Data import (v3.0)

http://localhost

Table of contents

Data import API

API for uploading source records and processing them

/data-import

POST /data-import/uploadDefinitions

Create a new uploadDefinition item.

POST /data-import/uploadDefinitions
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"
       }
    ]
 }

Response 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"
       }
    ]
 }

Response 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"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create uploadDefinitions -- unauthorized

Response 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"
        }
      ]
    }
  ]
}

Response 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

GET /data-import/uploadDefinitions
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

Response 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
}

Response 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

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list uploadDefinitions -- unauthorized

Response 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"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

PUT /data-import/uploadDefinitions/{uploadDefinitionId}

Update uploadDefinition item with given {uploadDefinitionId}

PUT /data-import/uploadDefinitions/{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"
       }
    ]
 }

Response 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"
  ]
}

Response 204

Item successfully updated

Response 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"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"uploadDefinition not found"

Response 409

Optimistic locking version conflict

Body

Media type: text/plain

Type: any

Example:

version conflict

Response 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"
        }
      ]
    }
  ]
}

Response 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}

DELETE /data-import/uploadDefinitions/{uploadDefinitionId}
URI Parameters
  • uploadDefinitionId: required (string)

Response 204

Item deleted successfully

Response 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"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"uploadDefinition not found"

Response 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}

GET /data-import/uploadDefinitions/{uploadDefinitionId}
URI Parameters
  • uploadDefinitionId: required (string)

Response 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"
       }
    ]
 }

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"uploadDefinition not found"

Response 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

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"
  ]
}

Response 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"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 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"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

DELETE /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}

Delete file by id

DELETE /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}
URI Parameters
  • uploadDefinitionId: required (string)
  • fileId: required (string)

Response 204

Response 404

File not found

Body

Media type: text/plain

Type: any

Example:

File not found

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}

Upload file

POST /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}
URI Parameters
  • uploadDefinitionId: required (string)
  • fileId: required (string)
Body

Media type: application/octet-stream

Type: any

Response 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"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 404

Not found

Body

Media type: text/plain

Type: any

Example:

Not found

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}/assembleStorageFile

Assemble the large file uploaded to storage by the UI

POST /data-import/uploadDefinitions/{uploadDefinitionId}/files/{fileId}/assembleStorageFile
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"
  ]
}

Response 204

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 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"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

POST /data-import/uploadDefinitions/{uploadDefinitionId}/processFiles

Starts the file processing

POST /data-import/uploadDefinitions/{uploadDefinitionId}/processFiles
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"
  ]
}

Response 204

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 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"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

DELETE /data-import/jobExecutions/{jobExecutionId}/cancel

DELETE /data-import/jobExecutions/{jobExecutionId}/cancel
URI Parameters
  • jobExecutionId: required (string)

Response 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"
  ]
}

Response 500

Body

Media type: application/json

Type: string

GET /data-import/jobExecutions/{jobExecutionId}/downloadUrl

GET /data-import/jobExecutions/{jobExecutionId}/downloadUrl
URI Parameters
  • jobExecutionId: required (string)

Response 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"
  ]
}

Response 404

Job execution not found

Body

Media type: text/plain

Type: any

Example:

Job execution not found

GET /data-import/fileExtensions

Retrieve a list of fileExtension items.

GET /data-import/fileExtensions
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

Response 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
}

Response 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

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list fileExtensions -- unauthorized

Response 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"
        }
      ]
    }
  ]
}

Response 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.

POST /data-import/fileExtensions
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": ""
  }
}

Response 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": ""
  }
}

Response 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"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create fileExtensions -- unauthorized

Response 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"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

PUT /data-import/fileExtensions/{id}

Update fileExtension item with given {fileExtensionId}

PUT /data-import/fileExtensions/{id}
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": ""
  }
}

Response 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"
  ]
}

Response 204

Item successfully updated

Response 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"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"fileExtension not found"

Response 409

Optimistic locking version conflict

Body

Media type: text/plain

Type: any

Example:

version conflict

Response 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"
        }
      ]
    }
  ]
}

Response 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}

DELETE /data-import/fileExtensions/{id}
URI Parameters
  • id: required (string)

Response 204

Item deleted successfully

Response 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"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"fileExtension not found"

Response 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}

GET /data-import/fileExtensions/{id}
URI Parameters
  • id: required (string)

Response 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": ""
  }
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"fileExtension not found"

Response 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/restore/default

Restore fileExtension settings to default

POST /data-import/fileExtensions/restore/default

Response 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"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 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"
    }
  }
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /data-import/dataTypes

Get a list of data types

GET /data-import/dataTypes

Response 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"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /data-import/splitStatus

Get the server configuration of file splitting

GET /data-import/splitStatus

Response 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"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /data-import/uploadUrl

Get a presigned upload url for the first part of a file

GET /data-import/uploadUrl
Query Parameters
  • fileName: required (string)

    The name of the file that will be uploaded

Response 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"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /data-import/uploadUrl/subsequent

Get a presigned upload url for later parts of a file

GET /data-import/uploadUrl/subsequent
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)

Response 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"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error