http://localhost
API for uploading source records and processing them
Create a new uploadDefinition item.
POST /data-import/uploadDefinitions
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"
}
]
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created uploadDefinition item
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"
}
]
}
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.
Media type: text/plain
Type: any
Example:
"unable to add uploadDefinition -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create uploadDefinitions -- unauthorized
Validation errors
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"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Get a list of definitions
GET /data-import/uploadDefinitions
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
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
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
Returns a list of uploadDefinition items
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
}
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.
Media type: text/plain
Type: any
Example:
unable to list uploadDefinitions -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list uploadDefinitions -- unauthorized
Validation errors
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"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Update uploadDefinition item with given {uploadDefinitionId}
PUT /data-import/uploadDefinitions/{uploadDefinitionId}
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"
}
]
}
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"
]
}
Item successfully updated
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.
Media type: text/plain
Type: any
Example:
"unable to update uploadDefinition -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"uploadDefinition not found"
Optimistic locking version conflict
Media type: text/plain
Type: any
Example:
version conflict
Validation errors
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"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete uploadDefinition item with given {uploadDefinitionId}
DELETE /data-import/uploadDefinitions/{uploadDefinitionId}
Item deleted successfully
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.
Media type: text/plain
Type: any
Example:
"unable to delete uploadDefinition -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"uploadDefinition not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Retrieve uploadDefinition item with given {uploadDefinitionId}
GET /data-import/uploadDefinitions/{uploadDefinitionId}
Returns item with a given ID
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"
}
]
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"uploadDefinition not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
POST /data-import/uploadDefinitions/{uploadDefinitionId}/files
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"
]
}
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"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Unprocessable Entity
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"
}
]
}
]
}
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error
Delete file by id
DELETE /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}
Upload file
POST /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}
Media type: application/octet-stream
Type: any
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"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Not found
Media type: text/plain
Type: any
Example:
Not found
Internal server error
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
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"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Validation errors
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"
}
]
}
]
}
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error
Starts the file processing
POST /data-import/uploadDefinitions/{uploadDefinitionId}/processFiles
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"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Unprocessable Entity
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"
}
]
}
]
}
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error
DELETE /data-import/jobExecutions/{jobExecutionId}/cancel
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"
]
}
Media type: application/json
Type: string
GET /data-import/jobExecutions/{jobExecutionId}/downloadUrl
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"
]
}
Job execution not found
Media type: text/plain
Type: any
Example:
Job execution not found
Retrieve a list of fileExtension items.
GET /data-import/fileExtensions
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
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
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
Returns a list of fileExtension items
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
}
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.
Media type: text/plain
Type: any
Example:
unable to list fileExtensions -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list fileExtensions -- unauthorized
Validation errors
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"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Create a new fileExtension item.
POST /data-import/fileExtensions
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": ""
}
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created fileExtension item
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": ""
}
}
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.
Media type: text/plain
Type: any
Example:
"unable to add fileExtension -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create fileExtensions -- unauthorized
Validation errors
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"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Update fileExtension item with given {fileExtensionId}
PUT /data-import/fileExtensions/{id}
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": ""
}
}
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"
]
}
Item successfully updated
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.
Media type: text/plain
Type: any
Example:
"unable to update fileExtension -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"fileExtension not found"
Optimistic locking version conflict
Media type: text/plain
Type: any
Example:
version conflict
Validation errors
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"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete fileExtension item with given {fileExtensionId}
DELETE /data-import/fileExtensions/{id}
Item deleted successfully
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.
Media type: text/plain
Type: any
Example:
"unable to delete fileExtension -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"fileExtension not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Retrieve fileExtension item with given {fileExtensionId}
GET /data-import/fileExtensions/{id}
Returns item with a given ID
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": ""
}
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"fileExtension not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Restore fileExtension settings to default
POST /data-import/fileExtensions/restore/default
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"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Unprocessable Entity
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"
}
}
}
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error
Get a list of data types
GET /data-import/dataTypes
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"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error
Get the server configuration of file splitting
GET /data-import/splitStatus
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"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Internal server error
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
The name of the file that will be uploaded
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"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Internal server error
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
The key that will be uploaded to on S3
The upload ID
The part number, postitive integers beginning at two (part 1 is uploaded with /uploadUrl)
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"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error