foliolib.folio.api.innReach.Contribution
- class foliolib.folio.api.innReach.Contribution(tenant: str)
Bases:
foliolib.folio.FolioApiINN-Reach Contribution API
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
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.
OkapiRequestFatalError – 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.
OkapiRequestFatalError – 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": { "$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": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Mapping validation status", "type": "string", "enum": [ "Valid", "Invalid" ], "additionalProperties": false }, "locationsMappingStatus": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Mapping validation status", "type": "string", "enum": [ "Valid", "Invalid" ], "additionalProperties": false }, "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": { "$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" }, "message": { "description": "Error message (cause)", "type": "string" }, "recordId": { "description": "Id of instance record which has not been processed due to error", "type": "string", "format": "uuid" } }, "additionalProperties": false, "required": [ "message", "recordId" ] } }, "metadata": { "title": "Metadata Schema", "description": "Metadata about creation and changes to records, provided by the server (client should not provide)", "type": "object", "properties": { "createdDate": { "description": "Date and time when the record was created", "type": "string", "format": "date-time" }, "createdByUserId": { "description": "ID of the user who created the record (when available)", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "createdByUsername": { "description": "Username of the user who created the record (when available)", "type": "string" }, "updatedDate": { "description": "Date and time when the record was last updated", "type": "string", "format": "date-time" }, "updatedByUserId": { "description": "ID of the user who last updated the record (when available)", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "updatedByUsername": { "description": "Username of the user who last updated the record (when available)", "type": "string" } }, "additionalProperties": false, "required": [ "createdDate" ] } }, "additionalProperties": false, "required": [ "status", "itemTypeMappingStatus", "locationsMappingStatus" ] } } }, "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.
OkapiRequestFatalError – 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": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Mapping validation status", "type": "string", "enum": [ "Valid", "Invalid" ], "additionalProperties": false }, "locationsMappingStatus": { "$schema": "http://json-schema.org/draft-04/schema#", "description": "Mapping validation status", "type": "string", "enum": [ "Valid", "Invalid" ], "additionalProperties": false }, "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": { "$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" }, "message": { "description": "Error message (cause)", "type": "string" }, "recordId": { "description": "Id of instance record which has not been processed due to error", "type": "string", "format": "uuid" } }, "additionalProperties": false, "required": [ "message", "recordId" ] } }, "metadata": { "title": "Metadata Schema", "description": "Metadata about creation and changes to records, provided by the server (client should not provide)", "type": "object", "properties": { "createdDate": { "description": "Date and time when the record was created", "type": "string", "format": "date-time" }, "createdByUserId": { "description": "ID of the user who created the record (when available)", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "createdByUsername": { "description": "Username of the user who created the record (when available)", "type": "string" }, "updatedDate": { "description": "Date and time when the record was last updated", "type": "string", "format": "date-time" }, "updatedByUserId": { "description": "ID of the user who last updated the record (when available)", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "updatedByUsername": { "description": "Username of the user who last updated the record (when available)", "type": "string" } }, "additionalProperties": false, "required": [ "createdDate" ] } }, "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
OkapiRequestFatalError – Internal server error