Admin API (v1)

http://localhost:8081

Table of contents

/jobs

GET /jobs/jobconfs

Return list of Jobs

GET /jobs/jobconfs
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.

    native mongodb query syntax with valid searchable fields: for example location

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    {"module":"IMPORTS"}
    
  • orderBy: (string)

    Order by field: field A, field B

  • order: (one of desc, asc - default: desc)

    Order

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

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Configurations for Jobs",
  "description": "Each configuration includes type and category of job, and whether it is enabled.",
  "type": "object",
  "properties": {
    "job_confs": {
      "description": "array of jobs",
      "id": "jobConfs",
      "type": "array",
      "items": {
        "type": "object",
        "$ref" : "jobs_conf.schema"
      }
    },
    "total_records": {
      "description": "total records",
      "type": "integer"
    }
  },
  "required": [
    "job_confs",
    "total_records"
  ]
}

Example:

{
  "job_confs": [
    {
      "_id": "987654321",
      "module": "IMPORT",
      "name": "Generic file import job",
      "description": "Import",
      "type": "MANUAL",
      "category": "IMPORTS",
      "enabled": true,
      "inst_id": "my_inst",
      "creator": "joe",
      "parameters": [
        {"key1": "value"},
        {"key1": "value"}
      ]
    }
  ],
  "total_records": 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 jobconfs -- 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 jobconfs -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /jobs/jobconfs

Create a new type of Job Conf

POST /jobs/jobconfs
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#",
  "title": "Configuration for Jobs",
  "description": "Includes type and category of job, and whether it is enabled.",
  "type": "object",
  "properties": {
    "_id": {
      "description" : "_id",
      "type": "string"
    },
    "module": {
      "description" : "module",
      "type": "string"
    },
    "name": {
      "description" : "name",
      "type": "string"
    },
    "description": {
      "description" : "hey",
      "type": "string"
    },
    "type": {
      "description" : "type",
      "type": "string"
    },
    "category": {
      "description" : "category",
      "type": "string"
    },
    "enabled": {
      "description" : "enabled",
      "type": "boolean"
    },
    "creator": {
      "description" : "creator",
      "type": "string"
    },
    "inst_id": {
      "description" : "inst_id",
      "type": "string"
    },
    "lib_id": {
      "description" : "lib_id",
      "type": "string"
    },
    "bulk_size": {
      "description" : "bulk size",
      "type": "integer"
    },
    "fail_percentage": {
      "description" : "fail percentage",
      "type": "number"
    },
    "last_modified": {
      "description" : "last modified",
      "type": "object",
      "$ref": "last_modified.schema"
    },
    "parameters": {
      "description" : "key/value pairs",
      "type": "object",
      "$ref" : "raml-util/schemas/parameters.schema"
    }
  },
  "required": [
    "module",
    "name",
    "type",
    "enabled",
    "inst_id"
  ]
}

Example:

{
  "_id": "987654321",
  "module": "IMPORT",
  "name": "Generic file import job",
  "description": "Import",
  "type": "MANUAL",
  "category": "IMPORTS",
  "enabled": true,
  "inst_id": "my_inst",
  "creator": "joe",
  "parameters": [
    {"key1": "value"},
    {"key1": "value"}
  ]
}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created jobconf item

Body

Media type: application/json

Type: any

Example:

{
  "_id": "987654321",
  "module": "IMPORT",
  "name": "Generic file import job",
  "description": "Import",
  "type": "MANUAL",
  "category": "IMPORTS",
  "enabled": true,
  "inst_id": "my_inst",
  "creator": "joe",
  "parameters": [
    {"key1": "value"},
    {"key1": "value"}
  ]
}

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 jobconf -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create jobconfs -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /jobs/jobconfs/{jobconfsId}

Retrieve jobconf item with given {jobconfId}

