Inventory Reindex Records API (v1.0)

http://localhost

Table of contents

Inventory Storage Reindex Records Publish API

POST /inventory-reindex-records/publish

Publish inventory storage reindex records.

POST /inventory-reindex-records/publish
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Inventory Storage records for reindex",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "UUID representing this range of records",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
    },
    "recordType": {
      "description": "Inventory storage record type (e.g. instance, item, holding)",
      "type": "string",
      "enum": [
        "instance",
        "item",
        "holdings"
      ]
    },
    "recordIdsRange": {
      "description": "Range of records IDs",
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "description": "UUID of the first record"
        },
        "to": {
          "type": "string",
          "description": "UUID of the last record"
        }
      },
      "additionalProperties": false,
      "required": [
        "from",
        "to"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "recordType",
    "recordIdsRange"
  ]
}

Example:

../examples/reindex-records/publishReindexRecords.json

Response 201

Records of the given range were published for reindex

Response 400

Bad request: malformed request body

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to retrieve records -- 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