foliolib.folio.api.remoteStorage.Remotestorage
- class foliolib.folio.api.remoteStorage.Remotestorage(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiRemote storages API
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
Check-in the item in the primary service by barcode value
Check-in the item in the primary service by barcode value
deleteconfigurationbyid(configId)DELETE /remote-storage/configurations/{configId}deletemappingbyid(folioLocationId)DELETE /remote-storage/mappings/{folioLocationId}deleteoriginallocationbyremotestorageconfigurationidandoriginallocationid(...)DELETE /remote-storage/extended-mappings/{remoteStorageConfigurationId}/{originalLocationId}getaccessions(**kwargs)Get a list of accession records
getconfigurationbyid(configId)GET /remote-storage/configurations/{configId}getconfigurations(**kwargs)Get a list of remote storage configurations
Get a list of location mappings
GET /remote-storage/extended-mappings/{finalLocationId}getextendedremotelocationconfigurationmappingslocations(...)Get a list of location mappings
getmappingbyid(folioLocationId)GET /remote-storage/mappings/{folioLocationId}getmappings(**kwargs)Get a list of location mappings
Get a list of providers
getretrievals(**kwargs)Get a list of retrieval records
logrecordevent(pubSubEvent)POST /remote-storage/pub-sub-handlers/log-record-eventmarkitemasmissingbybarcode(barcode)Mark item as missing
postaccession(accessionRequest)Perform remote storage initiated accession
postconfiguration(storageConfiguration)Add new remote storage configuration
Add/update a mapping between remote and Folio locations
postmapping(remoteLocationConfigurationMapping)Add/update a mapping between remote and Folio locations
putconfiguration(storageConfiguration, configId)Change the remote storage configuration
returnitembybarcode(...)Return the item by barcode
setaccessionedbybarcode(barcode)Set accessioned date by item barcode
setaccessionedbyid(accessionId)Set accessioned date by accession queue id
setretrievedbybarcode(barcode)Set retrieved date by item barcode
setretrievedbyid(retrievalId)Set retrieval date by retrieval queue id
- checkinitembybarcodewithremotestorageconfigurationid(remoteStorageConfigurationId, checkInItem)
Check-in the item in the primary service by barcode value
POST /remote-storage/retrieve/{remoteStorageConfigurationId}/checkInItem- Parameters
remoteStorageConfigurationId (str) – uuid
checkInItem (dict) – See Schema below.
- Raises
OkapiRequestError – Bad request
OkapiRequestUnprocessableEntity – Validation errors
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Value of item's barcode to check in an item at service points", "properties": { "itemBarcode": { "description": "Barcode of the item to be checked in", "type": "string" } }, "additionalProperties": false, "required": [ "itemBarcode" ] }
- checkinitembyholdidwithremotestorageconfigurationid(remoteStorageConfigurationId, checkInItemByHoldId)
Check-in the item in the primary service by barcode value
POST /remote-storage/retrieve/{remoteStorageConfigurationId}/checkInItemByHoldId- Parameters
remoteStorageConfigurationId (str) –
checkInItemByHoldId (dict) – See Schema below.
- Raises
OkapiRequestError – Bad request
OkapiRequestUnprocessableEntity – Validation errors
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Value of request's id for which item should be checked in at service points", "properties": { "holdId": { "description": "Id of request (hold) for which item should be checked in", "$ref": "uuid.json" } }, "additionalProperties": false, "required": [ "holdId" ] }
- deleteconfigurationbyid(configId)
DELETE /remote-storage/configurations/{configId}- Raises
OkapiRequestNotFound – Configuration not found
OkapiFatalError – Internal server error
- deletemappingbyid(folioLocationId)
DELETE /remote-storage/mappings/{folioLocationId}- Raises
OkapiRequestNotFound – Mapping not found
OkapiFatalError – Internal server error
- deleteoriginallocationbyremotestorageconfigurationidandoriginallocationid(remoteStorageConfigurationId, originalLocationId)
DELETE /remote-storage/extended-mappings/{remoteStorageConfigurationId}/{originalLocationId}- Parameters
remoteStorageConfigurationId (str) – uuid
originalLocationId (str) – uuid
- Raises
OkapiRequestNotFound – Mapping not found
OkapiFatalError – Internal server error
- getaccessions(**kwargs)
Get a list of accession records
GET /remote-storage/accessions- Keyword Arguments
accessioned (bool) – Flag to indicate, that accession queue record was accessioned and has accesion date
storageId (str) – Remote storage id
createdDate (str) – Date of accession queue record creation
offset (int) – Skip over a number of elements by specifying an offset value for the query (default: 0, minimum: 0, maximum: 2147483647)
limit (int) – Limit the number of elements returned in the response (default: 10, minimum: 0, maximum: 2147483647)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiFatalError – Internal server error
Schema
{ "allOf": [ { "$ref": "schemas/baseCollection.json" }, { "type": "object", "properties": { "accessions": { "type": "array", "items": { "$ref": "#/components/schemas/accessionQueue" } } } } ] }
- getconfigurationbyid(configId)
GET /remote-storage/configurations/{configId}- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestNotFound – Configuration not found
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Remote storage configuration", "type": "object", "properties": { "id": { "description": "configuration id", "$ref": "uuid.json" }, "name": { "description": "configuration name", "type": "string" }, "apiKey": { "description": "remote storage apiKey", "type": "string" }, "providerName": { "description": "remote storage provider name", "type": "string" }, "url": { "description": "remote storage url", "type": "string" }, "statusUrl": { "description": "remote storage url", "type": "string" }, "accessionDelay": { "description": "accession schedule delay", "type": "integer", "minimum": 1 }, "accessionTimeUnit": { "description": "accession schedule time unit", "type": "object", "$ref": "timeUnits.json" }, "accessionWorkflowDetails": { "description": "accession workflow details", "type": "object", "$ref": "accessionWorkflowDetails.json" }, "returningWorkflowDetails": { "description": "return workflow details", "type": "object", "$ref": "returningWorkflowDetails.json" }, "metadata": { "description": "Entity metadata", "type": "object", "$ref": "metadata.json" } }, "additionalProperties": false, "required": [ "name", "providerName" ] }
- getconfigurations(**kwargs)
Get a list of remote storage configurations
GET /remote-storage/configurations- Keyword Arguments
offset (int) – Skip over a number of elements by specifying an offset value for the query (default: 0, minimum: 0, maximum: 2147483647)
limit (int) – Limit the number of elements returned in the response (default: 10, minimum: 0, maximum: 2147483647)
query (str) – A query string to filter rules based on matching criteria in fields.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiFatalError – Internal server error
Schema
{ "allOf": [ { "$ref": "schemas/baseCollection.json" }, { "type": "object", "properties": { "configurations": { "type": "array", "items": { "$ref": "#/components/schemas/storageConfiguration" } } }, "required": [ "configurations" ] } ] }
- getextendedremotelocationconfigurationmappings(**kwargs)
Get a list of location mappings
GET /remote-storage/extended-mappings- Keyword Arguments
finalLocationId (str) – Final location id
remoteStorageConfigurationId (str) – Remote storage configuration id
originalLocationId (str) – Original location id
offset (int) – Skip over a number of elements by specifying an offset value for the query (default: 0, minimum: 0, maximum: 2147483647)
limit (int) – Limit the number of elements returned in the response (default: 10, minimum: 0, maximum: 2147483647)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiFatalError – Internal server error
Schema
{ "allOf": [ { "$ref": "schemas/baseCollection.json" }, { "type": "object", "properties": { "mappings": { "type": "array", "items": { "$ref": "#/components/schemas/extendedRemoteLocationConfigurationMapping" } } }, "required": [ "mappings" ] } ] }
- getextendedremotelocationconfigurationmappingsbyid(finalLocationId)
GET /remote-storage/extended-mappings/{finalLocationId}- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestNotFound – Mapping not found
OkapiFatalError – Internal server error
Schema
{ "allOf": [ { "$ref": "schemas/baseCollection.json" }, { "type": "object", "properties": { "mappings": { "type": "array", "items": { "$ref": "#/components/schemas/extendedRemoteLocationConfigurationMapping" } } }, "required": [ "mappings" ] } ] }
- getextendedremotelocationconfigurationmappingslocations(**kwargs)
Get a list of location mappings
GET /remote-storage/extended-mappings/locations- Keyword Arguments
remoteStorageConfigurationId (str) – Remote storage configuration id
offset (int) – Skip over a number of elements by specifying an offset value for the query (default: 0, minimum: 0, maximum: 2147483647)
limit (int) – Limit the number of elements returned in the response (default: 10, minimum: 0, maximum: 2147483647)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiFatalError – Internal server error
Schema
{ "allOf": [ { "$ref": "schemas/baseCollection.json" }, { "type": "object", "properties": { "mappings": { "type": "array", "items": { "$ref": "#/components/schemas/extendedRemoteLocationConfigurationMapping" } } }, "required": [ "mappings" ] } ] }
- getmappingbyid(folioLocationId)
GET /remote-storage/mappings/{folioLocationId}- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestNotFound – Mapping not found
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Mapping between remote and Folio locations", "type": "object", "properties": { "folioLocationId": { "description": "Folio location id", "$ref": "uuid.json" }, "configurationId": { "description": "Remote storage configuration id", "$ref": "uuid.json" } }, "additionalProperties": false, "required": [ "folioLocationId", "configurationId" ] }
- getmappings(**kwargs)
Get a list of location mappings
GET /remote-storage/mappings- Keyword Arguments
finalLocationId (str) – Final location id
remoteStorageConfigurationId (str) – Remote storage configuration id
offset (int) – Skip over a number of elements by specifying an offset value for the query (default: 0, minimum: 0, maximum: 2147483647)
limit (int) – Limit the number of elements returned in the response (default: 10, minimum: 0, maximum: 2147483647)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiFatalError – Internal server error
Schema
{ "allOf": [ { "$ref": "schemas/baseCollection.json" }, { "type": "object", "properties": { "mappings": { "type": "array", "items": { "$ref": "#/components/schemas/remoteLocationConfigurationMapping" } } }, "required": [ "mappings" ] } ] }
- getproviders()
Get a list of providers
GET /remote-storage/providers- Returns
See Schema below.
- Return type
dict
- Raises
OkapiFatalError – Internal server error
Schema
{ "type": "array", "items": { "$ref": "schemas/provider.json" } }
- getretrievals(**kwargs)
Get a list of retrieval records
GET /remote-storage/retrievals- Keyword Arguments
retrieved (bool) – Flag to indicate, that retrievals queue record was retrieved and has retrievals date
storageId (str) – Remote storage id
createdDate (str) – Date of accession queue record creation
offset (int) – Skip over a number of elements by specifying an offset value for the query (default: 0, minimum: 0, maximum: 2147483647)
limit (int) – Limit the number of elements returned in the response (default: 10, minimum: 0, maximum: 2147483647)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiFatalError – Internal server error
Schema
{ "allOf": [ { "$ref": "schemas/baseCollection.json" }, { "type": "object", "properties": { "retrievals": { "type": "array", "items": { "$ref": "#/components/schemas/retrievalQueue" } } } } ] }
- logrecordevent(pubSubEvent)
POST /remote-storage/pub-sub-handlers/log-record-event- Parameters
pubSubEvent (dict) – See Schema below.
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Event data model", "type": "object", "additionalProperties": false, "properties": { "logEventType": { "description": "A payload for the log record event", "type": "string" }, "payload": { "description": "A payload for the log record event", "type": "object" }, "itemBarcode": { "description": "An item barcode (for check in log record event)", "type": "string" } }, "required": [ "logEventType" ] }
- markitemasmissingbybarcode(barcode)
Mark item as missing
POST /remote-storage/items/barcode/{barcode}/markAsMissing- Parameters
barcode (str) –
- Raises
OkapiRequestError – Bad request
OkapiFatalError – Internal server error
- postaccession(accessionRequest)
Perform remote storage initiated accession
POST /remote-storage/accessions- Parameters
accessionRequest (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestUnprocessableEntity – Validation errors
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Accession request body", "properties": { "itemBarcode": { "description": "Barcode of the item to be accessioned", "type": "string" }, "remoteStorageId": { "description": "Remote storage id", "$ref": "uuid.json" } }, "additionalProperties": false, "required": [ "itemBarcode", "remoteStorageId" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Accession queue", "properties": { "id": { "description": "Accession queue id", "$ref": "uuid.json" }, "itemBarcode": { "description": "Accession queue name", "type": "string" }, "createdDateTime": { "description": "Created Date", "type": "string", "format": "date-time" }, "accessionedDateTime": { "description": "Accessioned Date", "type": "string", "format": "date-time" }, "remoteStorageId": { "description": "Remote storage id", "$ref": "uuid.json" }, "callNumber": { "description": "Call number", "type": "string" }, "instanceTitle": { "description": "Instance title", "type": "string" }, "instanceAuthor": { "description": "Instance author", "type": "string" }, "instanceContributors": { "description": "Instance contributors", "type": "string" }, "publisher": { "description": "Instance publisher", "type": "string" }, "publishYear": { "description": "Year of publication", "type": "string" }, "publishPlace": { "description": "Place of publication", "type": "string" }, "volume": { "description": "Volume", "type": "string" }, "enumeration": { "description": "Enumeration", "type": "string" }, "chronology": { "description": "Chronology", "type": "string" }, "issn": { "description": "ISSN identifier", "type": "string" }, "isbn": { "description": "ISBN identifier", "type": "string" }, "oclc": { "description": "OCLC identifier", "type": "string" }, "physicalDescription": { "description": "Physical description", "type": "string" }, "materialType": { "description": "Material type", "type": "string" }, "copyNumber": { "description": "Copy number", "type": "string" }, "permanentLocationId": { "description": "Permanent location id", "$ref": "uuid.json" }, "notes": { "description": "Accession queue notes", "type": "array", "items": { "description": "Accession queue note", "type": "object", "$ref": "accessionQueueNote.json" } }, "metadata": { "description": "Entity metadata", "type": "object", "$ref": "metadata.json" } }, "additionalProperties": false, "required": [] }
- postconfiguration(storageConfiguration)
Add new remote storage configuration
POST /remote-storage/configurations- Parameters
storageConfiguration (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestUnprocessableEntity – Validation errors
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Remote storage configuration", "type": "object", "properties": { "id": { "description": "configuration id", "$ref": "uuid.json" }, "name": { "description": "configuration name", "type": "string" }, "apiKey": { "description": "remote storage apiKey", "type": "string" }, "providerName": { "description": "remote storage provider name", "type": "string" }, "url": { "description": "remote storage url", "type": "string" }, "statusUrl": { "description": "remote storage url", "type": "string" }, "accessionDelay": { "description": "accession schedule delay", "type": "integer", "minimum": 1 }, "accessionTimeUnit": { "description": "accession schedule time unit", "type": "object", "$ref": "timeUnits.json" }, "accessionWorkflowDetails": { "description": "accession workflow details", "type": "object", "$ref": "accessionWorkflowDetails.json" }, "returningWorkflowDetails": { "description": "return workflow details", "type": "object", "$ref": "returningWorkflowDetails.json" }, "metadata": { "description": "Entity metadata", "type": "object", "$ref": "metadata.json" } }, "additionalProperties": false, "required": [ "name", "providerName" ] }
- postextendedremotelocationconfigurationmapping(extendedRemoteLocationConfigurationMapping)
Add/update a mapping between remote and Folio locations
POST /remote-storage/extended-mappings- Parameters
extendedRemoteLocationConfigurationMapping (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestUnprocessableEntity – Validation errors
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Mapping between remote and Folio locations with original location", "type": "object", "properties": { "finalLocationId": { "description": "Final location id", "$ref": "uuid.json" }, "remoteConfigurationId": { "description": "Remote storage configuration id", "$ref": "uuid.json" }, "originalLocationId": { "description": "Original location id", "$ref": "uuid.json" } }, "additionalProperties": false, "required": [ "finalLocationId", "remoteConfigurationId", "originalLocationId" ] }
- postmapping(remoteLocationConfigurationMapping)
Add/update a mapping between remote and Folio locations
POST /remote-storage/mappings- Parameters
remoteLocationConfigurationMapping (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestUnprocessableEntity – Validation errors
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Mapping between remote and Folio locations", "type": "object", "properties": { "folioLocationId": { "description": "Folio location id", "$ref": "uuid.json" }, "configurationId": { "description": "Remote storage configuration id", "$ref": "uuid.json" } }, "additionalProperties": false, "required": [ "folioLocationId", "configurationId" ] }
- putconfiguration(storageConfiguration, configId)
Change the remote storage configuration
PUT /remote-storage/configurations/{configId}- Parameters
storageConfiguration (dict) – See Schema below.
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Configuration not found
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Remote storage configuration", "type": "object", "properties": { "id": { "description": "configuration id", "$ref": "uuid.json" }, "name": { "description": "configuration name", "type": "string" }, "apiKey": { "description": "remote storage apiKey", "type": "string" }, "providerName": { "description": "remote storage provider name", "type": "string" }, "url": { "description": "remote storage url", "type": "string" }, "statusUrl": { "description": "remote storage url", "type": "string" }, "accessionDelay": { "description": "accession schedule delay", "type": "integer", "minimum": 1 }, "accessionTimeUnit": { "description": "accession schedule time unit", "type": "object", "$ref": "timeUnits.json" }, "accessionWorkflowDetails": { "description": "accession workflow details", "type": "object", "$ref": "accessionWorkflowDetails.json" }, "returningWorkflowDetails": { "description": "return workflow details", "type": "object", "$ref": "returningWorkflowDetails.json" }, "metadata": { "description": "Entity metadata", "type": "object", "$ref": "metadata.json" } }, "additionalProperties": false, "required": [ "name", "providerName" ] }
- returnitembybarcode(remoteStorageConfigurationId, checkInItem)
Return the item by barcode
POST /remote-storage/return/{remoteStorageConfigurationId}- Parameters
remoteStorageConfigurationId (str) –
checkInItem (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Value of item's barcode to check in an item at service points", "properties": { "itemBarcode": { "description": "Barcode of the item to be checked in", "type": "string" } }, "additionalProperties": false, "required": [ "itemBarcode" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Value of item's barcode to check in an item at service points", "properties": { "isHoldRecallRequestExist": { "description": "Barcode of the item to be checked in", "type": "boolean", "default": "false" } }, "additionalProperties": false, "required": [ "isHoldRecallRequestExist" ] }
- setaccessionedbybarcode(barcode)
Set accessioned date by item barcode
PUT /remote-storage/accessions/barcode/{barcode}- Parameters
barcode (str) –
- setaccessionedbyid(accessionId)
Set accessioned date by accession queue id
PUT /remote-storage/accessions/id/{accessionId}- Parameters
accessionId (str) – uuid
- setretrievedbybarcode(barcode)
Set retrieved date by item barcode
PUT /remote-storage/retrievals/barcode/{barcode}- Parameters
barcode (str) –
- setretrievedbyid(retrievalId)
Set retrieval date by retrieval queue id
PUT /remote-storage/retrievals/id/{retrievalId}- Parameters
retrievalId (str) – uuid