GET /jobs/jobconfs/{jobconfsId}
URI Parameters
  • jobconfsId: 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#",
  "title": "Configuration for Jobs",
  "description": "Includes type and category of job, and whether it is enabled.",
  "type": "object",
  "properties": {
    "_id": {
      "description" : "_id",
      "type": "string"
    },
    "module": {
      "description" : "module",
      "type": "string"
    },
    "name": {
      "description" : "name",
      "type": "string"
    },
    "description": {
      "description" : "hey",
      "type": "string"
    },
    "type": {
      "description" : "type",
      "type": "string"
    },
    "category": {
      "description" : "category",
      "type": "string"
    },
    "enabled": {
      "description" : "enabled",
      "type": "boolean"
    },
    "creator": {
      "description" : "creator",
      "type": "string"
    },
    "inst_id": {
      "description" : "inst_id",
      "type": "string"
    },
    "lib_id": {
      "description" : "lib_id",
      "type": "string"
    },
    "bulk_size": {
      "description" : "bulk size",
      "type": "integer"
    },
    "fail_percentage": {
      "description" : "fail percentage",
      "type": "number"
    },
    "last_modified": {
      "description" : "last modified",
      "type": "object",
      "$ref": "last_modified.schema"
    },
    "parameters": {
      "description" : "key/value pairs",
      "type": "object",
      "$ref" : "raml-util/schemas/parameters.schema"
    }
  },
  "required": [
    "module",
    "name",
    "type",
    "enabled",
    "inst_id"
  ]
}

Example:

{
  "_id": "987654321",
  "module": "IMPORT",
  "name": "Generic file import job",
  "description": "Import",
  "type": "MANUAL",
  "category": "IMPORTS",
  "enabled": true,
  "inst_id": "my_inst",
  "creator": "joe",
  "parameters": [
    {"key1": "value"},
    {"key1": "value"}
  ]
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

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

DELETE /jobs/jobconfs/{jobconfsId}

Delete jobconf item with given {jobconfId}

DELETE /jobs/jobconfs/{jobconfsId}
URI Parameters
  • jobconfsId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

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 jobconf -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

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

PUT /jobs/jobconfs/{jobconfsId}

Update jobconf item with given {jobconfId}

PUT /jobs/jobconfs/{jobconfsId}
URI Parameters
  • jobconfsId: 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#",
  "title": "Configuration for Jobs",
  "description": "Includes type and category of job, and whether it is enabled.",
  "type": "object",
  "properties": {
    "_id": {
      "description" : "_id",
      "type": "string"
    },
    "module": {
      "description" : "module",
      "type": "string"
    },
    "name": {
      "description" : "name",
      "type": "string"
    },
    "description": {
      "description" : "hey",
      "type": "string"
    },
    "type": {
      "description" : "type",
      "type": "string"
    },
    "category": {
      "description" : "category",
      "type": "string"
    },
    "enabled": {
      "description" : "enabled",
      "type": "boolean"
    },
    "creator": {
      "description" : "creator",
      "type": "string"
    },
    "inst_id": {
      "description" : "inst_id",
      "type": "string"
    },
    "lib_id": {
      "description" : "lib_id",
      "type": "string"
    },
    "bulk_size": {
      "description" : "bulk size",
      "type": "integer"
    },
    "fail_percentage": {
      "description" : "fail percentage",
      "type": "number"
    },
    "last_modified": {
      "description" : "last modified",
      "type": "object",
      "$ref": "last_modified.schema"
    },
    "parameters": {
      "description" : "key/value pairs",
      "type": "object",
      "$ref" : "raml-util/schemas/parameters.schema"
    }
  },
  "required": [
    "module",
    "name",
    "type",
    "enabled",
    "inst_id"
  ]
}

Example:

{
  "_id": "987654321",
  "module": "IMPORT",
  "name": "Generic file import job",
  "description": "Import",
  "type": "MANUAL",
  "category": "IMPORTS",
  "enabled": true,
  "inst_id": "my_inst",
  "creator": "joe",
  "parameters": [
    {"key1": "value"},
    {"key1": "value"}
  ]
}

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 jobconf -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"jobconf 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 /jobs/jobconfs/{jobconfsId}/jobs

Retrieve a list of job items.

GET /jobs/jobconfs/{jobconfsId}/jobs
URI Parameters
  • jobconfsId: required (string)
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.

    native mongodb query syntax with valid searchable fields: for example location

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    {"job_conf_id":"12345"}
    
  • orderBy: (string)

    Order by field: field A, field B

  • order: (one of desc, asc - default: desc)

    Order

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

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Jobs schema",
  "description": "Each job includes configuration and status.",
  "type": "object",
  "properties": {
    "jobs": {
      "description": "jobs array",
      "id": "jobs",
      "type": "array",
      "items": {
        "type": "object",
        "$ref" : "job.schema"
      }
    },
    "total_records": {
      "description": "total records",
      "type": "integer"
    }
  },
  "required": [
    "jobs",
    "total_records"
  ]
}

Example:

