foliolib.folio.api.batchPrint.BatchPrint
- class foliolib.folio.api.batchPrint.BatchPrint(tenant: str)
Bases:
foliolib.folio.FolioApiBatch printing
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
Methods
Send mail to create print entry.
deleteprintentries(**kwargs)Delete batch printing entries by comma separated IDs.
deleteprintentry(id_)Delete print entry.
getprintentries(**kwargs)Get batch printing entries with optional CQL query.
getprintentry(id_)Get print entry by id.
postprintentry(entry)Create print entry.
savemail(messageRequest)Send mail to create print entry.
updateprintentry(entry, id_)Update print entry.
- createbatch()
Send mail to create print entry. X-Okapi-Permissions must include batch-print.print.write
POST /print/batch-creation- Raises
OkapiRequestError – Bad request
OkapiRequestForbidden – Forbidden
OkapiRequestFatalError – Internal error
- deleteprintentries(**kwargs)
Delete batch printing entries by comma separated IDs. X-Okapi-Permissions must include batch-print.entries.collection.delete
DELETE /print/entries- Keyword Arguments
ids (str) – Comma seperated IDs of items
- Raises
OkapiRequestError – Bad request
OkapiRequestFatalError – Internal error
- deleteprintentry(id_)
Delete print entry. X-Okapi-Permissions must include batch-print.entries.item.delete
DELETE /print/entries/{id}- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Not Found
OkapiRequestFatalError – Internal error
- getprintentries(**kwargs)
Get batch printing entries with optional CQL query. X-Okapi-Permissions must include batch-print.entries.collection.get
GET /print/entries- Keyword Arguments
limit (int) – Limit the number of elements returned in the response (default: 10, minimum: 0)
offset (int) – Skip over number of elements (default is first element) (default: 0, minimum: 0)
query (str) – CQL query
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Not Found
OkapiRequestFatalError – Internal error
Schema
{ "description": "Print entries response", "type": "object", "properties": { "items": { "description": "List of print entries", "type": "array", "items": { "description": "Print entry", "type": "object", "properties": { "id": { "description": "Identifier", "type": "string", "format": "uuid" }, "created": { "type": "string", "description": "Creation date time" }, "type": { "type": "string", "description": "Print entry type" }, "sortingField": { "type": "string", "description": "Print entry sorting field" }, "content": { "type": "string", "description": "Print entry content" } }, "additionalProperties": false, "required": [ "id", "created", "type", "content" ] } }, "resultInfo": { "description": "Common result set information for streaming response", "type": "object", "properties": { "totalRecords": { "description": "Total number of entries in response", "type": "integer" }, "diagnostics": { "description": "Diagnostics for response", "type": "array", "items": { "type": "object", "properties": { "message": { "description": "single diagnostic message", "type": "string" } } } }, "facets": { "type": "array", "description": "Array of facets", "items": { "type": "object", "description": "A facet", "properties": { "facetValues": { "type": "array", "description": "Array of facet values", "items": { "type": "object", "description": "A facet value", "properties": { "count": { "type": "integer", "description": "Count of facet values" }, "value": { "description": "Value Object" } } } }, "type": { "type": "string", "description": "Type of facet" } } } } }, "additionalProperties": false } }, "additionalProperties": false, "required": [ "items" ] }
- getprintentry(id_)
Get print entry by id. X-Okapi-Permissions must include batch-print.entries.item.get
GET /print/entries/{id}- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestForbidden – Forbidden
OkapiRequestNotFound – Not Found
OkapiRequestFatalError – Internal error
Schema
{ "description": "Print entry", "type": "object", "properties": { "id": { "description": "Identifier", "type": "string", "format": "uuid" }, "created": { "type": "string", "description": "Creation date time" }, "type": { "type": "string", "description": "Print entry type" }, "sortingField": { "type": "string", "description": "Print entry sorting field" }, "content": { "type": "string", "description": "Print entry content" } }, "additionalProperties": false, "required": [ "id", "created", "type", "content" ] }
- postprintentry(entry)
Create print entry. X-Okapi-Permissions must include batch-print.entries.item.post
POST /print/entries- Parameters
entry (dict) – See Schema below.
- Raises
OkapiRequestError – Bad request
OkapiRequestForbidden – Forbidden
OkapiRequestPayloadToLarge – Payload Too Large
OkapiRequestFatalError – Internal error
Schema
{ "description": "Print entry", "type": "object", "properties": { "id": { "description": "Identifier", "type": "string", "format": "uuid" }, "created": { "type": "string", "description": "Creation date time" }, "type": { "type": "string", "description": "Print entry type" }, "sortingField": { "type": "string", "description": "Print entry sorting field" }, "content": { "type": "string", "description": "Print entry content" } }, "additionalProperties": false, "required": [ "id", "created", "type", "content" ] }
- savemail(messageRequest)
Send mail to create print entry. X-Okapi-Permissions must include batch-print.entries.mail.post
POST /mail- Parameters
messageRequest (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestForbidden – Forbidden
OkapiRequestFatalError – Internal error
Schema
{ "description": "The mail message that can be sent via mail", "title": "Mail Entity Schema", "type": "object", "properties": { "notificationId": { "description": "notification ID", "type": "string" }, "from": { "description": "sender's address", "type": "string" }, "to": { "description": "receiver's address", "type": "string" }, "outputFormat": { "description": "format type: `text/html` or `text/plain`", "type": "string" }, "body": { "description": "text of email", "type": "string" } }, "additionalProperties": true, "required": [ "body" ] }
{ "description": "Mail message response", "type": "object", "properties": { "id": { "description": "Identifier", "type": "string", "format": "uuid" } }, "additionalProperties": true, "required": [ "id" ] }
- updateprintentry(entry, id_)
Update print entry. X-Okapi-Permissions must include batch-print.entries.item.put
PUT /print/entries/{id}- Parameters
entry (dict) – See Schema below.
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Not Found
OkapiRequestFatalError – Internal error
Schema
{ "description": "Print entry", "type": "object", "properties": { "id": { "description": "Identifier", "type": "string", "format": "uuid" }, "created": { "type": "string", "description": "Creation date time" }, "type": { "type": "string", "description": "Print entry type" }, "sortingField": { "type": "string", "description": "Print entry sorting field" }, "content": { "type": "string", "description": "Print entry content" } }, "additionalProperties": false, "required": [ "id", "created", "type", "content" ] }