Async migrations API version v0.1
http://localhost
Async migrations API
Running async migrations proceses for inventory enteties
Async migrations
Avalilible async migrations for the inventory-storage
get /inventory-storage/migrations
Avalilible async migrations for the inventory-storage
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Post migration job request",
"type": "object",
"properties": {
"asyncMigrations": {
"description": "List of available migrations",
"id": "asyncMigration",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Post migration job request",
"properties": {
"migrations": {
"description": "Names of migration procedure",
"type": "array",
"items": {
"type": "string"
}
},
"affectedEntities": {
"description": "List of affected entities by particular migration",
"type": "array",
"items": {
"type": "string",
"enum": [
"INSTANCE",
"ITEM"
]
}
}
},
"additionalProperties": false,
"required": [
"name"
]
}
},
"totalRecords": {
"type": "integer",
"default": 0
}
},
"additionalProperties": false,
"required": [
"migrations",
"totalRecords"
]
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
Get migration jobs
Submit a migration job
get /inventory-storage/migrations/jobs
Get migration jobs
HTTP status code 200
Migration jobs collection has returned
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Get collection of async jobs",
"type": "object",
"properties": {
"jobs": {
"description": "List of async jobs records",
"javaType": "java.util.List<org.folio.rest.jaxrs.model.AsyncMigrationJob>"
},
"totalRecords": {
"type": "integer"
}
},
"additionalProperties": false
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
post /inventory-storage/migrations/jobs
Submit a migration job
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Post migration job request",
"type": "object",
"properties": {
"migrations": {
"description": "Names of migration procedure",
"type": "array",
"items": {
"type": "string"
}
},
"affectedEntities": {
"description": "List of affected entities by particular migration",
"type": "array",
"items": {
"type": "string",
"enum": [
"INSTANCE",
"ITEM"
]
}
}
},
"additionalProperties": false,
"required": [
"name"
]
}
HTTP status code 200
Migration job has been submitted
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Get job by id response",
"type": "object",
"properties": {
"id": {
"description": "Job id",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"migrations": {
"description": "Name of migration procedure",
"type": "array",
"items": {
"type": "string"
}
},
"affectedEntities": {
"description": "List of affected entities by particular migration",
"type": "array",
"items": {
"type": "string"
}
},
"published": {
"description": "Number of records that was published so far",
"type": "array",
"items": {
"properties": {
"migrationName": {
"description": "Name of migration procedure",
"type": "string"
},
"count": {
"description": "Number of records that was published so far",
"type": "integer",
"minimum": 0,
"default": 0
}
}
}
},
"processed": {
"description": "Number of records that was processed",
"type": "array",
"items": {
"properties": {
"migrationName": {
"description": "Name of migration procedure",
"type": "string"
},
"count": {
"description": "Number of records that was processed",
"type": "integer",
"minimum": 0,
"default": 0
}
}
}
},
"jobStatus": {
"description": "Overall job status",
"type": "string",
"enum": [
"In progress",
"Id publishing failed",
"Ids published",
"Pending cancel",
"Cancelled",
"Completed"
]
},
"submittedDate": {
"description": "Timestamp when the job has been submitted",
"type": "string",
"format": "date-time"
},
"finishedDate": {
"description": "Timestamp when the job has been finished",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
Get migration job by id
Cancell migration job by id
get /inventory-storage/migrations/jobs/{id}
Get migration job by id
URI Parameters
- id: required(string)
HTTP status code 200
Migration job has returned
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Get job by id response",
"type": "object",
"properties": {
"id": {
"description": "Job id",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"migrations": {
"description": "Name of migration procedure",
"type": "array",
"items": {
"type": "string"
}
},
"affectedEntities": {
"description": "List of affected entities by particular migration",
"type": "array",
"items": {
"type": "string"
}
},
"published": {
"description": "Number of records that was published so far",
"type": "array",
"items": {
"properties": {
"migrationName": {
"description": "Name of migration procedure",
"type": "string"
},
"count": {
"description": "Number of records that was published so far",
"type": "integer",
"minimum": 0,
"default": 0
}
}
}
},
"processed": {
"description": "Number of records that was processed",
"type": "array",
"items": {
"properties": {
"migrationName": {
"description": "Name of migration procedure",
"type": "string"
},
"count": {
"description": "Number of records that was processed",
"type": "integer",
"minimum": 0,
"default": 0
}
}
}
},
"jobStatus": {
"description": "Overall job status",
"type": "string",
"enum": [
"In progress",
"Id publishing failed",
"Ids published",
"Pending cancel",
"Cancelled",
"Completed"
]
},
"submittedDate": {
"description": "Timestamp when the job has been submitted",
"type": "string",
"format": "date-time"
},
"finishedDate": {
"description": "Timestamp when the job has been finished",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
}
HTTP status code 404
Migration job with id not found
Body
Media type: text/plain
Type: any
Example:
Not found
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
delete /inventory-storage/migrations/jobs/{id}
Cancell migration job by id