foliolib.folio.api.circulationStorage.StaffSlips
- class foliolib.folio.api.circulationStorage.StaffSlips(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiStaff Slips Storage API
Storage for staff slips
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_staffSlip(staffSlipId)Delete staffSlip item with given {staffSlipId}
DELETE /staff-slips-storage/staff-slipsget_staffSlip(staffSlipId)Retrieve staffSlip item with given {staffSlipId}
get_staffSlips(**kwargs)Retrieve a list of staffSlip items.
modify_staffSlip(staffSlipId, staffSlip)Update staffSlip item with given {staffSlipId}
set_staffSlip(staffSlip)Create a new staffSlip item.
- delete_staffSlip(staffSlipId: str)
Delete staffSlip item with given {staffSlipId}
DELETE /staff-slips-storage/staff-slips/{staffSlipId}- Parameters
staffSlipId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
OkapiFatalError – Server Error
- delete_staffSlips()
DELETE /staff-slips-storage/staff-slips
- get_staffSlip(staffSlipId: str)
Retrieve staffSlip item with given {staffSlipId}
GET /staff-slips-storage/staff-slips/{staffSlipId}- Parameters
staffSlipId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
OkapiFatalError – Server Error
Schema
{ "$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" ] }
- get_staffSlips(**kwargs)
Retrieve a list of staffSlip items.
GET /staff-slips-storage/staff-slips- Parameters
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
offset (int) –
(default=0) Skip over a number of elements by specifying an offset value for the query
Example
0
limit (int) –
(default=10) Limit the number of elements returned in the response
Example
10
query (str) –
A query expressed as a CQL string (see [dev.folio.org/reference/glossary#cql](https://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”
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
OkapiFatalError – Server Error
Schema
{ "$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" ] }
- modify_staffSlip(staffSlipId: str, staffSlip: dict)
Update staffSlip item with given {staffSlipId}
PUT /staff-slips-storage/staff-slips/{staffSlipId}- Parameters
staffSlipId (str) –
staffSlip (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestConflict – Conflict
OkapiFatalError – Server Error
OkapiFatalError – Server Error
Schema
{ "$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" ] }
- set_staffSlip(staffSlip: dict)
Create a new staffSlip item.
POST /staff-slips-storage/staff-slips- Parameters
staffSlip (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
OkapiFatalError – Server Error
Headers
Location - URI to the created staffSlip item
Schema
{ "$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" ] }