Staff Slips (v1.0)

http://localhost:9130

Table of contents

Staff Slips Storage API

Storage for staff slips

/staff-slips-storage

GET /staff-slips-storage/staff-slips

Retrieve a list of staff-slip items.

GET /staff-slips-storage/staff-slips
Query Parameters
  • offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)

    Skip over a number of elements by specifying an offset value for the query

    Example:

    0
  • limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)

    Limit the number of elements returned in the response

    Example:

    10
  • query: (string)

    A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.

    by using CQL

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    id="6406fd34-9ae3-46f8-aca3-bf07455635ea"
    
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of staff-slip items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of staffSlips",
  "type": "object",
  "properties": {
    "staffSlips": {
      "description": "List of staffSlip items",
      "id": "staffSlips",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "staff-slip.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "staffSlips",
    "totalRecords"
  ]
}

Example:

{
  "staffSlips": [
    {
      "id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
      "name": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
      "description": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
      "active": true,
      "template": "cf23adf0-61ba-4887-bf82-956c4aae2260"
    },
    {
      "id": "cf23adf0-61ba-4887-bf82-956c4aae2261",
      "name": "df7f4993-8c14-4a0f-ab63-93975ab01c77",
      "description": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
      "active": false,
      "template": "cf23adf0-61ba-4887-bf82-956c4aae2260"
    }
  ],
  "totalRecords": 2
}

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

unable to list staff-slips -- malformed parameter 'query', syntax error at column 6

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list staff-slips -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

Response 501

Not implemented yet

POST /staff-slips-storage/staff-slips

Create a new staff-slip item.

POST /staff-slips-storage/staff-slips
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "template": {
      "type": "string"
    },
    "metadata": {
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "template"
  ]
}

Example:

{
  "id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
  "name": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
  "description": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
  "active": true,
  "template": "cf23adf0-61ba-4887-bf82-956c4aae2260"
}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created staff-slip item

Body

Media type: application/json

Type: any

Example:

{
  "id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
  "name": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
  "description": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
  "active": true,
  "template": "cf23adf0-61ba-4887-bf82-956c4aae2260"
}

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to add staff-slip -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create staff-slips -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

Response 501

Not implemented yet

DELETE /staff-slips-storage/staff-slips

DELETE /staff-slips-storage/staff-slips
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

Response 501

Not implemented yet

GET /staff-slips-storage/staff-slips/{staffSlipId}

Retrieve staff-slip item with given {staff-slipId}

GET /staff-slips-storage/staff-slips/{staffSlipId}
URI Parameters
  • staffSlipId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns item with a given ID

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "template": {
      "type": "string"
    },
    "metadata": {
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "template"
  ]
}

Example:

{
  "id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
  "name": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
  "description": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
  "active": true,
  "template": "cf23adf0-61ba-4887-bf82-956c4aae2260"
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"staff-slip not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

Response 501

Not implemented yet

DELETE /staff-slips-storage/staff-slips/{staffSlipId}

Delete staff-slip item with given {staff-slipId}

DELETE /staff-slips-storage/staff-slips/{staffSlipId}
URI Parameters
  • staffSlipId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

Item deleted successfully

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to delete staff-slip -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"staff-slip not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

Response 501

Not implemented yet

PUT /staff-slips-storage/staff-slips/{staffSlipId}

Update staff-slip item with given {staff-slipId}

PUT /staff-slips-storage/staff-slips/{staffSlipId}
URI Parameters
  • staffSlipId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "active": {
      "type": "boolean"
    },
    "template": {
      "type": "string"
    },
    "metadata": {
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "name",
    "template"
  ]
}

Example:

{
  "id": "cf23adf0-61ba-4887-bf82-956c4aae2260",
  "name": "df7f4993-8c14-4a0f-ab63-93975ab01c76",
  "description": "346ad017-dac1-417d-9ed8-0ac7eeb886aa",
  "active": true,
  "template": "cf23adf0-61ba-4887-bf82-956c4aae2260"
}

Response 204

Item successfully updated

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to update staff-slip -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"staff-slip not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

Response 501

Not implemented yet