{
  "jobs": [
    {
      "_id": "12345678",
      "job_conf_id": "987654321",
      "creator": "a",
      "status": "ready",
      "inst_id": "my_inst",
      "parameters" : [
        {"errors":"2"},
        {"succeeded":"2"}
      ]
    }
  ],
  "total_records": 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 jobs -- 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 jobs -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /jobs/jobconfs/{jobconfsId}/jobs

Create a new job item.

POST /jobs/jobconfs/{jobconfsId}/jobs
URI Parameters
  • jobconfsId: 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#",
  "title": "Job schema",
  "description": "Includes the configuration and status of the job.",
  "type": "object",
  "properties": {
    "_id": {
      "description": "identifier",
      "type": "string"
    },
    "module": {
      "description": "module",
      "type": "string"
    },
    "name": {
      "description": "name",
      "type": "string"
    },
    "creator": {
      "description": "creator",
      "type": "string",
      "readonly": true
    },
    "job_conf_id": {
      "description": "job configuration id",
      "type": "string"
    },
    "status": {
      "description": "status",
      "type": "string"
    },
    "bulk_size": {
      "description": "bulk size",
      "type": "integer"
    },
    "fail_percentage": {
      "description": "fail percentage",
      "type": "number"
    },
    "last_modified": {
      "description": "last modified",
      "type": "object",
      "$ref" : "last_modified.schema"
    },
    "inst_id": {
      "description": "instance id",
      "type": "string"
    },
    "parameters": {
      "description": "key value pairs",
      "type": "object",
      "$ref" : "raml-util/schemas/parameters.schema",
      "readonly": true
    }
  },
  "required": [
    "job_conf_id",
    "creator",
    "status",
    "inst_id"
  ]
}

Example:

{
  "_id": "12345678",
  "job_conf_id": "987654321",
  "creator": "a",
  "status": "ready",
  "inst_id": "my_inst",
  "parameters" : [
    {"errors":"2"},
    {"succeeded":"2"}
  ]
}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created job item

Body

Media type: application/json

Type: any

Example:

{
  "_id": "12345678",
  "job_conf_id": "987654321",
  "creator": "a",
  "status": "ready",
  "inst_id": "my_inst",
  "parameters" : [
    {"errors":"2"},
    {"succeeded":"2"}
  ]
}

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 job -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create jobs -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /jobs/jobconfs/{jobconfsId}/jobs/{jobId}

Retrieve job item with given {jobId}

GET /jobs/jobconfs/{jobconfsId}/jobs/{jobId}
URI Parameters
  • jobconfsId: required (string)
  • jobId: 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#",
  "title": "Job schema",
  "description": "Includes the configuration and status of the job.",
  "type": "object",
  "properties": {
    "_id": {
      "description": "identifier",
      "type": "string"
    },
    "module": {
      "description": "module",
      "type": "string"
    },
    "name": {
      "description": "name",
      "type": "string"
    },
    "creator": {
      "description": "creator",
      "type": "string",
      "readonly": true
    },
    "job_conf_id": {
      "description": "job configuration id",
      "type": "string"
    },
    "status": {
      "description": "status",
      "type": "string"
    },
    "bulk_size": {
      "description": "bulk size",
      "type": "integer"
    },
    "fail_percentage": {
      "description": "fail percentage",
      "type": "number"
    },
    "last_modified": {
      "description": "last modified",
      "type": "object",
      "$ref" : "last_modified.schema"
    },
    "inst_id": {
      "description": "instance id",
      "type": "string"
    },
    "parameters": {
      "description": "key value pairs",
      "type": "object",
      "$ref" : "raml-util/schemas/parameters.schema",
      "readonly": true
    }
  },
  "required": [
    "job_conf_id",
    "creator",
    "status",
    "inst_id"
  ]
}

Example:

