foliolib.folio.api.dataExportSpring.Jobs
- class foliolib.folio.api.dataExportSpring.Jobs(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiData Export Spring Jobs
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
Download exported file by the job ID
getjobbyid(id_)Get a job by the job ID
getjobs(**kwargs)Get jobs fy filter
resendexportedfile(id_)resend exported file by the job ID
upsertjob(job)Create or update a job
- downloadexportedfilebyjobid(id_)
Download exported file by the job ID
GET /data-export-spring/jobs/{id}/download
- getjobbyid(id_)
Get a job by the job ID
GET /data-export-spring/jobs/{id}- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request, e.g. malformed request body or query parameter. Details of the errors (e.g. name of the parameter or line/character number with malformed data) provided in the response.
OkapiRequestNotFound – Job with a given ID not found
OkapiFatalError – Internal server errors, e.g. due to misconfiguration
Schema
{ "type": "object", "properties": { "id": { "description": "Job ID", "type": "string", "format": "uuid" }, "name": { "description": "Job name", "type": "string", "maxLength": 100 }, "description": { "description": "Job description", "type": "string" }, "source": { "description": "Job source", "type": "string", "maxLength": 50 }, "isSystemSource": { "description": "Was the job created by system", "type": "boolean" }, "tenant": { "description": "Tenant id", "type": "string" }, "type": { "description": "Export type", "$ref": "exportType.json#/ExportType" }, "exportTypeSpecificParameters": { "$ref": "exportTypeSpecificParameters.json#/ExportTypeSpecificParameters" }, "status": { "description": "Job status", "$ref": "jobStatus.json#/JobStatus" }, "files": { "description": "Export files URLs", "type": "array", "items": { "type": "string" } }, "fileNames": { "description": "Exported files", "type": "array", "items": { "type": "string" } }, "startTime": { "description": "Job start timestamp", "type": "string", "format": "date-time" }, "endTime": { "description": "Job end timestamp", "type": "string", "format": "date-time" }, "metadata": { "description": "Standard FOLIO metadata", "$ref": "common/metadata.json#/Metadata" }, "outputFormat": { "description": "Job output format", "type": "string", "maxLength": 50 }, "errorDetails": { "description": "Job error details", "type": "string" }, "identifierType": { "description": "Identifier type", "$ref": "bulk-edit/identifierType.json#/IdentifierType" }, "entityType": { "description": "Entity type", "$ref": "bulk-edit/entityType.json#/EntityType" }, "progress": { "description": "Progress for records being processed", "$ref": "progress.json#/Progress" } }, "additionalProperties": false, "required": [ "type", "exportTypeSpecificParameters" ] }
- getjobs(**kwargs)
Get jobs fy filter
GET /data-export-spring/jobs- 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
OkapiRequestError – Bad request, e.g. malformed request body or query parameter. Details of the errors (e.g. name of the parameter or line/character number with malformed data) provided in the response.
OkapiFatalError – Internal server errors, e.g. due to misconfiguration
Schema
{ "type": "object", "properties": { "jobRecords": { "type": "array", "description": "Jobs", "items": { "$ref": "job.json#/Job" } }, "totalRecords": { "type": "integer" } }, "required": [ "jobRecords", "totalRecords" ] }
- resendexportedfile(id_)
resend exported file by the job ID
POST /data-export-spring/jobs/{id}/resend- Raises
OkapiRequestError – Bad Request
OkapiRequestNotFound – ExportFile with a given Job ID not found
OkapiFatalError – Internal server errors
- upsertjob(job)
Create or update a job
POST /data-export-spring/jobs- Parameters
job (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiFatalError – Internal server errors, e.g. due to misconfiguration
Schema
{ "type": "object", "properties": { "id": { "description": "Job ID", "type": "string", "format": "uuid" }, "name": { "description": "Job name", "type": "string", "maxLength": 100 }, "description": { "description": "Job description", "type": "string" }, "source": { "description": "Job source", "type": "string", "maxLength": 50 }, "isSystemSource": { "description": "Was the job created by system", "type": "boolean" }, "tenant": { "description": "Tenant id", "type": "string" }, "type": { "description": "Export type", "$ref": "exportType.json#/ExportType" }, "exportTypeSpecificParameters": { "$ref": "exportTypeSpecificParameters.json#/ExportTypeSpecificParameters" }, "status": { "description": "Job status", "$ref": "jobStatus.json#/JobStatus" }, "files": { "description": "Export files URLs", "type": "array", "items": { "type": "string" } }, "fileNames": { "description": "Exported files", "type": "array", "items": { "type": "string" } }, "startTime": { "description": "Job start timestamp", "type": "string", "format": "date-time" }, "endTime": { "description": "Job end timestamp", "type": "string", "format": "date-time" }, "metadata": { "description": "Standard FOLIO metadata", "$ref": "common/metadata.json#/Metadata" }, "outputFormat": { "description": "Job output format", "type": "string", "maxLength": 50 }, "errorDetails": { "description": "Job error details", "type": "string" }, "identifierType": { "description": "Identifier type", "$ref": "bulk-edit/identifierType.json#/IdentifierType" }, "entityType": { "description": "Entity type", "$ref": "bulk-edit/entityType.json#/EntityType" }, "progress": { "description": "Progress for records being processed", "$ref": "progress.json#/Progress" } }, "additionalProperties": false, "required": [ "type", "exportTypeSpecificParameters" ] }