Data import version v3.0
http://localhost
Data import API
API for uploading source records and processing them
/data-import
File Upload Definition API
Create a new uploadDefinition item.
Get a list of definitions
post /data-import/uploadDefinitions
Create a new uploadDefinition item.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Upload process definition",
"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}$"
},
"metaJobExecutionId": {
"description": "Link to the metajob execution",
"$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}$"
},
"status": {
"description": "Status of upload",
"type": "string",
"enum": [
"NEW",
"IN_PROGRESS",
"LOADED",
"COMPLETED",
"ERROR"
]
},
"createDate": {
"description": "Date and time when the upload definition was created",
"type": "string",
"format": "date-time"
},
"fileDefinitions": {
"description": "Array of file entities",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Uploaded file metadata entity",
"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}$"
},
"sourcePath": {
"description": "The path to the file location",
"type": "string",
"readonly": true
},
"name": {
"description": "Name of the file with extension",
"type": "string"
},
"status": {
"description": "Status of files upload",
"type": "string",
"enum": [
"NEW",
"UPLOADING",
"UPLOADED",
"ERROR"
]
},
"jobExecutionId": {
"description": "Link to 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}$"
},
"uploadDefinitionId": {
"description": "Link to UploadDefinition 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}$"
},
"createDate": {
"description": "Date and time when the file definition was created",
"type": "string",
"format": "date-time"
},
"uploadedDate": {
"description": "Date and time when the file was uploaded",
"type": "string",
"format": "date-time"
},
"size": {
"description": "Size of the file in Kbyte",
"type": "integer"
},
"uiKey": {
"description": "Unique key for the file definition on ui before entity saved",
"type": "string"
}
},
"required": [
"name"
]
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"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"
]
}
},
"excludedFromEqualsAndHashCode": [
"fileDefinitions"
]
}
Example:
{
"id":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"metaJobExecutionId":"99dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"IN_PROGRESS",
"fileDefinitions":[
{
"id":"88dfac11-1caf-4470-9ad1-d533f6360bdd",
"uploadDefinitionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"jobExecutionId":"66dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"UPLOADED",
"name":"marc.mrc"
},
{
"id":"77dfac11-1caf-4470-9ad1-d533f6360bdd",
"uploadDefinitionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"jobExecutionId":"55dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"UPLOADING",
"name":"marc2.mrc"
}
]
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created uploadDefinition item
Body
Media type: application/json
Type: any
Example:
{
"id":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"metaJobExecutionId":"99dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"IN_PROGRESS",
"fileDefinitions":[
{
"id":"88dfac11-1caf-4470-9ad1-d533f6360bdd",
"uploadDefinitionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"jobExecutionId":"66dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"UPLOADED",
"name":"marc.mrc"
},
{
"id":"77dfac11-1caf-4470-9ad1-d533f6360bdd",
"uploadDefinitionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"jobExecutionId":"55dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"UPLOADING",
"name":"marc2.mrc"
}
]
}
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 add uploadDefinition -- malformed JSON at 13:3"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to create uploadDefinitions -- unauthorized
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 /data-import/uploadDefinitions
Get a list of definitions
Query Parameters
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example id=67dfac11-1caf-4470-9ad1-d533f6360bdd
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode id=67dfac11-1caf-4470-9ad1-d533f6360bdd
- 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
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
HTTP status code 200
Returns a list of uploadDefinition items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of upload definitions",
"type": "object",
"additionalProperties": false,
"properties": {
"uploadDefinitions": {
"description": "Array of upload definitions",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Upload process definition",
"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}$"
},
"metaJobExecutionId": {
"description": "Link to the metajob execution",
"$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}$"
},
"status": {
"description": "Status of upload",
"type": "string",
"enum": [
"NEW",
"IN_PROGRESS",
"LOADED",
"COMPLETED",
"ERROR"
]
},
"createDate": {
"description": "Date and time when the upload definition was created",
"type": "string",
"format": "date-time"
},
"fileDefinitions": {
"description": "Array of file entities",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Uploaded file metadata entity",
"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}$"
},
"sourcePath": {
"description": "The path to the file location",
"type": "string",
"readonly": true
},
"name": {
"description": "Name of the file with extension",
"type": "string"
},
"status": {
"description": "Status of files upload",
"type": "string",
"enum": [
"NEW",
"UPLOADING",
"UPLOADED",
"ERROR"
]
},
"jobExecutionId": {
"description": "Link to 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}$"
},
"uploadDefinitionId": {
"description": "Link to UploadDefinition 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}$"
},
"createDate": {
"description": "Date and time when the file definition was created",
"type": "string",
"format": "date-time"
},
"uploadedDate": {
"description": "Date and time when the file was uploaded",
"type": "string",
"format": "date-time"
},
"size": {
"description": "Size of the file in Kbyte",
"type": "integer"
},
"uiKey": {
"description": "Unique key for the file definition on ui before entity saved",
"type": "string"
}
},
"required": [
"name"
]
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"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"
]
}
},
"excludedFromEqualsAndHashCode": [
"fileDefinitions"
]
}
},
"totalRecords": {
"description": "Total records in collection",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"uploadDefinitions",
"totalRecords"
]
}
Example:
{
"uploadDefinitions":[
{
"id":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"metaJobExecutionId":"99dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"IN_PROGRESS",
"fileDefinitions":[
{
"id":"88dfac11-1caf-4470-9ad1-d533f6360bdd",
"uploadDefinitionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"jobExecutionId":"66dfac11-1caf-4470-9ad1-d533f6360bdd",
"loaded":true,
"name":"marc.mrc"
},
{
"id":"77dfac11-1caf-4470-9ad1-d533f6360bdd",
"uploadDefinitionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"jobExecutionId":"55dfac11-1caf-4470-9ad1-d533f6360bdd",
"loaded":false,
"name":"marc2.mrc"
}
]
}
],
"totalRecords":1
}
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 list uploadDefinitions -- malformed parameter 'query', syntax error at column 6
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to list uploadDefinitions -- unauthorized
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, Delete or Update a specific Upload Definition
Update uploadDefinition item with given {uploadDefinitionId}
Delete uploadDefinition item with given {uploadDefinitionId}
Retrieve uploadDefinition item with given {uploadDefinitionId}
put /data-import/uploadDefinitions/{uploadDefinitionId}
Update uploadDefinition item with given {uploadDefinitionId}
URI Parameters
- uploadDefinitionId: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Upload process definition",
"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}$"
},
"metaJobExecutionId": {
"description": "Link to the metajob execution",
"$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}$"
},
"status": {
"description": "Status of upload",
"type": "string",
"enum": [
"NEW",
"IN_PROGRESS",
"LOADED",
"COMPLETED",
"ERROR"
]
},
"createDate": {
"description": "Date and time when the upload definition was created",
"type": "string",
"format": "date-time"
},
"fileDefinitions": {
"description": "Array of file entities",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Uploaded file metadata entity",
"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}$"
},
"sourcePath": {
"description": "The path to the file location",
"type": "string",
"readonly": true
},
"name": {
"description": "Name of the file with extension",
"type": "string"
},
"status": {
"description": "Status of files upload",
"type": "string",
"enum": [
"NEW",
"UPLOADING",
"UPLOADED",
"ERROR"
]
},
"jobExecutionId": {
"description": "Link to 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}$"
},
"uploadDefinitionId": {
"description": "Link to UploadDefinition 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}$"
},
"createDate": {
"description": "Date and time when the file definition was created",
"type": "string",
"format": "date-time"
},
"uploadedDate": {
"description": "Date and time when the file was uploaded",
"type": "string",
"format": "date-time"
},
"size": {
"description": "Size of the file in Kbyte",
"type": "integer"
},
"uiKey": {
"description": "Unique key for the file definition on ui before entity saved",
"type": "string"
}
},
"required": [
"name"
]
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"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"
]
}
},
"excludedFromEqualsAndHashCode": [
"fileDefinitions"
]
}
Example:
{
"id":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"metaJobExecutionId":"99dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"IN_PROGRESS",
"fileDefinitions":[
{
"id":"88dfac11-1caf-4470-9ad1-d533f6360bdd",
"uploadDefinitionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"jobExecutionId":"66dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"UPLOADED",
"name":"marc.mrc"
},
{
"id":"77dfac11-1caf-4470-9ad1-d533f6360bdd",
"uploadDefinitionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"jobExecutionId":"55dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"UPLOADING",
"name":"marc2.mrc"
}
]
}
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Upload process definition",
"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}$"
},
"metaJobExecutionId": {
"description": "Link to the metajob execution",
"$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}$"
},
"status": {
"description": "Status of upload",
"type": "string",
"enum": [
"NEW",
"IN_PROGRESS",
"LOADED",
"COMPLETED",
"ERROR"
]
},
"createDate": {
"description": "Date and time when the upload definition was created",
"type": "string",
"format": "date-time"
},
"fileDefinitions": {
"description": "Array of file entities",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Uploaded file metadata entity",
"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}$"
},
"sourcePath": {
"description": "The path to the file location",
"type": "string",
"readonly": true
},
"name": {
"description": "Name of the file with extension",
"type": "string"
},
"status": {
"description": "Status of files upload",
"type": "string",
"enum": [
"NEW",
"UPLOADING",
"UPLOADED",
"ERROR"
]
},
"jobExecutionId": {
"description": "Link to 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}$"
},
"uploadDefinitionId": {
"description": "Link to UploadDefinition 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}$"
},
"createDate": {
"description": "Date and time when the file definition was created",
"type": "string",
"format": "date-time"
},
"uploadedDate": {
"description": "Date and time when the file was uploaded",
"type": "string",
"format": "date-time"
},
"size": {
"description": "Size of the file in Kbyte",
"type": "integer"
},
"uiKey": {
"description": "Unique key for the file definition on ui before entity saved",
"type": "string"
}
},
"required": [
"name"
]
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"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"
]
}
},
"excludedFromEqualsAndHashCode": [
"fileDefinitions"
]
}
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 uploadDefinition -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"uploadDefinition 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
delete /data-import/uploadDefinitions/{uploadDefinitionId}
Delete uploadDefinition item with given {uploadDefinitionId}
URI Parameters
- uploadDefinitionId: 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 uploadDefinition -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"uploadDefinition 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 /data-import/uploadDefinitions/{uploadDefinitionId}
Retrieve uploadDefinition item with given {uploadDefinitionId}
URI Parameters
- uploadDefinitionId: 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#",
"type": "object",
"description": "Upload process definition",
"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}$"
},
"metaJobExecutionId": {
"description": "Link to the metajob execution",
"$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}$"
},
"status": {
"description": "Status of upload",
"type": "string",
"enum": [
"NEW",
"IN_PROGRESS",
"LOADED",
"COMPLETED",
"ERROR"
]
},
"createDate": {
"description": "Date and time when the upload definition was created",
"type": "string",
"format": "date-time"
},
"fileDefinitions": {
"description": "Array of file entities",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Uploaded file metadata entity",
"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}$"
},
"sourcePath": {
"description": "The path to the file location",
"type": "string",
"readonly": true
},
"name": {
"description": "Name of the file with extension",
"type": "string"
},
"status": {
"description": "Status of files upload",
"type": "string",
"enum": [
"NEW",
"UPLOADING",
"UPLOADED",
"ERROR"
]
},
"jobExecutionId": {
"description": "Link to 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}$"
},
"uploadDefinitionId": {
"description": "Link to UploadDefinition 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}$"
},
"createDate": {
"description": "Date and time when the file definition was created",
"type": "string",
"format": "date-time"
},
"uploadedDate": {
"description": "Date and time when the file was uploaded",
"type": "string",
"format": "date-time"
},
"size": {
"description": "Size of the file in Kbyte",
"type": "integer"
},
"uiKey": {
"description": "Unique key for the file definition on ui before entity saved",
"type": "string"
}
},
"required": [
"name"
]
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"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"
]
}
},
"excludedFromEqualsAndHashCode": [
"fileDefinitions"
]
}
Example:
{
"id":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"metaJobExecutionId":"99dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"IN_PROGRESS",
"fileDefinitions":[
{
"id":"88dfac11-1caf-4470-9ad1-d533f6360bdd",
"uploadDefinitionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"jobExecutionId":"66dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"UPLOADED",
"name":"marc.mrc"
},
{
"id":"77dfac11-1caf-4470-9ad1-d533f6360bdd",
"uploadDefinitionId":"67dfac11-1caf-4470-9ad1-d533f6360bdd",
"jobExecutionId":"55dfac11-1caf-4470-9ad1-d533f6360bdd",
"status":"UPLOADING",
"name":"marc2.mrc"
}
]
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"uploadDefinition 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
post /data-import/uploadDefinitions/{uploadDefinitionId}/files
URI Parameters
- uploadDefinitionId: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Uploaded file metadata entity",
"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}$"
},
"sourcePath": {
"description": "The path to the file location",
"type": "string",
"readonly": true
},
"name": {
"description": "Name of the file with extension",
"type": "string"
},
"status": {
"description": "Status of files upload",
"type": "string",
"enum": [
"NEW",
"UPLOADING",
"UPLOADED",
"ERROR"
]
},
"jobExecutionId": {
"description": "Link to 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}$"
},
"uploadDefinitionId": {
"description": "Link to UploadDefinition 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}$"
},
"createDate": {
"description": "Date and time when the file definition was created",
"type": "string",
"format": "date-time"
},
"uploadedDate": {
"description": "Date and time when the file was uploaded",
"type": "string",
"format": "date-time"
},
"size": {
"description": "Size of the file in Kbyte",
"type": "integer"
},
"uiKey": {
"description": "Unique key for the file definition on ui before entity saved",
"type": "string"
}
},
"required": [
"name"
]
}
HTTP status code 201
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Upload process definition",
"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}$"
},
"metaJobExecutionId": {
"description": "Link to the metajob execution",
"$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}$"
},
"status": {
"description": "Status of upload",
"type": "string",
"enum": [
"NEW",
"IN_PROGRESS",
"LOADED",
"COMPLETED",
"ERROR"
]
},
"createDate": {
"description": "Date and time when the upload definition was created",
"type": "string",
"format": "date-time"
},
"fileDefinitions": {
"description": "Array of file entities",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Uploaded file metadata entity",
"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}$"
},
"sourcePath": {
"description": "The path to the file location",
"type": "string",
"readonly": true
},
"name": {
"description": "Name of the file with extension",
"type": "string"
},
"status": {
"description": "Status of files upload",
"type": "string",
"enum": [
"NEW",
"UPLOADING",
"UPLOADED",
"ERROR"
]
},
"jobExecutionId": {
"description": "Link to 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}$"
},
"uploadDefinitionId": {
"description": "Link to UploadDefinition 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}$"
},
"createDate": {
"description": "Date and time when the file definition was created",
"type": "string",
"format": "date-time"
},
"uploadedDate": {
"description": "Date and time when the file was uploaded",
"type": "string",
"format": "date-time"
},
"size": {
"description": "Size of the file in Kbyte",
"type": "integer"
},
"uiKey": {
"description": "Unique key for the file definition on ui before entity saved",
"type": "string"
}
},
"required": [
"name"
]
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"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"
]
}
},
"excludedFromEqualsAndHashCode": [
"fileDefinitions"
]
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
Bad request
HTTP status code 422
Unprocessable Entity
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 file by id
Upload file
delete /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}
Delete file by id
post /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}
Upload file
URI Parameters
- uploadDefinitionId: required(string)
- fileId: required(string)
Body
Media type: application/octet-stream
Type: any
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Upload process definition",
"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}$"
},
"metaJobExecutionId": {
"description": "Link to the metajob execution",
"$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}$"
},
"status": {
"description": "Status of upload",
"type": "string",
"enum": [
"NEW",
"IN_PROGRESS",
"LOADED",
"COMPLETED",
"ERROR"
]
},
"createDate": {
"description": "Date and time when the upload definition was created",
"type": "string",
"format": "date-time"
},
"fileDefinitions": {
"description": "Array of file entities",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Uploaded file metadata entity",
"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}$"
},
"sourcePath": {
"description": "The path to the file location",
"type": "string",
"readonly": true
},
"name": {
"description": "Name of the file with extension",
"type": "string"
},
"status": {
"description": "Status of files upload",
"type": "string",
"enum": [
"NEW",
"UPLOADING",
"UPLOADED",
"ERROR"
]
},
"jobExecutionId": {
"description": "Link to 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}$"
},
"uploadDefinitionId": {
"description": "Link to UploadDefinition 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}$"
},
"createDate": {
"description": "Date and time when the file definition was created",
"type": "string",
"format": "date-time"
},
"uploadedDate": {
"description": "Date and time when the file was uploaded",
"type": "string",
"format": "date-time"
},
"size": {
"description": "Size of the file in Kbyte",
"type": "integer"
},
"uiKey": {
"description": "Unique key for the file definition on ui before entity saved",
"type": "string"
}
},
"required": [
"name"
]
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"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"
]
}
},
"excludedFromEqualsAndHashCode": [
"fileDefinitions"
]
}
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 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
Assemble the large file uploaded to storage by the UI
post /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}/assembleStorageFile
Assemble the large file uploaded to storage by the UI
URI Parameters
- uploadDefinitionId: required(string)
- fileId: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Request to assemble parts of a file into the result",
"type": "object",
"additionalProperties": false,
"properties": {
"tags": {
"description": "Identifier for all files taken from response to individual uploads. Determines what files will be assembled",
"type": "array",
"items": {
"type": "string"
}
},
"key": {
"description": "Storage key for the object",
"type": "string"
},
"uploadId": {
"description": "ID of the upload taken from /data-import/uploadUrl",
"type": "string"
}
},
"required": [
"tags",
"key",
"uploadId"
]
}
HTTP status code 204
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
File processing API
Starts the file processing
post /data-import/uploadDefinitions/{uploadDefinitionId}/processFiles
Starts the file processing
URI Parameters
- uploadDefinitionId: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Necessary data to start file dividing process",
"type": "object",
"additionalProperties": false,
"properties": {
"uploadDefinition": {
"description": "Upload definition",
"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}$"
},
"metaJobExecutionId": {
"description": "Link to the metajob execution",
"$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}$"
},
"status": {
"description": "Status of upload",
"type": "string",
"enum": [
"NEW",
"IN_PROGRESS",
"LOADED",
"COMPLETED",
"ERROR"
]
},
"createDate": {
"description": "Date and time when the upload definition was created",
"type": "string",
"format": "date-time"
},
"fileDefinitions": {
"description": "Array of file entities",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Uploaded file metadata entity",
"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}$"
},
"sourcePath": {
"description": "The path to the file location",
"type": "string",
"readonly": true
},
"name": {
"description": "Name of the file with extension",
"type": "string"
},
"status": {
"description": "Status of files upload",
"type": "string",
"enum": [
"NEW",
"UPLOADING",
"UPLOADED",
"ERROR"
]
},
"jobExecutionId": {
"description": "Link to 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}$"
},
"uploadDefinitionId": {
"description": "Link to UploadDefinition 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}$"
},
"createDate": {
"description": "Date and time when the file definition was created",
"type": "string",
"format": "date-time"
},
"uploadedDate": {
"description": "Date and time when the file was uploaded",
"type": "string",
"format": "date-time"
},
"size": {
"description": "Size of the file in Kbyte",
"type": "integer"
},
"uiKey": {
"description": "Unique key for the file definition on ui before entity saved",
"type": "string"
}
},
"required": [
"name"
]
}
},
"metadata": {
"description": "Metadata about creation and changes, provided by the server (client should not provide)",
"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"
]
}
},
"excludedFromEqualsAndHashCode": [
"fileDefinitions"
]
},
"jobProfileInfo": {
"description": "Related Job profile info",
"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"
]
}
},
"required": [
"uploadDefinition",
"jobProfileInfo"
]
}
HTTP status code 204
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
Bad request
HTTP status code 422
Unprocessable Entity
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
removes incomplete files from DI queue and marks the jobs cancelled
delete /data-import/jobExecutions/{jobExecutionId}/cancel
URI Parameters
- jobExecutionId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "cancel job execution response schema",
"type": "object",
"additionalProperties": false,
"properties": {
"ok": {
"description": "If the request was successful; this will always be true as failures will cause a non-2xx response",
"type": "boolean",
"const": true
}
},
"required": [
"ok"
]
}
HTTP status code 500
Body
Media type: application/json
Type: string
Get a presigned S3 download URL
get /data-import/jobExecutions/{jobExecutionId}/downloadUrl
URI Parameters
- jobExecutionId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "file download info, returned when requesting a presigned S3 url",
"type": "object",
"additionalProperties": false,
"properties": {
"url": {
"description": "presigned url to be used for direct s3 download",
"type": "string"
}
},
"required": [
"url"
]
}
HTTP status code 404
Job execution not found
Body
Media type: text/plain
Type: any
Example:
Job execution not found
API for managing file extensions
Retrieve a list of fileExtension items.
Create a new fileExtension item.
get /data-import/fileExtensions
Retrieve a list of fileExtension items.
Query Parameters
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example importBlocked=true
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode importBlocked=true
- 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
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
HTTP status code 200
Returns a list of fileExtension items
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of file extensions",
"type": "object",
"additionalProperties": false,
"properties": {
"fileExtensions": {
"description": "List of file extensions",
"type": "array",
"id": "fileExtensionList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "File Extension Schema",
"additionalProperties": false,
"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}$"
},
"description": {
"description": "Description field for the extension",
"type": "string"
},
"extension": {
"description": "File extension",
"type": "string"
},
"dataTypes": {
"description": "Set of data types",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Data Types Enum",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
}
},
"importBlocked": {
"description": "Flag indicating if import is blocked",
"type": "boolean"
},
"userInfo": {
"description": "User brief info, who updated the File Extension",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"firstName": {
"description": "User first name",
"type": "string"
},
"lastName": {
"description": "User last name",
"type": "string"
},
"userName": {
"description": "User name (nickname)",
"type": "string"
}
}
},
"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"
]
}
},
"required": [
"extension",
"importBlocked"
]
}
},
"totalRecords": {
"description": "Total number of file extensions",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"fileExtensions",
"totalRecords"
]
}
Example:
{
"fileExtensions": [
{
"id": "zx5thml9-6hnq-45n0-23c0-13n8gbkl7091",
"description": "Marc file",
"extension": ".marc",
"dataTypes": [
"MARC"
],
"importBlocked": false,
"userInfo": {
"firstName": "",
"lastName": "",
"userName": "System"
},
"metadata": {
"createdDate": "2019-01-01T11:550:09Z",
"createdByUserId": "",
"createdByUsername": "",
"updatedDate": "",
"updatedByUserId": "",
"updatedByUsername": ""
}
}
],
"totalRecords": 1
}
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 list fileExtensions -- malformed parameter 'query', syntax error at column 6
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to list fileExtensions -- unauthorized
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
post /data-import/fileExtensions
Create a new fileExtension item.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "File Extension Schema",
"additionalProperties": false,
"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}$"
},
"description": {
"description": "Description field for the extension",
"type": "string"
},
"extension": {
"description": "File extension",
"type": "string"
},
"dataTypes": {
"description": "Set of data types",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Data Types Enum",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
}
},
"importBlocked": {
"description": "Flag indicating if import is blocked",
"type": "boolean"
},
"userInfo": {
"description": "User brief info, who updated the File Extension",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"firstName": {
"description": "User first name",
"type": "string"
},
"lastName": {
"description": "User last name",
"type": "string"
},
"userName": {
"description": "User name (nickname)",
"type": "string"
}
}
},
"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"
]
}
},
"required": [
"extension",
"importBlocked"
]
}
Example:
{
"id": "zx5thml9-6hnq-45n0-23c0-13n8gbkl7091",
"description": "Marc file",
"extension": ".marc",
"dataTypes": [
"MARC"
],
"importBlocked": false,
"userInfo": {
"firstName": "DIKU",
"lastName": "ADMINISTRATOR",
"userName": "diku_admin"
},
"metadata": {
"createdDate": "2019-01-01T11:550:09Z",
"createdByUserId": "",
"createdByUsername": "",
"updatedDate": "2019-01-12T14:21:11Z",
"updatedByUserId": "",
"updatedByUsername": ""
}
}
HTTP status code 201
Returns a newly created item, with server-controlled fields like 'id' populated
Headers
- Location: required(string)
URI to the created fileExtension item
Body
Media type: application/json
Type: any
Example:
{
"id": "zx5thml9-6hnq-45n0-23c0-13n8gbkl7091",
"description": "Marc file",
"extension": ".marc",
"dataTypes": [
"MARC"
],
"importBlocked": false,
"userInfo": {
"firstName": "DIKU",
"lastName": "ADMINISTRATOR",
"userName": "diku_admin"
},
"metadata": {
"createdDate": "2019-01-01T11:550:09Z",
"createdByUserId": "",
"createdByUsername": "",
"updatedDate": "2019-01-12T14:21:11Z",
"updatedByUserId": "",
"updatedByUsername": ""
}
}
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 add fileExtension -- malformed JSON at 13:3"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to create fileExtensions -- unauthorized
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, Delete or Update a specific File Extension
Update fileExtension item with given {fileExtensionId}
Delete fileExtension item with given {fileExtensionId}
Retrieve fileExtension item with given {fileExtensionId}
put /data-import/fileExtensions/{id}
Update fileExtension item with given {fileExtensionId}
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "File Extension Schema",
"additionalProperties": false,
"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}$"
},
"description": {
"description": "Description field for the extension",
"type": "string"
},
"extension": {
"description": "File extension",
"type": "string"
},
"dataTypes": {
"description": "Set of data types",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Data Types Enum",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
}
},
"importBlocked": {
"description": "Flag indicating if import is blocked",
"type": "boolean"
},
"userInfo": {
"description": "User brief info, who updated the File Extension",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"firstName": {
"description": "User first name",
"type": "string"
},
"lastName": {
"description": "User last name",
"type": "string"
},
"userName": {
"description": "User name (nickname)",
"type": "string"
}
}
},
"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"
]
}
},
"required": [
"extension",
"importBlocked"
]
}
Example:
{
"id": "zx5thml9-6hnq-45n0-23c0-13n8gbkl7091",
"description": "Marc file",
"extension": ".marc",
"dataTypes": [
"MARC"
],
"importBlocked": false,
"userInfo": {
"firstName": "DIKU",
"lastName": "ADMINISTRATOR",
"userName": "diku_admin"
},
"metadata": {
"createdDate": "2019-01-01T11:550:09Z",
"createdByUserId": "",
"createdByUsername": "",
"updatedDate": "2019-01-12T14:21:11Z",
"updatedByUserId": "",
"updatedByUsername": ""
}
}
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "File Extension Schema",
"additionalProperties": false,
"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}$"
},
"description": {
"description": "Description field for the extension",
"type": "string"
},
"extension": {
"description": "File extension",
"type": "string"
},
"dataTypes": {
"description": "Set of data types",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Data Types Enum",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
}
},
"importBlocked": {
"description": "Flag indicating if import is blocked",
"type": "boolean"
},
"userInfo": {
"description": "User brief info, who updated the File Extension",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"firstName": {
"description": "User first name",
"type": "string"
},
"lastName": {
"description": "User last name",
"type": "string"
},
"userName": {
"description": "User name (nickname)",
"type": "string"
}
}
},
"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"
]
}
},
"required": [
"extension",
"importBlocked"
]
}
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 fileExtension -- malformed JSON at 13:4"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"fileExtension 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
delete /data-import/fileExtensions/{id}
Delete fileExtension item with given {fileExtensionId}
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 fileExtension -- constraint violation"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"fileExtension 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 /data-import/fileExtensions/{id}
Retrieve fileExtension item with given {fileExtensionId}
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": "File Extension Schema",
"additionalProperties": false,
"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}$"
},
"description": {
"description": "Description field for the extension",
"type": "string"
},
"extension": {
"description": "File extension",
"type": "string"
},
"dataTypes": {
"description": "Set of data types",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Data Types Enum",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
}
},
"importBlocked": {
"description": "Flag indicating if import is blocked",
"type": "boolean"
},
"userInfo": {
"description": "User brief info, who updated the File Extension",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"firstName": {
"description": "User first name",
"type": "string"
},
"lastName": {
"description": "User last name",
"type": "string"
},
"userName": {
"description": "User name (nickname)",
"type": "string"
}
}
},
"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"
]
}
},
"required": [
"extension",
"importBlocked"
]
}
Example:
{
"id": "zx5thml9-6hnq-45n0-23c0-13n8gbkl7091",
"description": "Marc file",
"extension": ".marc",
"dataTypes": [
"MARC"
],
"importBlocked": false,
"userInfo": {
"firstName": "DIKU",
"lastName": "ADMINISTRATOR",
"userName": "diku_admin"
},
"metadata": {
"createdDate": "2019-01-01T11:550:09Z",
"createdByUserId": "",
"createdByUsername": "",
"updatedDate": "2019-01-12T14:21:11Z",
"updatedByUserId": "",
"updatedByUsername": ""
}
}
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"fileExtension 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
Restore fileExtension settings to default
post /data-import/fileExtensions/restore/default
Restore fileExtension settings to default
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of file extensions",
"type": "object",
"additionalProperties": false,
"properties": {
"fileExtensions": {
"description": "List of file extensions",
"type": "array",
"id": "fileExtensionList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "File Extension Schema",
"additionalProperties": false,
"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}$"
},
"description": {
"description": "Description field for the extension",
"type": "string"
},
"extension": {
"description": "File extension",
"type": "string"
},
"dataTypes": {
"description": "Set of data types",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Data Types Enum",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
}
},
"importBlocked": {
"description": "Flag indicating if import is blocked",
"type": "boolean"
},
"userInfo": {
"description": "User brief info, who updated the File Extension",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"firstName": {
"description": "User first name",
"type": "string"
},
"lastName": {
"description": "User last name",
"type": "string"
},
"userName": {
"description": "User name (nickname)",
"type": "string"
}
}
},
"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"
]
}
},
"required": [
"extension",
"importBlocked"
]
}
},
"totalRecords": {
"description": "Total number of file extensions",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"fileExtensions",
"totalRecords"
]
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
Bad request
HTTP status code 422
Unprocessable Entity
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"
}
}
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error
Get a list of data types
get /data-import/dataTypes
Get a list of data types
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of data types",
"type": "object",
"additionalProperties": false,
"properties": {
"dataTypes": {
"description": "Set of data types",
"type": "array",
"id": "dataTypeList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Data Types Enum",
"additionalProperties": false,
"enum": [
"Delimited",
"EDIFACT",
"MARC"
]
}
},
"totalRecords": {
"description": "Total number of data types",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"dataTypes",
"totalRecords"
]
}
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
Get the server configuration of file splitting
get /data-import/splitStatus
Get the server configuration of file splitting
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "response from teh split status api call",
"type": "object",
"additionalProperties": false,
"properties": {
"splitStatus": {
"type": "boolean",
"description": "current status of split configuration for the module",
"default": false
}
},
"required": [
"splitStatus"
]
}
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
Get a presigned upload url for the first part of a file
get /data-import/uploadUrl
Get a presigned upload url for the first part of a file
Query Parameters
- fileName: required(string)
The name of the file that will be uploaded
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "file upload info json",
"type": "object",
"additionalProperties": false,
"properties": {
"url": {
"description": "presigned url to be used for direct s3 upload",
"type": "string"
},
"key": {
"description": "Key for file upload on S3 storage",
"type": "string"
},
"uploadId": {
"description": "Multipart upload ID",
"type": "string"
}
},
"required": [
"url",
"key",
"uploadId"
]
}
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
Get a presigned upload url for later parts of a file
get /data-import/uploadUrl/subsequent
Get a presigned upload url for later parts of a file
Query Parameters
- key: required(string)
The key that will be uploaded to on S3
- uploadId: required(string)
The upload ID
- partNumber: required(integer - minimum: 2)
The part number, postitive integers beginning at two (part 1 is uploaded with /uploadUrl)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "file upload info json",
"type": "object",
"additionalProperties": false,
"properties": {
"url": {
"description": "presigned url to be used for direct s3 upload",
"type": "string"
},
"key": {
"description": "Key for file upload on S3 storage",
"type": "string"
},
"uploadId": {
"description": "Multipart upload ID",
"type": "string"
}
},
"required": [
"url",
"key",
"uploadId"
]
}
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