foliolib.folio.api.innReach.Contribution
- class foliolib.folio.api.innReach.Contribution(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiINN-Reach Contribution API
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
Cancel current INN-Reach contribution for the given central server
Get a list of Inn-Reach contributions for the given central server
getcurrentcontributionbyserverid(centralServerId)Get current INN-Reach contribution for the given central server
startinitialcontribution(centralServerId)Start initial contribution process
- cancelcurrentcontributionbyserverid(centralServerId)
Cancel current INN-Reach contribution for the given central server
DELETE /inn-reach/central-servers/{centralServerId}/contributions/current- Parameters
centralServerId (str) – (format: uuid)
- Raises
OkapiRequestError – Bad request, e.g. malformed query parameter.
OkapiFatalError – Internal server error
- getcontributionhistorybyserverid(centralServerId, **kwargs)
Get a list of Inn-Reach contributions for the given central server
GET /inn-reach/central-servers/{centralServerId}/contributions/history- Parameters
centralServerId (str) – (format: uuid)
- 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)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request, e.g. malformed query parameter.
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "INN-Reach contribution history of job execution status tracking and basic statistics", "type": "object", "properties": { "totalRecords": { "description": "Total records", "type": "integer" }, "contributionHistory": { "description": "List of INN-Reach contribution job execution status tracking and basic statistics", "type": "array", "items": { "$ref": "contributionDTO.json" } } }, "additionalProperties": false, "required": [ "contributions" ] }
- getcurrentcontributionbyserverid(centralServerId)
Get current INN-Reach contribution for the given central server
GET /inn-reach/central-servers/{centralServerId}/contributions/current- Parameters
centralServerId (str) – (format: uuid)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request, e.g. malformed query parameter.
OkapiFatalError – Internal server error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "INN-Reach contribution job execution status tracking and basic statistics", "type": "object", "properties": { "id": { "description": "Contribution id", "type": "string", "format": "uuid" }, "jobId": { "description": "Instance iteration job id", "type": "string", "format": "uuid" }, "itemTypeMappingStatus": { "description": "Material type mapping validation status", "type": "object", "$ref": "mappingValidationStatusDTO.json", "default": "Invalid" }, "locationsMappingStatus": { "description": "Location mapping validation status", "type": "object", "$ref": "mappingValidationStatusDTO.json", "default": "Invalid" }, "status": { "description": "Status", "type": "string", "enum": [ "In Progress", "Complete", "Not started", "Cancelled" ], "default": "Not started" }, "contributionStarted": { "description": "Date and time when the contribution has started", "type": "string", "format": "date-time" }, "contributionStartedBy": { "description": "Username of the user who started the contribution", "type": "string" }, "contributionComplete": { "description": "Date and time when the contribution has completed", "type": "string", "format": "date-time" }, "recordsTotal": { "description": "Total number of FOLIO instance records", "type": "integer", "format": "int64" }, "recordsProcessed": { "description": "Total number of Processed records", "type": "integer", "format": "int64" }, "recordsContributed": { "description": "Total number of Contributed records", "type": "integer", "format": "int64" }, "recordsUpdated": { "description": "Total number of Updated records", "type": "integer", "format": "int64" }, "recordsDecontributed": { "description": "Total number of De-contributed records", "type": "integer", "format": "int64", "readOnly": true }, "errors": { "description": "List of errors occurred", "type": "array", "items": { "$ref": "contributionErrorDTO.json" } }, "metadata": { "description": "Entity metadata", "type": "object", "$ref": "metadata.json" } }, "additionalProperties": false, "required": [ "status", "itemTypeMappingStatus", "locationsMappingStatus" ] }
- startinitialcontribution(centralServerId)
Start initial contribution process
POST /inn-reach/central-servers/{centralServerId}/contributions- Parameters
centralServerId (str) – (format: uuid)
- Raises
OkapiRequestError – Bad request
OkapiFatalError – Internal server error