Change Manager version v1.1
http://localhost
Change Manager API
API for accessing ChangeManager's bussiness logic
/change-manager
Delete JobExecution by multiple IDs
Initialize JobExecutions
post /change-manager/jobExecutions
Initialize JobExecutions
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Request to initialize JobExecution entities",
"type": "object",
"additionalProperties": false,
"properties": {
"files": {
"description": "Information about files to upload",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Information about file to upload",
"additionalProperties": false,
"properties": {
"name": {
"description": "File name",
"type": "string"
}
}
}
},
"sourceType": {
"description": "Raw records source type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"FILES",
"ONLINE",
"COMPOSITE"
]
},
"jobProfileInfo": {
"description": "Related JobProfile information",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.JobProfileInfo",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique JobProfile identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"name": {
"description": "Job Profile name",
"type": "string"
},
"dataType": {
"description": "Data type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
},
"hidden": {
"description": "Indicates that job should be hidden in data-import log",
"type": "boolean",
"default": false,
"example": false
}
},
"required": [
"id"
]
},
"userId": {
"description": "ID of the user initializing JobExecutions",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"jobPartNumber": {
"description": "The order number of the chunk job for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalJobParts": {
"description": "The total number of chunk jobs for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"parentJobId": {
"description": "Id of the parent JobExecution entity",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
}
},
"required": [
"sourceType",
"userId"
]
}
HTTP status code 201
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Initialized JobExecution entities",
"type": "object",
"additionalProperties": false,
"properties": {
"parentJobExecutionId": {
"description": "UUID of the JobExecution entity which is parent for all JobExecution entities in a scope of one file upload process",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"jobExecutions": {
"description": "Array of initialized JobExecution entities",
"type": "array",
"items": {
"type": "object",
"$ref": "../mod-source-record-manager/jobExecution.json"
}
}
}
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
Get or Update a specific JobExecution
Update jobExecution item with given {jobExecutionId}
Get JobExecution by id
Delete jobExecution item with given {jobExecutionId}
put /change-manager/jobExecutions/{id}
Update jobExecution item with given {jobExecutionId}
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Job Execution Schema",
"type": "object",
"properties": {
"id": {
"description": "Unique identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"hrId": {
"description": "Human readable id",
"type": "integer"
},
"parentJobId": {
"description": "Id of the parent JobExecution entity",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"subordinationType": {
"description": "Type of subordination to another JobExecution entities",
"type": "string",
"enum": [
"CHILD",
"PARENT_SINGLE",
"PARENT_MULTIPLE",
"COMPOSITE_PARENT",
"COMPOSITE_CHILD"
]
},
"jobProfileInfo": {
"description": "Related JobProfile information",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.JobProfileInfo",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique JobProfile identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"name": {
"description": "Job Profile name",
"type": "string"
},
"dataType": {
"description": "Data type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
},
"hidden": {
"description": "Indicates that job should be hidden in data-import log",
"type": "boolean",
"default": false,
"example": false
}
},
"required": [
"id"
]
},
"jobProfileSnapshotWrapper": {
"description": "Snapshot wrapper of related JobProfile",
"$ref": "../mod-data-import-converter-storage/profileSnapshotWrapper.json"
},
"sourcePath": {
"description": "Path to the file",
"type": "string"
},
"fileName": {
"description": "File name",
"type": "string"
},
"runBy": {
"description": "First and last name of the user that triggered the job execution",
"type": "object",
"properties": {
"firstName": {
"description": "First name",
"type": "string"
},
"lastName": {
"description": "Last name",
"type": "string"
}
}
},
"progress": {
"description": "Execution progress of the job",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"type": "string"
},
"current": {
"description": "Currently processing record",
"type": "integer"
},
"total": {
"description": "Total number of records to be processed",
"type": "integer"
}
}
},
"startedDate": {
"description": "Date and time when the job execution started",
"type": "string",
"format": "date-time"
},
"completedDate": {
"description": "Date and time when the job execution completed",
"type": "string",
"format": "date-time"
},
"status": {
"description": "Current status of the job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"uiStatus": {
"description": "Status that is rendered on UI",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"INITIALIZATION",
"PREPARING_FOR_PREVIEW",
"READY_FOR_PREVIEW",
"RUNNING",
"RUNNING_COMPLETE",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"errorStatus": {
"description": "Status that describe error state of job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"SNAPSHOT_UPDATE_ERROR",
"RECORD_UPDATE_ERROR",
"FILE_PROCESSING_ERROR",
"INSTANCE_CREATING_ERROR",
"PROFILE_SNAPSHOT_CREATING_ERROR"
]
},
"userId": {
"description": "ID of the user who created the JobExecution",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"jobPartNumber": {
"description": "The order number of the chunk job for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalJobParts": {
"description": "The total number of chunk jobs for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalRecordsInFile": {
"description": "The total number of records in the source file for COMPOSITE_PARENT jobs",
"type": "integer",
"default": 0
}
},
"required": [
"id",
"parentJobId",
"subordinationType",
"status",
"uiStatus",
"userId"
],
"excludedFromEqualsAndHashCode": [
"hrId",
"progress",
"runBy"
]
}
Example:
{
"id":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"hrId": 10000,
"jobProfileInfo":{
"id":"88dfac11-1caf-4470-9ad1-d533f6360bad",
"name":"stub job profile",
"dataType":"MARC"
},
"jobProfileSnapshotWrapper": {
"id": "0fc0ba76-d560-4541-826f-f8bdd3b09841",
"profileId": "dc4ac439-57ae-4779-872e-1892b163bb47",
"contentType": "JOB_PROFILE",
"reactTo":"NON-MATCH",
"content": {
"id": "dc4ac439-57ae-4779-872e-1892b163bb47",
"name": "Load vendor order records",
"description": "Ordered on vendor site; load MARC to create bib, holdings, item, and order; keep MARC",
"dataTypes": ["MARC_BIB"],
"tags": {"tagList": ["acq", "daily"]}
},
"childSnapshotWrappers": [
{
"id": "0d1db69a-87b7-4147-9ef2-2a674add4f0c",
"profileId": "2fb94d27-3d46-4ee8-97f4-c2b5d0cd20c6",
"contentType": "MATCH_PROFILE",
"content": {
"id": "2fb94d27-3d46-4ee8-97f4-c2b5d0cd20c6",
"name": "Dolor sit",
"description": "Lorem ipsum dolor sit amet",
"tags": {"tagList": ["acq", "daily"]},
"match": "Order 998"
},
"childSnapshotWrappers": [
{
"id": "5de73bc8-434e-492d-8469-2e7847488a24",
"profileId": "34a0839a-57aa-4a53-af10-431ad23ed0cc",
"contentType": "ACTION_PROFILE",
"content": {
"id": "34a0839a-57aa-4a53-af10-431ad23ed0cc",
"name": "Dolor sit",
"description": "Lorem ipsum dolor sit amet",
"tags": {"tagList": ["lorem", "ipsum", "dolor"]},
"action": "Create order",
"mapping": "EDI orders"
},
"childSnapshotWrappers": [
{
"id": "e5850dcf-2c4f-472d-b6a9-9cf40f6ec9c9",
"profileId": "143d81ef-ffdf-46ff-8718-281d64d7460a",
"contentType": "MAPPING_PROFILE",
"content": {
"id": "143d81ef-ffdf-46ff-8718-281d64d7460a",
"name": "Profile for mapping",
"description": "Description for mapping profile",
"tags": {"tagList": ["lorem", "ipsum", "dolor"]},
"mapped": "Order - 3 fields"
},
"childSnapshotWrappers": []
}
]
}
]
}
]
},
"parentJobId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"subordinationType":"PARENT_SINGLE",
"sourcePath":"C:\import\files\import_1.csv",
"fileName": "import_1.csv",
"runBy":{
"firstName":"DIKU",
"lastName":"ADMINISTRATOR"
},
"progress":{
"jobExecutionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"current":50,
"total":50
},
"startedDate":"2018-10-30T12:36:55.000",
"completedDate":"2018-10-30T12:40:01.000",
"status":"COMMITTED",
"uiStatus":"RUNNING_COMPLETE",
"userId":"c9db5d7a-e1d4-11e8-9f32-f2801f1b9fd1"
}
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Job Execution Schema",
"type": "object",
"properties": {
"id": {
"description": "Unique identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"hrId": {
"description": "Human readable id",
"type": "integer"
},
"parentJobId": {
"description": "Id of the parent JobExecution entity",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"subordinationType": {
"description": "Type of subordination to another JobExecution entities",
"type": "string",
"enum": [
"CHILD",
"PARENT_SINGLE",
"PARENT_MULTIPLE",
"COMPOSITE_PARENT",
"COMPOSITE_CHILD"
]
},
"jobProfileInfo": {
"description": "Related JobProfile information",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.JobProfileInfo",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique JobProfile identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"name": {
"description": "Job Profile name",
"type": "string"
},
"dataType": {
"description": "Data type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
},
"hidden": {
"description": "Indicates that job should be hidden in data-import log",
"type": "boolean",
"default": false,
"example": false
}
},
"required": [
"id"
]
},
"jobProfileSnapshotWrapper": {
"description": "Snapshot wrapper of related JobProfile",
"$ref": "../mod-data-import-converter-storage/profileSnapshotWrapper.json"
},
"sourcePath": {
"description": "Path to the file",
"type": "string"
},
"fileName": {
"description": "File name",
"type": "string"
},
"runBy": {
"description": "First and last name of the user that triggered the job execution",
"type": "object",
"properties": {
"firstName": {
"description": "First name",
"type": "string"
},
"lastName": {
"description": "Last name",
"type": "string"
}
}
},
"progress": {
"description": "Execution progress of the job",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"type": "string"
},
"current": {
"description": "Currently processing record",
"type": "integer"
},
"total": {
"description": "Total number of records to be processed",
"type": "integer"
}
}
},
"startedDate": {
"description": "Date and time when the job execution started",
"type": "string",
"format": "date-time"
},
"completedDate": {
"description": "Date and time when the job execution completed",
"type": "string",
"format": "date-time"
},
"status": {
"description": "Current status of the job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"uiStatus": {
"description": "Status that is rendered on UI",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"INITIALIZATION",
"PREPARING_FOR_PREVIEW",
"READY_FOR_PREVIEW",
"RUNNING",
"RUNNING_COMPLETE",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"errorStatus": {
"description": "Status that describe error state of job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"SNAPSHOT_UPDATE_ERROR",
"RECORD_UPDATE_ERROR",
"FILE_PROCESSING_ERROR",
"INSTANCE_CREATING_ERROR",
"PROFILE_SNAPSHOT_CREATING_ERROR"
]
},
"userId": {
"description": "ID of the user who created the JobExecution",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"jobPartNumber": {
"description": "The order number of the chunk job for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalJobParts": {
"description": "The total number of chunk jobs for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalRecordsInFile": {
"description": "The total number of records in the source file for COMPOSITE_PARENT jobs",
"type": "integer",
"default": 0
}
},
"required": [
"id",
"parentJobId",
"subordinationType",
"status",
"uiStatus",
"userId"
],
"excludedFromEqualsAndHashCode": [
"hrId",
"progress",
"runBy"
]
}
HTTP status code 204
Item successfully updated
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to update jobExecution -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"jobExecution not found"
HTTP status code 409
Optimistic locking version conflict
Body
Media type: text/plain
Type: any
Example:
version conflict
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
get /change-manager/jobExecutions/{id}
Get JobExecution by id
URI Parameters
- id: required(string)
HTTP status code 200
Returns item with a given ID
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Job Execution Schema",
"type": "object",
"properties": {
"id": {
"description": "Unique identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"hrId": {
"description": "Human readable id",
"type": "integer"
},
"parentJobId": {
"description": "Id of the parent JobExecution entity",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"subordinationType": {
"description": "Type of subordination to another JobExecution entities",
"type": "string",
"enum": [
"CHILD",
"PARENT_SINGLE",
"PARENT_MULTIPLE",
"COMPOSITE_PARENT",
"COMPOSITE_CHILD"
]
},
"jobProfileInfo": {
"description": "Related JobProfile information",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.JobProfileInfo",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique JobProfile identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"name": {
"description": "Job Profile name",
"type": "string"
},
"dataType": {
"description": "Data type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
},
"hidden": {
"description": "Indicates that job should be hidden in data-import log",
"type": "boolean",
"default": false,
"example": false
}
},
"required": [
"id"
]
},
"jobProfileSnapshotWrapper": {
"description": "Snapshot wrapper of related JobProfile",
"$ref": "../mod-data-import-converter-storage/profileSnapshotWrapper.json"
},
"sourcePath": {
"description": "Path to the file",
"type": "string"
},
"fileName": {
"description": "File name",
"type": "string"
},
"runBy": {
"description": "First and last name of the user that triggered the job execution",
"type": "object",
"properties": {
"firstName": {
"description": "First name",
"type": "string"
},
"lastName": {
"description": "Last name",
"type": "string"
}
}
},
"progress": {
"description": "Execution progress of the job",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"type": "string"
},
"current": {
"description": "Currently processing record",
"type": "integer"
},
"total": {
"description": "Total number of records to be processed",
"type": "integer"
}
}
},
"startedDate": {
"description": "Date and time when the job execution started",
"type": "string",
"format": "date-time"
},
"completedDate": {
"description": "Date and time when the job execution completed",
"type": "string",
"format": "date-time"
},
"status": {
"description": "Current status of the job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"uiStatus": {
"description": "Status that is rendered on UI",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"INITIALIZATION",
"PREPARING_FOR_PREVIEW",
"READY_FOR_PREVIEW",
"RUNNING",
"RUNNING_COMPLETE",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"errorStatus": {
"description": "Status that describe error state of job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"SNAPSHOT_UPDATE_ERROR",
"RECORD_UPDATE_ERROR",
"FILE_PROCESSING_ERROR",
"INSTANCE_CREATING_ERROR",
"PROFILE_SNAPSHOT_CREATING_ERROR"
]
},
"userId": {
"description": "ID of the user who created the JobExecution",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"jobPartNumber": {
"description": "The order number of the chunk job for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalJobParts": {
"description": "The total number of chunk jobs for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalRecordsInFile": {
"description": "The total number of records in the source file for COMPOSITE_PARENT jobs",
"type": "integer",
"default": 0
}
},
"required": [
"id",
"parentJobId",
"subordinationType",
"status",
"uiStatus",
"userId"
],
"excludedFromEqualsAndHashCode": [
"hrId",
"progress",
"runBy"
]
}
Example:
{
"id":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"hrId": 10000,
"jobProfileInfo":{
"id":"88dfac11-1caf-4470-9ad1-d533f6360bad",
"name":"stub job profile",
"dataType":"MARC"
},
"jobProfileSnapshotWrapper": {
"id": "0fc0ba76-d560-4541-826f-f8bdd3b09841",
"profileId": "dc4ac439-57ae-4779-872e-1892b163bb47",
"contentType": "JOB_PROFILE",
"reactTo":"NON-MATCH",
"content": {
"id": "dc4ac439-57ae-4779-872e-1892b163bb47",
"name": "Load vendor order records",
"description": "Ordered on vendor site; load MARC to create bib, holdings, item, and order; keep MARC",
"dataTypes": ["MARC_BIB"],
"tags": {"tagList": ["acq", "daily"]}
},
"childSnapshotWrappers": [
{
"id": "0d1db69a-87b7-4147-9ef2-2a674add4f0c",
"profileId": "2fb94d27-3d46-4ee8-97f4-c2b5d0cd20c6",
"contentType": "MATCH_PROFILE",
"content": {
"id": "2fb94d27-3d46-4ee8-97f4-c2b5d0cd20c6",
"name": "Dolor sit",
"description": "Lorem ipsum dolor sit amet",
"tags": {"tagList": ["acq", "daily"]},
"match": "Order 998"
},
"childSnapshotWrappers": [
{
"id": "5de73bc8-434e-492d-8469-2e7847488a24",
"profileId": "34a0839a-57aa-4a53-af10-431ad23ed0cc",
"contentType": "ACTION_PROFILE",
"content": {
"id": "34a0839a-57aa-4a53-af10-431ad23ed0cc",
"name": "Dolor sit",
"description": "Lorem ipsum dolor sit amet",
"tags": {"tagList": ["lorem", "ipsum", "dolor"]},
"action": "Create order",
"mapping": "EDI orders"
},
"childSnapshotWrappers": [
{
"id": "e5850dcf-2c4f-472d-b6a9-9cf40f6ec9c9",
"profileId": "143d81ef-ffdf-46ff-8718-281d64d7460a",
"contentType": "MAPPING_PROFILE",
"content": {
"id": "143d81ef-ffdf-46ff-8718-281d64d7460a",
"name": "Profile for mapping",
"description": "Description for mapping profile",
"tags": {"tagList": ["lorem", "ipsum", "dolor"]},
"mapped": "Order - 3 fields"
},
"childSnapshotWrappers": []
}
]
}
]
}
]
},
"parentJobId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"subordinationType":"PARENT_SINGLE",
"sourcePath":"C:\import\files\import_1.csv",
"fileName": "import_1.csv",
"runBy":{
"firstName":"DIKU",
"lastName":"ADMINISTRATOR"
},
"progress":{
"jobExecutionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"current":50,
"total":50
},
"startedDate":"2018-10-30T12:36:55.000",
"completedDate":"2018-10-30T12:40:01.000",
"status":"COMMITTED",
"uiStatus":"RUNNING_COMPLETE",
"userId":"c9db5d7a-e1d4-11e8-9f32-f2801f1b9fd1"
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"jobExecution not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
delete /change-manager/jobExecutions/{id}
Delete jobExecution item with given {jobExecutionId}
URI Parameters
- id: required(string)
HTTP status code 204
Item deleted successfully
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to delete jobExecution -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"jobExecution not found"
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Get children JobExecutions by parent id, by default returns all existing children JobExecutions, in order to limit the collection parameter limit should be explicitly specified
get /change-manager/jobExecutions/{id}/children
Get children JobExecutions by parent id, by default returns all existing children JobExecutions, in order to limit the collection parameter limit should be explicitly specified
URI Parameters
- id: required(string)
Query Parameters
- limit: (integer - default: 2147483647 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
- totalRecords: (string - default: auto - pattern: exact|estimated|none|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: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of execution job dtos",
"type": "object",
"additionalProperties": false,
"properties": {
"jobExecutions": {
"description": "List of execution job dtos",
"type": "array",
"id": "jobExecutionList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Job Execution Dto Schema",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionDto",
"properties": {
"id": {
"description": "Unique identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"hrId": {
"description": "Human readable id",
"type": "integer"
},
"parentJobId": {
"description": "Id of the parent JobExecution entity",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"subordinationType": {
"description": "Type of subordination to another JobExecution entities",
"type": "string",
"enum": [
"CHILD",
"PARENT_SINGLE",
"PARENT_MULTIPLE",
"COMPOSITE_PARENT",
"COMPOSITE_CHILD"
]
},
"jobProfileInfo": {
"description": "Related JobProfile information",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.JobProfileInfo",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique JobProfile identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"name": {
"description": "Job Profile name",
"type": "string"
},
"dataType": {
"description": "Data type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
},
"hidden": {
"description": "Indicates that job should be hidden in data-import log",
"type": "boolean",
"default": false,
"example": false
}
},
"required": [
"id"
]
},
"sourcePath": {
"description": "Path to the file",
"type": "string"
},
"fileName": {
"description": "File name",
"type": "string"
},
"runBy": {
"description": "First and last name of the user that triggered the job execution",
"type": "object",
"properties": {
"firstName": {
"description": "First name",
"type": "string"
},
"lastName": {
"description": "Last name",
"type": "string"
}
}
},
"progress": {
"description": "Execution progress of the job",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"type": "string"
},
"current": {
"description": "Currently processing record",
"type": "integer"
},
"total": {
"description": "Total number of records to be processed",
"type": "integer"
}
}
},
"startedDate": {
"description": "Date and time when the job execution started",
"type": "string",
"format": "date-time"
},
"completedDate": {
"description": "Date and time when the job execution completed",
"type": "string",
"format": "date-time"
},
"status": {
"description": "Current status of the job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"uiStatus": {
"description": "Status that is rendered on UI",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"INITIALIZATION",
"PREPARING_FOR_PREVIEW",
"READY_FOR_PREVIEW",
"RUNNING",
"RUNNING_COMPLETE",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"errorStatus": {
"description": "Status that describe error state of job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"SNAPSHOT_UPDATE_ERROR",
"RECORD_UPDATE_ERROR",
"FILE_PROCESSING_ERROR",
"INSTANCE_CREATING_ERROR",
"PROFILE_SNAPSHOT_CREATING_ERROR"
]
},
"userId": {
"description": "ID of the user who created the JobExecution",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"jobPartNumber": {
"description": "The order number of the chunk job for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalJobParts": {
"description": "The total number of chunk jobs for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"compositeDetails": {
"description": "The statuses of this execution's children; applicable only for COMPOSITE_PARENT jobs",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailsDto",
"properties": {
"newState": {
"description": "The number of children with status NEW",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
},
"fileUploadedState": {
"description": "The number of children with status FILE_UPLOADED",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
},
"parsingInProgressState": {
"description": "The number of children with status PARSING_IN_PROGRESS",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
},
"parsingFinishedState": {
"description": "The number of children with status PARSING_FINISHED",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
},
"processingInProgressState": {
"description": "The number of children with status PROCESSING_IN_PROGRESS",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
},
"processingFinishedState": {
"description": "The number of children with status PROCESSING_FINISHED",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
},
"commitInProgressState": {
"description": "The number of children with status COMMIT_IN_PROGRESS",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
},
"committedState": {
"description": "The number of children with status COMMITTED",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
},
"errorState": {
"description": "The number of children with status ERROR",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
},
"discardedState": {
"description": "The number of children with status DISCARDED",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
},
"cancelledState": {
"description": "The number of children with status CANCELLED",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.JobExecutionCompositeDetailDto",
"properties": {
"chunksCount": {
"type": "integer",
"description": "Number of chunks in this state"
},
"totalRecordsCount": {
"type": "integer",
"description": "Number of total records in this state"
},
"currentlyProcessedCount": {
"type": "integer",
"description": "Number of processed records in this state"
}
}
}
}
},
"totalRecordsInFile": {
"description": "The total number of records in the source file for COMPOSITE_PARENT jobs",
"type": "integer",
"default": 0
}
},
"required": [
"id",
"parentJobId",
"subordinationType",
"status",
"uiStatus",
"userId"
],
"excludedFromEqualsAndHashCode": [
"hrId",
"progress",
"runBy"
]
}
},
"totalRecords": {
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"jobExecutions",
"totalRecords"
]
}
HTTP status code 404
Not found
Body
Media type: text/plain
Type: any
Example:
Not found
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
Update JobExecution status
put /change-manager/jobExecutions/{id}/status
Update JobExecution status
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Status DTO Schema",
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"description": "Current status of the job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"errorStatus": {
"description": "Status that describe error state of job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"SNAPSHOT_UPDATE_ERROR",
"RECORD_UPDATE_ERROR",
"FILE_PROCESSING_ERROR",
"INSTANCE_CREATING_ERROR",
"PROFILE_SNAPSHOT_CREATING_ERROR"
]
}
},
"required": [
"status"
]
}
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Job Execution Schema",
"type": "object",
"properties": {
"id": {
"description": "Unique identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"hrId": {
"description": "Human readable id",
"type": "integer"
},
"parentJobId": {
"description": "Id of the parent JobExecution entity",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"subordinationType": {
"description": "Type of subordination to another JobExecution entities",
"type": "string",
"enum": [
"CHILD",
"PARENT_SINGLE",
"PARENT_MULTIPLE",
"COMPOSITE_PARENT",
"COMPOSITE_CHILD"
]
},
"jobProfileInfo": {
"description": "Related JobProfile information",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.JobProfileInfo",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique JobProfile identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"name": {
"description": "Job Profile name",
"type": "string"
},
"dataType": {
"description": "Data type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
},
"hidden": {
"description": "Indicates that job should be hidden in data-import log",
"type": "boolean",
"default": false,
"example": false
}
},
"required": [
"id"
]
},
"jobProfileSnapshotWrapper": {
"description": "Snapshot wrapper of related JobProfile",
"$ref": "../mod-data-import-converter-storage/profileSnapshotWrapper.json"
},
"sourcePath": {
"description": "Path to the file",
"type": "string"
},
"fileName": {
"description": "File name",
"type": "string"
},
"runBy": {
"description": "First and last name of the user that triggered the job execution",
"type": "object",
"properties": {
"firstName": {
"description": "First name",
"type": "string"
},
"lastName": {
"description": "Last name",
"type": "string"
}
}
},
"progress": {
"description": "Execution progress of the job",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"type": "string"
},
"current": {
"description": "Currently processing record",
"type": "integer"
},
"total": {
"description": "Total number of records to be processed",
"type": "integer"
}
}
},
"startedDate": {
"description": "Date and time when the job execution started",
"type": "string",
"format": "date-time"
},
"completedDate": {
"description": "Date and time when the job execution completed",
"type": "string",
"format": "date-time"
},
"status": {
"description": "Current status of the job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"uiStatus": {
"description": "Status that is rendered on UI",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"INITIALIZATION",
"PREPARING_FOR_PREVIEW",
"READY_FOR_PREVIEW",
"RUNNING",
"RUNNING_COMPLETE",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"errorStatus": {
"description": "Status that describe error state of job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"SNAPSHOT_UPDATE_ERROR",
"RECORD_UPDATE_ERROR",
"FILE_PROCESSING_ERROR",
"INSTANCE_CREATING_ERROR",
"PROFILE_SNAPSHOT_CREATING_ERROR"
]
},
"userId": {
"description": "ID of the user who created the JobExecution",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"jobPartNumber": {
"description": "The order number of the chunk job for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalJobParts": {
"description": "The total number of chunk jobs for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalRecordsInFile": {
"description": "The total number of records in the source file for COMPOSITE_PARENT jobs",
"type": "integer",
"default": 0
}
},
"required": [
"id",
"parentJobId",
"subordinationType",
"status",
"uiStatus",
"userId"
],
"excludedFromEqualsAndHashCode": [
"hrId",
"progress",
"runBy"
]
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
Bad request
HTTP status code 404
Not found
Body
Media type: text/plain
Type: any
Example:
Not found
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
Set JobProfile for JobExecution
put /change-manager/jobExecutions/{id}/jobProfile
Set JobProfile for JobExecution
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Related JobProfile information",
"javaType": "org.folio.rest.jaxrs.model.JobProfileInfo",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique JobProfile identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"name": {
"description": "Job Profile name",
"type": "string"
},
"dataType": {
"description": "Data type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
},
"hidden": {
"description": "Indicates that job should be hidden in data-import log",
"type": "boolean",
"default": false,
"example": false
}
},
"required": [
"id"
]
}
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Job Execution Schema",
"type": "object",
"properties": {
"id": {
"description": "Unique identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"hrId": {
"description": "Human readable id",
"type": "integer"
},
"parentJobId": {
"description": "Id of the parent JobExecution entity",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"subordinationType": {
"description": "Type of subordination to another JobExecution entities",
"type": "string",
"enum": [
"CHILD",
"PARENT_SINGLE",
"PARENT_MULTIPLE",
"COMPOSITE_PARENT",
"COMPOSITE_CHILD"
]
},
"jobProfileInfo": {
"description": "Related JobProfile information",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.JobProfileInfo",
"additionalProperties": false,
"properties": {
"id": {
"description": "Unique JobProfile identifier",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"name": {
"description": "Job Profile name",
"type": "string"
},
"dataType": {
"description": "Data type",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
},
"hidden": {
"description": "Indicates that job should be hidden in data-import log",
"type": "boolean",
"default": false,
"example": false
}
},
"required": [
"id"
]
},
"jobProfileSnapshotWrapper": {
"description": "Snapshot wrapper of related JobProfile",
"$ref": "../mod-data-import-converter-storage/profileSnapshotWrapper.json"
},
"sourcePath": {
"description": "Path to the file",
"type": "string"
},
"fileName": {
"description": "File name",
"type": "string"
},
"runBy": {
"description": "First and last name of the user that triggered the job execution",
"type": "object",
"properties": {
"firstName": {
"description": "First name",
"type": "string"
},
"lastName": {
"description": "Last name",
"type": "string"
}
}
},
"progress": {
"description": "Execution progress of the job",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"jobExecutionId": {
"description": "Corresponding jobExecution id",
"type": "string"
},
"current": {
"description": "Currently processing record",
"type": "integer"
},
"total": {
"description": "Total number of records to be processed",
"type": "integer"
}
}
},
"startedDate": {
"description": "Date and time when the job execution started",
"type": "string",
"format": "date-time"
},
"completedDate": {
"description": "Date and time when the job execution completed",
"type": "string",
"format": "date-time"
},
"status": {
"description": "Current status of the job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"NEW",
"FILE_UPLOADED",
"PARSING_IN_PROGRESS",
"PARSING_FINISHED",
"PROCESSING_IN_PROGRESS",
"PROCESSING_FINISHED",
"COMMIT_IN_PROGRESS",
"COMMITTED",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"uiStatus": {
"description": "Status that is rendered on UI",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"PARENT",
"INITIALIZATION",
"PREPARING_FOR_PREVIEW",
"READY_FOR_PREVIEW",
"RUNNING",
"RUNNING_COMPLETE",
"ERROR",
"DISCARDED",
"CANCELLED"
]
},
"errorStatus": {
"description": "Status that describe error state of job execution",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"SNAPSHOT_UPDATE_ERROR",
"RECORD_UPDATE_ERROR",
"FILE_PROCESSING_ERROR",
"INSTANCE_CREATING_ERROR",
"PROFILE_SNAPSHOT_CREATING_ERROR"
]
},
"userId": {
"description": "ID of the user who created the JobExecution",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"jobPartNumber": {
"description": "The order number of the chunk job for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalJobParts": {
"description": "The total number of chunk jobs for COMPOSITE jobs",
"type": "integer",
"default": 1
},
"totalRecordsInFile": {
"description": "The total number of records in the source file for COMPOSITE_PARENT jobs",
"type": "integer",
"default": 0
}
},
"required": [
"id",
"parentJobId",
"subordinationType",
"status",
"uiStatus",
"userId"
],
"excludedFromEqualsAndHashCode": [
"hrId",
"progress",
"runBy"
]
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
Bad request
HTTP status code 404
Not found
Body
Media type: text/plain
Type: any
Example:
Not found
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
Receive chunk of raw records
Delete JobExecution and associated records in SRS
post /change-manager/jobExecutions/{id}/records
Receive chunk of raw records
URI Parameters
- id: required(string)
Query Parameters
- acceptInstanceId: (boolean - default: false)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Schema that describes payload for receiving a chunk of raw records",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"initialRecords": {
"description": "List of raw records",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Raw record DTO schema",
"additionalProperties": false,
"properties": {
"record": {
"description": "Raw record content",
"type": "string"
},
"order": {
"description": "Order of the record in incoming file",
"type": "integer",
"minimum": 0
}
},
"required": [
"record"
]
}
},
"recordsMetadata": {
"description": "Metadata with info about records",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"last": {
"description": "Indicates if the current chunk is the last one associated with the same JobExecution",
"type": "boolean"
},
"counter": {
"description": "Counter of records associated with the same JobExecution, the last counter number is a total number of records",
"type": "integer"
},
"total": {
"description": "Total number of records associated with the same JobExecution",
"type": "integer"
},
"contentType": {
"description": "Describes type of records and format of record representation",
"type": "string",
"enum": [
"EDIFACT_RAW",
"MARC_RAW",
"MARC_JSON",
"MARC_XML"
]
}
},
"required": [
"last",
"counter",
"contentType"
]
}
},
"required": [
"id",
"recordsMetadata",
"initialRecords"
]
}
HTTP status code 204
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
Bad request
HTTP status code 404
Not found
Body
Media type: text/plain
Type: any
Example:
Not found
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
delete /change-manager/jobExecutions/{id}/records
Delete JobExecution and associated records in SRS
URI Parameters
- id: required(string)
Retrieve ParsedRecord by externalId
get /change-manager/parsedRecords
Retrieve ParsedRecord by externalId
Query Parameters
- externalId: required(string - pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$)
externalId parameter
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Record DTO Schema",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"externalIdsHolder": {
"description": "Container for identifiers of external entities",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"instanceId": {
"description": "instance id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"instanceHrid": {
"description": "instance hrid",
"type": "string"
},
"holdingsId": {
"description": "holdings id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsHrid": {
"description": "holdings hrid",
"type": "string"
},
"authorityId": {
"description": "authority id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"authorityHrid": {
"description": "authority hrid",
"type": "string"
}
}
},
"recordType": {
"description": "Type of record, e.g. MARC",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"MARC_BIB",
"MARC_AUTHORITY",
"MARC_HOLDING",
"EDIFACT"
]
},
"parsedRecord": {
"description": "Parsed record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Parsed record content, e.g. MARC record"
},
"formattedContent": {
"description": "Parsed content represented in human readable form",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content",
"formattedContent"
],
"required": [
"content"
]
},
"recordState": {
"description": "State of source record in QM workflow",
"type": "string",
"enum": [
"ACTUAL",
"IN_PROGRESS",
"ERROR"
],
"default": "ACTUAL"
},
"additionalInfo": {
"description": "Auxiliary data which is not related to MARC type record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"suppressDiscovery": {
"description": "Flag indicates if the record is displayed during a search",
"type": "boolean",
"default": false
}
}
},
"metadata": {
"description": "Metadata provided by the server",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"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"
]
},
"relatedRecordVersion": {
"type": "string",
"description": "Related record (instance, holdings) version for optimistic locking needs"
}
},
"required": [
"id",
"recordType",
"relatedRecordVersion",
"parsedRecord"
]
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
Bad request
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
Update ParsedRecord by id
put /change-manager/parsedRecords/{id}
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Record DTO Schema",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"externalIdsHolder": {
"description": "Container for identifiers of external entities",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"instanceId": {
"description": "instance id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"instanceHrid": {
"description": "instance hrid",
"type": "string"
},
"holdingsId": {
"description": "holdings id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"holdingsHrid": {
"description": "holdings hrid",
"type": "string"
},
"authorityId": {
"description": "authority id",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"authorityHrid": {
"description": "authority hrid",
"type": "string"
}
}
},
"recordType": {
"description": "Type of record, e.g. MARC",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"MARC_BIB",
"MARC_AUTHORITY",
"MARC_HOLDING",
"EDIFACT"
]
},
"parsedRecord": {
"description": "Parsed record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Parsed record content, e.g. MARC record"
},
"formattedContent": {
"description": "Parsed content represented in human readable form",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content",
"formattedContent"
],
"required": [
"content"
]
},
"recordState": {
"description": "State of source record in QM workflow",
"type": "string",
"enum": [
"ACTUAL",
"IN_PROGRESS",
"ERROR"
],
"default": "ACTUAL"
},
"additionalInfo": {
"description": "Auxiliary data which is not related to MARC type record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"suppressDiscovery": {
"description": "Flag indicates if the record is displayed during a search",
"type": "boolean",
"default": false
}
}
},
"metadata": {
"description": "Metadata provided by the server",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"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"
]
},
"relatedRecordVersion": {
"type": "string",
"description": "Related record (instance, holdings) version for optimistic locking needs"
}
},
"required": [
"id",
"recordType",
"relatedRecordVersion",
"parsedRecord"
]
}
HTTP status code 202
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
Bad request
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error