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
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

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",
      "type": "string"
    },
    "metaJobExecutionId": {
      "description": "Link to the metajob execution",
      "type": "string"
    },
    "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",
        "$ref": "fileDefinition.json"
      }
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  }
}

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#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "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
    
  • 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
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of uploadDefinition items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Collection of upload definitions",
  "properties": {
    "uploadDefinitions": {
      "description": "Array of upload definitions",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "uploadDefinition.json"
      }
    },
    "totalRecords": {
      "description": "Total records in collection",
      "type": "integer"
    }
  },
  "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#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "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)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

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",
      "type": "string"
    },
    "metaJobExecutionId": {
      "description": "Link to the metajob execution",
      "type": "string"
    },
    "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",
        "$ref": "fileDefinition.json"
      }
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  }
}

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",
      "type": "string"
    },
    "metaJobExecutionId": {
      "description": "Link to the metajob execution",
      "type": "string"
    },
    "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",
        "$ref": "fileDefinition.json"
      }
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  }
}

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 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "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)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 204

Item deleted successfully

Body

Media type: text/plain

Type: any

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)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

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",
      "type": "string"
    },
    "metaJobExecutionId": {
      "description": "Link to the metajob execution",
      "type": "string"
    },
    "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",
        "$ref": "fileDefinition.json"
      }
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  }
}

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",
      "type": "string"
    },
    "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",
      "type": "string"
    },
    "uploadDefinitionId": {
      "description": "Link to UploadDefinition entity",
      "type": "string"
    },
    "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",
      "type": "string"
    },
    "metaJobExecutionId": {
      "description": "Link to the metajob execution",
      "type": "string"
    },
    "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",
        "$ref": "fileDefinition.json"
      }
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  }
}

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#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "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

Body

Media type: text/plain

Type: any

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",
      "type": "string"
    },
    "metaJobExecutionId": {
      "description": "Link to the metajob execution",
      "type": "string"
    },
    "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",
        "$ref": "fileDefinition.json"
      }
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  }
}

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}/processFiles

Starts the file processing

POST /data-import/uploadDefinitions/{uploadDefinitionId}/processFiles
URI Parameters
  • uploadDefinitionId: required (string)
Query Parameters
  • jobProfileId: 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",
  "properties": {
    "uploadDefinition": {
      "description": "Upload definition",
      "type": "object",
      "$ref": "../mod-data-import/uploadDefinition.json"
    },
    "jobProfile": {
      "description": "Job profile",
      "type": "object",
      "$ref": "../mod-source-record-manager/jobProfile.json"
    }
  },
  "required": [
    "uploadDefinition",
    "jobProfile"
  ]
}

Response 204

Successful request

Body

Media type: text/plain

Type: any

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#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "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

GET /data-import/fileExtensions

Get a list of file extensions

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
    
  • 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

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of file extensions",
  "type": "object",
  "properties": {
    "fileExtensions": {
      "description": "List of file extensions",
      "type": "array",
      "id": "fileExtensionList",
      "items": {
        "type": "object",
        "$ref": "fileExtension.json"
      }
    },
    "totalRecords": {
      "description": "Total number of file extensions",
      "type": "integer"
    }
  },
  "required": [
    "fileExtensions",
    "totalRecords"
  ]
}

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#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "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/fileExtensions

Create new fileExtension

POST /data-import/fileExtensions
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "File Extension Schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique identifier",
      "type": "string"
    },
    "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",
        "$ref": "../common/dataType.json"
      }
    },
    "importBlocked": {
      "description": "Flag indicating if import is blocked",
      "type": "boolean"
    },
    "userInfo": {
      "description": "User brief info, who updated the File Extension",
      "type": "object",
      "$ref": "../common/userInfo.json"
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "extension",
    "importBlocked"
  ]
}

Response 201

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "File Extension Schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique identifier",
      "type": "string"
    },
    "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",
        "$ref": "../common/dataType.json"
      }
    },
    "importBlocked": {
      "description": "Flag indicating if import is blocked",
      "type": "boolean"
    },
    "userInfo": {
      "description": "User brief info, who updated the File Extension",
      "type": "object",
      "$ref": "../common/userInfo.json"
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "extension",
    "importBlocked"
  ]
}

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#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "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

GET /data-import/fileExtensions/{id}

Get fileExtension by id

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

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "File Extension Schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique identifier",
      "type": "string"
    },
    "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",
        "$ref": "../common/dataType.json"
      }
    },
    "importBlocked": {
      "description": "Flag indicating if import is blocked",
      "type": "boolean"
    },
    "userInfo": {
      "description": "User brief info, who updated the File Extension",
      "type": "object",
      "$ref": "../common/userInfo.json"
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "extension",
    "importBlocked"
  ]
}

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

PUT /data-import/fileExtensions/{id}

Update fileExtension

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",
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique identifier",
      "type": "string"
    },
    "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",
        "$ref": "../common/dataType.json"
      }
    },
    "importBlocked": {
      "description": "Flag indicating if import is blocked",
      "type": "boolean"
    },
    "userInfo": {
      "description": "User brief info, who updated the File Extension",
      "type": "object",
      "$ref": "../common/userInfo.json"
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "extension",
    "importBlocked"
  ]
}

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "File Extension Schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "Unique identifier",
      "type": "string"
    },
    "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",
        "$ref": "../common/dataType.json"
      }
    },
    "importBlocked": {
      "description": "Flag indicating if import is blocked",
      "type": "boolean"
    },
    "userInfo": {
      "description": "User brief info, who updated the File Extension",
      "type": "object",
      "$ref": "../common/userInfo.json"
    },
    "metadata": {
      "description": "Metadata provided by the server",
      "type": "object",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "extension",
    "importBlocked"
  ]
}

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 422

Unprocessable Entity

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

DELETE /data-import/fileExtensions/{id}

Delete fileExtension by id

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

Response 204

Body

Media type: text/plain

Type: any

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

GET /data-import/fileExtensions/restore/default

Restore fileExtension settings to default

GET /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",
  "properties": {
    "fileExtensions": {
      "description": "List of file extensions",
      "type": "array",
      "id": "fileExtensionList",
      "items": {
        "type": "object",
        "$ref": "fileExtension.json"
      }
    },
    "totalRecords": {
      "description": "Total number of file extensions",
      "type": "integer"
    }
  },
  "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#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "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",
  "properties": {
    "dataTypes": {
      "description": "Set of data types",
      "type": "array",
      "id": "dataTypeList",
      "items": {
        "type": "object",
        "$ref": "../common/dataType.json"
      }
    },
    "totalRecords": {
      "description": "Total number of data types",
      "type": "integer"
    }
  },
  "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