mod-kb-ebsco-java version v1
https://github.com/folio-org/mod-kb-ebsco-java
mod-kb-ebsco-java
Implements the eholdings interface using EBSCO KB as backend.
Access Types
Get a list of access types.
get /eholdings/access-types
Get a list of access types.
HTTP status code 200
OK
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Types Collection Schema",
"description": "Access Types Collection Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypeCollection",
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"type": "array",
"description": "List of access types",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type object schema for a collection",
"description": "Access Type object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.AccessType",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "UUID of access type",
"example": "f973c3b6-85fc-4d35-bda8-f31b568957bf",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"accessTypes"
],
"example": "accessTypes"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypeDataAttributes",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Access Type Name",
"example": "Subscribed"
},
"description": {
"type": "string",
"description": "Access Type Description",
"example": "Indicates subscription of the entity"
},
"credentialsId": {
"type": "string",
"description": "The UUID of credentials",
"examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
}
},
"required": [
"name"
]
},
"creator": {
"type": "object",
"description": "User display info for creator of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"updater": {
"type": "object",
"description": "User display info for updater of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"usageNumber": {
"type": "integer",
"description": "Number of records that use the access type",
"readonly": true
},
"metadata": {
"type": "object",
"description": "Metadata for the entity",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"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"
]
}
},
"required": [
"type",
"attributes"
]
}
},
"meta": {
"type": "object",
"description": "metadata containing total results in collection",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata total results Schema",
"javaType": "org.folio.rest.jaxrs.model.MetaTotalResults",
"additionalProperties": false,
"properties": {
"totalResults": {
"type": "integer",
"description": "Total number of results",
"example": 2
}
},
"required": [
"totalResults"
]
},
"jsonapi": {
"type": "object",
"description": "version of json api",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
},
"required": [
"data",
"meta",
"jsonapi"
]
}
Example:
{
"data": [
{
"id": "6b30f929-6075-4e18-82fa-525f1355acd7",
"type": "accessTypes",
"attributes": {
"name": "my custom type 1",
"description": "Description 1",
"credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f"
},
"creator": {
"lastName": "Doe",
"firstName": "John",
"middleName": "Joseph"
},
"metadata": {
"createdDate": "2020-02-03T13:23:56.784",
"updatedDate": "2020-02-03T13:23:56.784+0000",
"createdByUserId": "22222222-2222-2222-a222-222222222222",
"updatedByUserId": "22222222-2222-2222-a222-222222222222",
"createdByUsername": "john_doe"
}
},
{
"id": "342dcb99-c476-4f93-b430-471874b18e2a",
"type": "accessTypes",
"attributes": {
"name": "my custom type 2",
"description": "Description 2",
"credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f"
},
"creator": {
"lastName": "Doe",
"firstName": "John",
"middleName": "Joseph"
},
"updater": {
"lastName": "Doe",
"firstName": "Jane",
"middleName": "Rosemary"
},
"metadata": {
"createdDate": "2020-02-03T13:23:56.784+0000",
"updatedDate": "2020-02-03T14:36:06.234+0000",
"createdByUserId": "22222222-2222-2222-a222-222222222222",
"updatedByUserId": "33333333-3333-3333-a333-333333333333",
"createdByUsername": "john_doe",
"updatedByUsername": "jane_doe"
}
}
],
"meta": {
"totalResults": 2
},
"jsonapi": {
"version": "1.0"
}
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Instance of a Access Type by given Id
Retrieve specific Access Types by Id
get /eholdings/access-types/{id}
Retrieve specific Access Types by Id
URI Parameters
- id: required(string - 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}$)
HTTP status code 200
OK
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type object schema for a collection",
"description": "Access Type object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.AccessType",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "UUID of access type",
"example": "f973c3b6-85fc-4d35-bda8-f31b568957bf",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"accessTypes"
],
"example": "accessTypes"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypeDataAttributes",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Access Type Name",
"example": "Subscribed"
},
"description": {
"type": "string",
"description": "Access Type Description",
"example": "Indicates subscription of the entity"
},
"credentialsId": {
"type": "string",
"description": "The UUID of credentials",
"examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
}
},
"required": [
"name"
]
},
"creator": {
"type": "object",
"description": "User display info for creator of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"updater": {
"type": "object",
"description": "User display info for updater of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"usageNumber": {
"type": "integer",
"description": "Number of records that use the access type",
"readonly": true
},
"metadata": {
"type": "object",
"description": "Metadata for the entity",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"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"
]
}
},
"required": [
"type",
"attributes"
]
}
Example:
{
"id": "3866efa9-4af8-4c4e-8fab-2451963cf0ea",
"type": "accessTypes",
"attributes": {
"name": "Access Type 1",
"description": "Access Type description 1"
},
"creator": {
"lastName": "last name",
"firstName": "first name"
},
"metadata": {
"createdDate": "2020-02-03T13:23:56.784+0000",
"updatedDate": "2020-02-03T13:23:56.784+0000",
"createdByUserId": "22222222-2222-2222-a222-222222222222",
"updatedByUserId": "22222222-2222-2222-a222-222222222222",
"createdByUsername": "john_doe"
}
}
HTTP status code 400
Bad Request
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "Invalid id '99999999-9999-2-9999-999999999999'"
}
],
"jsonapi": {
"version": "1.0"
}
}
HTTP status code 404
Not Found
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "Access type with id '99999999-9999-9999-9999-999999999999' not found"
}
],
"jsonapi": {
"version": "1.0"
}
}
Access Types
Access Types belongs to specific KB Credentials
Get a list of access types related to specific KB credentials.
Create an access type in specific KB Credentials
get /eholdings/kb-credentials/{id}/access-types
Get a list of access types related to specific KB credentials.
URI Parameters
- id: required(string - 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}$)
HTTP status code 200
OK
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Types Collection Schema",
"description": "Access Types Collection Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypeCollection",
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"type": "array",
"description": "List of access types",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type object schema for a collection",
"description": "Access Type object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.AccessType",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "UUID of access type",
"example": "f973c3b6-85fc-4d35-bda8-f31b568957bf",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"accessTypes"
],
"example": "accessTypes"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypeDataAttributes",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Access Type Name",
"example": "Subscribed"
},
"description": {
"type": "string",
"description": "Access Type Description",
"example": "Indicates subscription of the entity"
},
"credentialsId": {
"type": "string",
"description": "The UUID of credentials",
"examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
}
},
"required": [
"name"
]
},
"creator": {
"type": "object",
"description": "User display info for creator of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"updater": {
"type": "object",
"description": "User display info for updater of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"usageNumber": {
"type": "integer",
"description": "Number of records that use the access type",
"readonly": true
},
"metadata": {
"type": "object",
"description": "Metadata for the entity",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"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"
]
}
},
"required": [
"type",
"attributes"
]
}
},
"meta": {
"type": "object",
"description": "metadata containing total results in collection",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata total results Schema",
"javaType": "org.folio.rest.jaxrs.model.MetaTotalResults",
"additionalProperties": false,
"properties": {
"totalResults": {
"type": "integer",
"description": "Total number of results",
"example": 2
}
},
"required": [
"totalResults"
]
},
"jsonapi": {
"type": "object",
"description": "version of json api",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
},
"required": [
"data",
"meta",
"jsonapi"
]
}
Example:
{
"data": [
{
"id": "6b30f929-6075-4e18-82fa-525f1355acd7",
"type": "accessTypes",
"attributes": {
"name": "my custom type 1",
"description": "Description 1",
"credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f"
},
"creator": {
"lastName": "Doe",
"firstName": "John",
"middleName": "Joseph"
},
"metadata": {
"createdDate": "2020-02-03T13:23:56.784",
"updatedDate": "2020-02-03T13:23:56.784+0000",
"createdByUserId": "22222222-2222-2222-a222-222222222222",
"updatedByUserId": "22222222-2222-2222-a222-222222222222",
"createdByUsername": "john_doe"
}
},
{
"id": "342dcb99-c476-4f93-b430-471874b18e2a",
"type": "accessTypes",
"attributes": {
"name": "my custom type 2",
"description": "Description 2",
"credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f"
},
"creator": {
"lastName": "Doe",
"firstName": "John",
"middleName": "Joseph"
},
"updater": {
"lastName": "Doe",
"firstName": "Jane",
"middleName": "Rosemary"
},
"metadata": {
"createdDate": "2020-02-03T13:23:56.784+0000",
"updatedDate": "2020-02-03T14:36:06.234+0000",
"createdByUserId": "22222222-2222-2222-a222-222222222222",
"updatedByUserId": "33333333-3333-3333-a333-333333333333",
"createdByUsername": "john_doe",
"updatedByUsername": "jane_doe"
}
}
],
"meta": {
"totalResults": 2
},
"jsonapi": {
"version": "1.0"
}
}
post /eholdings/kb-credentials/{id}/access-types
Create an access type in specific KB Credentials
URI Parameters
- id: required(string - 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}$)
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "POST Request To Access Type Collection Schema",
"description": "POST Request To Access Type Collection Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypePostRequest",
"additionalProperties": false,
"type": "object",
"properties": {
"data": {
"type": "object",
"description": "Access type object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.AccessType",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "UUID of access type",
"example": "f973c3b6-85fc-4d35-bda8-f31b568957bf",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"accessTypes"
],
"example": "accessTypes"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypeDataAttributes",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Access Type Name",
"example": "Subscribed"
},
"description": {
"type": "string",
"description": "Access Type Description",
"example": "Indicates subscription of the entity"
},
"credentialsId": {
"type": "string",
"description": "The UUID of credentials",
"examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
}
},
"required": [
"name"
]
},
"creator": {
"type": "object",
"description": "User display info for creator of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"updater": {
"type": "object",
"description": "User display info for updater of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"usageNumber": {
"type": "integer",
"description": "Number of records that use the access type",
"readonly": true
},
"metadata": {
"type": "object",
"description": "Metadata for the entity",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"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"
]
}
},
"required": [
"type",
"attributes"
]
}
},
"required": [
"data"
]
}
Example:
{
"data": {
"type": "accessTypes",
"attributes": {
"name": "Subscribed",
"description": "Indicates subscription of the entity",
"credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f"
}
}
}
HTTP status code 201
Created
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type object schema for a collection",
"description": "Access Type object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.AccessType",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "UUID of access type",
"example": "f973c3b6-85fc-4d35-bda8-f31b568957bf",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"accessTypes"
],
"example": "accessTypes"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypeDataAttributes",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Access Type Name",
"example": "Subscribed"
},
"description": {
"type": "string",
"description": "Access Type Description",
"example": "Indicates subscription of the entity"
},
"credentialsId": {
"type": "string",
"description": "The UUID of credentials",
"examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
}
},
"required": [
"name"
]
},
"creator": {
"type": "object",
"description": "User display info for creator of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"updater": {
"type": "object",
"description": "User display info for updater of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"usageNumber": {
"type": "integer",
"description": "Number of records that use the access type",
"readonly": true
},
"metadata": {
"type": "object",
"description": "Metadata for the entity",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"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"
]
}
},
"required": [
"type",
"attributes"
]
}
Example:
{
"id": "11111111-1111-1111-a111-111111111111",
"type": "accessTypes",
"attributes": {
"name": "Subscribed",
"description": "Indicates subscription of the entity",
"credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f"
},
"creator": {
"lastName": "Doe",
"firstName": "John",
"middleName": "Joseph"
},
"metadata": {
"createdDate": "2020-02-03T13:23:56.784",
"updatedDate": "2020-02-03T13:23:56.784+0000",
"createdByUserId": "22222222-2222-2222-a222-222222222222",
"updatedByUserId": "22222222-2222-2222-a222-222222222222",
"createdByUsername": "john_doe"
}
}
HTTP status code 400
Bad Request
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "duplicate key value violates unique constraint \"access_types_pkey\"",
"detail": "Key (id)=(11111111-1111-1111-a111-111111111111) already exists."
}
],
"jsonapi": {
"version": "1.0"
}
}
HTTP status code 404
Not Found
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "KB credentials with id '99999999-9999-9999-9999-999999999999' not found"
}
],
"jsonapi": {
"version": "1.0"
}
}
HTTP status code 422
Unprocessable Entity
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "Invalid name",
"detail": "name is too long (maximum is 75 characters)"
}
],
"jsonapi": {
"version": "1.0"
}
}
Instance of a Access Type by given Id related to specific KB credentials
Retrieve specific Access Types by Id related to specific KB credentials
Update a Access Type by Id related to specific KB credentials
Delete a Access Type by Id
get /eholdings/kb-credentials/{id}/access-types/{accessTypeId}
Retrieve specific Access Types by Id related to specific KB credentials
URI Parameters
- id: required(string - 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}$)
- accessTypeId: required(string - 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}$)
HTTP status code 200
OK
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type object schema for a collection",
"description": "Access Type object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.AccessType",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "UUID of access type",
"example": "f973c3b6-85fc-4d35-bda8-f31b568957bf",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"accessTypes"
],
"example": "accessTypes"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypeDataAttributes",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Access Type Name",
"example": "Subscribed"
},
"description": {
"type": "string",
"description": "Access Type Description",
"example": "Indicates subscription of the entity"
},
"credentialsId": {
"type": "string",
"description": "The UUID of credentials",
"examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
}
},
"required": [
"name"
]
},
"creator": {
"type": "object",
"description": "User display info for creator of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"updater": {
"type": "object",
"description": "User display info for updater of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"usageNumber": {
"type": "integer",
"description": "Number of records that use the access type",
"readonly": true
},
"metadata": {
"type": "object",
"description": "Metadata for the entity",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"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"
]
}
},
"required": [
"type",
"attributes"
]
}
Example:
{
"id": "3866efa9-4af8-4c4e-8fab-2451963cf0ea",
"type": "accessTypes",
"attributes": {
"name": "Access Type 1",
"description": "Access Type description 1"
},
"creator": {
"lastName": "last name",
"firstName": "first name"
},
"metadata": {
"createdDate": "2020-02-03T13:23:56.784+0000",
"updatedDate": "2020-02-03T13:23:56.784+0000",
"createdByUserId": "22222222-2222-2222-a222-222222222222",
"updatedByUserId": "22222222-2222-2222-a222-222222222222",
"createdByUsername": "john_doe"
}
}
HTTP status code 400
Bad Request
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "Invalid id '99999999-9999-2-9999-999999999999'"
}
],
"jsonapi": {
"version": "1.0"
}
}
HTTP status code 404
Not Found
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "Access type with id '99999999-9999-9999-9999-999999999999' not found"
}
],
"jsonapi": {
"version": "1.0"
}
}
put /eholdings/kb-credentials/{id}/access-types/{accessTypeId}
Update a Access Type by Id related to specific KB credentials
URI Parameters
- id: required(string - 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}$)
- accessTypeId: required(string - 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}$)
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "PUT Request To Access Type Collection Schema",
"description": "PUT Request To Access Type Collection Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypePutRequest",
"additionalProperties": false,
"type": "object",
"properties": {
"data": {
"type": "object",
"description": "Access type object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.AccessType",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "UUID of access type",
"example": "f973c3b6-85fc-4d35-bda8-f31b568957bf",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"accessTypes"
],
"example": "accessTypes"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Access Type Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.AccessTypeDataAttributes",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Access Type Name",
"example": "Subscribed"
},
"description": {
"type": "string",
"description": "Access Type Description",
"example": "Indicates subscription of the entity"
},
"credentialsId": {
"type": "string",
"description": "The UUID of credentials",
"examples": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
}
},
"required": [
"name"
]
},
"creator": {
"type": "object",
"description": "User display info for creator of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"updater": {
"type": "object",
"description": "User display info for updater of the note",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.UserDisplayInfo",
"additionalProperties": false,
"properties": {
"lastName": {
"type": "string",
"description": "Last name of the user",
"example": "Doe",
"readonly": true
},
"firstName": {
"type": "string",
"description": "First name of the user",
"example": "John",
"readonly": true
},
"middleName": {
"type": "string",
"description": "Middle name or initial of the user",
"example": "X.",
"readonly": true
}
}
},
"usageNumber": {
"type": "integer",
"description": "Number of records that use the access type",
"readonly": true
},
"metadata": {
"type": "object",
"description": "Metadata for the entity",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"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"
]
}
},
"required": [
"type",
"attributes"
]
}
},
"required": [
"data"
]
}
Example:
{
"data": {
"type": "accessTypes",
"attributes": {
"name": "Subscribed updated",
"description": "Indicates subscription of the entity updated",
"credentialsId": "2ffa1940-2cf6-48b1-8cc9-5e539c61d93f"
}
}
}
HTTP status code 204
Item successfully updated
HTTP status code 400
Bad Request
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "Invalid id '99999999-9999-2-9999-9999-999999999999'",
"detail": "Id should follow UUID format %s"
}
],
"jsonapi": {
"version": "1.0"
}
}
HTTP status code 404
Not Found
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "Access Type with id '99999999-9999-9999-9999-999999999999' doesn't exist"
}
],
"jsonapi": {
"version": "1.0"
}
}
HTTP status code 422
Unprocessable Entity
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"message": "must not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "data.attributes",
"value": "null"
}
]
}
],
"jsonapi": {
"version": "1.0"
}
}
delete /eholdings/kb-credentials/{id}/access-types/{accessTypeId}
Delete a Access Type by Id
URI Parameters
- id: required(string - 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}$)
- accessTypeId: required(string - 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}$)
HTTP status code 204
No Content
HTTP status code 400
Bad Request
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "Invalid id '99999999-9999-2-9999-9999-999999999999'",
"detail": "Id should follow UUID format %s"
}
],
"jsonapi": {
"version": "1.0"
}
}
HTTP status code 422
Unprocessable Entity
Body
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response Schema",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiError",
"type": "object",
"additionalProperties": false,
"properties": {
"errors": {
"type": "array",
"description": "Error Response List",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Error Response object",
"description": "Error Response Schema for JSON API",
"javaType": "org.folio.rest.jaxrs.model.JsonapiErrorResponse",
"additionalProperties": false,
"properties": {
"title": {
"type": "string",
"description": "Error Message Title",
"example": "Invalid KB API Credentials"
},
"detail": {
"type": "string",
"description": "Error Message Detail",
"example": "Kb api credentials are invalid"
},
"source": {
"type": "object",
"description": "Source of Error Message",
"example": {}
}
}
}
},
"jsonapi": {
"type": "object",
"description": "JSON API Version",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Version Schema",
"javaType": "org.folio.rest.jaxrs.model.JsonAPI",
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
"description": "Version of json api being used",
"example": "1.0"
}
},
"required": [
"version"
]
}
}
}
Example:
{
"errors": [
{
"title": "Can't delete access type that has assigned records"
}
],
"jsonapi": {
"version": "1.0"
}
}