foliolib.folio.api.inventoryStorage.InstancePrecedingSucceedingTitles
- class foliolib.folio.api.inventoryStorage.InstancePrecedingSucceedingTitles(tenant: str)
Bases:
foliolib.folio.FolioApiPreceding/succeeding Titles API
Storage for preceding/succeeding titles in the inventory
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
Methods
Delete a preceding/succeeding title by id
Get a preceding/succeeding title by id
get_precedingSucceedingTitles(**kwargs)Return a list of preceding succeeding titles
modify_instance(instanceId, instance)Update preceding/succeeding titles related to the instance
Update a preceding/succeeding title by id
Create a new preceding/succeeding title
- delete_precedingSucceedingTitle(precedingSucceedingTitleId: str)
Delete a preceding/succeeding title by id
DELETE /preceding-succeeding-titles/{precedingSucceedingTitleId}- Parameters
precedingSucceedingTitleId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestFatalError – Server Error
- get_precedingSucceedingTitle(precedingSucceedingTitleId: str)
Get a preceding/succeeding title by id
GET /preceding-succeeding-titles/{precedingSucceedingTitleId}- Parameters
precedingSucceedingTitleId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A relationship of a given type between a super-instance and a sub-instance", "type": "object", "properties": { "id": { "description": "unique ID of the preceding-succeeding title", "type": "string", "$ref": "uuid.json" }, "precedingInstanceId": { "description": "ID (a UUID) of the preceding instance", "type": "string", "$ref": "uuid.json" }, "succeedingInstanceId": { "description": "ID (a UUID) of the succeeding instance", "type": "string", "$ref": "uuid.json" }, "title": { "type": "string", "description": "The primary title (or label) associated with the resource" }, "hrid": { "type": "string", "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID" }, "identifiers": { "type": "array", "description": "An extensible set of name-value pairs of identifiers associated with the resource", "minItems": 0, "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Resource identifier value" }, "identifierTypeId": { "type": "string", "description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)", "$ref": "uuid.json" } }, "additionalProperties": false, "required": [ "value", "identifierTypeId" ] } }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false }
- get_precedingSucceedingTitles(**kwargs)
Return a list of preceding succeeding titles
GET /preceding-succeeding-titles- Parameters
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
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
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 preceding instance ID or by succeeding instance ID (using CQL))
Example
(username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode
precedingInstanceId==83a50dc6-b887-43d9-93ee-28b2c4cd11f8 succeedingInstanceId==30fcc8e7-a019-43f4-b642-2edc389f4501
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiRequestFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A collection of InstanceRelationship records", "type": "object", "properties": { "precedingSucceedingTitles": { "description": "List of instance relationships", "id": "precedingSucceedingTitles", "type": "array", "items": { "type": "object", "$ref": "instanceprecedingsucceedingtitle.json" } }, "totalRecords": { "description": "Estimated or exact total number of records", "type": "integer" } }, "required": [ "precedingSucceedingTitles", "totalRecords" ] }
- modify_instance(instanceId: str, instance: dict)
Update preceding/succeeding titles related to the instance
PUT /preceding-succeeding-titles/instances/{instanceId}- Parameters
instanceId (str) –
instance (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A collection of InstanceRelationship records", "type": "object", "properties": { "precedingSucceedingTitles": { "description": "List of instance relationships", "id": "precedingSucceedingTitles", "type": "array", "items": { "type": "object", "$ref": "instanceprecedingsucceedingtitle.json" } }, "totalRecords": { "description": "Estimated or exact total number of records", "type": "integer" } }, "required": [ "precedingSucceedingTitles", "totalRecords" ] }
- modify_precedingSucceedingTitle(precedingSucceedingTitleId: str, precedingSucceedingTitle: dict)
Update a preceding/succeeding title by id
PUT /preceding-succeeding-titles/{precedingSucceedingTitleId}- Parameters
precedingSucceedingTitleId (str) –
precedingSucceedingTitle (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestConflict – Conflict
OkapiRequestFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiRequestUnprocessableEntity – Unprocessable Entity
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A relationship of a given type between a super-instance and a sub-instance", "type": "object", "properties": { "id": { "description": "unique ID of the preceding-succeeding title", "type": "string", "$ref": "uuid.json" }, "precedingInstanceId": { "description": "ID (a UUID) of the preceding instance", "type": "string", "$ref": "uuid.json" }, "succeedingInstanceId": { "description": "ID (a UUID) of the succeeding instance", "type": "string", "$ref": "uuid.json" }, "title": { "type": "string", "description": "The primary title (or label) associated with the resource" }, "hrid": { "type": "string", "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID" }, "identifiers": { "type": "array", "description": "An extensible set of name-value pairs of identifiers associated with the resource", "minItems": 0, "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Resource identifier value" }, "identifierTypeId": { "type": "string", "description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)", "$ref": "uuid.json" } }, "additionalProperties": false, "required": [ "value", "identifierTypeId" ] } }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false }
- set_precedingSucceedingTitle(precedingSucceedingTitle: dict)
Create a new preceding/succeeding title
POST /preceding-succeeding-titles- Parameters
precedingSucceedingTitle (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiRequestFatalError – Server Error
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiRequestUnprocessableEntity – Unprocessable Entity
Headers
Location - URI to the created precedingSucceedingTitle item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A relationship of a given type between a super-instance and a sub-instance", "type": "object", "properties": { "id": { "description": "unique ID of the preceding-succeeding title", "type": "string", "$ref": "uuid.json" }, "precedingInstanceId": { "description": "ID (a UUID) of the preceding instance", "type": "string", "$ref": "uuid.json" }, "succeedingInstanceId": { "description": "ID (a UUID) of the succeeding instance", "type": "string", "$ref": "uuid.json" }, "title": { "type": "string", "description": "The primary title (or label) associated with the resource" }, "hrid": { "type": "string", "description": "The human readable ID, also called eye readable ID. A system-assigned sequential ID which maps to the Instance ID" }, "identifiers": { "type": "array", "description": "An extensible set of name-value pairs of identifiers associated with the resource", "minItems": 0, "items": { "type": "object", "properties": { "value": { "type": "string", "description": "Resource identifier value" }, "identifierTypeId": { "type": "string", "description": "UUID of resource identifier type (e.g. ISBN, ISSN, LCCN, CODEN, Locally defined identifiers)", "$ref": "uuid.json" } }, "additionalProperties": false, "required": [ "value", "identifierTypeId" ] } }, "metadata": { "type": "object", "$ref": "raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false }