http://localhost
Storage for Human Readable Identifier (HRID) Settings
Return the HRID settings
GET /hrid-settings-storage/hrid-settings
Returns the user account info
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
}
}
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to get account -- unauthorized
Access Denied
Media type: text/plain
Type: any
Example:
Access Denied
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Modifies HRID settings
PUT /hrid-settings-storage/hrid-settings
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,
"$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}$"
},
"instances": {
"description": "The HRID settings for instances",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.HridSetting",
"properties": {
"prefix": {
"description": "A prefix to apply to the HRID",
"type": "string",
"pattern": "^[0-9a-zA-Z.-]{0,10}$"
},
"startNumber": {
"description": "The number from which to start generating HRIDs",
"type": "integer",
"minimum": 1,
"maximum": 99999999999
},
"currentNumber": {
"description": "The last generated number, or startNumber - 1 if none has been generated",
"type": "integer",
"minimum": 0,
"maximum": 99999999999,
"readonly": true
}
},
"additionalProperties": false,
"required": [
"startNumber"
]
},
"holdings": {
"description": "The HRID settings for holdings",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.HridSetting",
"properties": {
"prefix": {
"description": "A prefix to apply to the HRID",
"type": "string",
"pattern": "^[0-9a-zA-Z.-]{0,10}$"
},
"startNumber": {
"description": "The number from which to start generating HRIDs",
"type": "integer",
"minimum": 1,
"maximum": 99999999999
},
"currentNumber": {
"description": "The last generated number, or startNumber - 1 if none has been generated",
"type": "integer",
"minimum": 0,
"maximum": 99999999999,
"readonly": true
}
},
"additionalProperties": false,
"required": [
"startNumber"
]
},
"items": {
"description": "The HRID settings for items",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.HridSetting",
"properties": {
"prefix": {
"description": "A prefix to apply to the HRID",
"type": "string",
"pattern": "^[0-9a-zA-Z.-]{0,10}$"
},
"startNumber": {
"description": "The number from which to start generating HRIDs",
"type": "integer",
"minimum": 1,
"maximum": 99999999999
},
"currentNumber": {
"description": "The last generated number, or startNumber - 1 if none has been generated",
"type": "integer",
"minimum": 0,
"maximum": 99999999999,
"readonly": true
}
},
"additionalProperties": false,
"required": [
"startNumber"
]
},
"commonRetainLeadingZeroes": {
"type": "boolean",
"description": "If true, leading zeros should be applied for HRIDs",
"default": true
},
"metadata": {
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"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"
]
}
},
"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
}
}
Item successfully updated
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to get account -- unauthorized
Access Denied
Media type: text/plain
Type: any
Example:
Access Denied
Validation errors
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"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator