HRID Settings Storage (v1.1)

http://localhost

Table of contents

HRID Settings Storage API

Storage for Human Readable Identifier (HRID) Settings

/hrid-settings-storage

GET /hrid-settings-storage/hrid-settings

Return the HRID settings

GET /hrid-settings-storage/hrid-settings

Response 200

Returns the user account info

Body

Media type: application/json

Example:

{
  "id": "ca81eafd-ddb8-416a-89e1-4f772ab6afee",
  "instances": {
    "prefix": "in",
    "startNumber": 1
  },
  "holdings": {
    "prefix": "ho",
    "startNumber": 1
  },
  "items": {
    "prefix": "it",
    "startNumber": 1
  }
}

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to get account -- unauthorized

Response 403

Access Denied

Body

Media type: text/plain

Type: any

Example:

Access Denied

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

PUT /hrid-settings-storage/hrid-settings

Modifies HRID settings

PUT /hrid-settings-storage/hrid-settings
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "The HRID settings",
  "type": "object",
  "javaType": "org.folio.rest.jaxrs.model.HridSettings",
  "properties": {
    "id": {
      "description": "The ID of the one and only HRID settings record",
      "type": "string",
      "readonly": true,
      "$ref": "uuid.json"
    },
    "instances": {
      "description": "The HRID settings for instances",
      "type": "object",
      "$ref": "hridsetting.json"
    },
    "holdings": {
      "description": "The HRID settings for holdings",
      "type": "object",
      "$ref": "hridsetting.json"
    },
    "items": {
      "description": "The HRID settings for items",
      "type": "object",
      "$ref": "hridsetting.json"
    }
  },
  "additionalProperties": false,
  "required": [
    "instances",
    "holdings",
    "items"
  ]
}

Example:

{
  "id": "ca81eafd-ddb8-416a-89e1-4f772ab6afee",
  "instances": {
    "prefix": "in",
    "startNumber": 1
  },
  "holdings": {
    "prefix": "ho",
    "startNumber": 1
  },
  "items": {
    "prefix": "it",
    "startNumber": 1
  }
}

Response 204

Item successfully updated

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to get account -- unauthorized

Response 403

Access Denied

Body

Media type: text/plain

Type: any

Example:

Access Denied

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": {
      "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