foliolib.folio.api.patronBlocks.PatronBlockLimits
- class foliolib.folio.api.patronBlocks.PatronBlockLimits(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApimod-users Patron Block Limits API
This documents the API calls that can be made to query and manage patron block limits
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_patronBlockLimit(patronBlockLimitId)Delete patronBlockLimit item with given {patronBlockLimitId}
get_patronBlockLimit(patronBlockLimitId)Retrieve patronBlockLimit item with given {patronBlockLimitId}
get_patronBlockLimits(**kwargs)Return a list of patron block limits
modify_patronBlockLimit(patronBlockLimitId, ...)Update a patron block limit
set_patronBlockLimit(patronBlockLimit)Create a patron block limit
- delete_patronBlockLimit(patronBlockLimitId: str)
Delete patronBlockLimit item with given {patronBlockLimitId}
DELETE /patron-block-limits/{patronBlockLimitId}- Parameters
patronBlockLimitId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
- get_patronBlockLimit(patronBlockLimitId: str)
Retrieve patronBlockLimit item with given {patronBlockLimitId}
GET /patron-block-limits/{patronBlockLimitId}- Parameters
patronBlockLimitId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Patron block limits schema", "properties": { "id": { "type": "string", "description": "A UUID identifying the limit", "$ref": "raml-util/schemas/uuid.schema" }, "patronGroupId": { "type": "string", "description": "A UUID identifying the patron group", "$ref": "raml-util/schemas/uuid.schema" }, "conditionId": { "type": "string", "description": "A UUID identifying the condition", "$ref": "raml-util/schemas/uuid.schema" }, "value": { "type": "number", "description": "Limit value" }, "metadata": { "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "required": [ "id", "patronGroupId", "conditionId", "value" ] }
- get_patronBlockLimits(**kwargs)
Return a list of patron block limits
GET /patron-block-limits- 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.
searchable using CQL
Example
(username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode
name=”undergrad*”
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Collection of available patron block limits", "type": "object", "properties": { "patronBlockLimits": { "description": "List of available patron block limits", "id": "patronBlockLimits", "type": "array", "items": { "type": "object", "$ref": "patron-block-limit.json" } }, "totalRecords": { "type": "integer" } }, "additionalProperties": false, "required": [ "patronBlockLimits", "totalRecords" ] }
- modify_patronBlockLimit(patronBlockLimitId: str, patronBlockLimit: dict)
Update a patron block limit
PUT /patron-block-limits/{patronBlockLimitId}- Parameters
patronBlockLimitId (str) –
patronBlockLimit (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Patron block limits schema", "properties": { "id": { "type": "string", "description": "A UUID identifying the limit", "$ref": "raml-util/schemas/uuid.schema" }, "patronGroupId": { "type": "string", "description": "A UUID identifying the patron group", "$ref": "raml-util/schemas/uuid.schema" }, "conditionId": { "type": "string", "description": "A UUID identifying the condition", "$ref": "raml-util/schemas/uuid.schema" }, "value": { "type": "number", "description": "Limit value" }, "metadata": { "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "required": [ "id", "patronGroupId", "conditionId", "value" ] }
- set_patronBlockLimit(patronBlockLimit: dict)
Create a patron block limit
POST /patron-block-limits- Parameters
patronBlockLimit (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Headers
Location - URI to the created patronBlockLimit item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Patron block limits schema", "properties": { "id": { "type": "string", "description": "A UUID identifying the limit", "$ref": "raml-util/schemas/uuid.schema" }, "patronGroupId": { "type": "string", "description": "A UUID identifying the patron group", "$ref": "raml-util/schemas/uuid.schema" }, "conditionId": { "type": "string", "description": "A UUID identifying the condition", "$ref": "raml-util/schemas/uuid.schema" }, "value": { "type": "number", "description": "Limit value" }, "metadata": { "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "required": [ "id", "patronGroupId", "conditionId", "value" ] }