foliolib.folio.api.inventoryStorage.IllPolicy
- class foliolib.folio.api.inventoryStorage.IllPolicy(tenant: str)
Bases:
foliolib.folio.FolioApiILL policy API
This documents the API calls that can be made to query and manage ILL policies of the system
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
Methods
delete_illPolicy(illPoliciesId)Delete illPolicy item with given {illPolicyId}
get_illPolicies(**kwargs)Return a list of ILL policy types
get_illPolicy(illPoliciesId)Retrieve illPolicy item with given {illPolicyId}
modify_illPolicy(illPoliciesId, illPolicy)Update illPolicy item with given {illPolicyId}
set_illPolicy(illPolicy)Create a new ILL policy
- delete_illPolicy(illPoliciesId: str)
Delete illPolicy item with given {illPolicyId}
DELETE /ill-policies/{illPoliciesId}- Parameters
illPoliciesId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestFatalError – Server Error
- get_illPolicies(**kwargs)
Return a list of ILL policy types
GET /ill-policies- Parameters
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
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.
with valid searchable fields
Example
(username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode
name=aaa
totalRecords (str) –
(default=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 (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
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiRequestFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A collection of ILL policies", "type": "object", "properties": { "illPolicies": { "description": "List of ILL policies", "id": "illPolicy", "type": "array", "items": { "type": "object", "$ref": "illpolicy.json" } }, "totalRecords": { "description": "Estimated or exact total number of records", "type": "integer" } }, "required": [ "illPolicies", "totalRecords" ] }
- get_illPolicy(illPoliciesId: str)
Retrieve illPolicy item with given {illPolicyId}
GET /ill-policies/{illPoliciesId}- Parameters
illPoliciesId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "An ILL policy", "type": "object", "properties": { "id": { "type": "string", "description": "unique ID of the ILL policy; UUID" }, "name": { "type": "string", "description": "name of the policy" }, "source": { "type": "string", "description": "label indicating where the ILL policy entry originates from, i.e. 'folio' or 'local'" }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "name", "source" ] }
- modify_illPolicy(illPoliciesId: str, illPolicy: dict)
Update illPolicy item with given {illPolicyId}
PUT /ill-policies/{illPoliciesId}- Parameters
illPoliciesId (str) –
illPolicy (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestConflict – Conflict
OkapiRequestFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "An ILL policy", "type": "object", "properties": { "id": { "type": "string", "description": "unique ID of the ILL policy; UUID" }, "name": { "type": "string", "description": "name of the policy" }, "source": { "type": "string", "description": "label indicating where the ILL policy entry originates from, i.e. 'folio' or 'local'" }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "name", "source" ] }
- set_illPolicy(illPolicy: dict)
Create a new ILL policy
POST /ill-policies- Parameters
illPolicy (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiRequestFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Headers
Location - URI to the created illPolicy item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "An ILL policy", "type": "object", "properties": { "id": { "type": "string", "description": "unique ID of the ILL policy; UUID" }, "name": { "type": "string", "description": "name of the policy" }, "source": { "type": "string", "description": "label indicating where the ILL policy entry originates from, i.e. 'folio' or 'local'" }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "name", "source" ] }