http://localhost:9130
Storage for checkout lock
Retrieve a list of checkout lock items
GET /check-out-lock-storage
Filter locks by user ID.
The number of items to skip in the result set.
The maximum number of locks to return.
Returns a list of checkout lock items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of checkoutLocks",
"type": "object",
"properties": {
"checkoutLocks": {
"description": "List of checkoutLocks",
"id": "checkoutLocks",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Checkout Lock",
"properties": {
"id": {
"description": "ID of the lock",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"userId": {
"description": "ID of the patron the lock is created for",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"creationDate": {
"description": "Date and time of lock creation",
"type": "string",
"format": "date-time"
}
}
}
},
"totalRecords": {
"type": "integer"
}
},
"required": [
"checkoutLocks",
"totalRecords"
]
}
Invalid Parameters
Media type: text/plain
Type: any
Example:
Invalid Parameters
Create a lock for the given userid
POST /check-out-lock-storage
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Checkout Lock",
"properties": {
"userId": {
"description": "ID of the patron the lock is created for",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"ttlMs": {
"description": "Time to live for lock object",
"type": "integer"
}
}
}
Example:
{
"userId": "77477611-ab44-4082-a0d8-42f7acdfde11",
"ttl": 3000
}
Checkout lock is created
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Checkout Lock",
"properties": {
"id": {
"description": "ID of the lock",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"userId": {
"description": "ID of the patron the lock is created for",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"creationDate": {
"description": "Date and time of lock creation",
"type": "string",
"format": "date-time"
}
}
}
Example:
{
"id": "0bab56e5-1ab6-4ac2-afdf-8b2df0434379",
"userId": "77477611-ab44-4082-a0d8-42f7acdfde11",
"creationDate": "2018-01-31T21:21:02Z"
}
Bad Request
Media type: text/plain
Type: any
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
Media type: text/plain
Type: any
Example:
Internal server error
Failed to create lock for patron {userId}
Media type: text/plain
Type: any
Example:
Failed to create lock for patron
Get checkout lock
GET /check-out-lock-storage/{lockId}
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Checkout Lock",
"properties": {
"id": {
"description": "ID of the lock",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"userId": {
"description": "ID of the patron the lock is created for",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"creationDate": {
"description": "Date and time of lock creation",
"type": "string",
"format": "date-time"
}
}
}
Example:
{
"id": "0bab56e5-1ab6-4ac2-afdf-8b2df0434379",
"userId": "77477611-ab44-4082-a0d8-42f7acdfde11",
"creationDate": "2018-01-31T21:21:02Z"
}
Bad Request
Media type: text/plain
Type: any
Item with a given ID not found
Delete checkout lock
DELETE /check-out-lock-storage/{lockId}
Item deleted successfully
Internal Server error
Media type: text/plain
Type: any
Example:
Internal server error