{
  "_id": "12345678",
  "job_conf_id": "987654321",
  "creator": "a",
  "status": "ready",
  "inst_id": "my_inst",
  "parameters" : [
    {"errors":"2"},
    {"succeeded":"2"}
  ]
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

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

DELETE /jobs/jobconfs/{jobconfsId}/jobs/{jobId}

Delete job item with given {jobId}

DELETE /jobs/jobconfs/{jobconfsId}/jobs/{jobId}
URI Parameters
  • jobconfsId: required (string)
  • jobId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

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 job -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

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

PUT /jobs/jobconfs/{jobconfsId}/jobs/{jobId}

Update job item with given {jobId}

PUT /jobs/jobconfs/{jobconfsId}/jobs/{jobId}
URI Parameters
  • jobconfsId: required (string)
  • jobId: 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#",
  "title": "Job schema",
  "description": "Includes the configuration and status of the job.",
  "type": "object",
  "properties": {
    "_id": {
      "description": "identifier",
      "type": "string"
    },
    "module": {
      "description": "module",
      "type": "string"
    },
    "name": {
      "description": "name",
      "type": "string"
    },
    "creator": {
      "description": "creator",
      "type": "string",
      "readonly": true
    },
    "job_conf_id": {
      "description": "job configuration id",
      "type": "string"
    },
    "status": {
      "description": "status",
      "type": "string"
    },
    "bulk_size": {
      "description": "bulk size",
      "type": "integer"
    },
    "fail_percentage": {
      "description": "fail percentage",
      "type": "number"
    },
    "last_modified": {
      "description": "last modified",
      "type": "object",
      "$ref" : "last_modified.schema"
    },
    "inst_id": {
      "description": "instance id",
      "type": "string"
    },
    "parameters": {
      "description": "key value pairs",
      "type": "object",
      "$ref" : "raml-util/schemas/parameters.schema",
      "readonly": true
    }
  },
  "required": [
    "job_conf_id",
    "creator",
    "status",
    "inst_id"
  ]
}

Example:

{
  "_id": "12345678",
  "job_conf_id": "987654321",
  "creator": "a",
  "status": "ready",
  "inst_id": "my_inst",
  "parameters" : [
    {"errors":"2"},
    {"succeeded":"2"}
  ]
}

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 job -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"job 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 /jobs/jobconfs/{jobconfsId}/jobs/{jobId}/bulks

Retrieve a list of bulk items.

GET /jobs/jobconfs/{jobconfsId}/jobs/{jobId}/bulks
URI Parameters
  • jobconfsId: required (string)
  • jobId: required (string)
Query Parameters
  • lang: (string - default: en - pattern: [a-zA-Z]{2})

    Requested language. Optional. [lang=en]

Response 200

Returns a list of bulk items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Bulks",
  "description": "Bulks of jobs",
  "type": "object",
  "properties": {
    "bulks": {
      "description" : "bulks array",
      "id": "bulks",
      "type": "array",
      "items": {
        "type": "object",
        "$ref" : "bulk.schema",
        "readonly": true
      }
    },
    "total_records": {
      "description" : "total records",
      "type": "integer"
    }
  },
  "required": [
    "bulks",
    "total_records"
  ]
}

Example:

{
  "bulks": [
    {
      "bulk_id": 1,
      "error_count": 8,
      "success_count": 9,
      "error_ids": "1,2,3,4,5,6,7,8",
      "inst_id": "my_inst",
      "job_id": "76543331"
    }
  ],
  "total_records": 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 bulks -- 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 bulks -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /jobs/jobconfs/{jobconfsId}/jobs/{jobId}/bulks

Create a new bulk item.

POST /jobs/jobconfs/{jobconfsId}/jobs/{jobId}/bulks
URI Parameters
  • jobconfsId: required (string)
  • jobId: 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#",
  "title": "Bulk",
  "description": "Bulk of a job",
  "type": "object",
  "properties": {
    "_id": {
      "description": "primary identifier",
      "type": "string"
    },
    "bulk_id": {
      "description": "bulk id",
      "type": "integer"
    },
    "error_count": {
      "description": "error count",
      "type": "integer"
    },
    "success_count": {
      "description": "success count",
      "type": "integer"
    },
    "error_ids": {
      "description": "error ids",
      "type": "string"
    },
    "last_modified": {
      "description": "last modified",
      "type": "object",
      "$ref" : "last_modified.schema",
      "readonly": true
    },
    "inst_id": {
      "description": "instance id",
      "type": "string"
    },
    "job_id": {
      "description": "job id",
      "type": "string"
    }
  },
  "required": [
    "bulk_id",
    "job_id",
    "inst_id"
  ]
}

Example:

{
  "bulk_id": 1,
  "error_count": 8,
  "success_count": 9,
  "error_ids": "1,2,3,4,5,6,7,8",
  "inst_id": "my_inst",
  "job_id": "76543331"
}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created bulk item

Body

Media type: application/json

Type: any

Example:

{
  "bulk_id": 1,
  "error_count": 8,
  "success_count": 9,
  "error_ids": "1,2,3,4,5,6,7,8",
  "inst_id": "my_inst",
  "job_id": "76543331"
}

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 bulk -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create bulks -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator