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
  • totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)

    How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    Example:

    none
  • 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. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    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"
    

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",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Staff slip",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "description": "Staff slip name",
            "type": "string"
          },
          "description": {
            "description": "Staff slip description",
            "type": "string"
          },
          "active": {
            "description": "Flag that indicates whether staff slip is active",
            "type": "boolean"
          },
          "isRawHtml": {
            "description": "Flag that indicates whether staff slip should be maintained as raw HTML rather than using the WYSIWYG editor. This has no implications for the back-end code, as is merely a note from the UI to itself.",
            "type": "boolean"
          },
          "template": {
            "description": "Staff slip template",
            "type": "string"
          },
          "metadata": {
            "readonly": true,
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "metadata.schema",
            "title": "Metadata Schema",
            "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
            "type": "object",
            "properties": {
              "createdDate": {
                "description": "Date and time when the record was created",
                "type": "string",
                "format": "date-time"
              },
              "createdByUserId": {
                "description": "ID of the user who created the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "createdByUsername": {
                "description": "Username of the user who created the record (when available)",
                "type": "string"
              },
              "updatedDate": {
                "description": "Date and time when the record was last updated",
                "type": "string",
                "format": "date-time"
              },
              "updatedByUserId": {
                "description": "ID of the user who last updated the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "updatedByUsername": {
                "description": "Username of the user who last updated the record (when available)",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "createdDate"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "name",
          "template"
        ]
      }
    },
    "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
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Staff slip",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "description": "Staff slip name",
      "type": "string"
    },
    "description": {
      "description": "Staff slip description",
      "type": "string"
    },
    "active": {
      "description": "Flag that indicates whether staff slip is active",
      "type": "boolean"
    },
    "isRawHtml": {
      "description": "Flag that indicates whether staff slip should be maintained as raw HTML rather than using the WYSIWYG editor. This has no implications for the back-end code, as is merely a note from the UI to itself.",
      "type": "boolean"
    },
    "template": {
      "description": "Staff slip template",
      "type": "string"
    },
    "metadata": {
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "type": "object",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "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

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)

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",
  "description": "Staff slip",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "description": "Staff slip name",
      "type": "string"
    },
    "description": {
      "description": "Staff slip description",
      "type": "string"
    },
    "active": {
      "description": "Flag that indicates whether staff slip is active",
      "type": "boolean"
    },
    "isRawHtml": {
      "description": "Flag that indicates whether staff slip should be maintained as raw HTML rather than using the WYSIWYG editor. This has no implications for the back-end code, as is merely a note from the UI to itself.",
      "type": "boolean"
    },
    "template": {
      "description": "Staff slip template",
      "type": "string"
    },
    "metadata": {
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "type": "object",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "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)

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)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Staff slip",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "description": "Staff slip name",
      "type": "string"
    },
    "description": {
      "description": "Staff slip description",
      "type": "string"
    },
    "active": {
      "description": "Flag that indicates whether staff slip is active",
      "type": "boolean"
    },
    "isRawHtml": {
      "description": "Flag that indicates whether staff slip should be maintained as raw HTML rather than using the WYSIWYG editor. This has no implications for the back-end code, as is merely a note from the UI to itself.",
      "type": "boolean"
    },
    "template": {
      "description": "Staff slip template",
      "type": "string"
    },
    "metadata": {
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "type": "object",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "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 409

Optimistic locking version conflict

Body

Media type: text/plain

Type: any

Example:

version conflict

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