https://github.com/folio-org/mod-kb-ebsco-java
Implements the eholdings interface using EBSCO KB as backend.
Get a list of custom labels.
GET /eholdings/custom-labels
OK
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Labels Collection Schema",
"description": "Custom Labels Collection Schema",
"javaType": "org.folio.rest.jaxrs.model.CustomLabelsCollection",
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"type": "array",
"description": "List of custom labels",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Label object schema for a collection",
"description": "Custom Label object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.CustomLabel",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"customLabels"
],
"example": "customLabels"
},
"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}$"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Label Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.CustomLabelDataAttributes",
"additionalProperties": false,
"properties": {
"id": {
"type": "integer",
"description": "Label id",
"example": 1
},
"displayLabel": {
"type": "string",
"description": "Display Label Name",
"example": "User defined field 1"
},
"displayOnFullTextFinder": {
"type": "boolean",
"description": "Indicates if displayed on Full Text Finder",
"example": false
},
"displayOnPublicationFinder": {
"type": "boolean",
"description": "Indicates if displayed on Publication Finder",
"example": false
}
},
"required": [
"id",
"displayLabel",
"displayOnFullTextFinder",
"displayOnPublicationFinder"
]
}
},
"required": [
"type",
"attributes"
]
}
},
"meta": {
"type": "object",
"description": "metadata containing total results in packages collection",
"$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": [
{
"type": "customLabel",
"attributes": {
"id": 1,
"displayLabel": "Department",
"displayOnFullTextFinder": false,
"displayOnPublicationFinder": false
}
},
{
"type": "customLabel",
"attributes": {
"id": 2,
"displayLabel": "Faculty",
"displayOnFullTextFinder": false,
"displayOnPublicationFinder": false
}
}
],
"meta": {
"totalResults": 2
},
"jsonapi": {
"version": "1.0"
}
}
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Custom labels belongs to specific KB Credentials
Get a custom labels related to specific KB credentials
GET /eholdings/kb-credentials/{id}/custom-labels
OK
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Labels Collection Schema",
"description": "Custom Labels Collection Schema",
"javaType": "org.folio.rest.jaxrs.model.CustomLabelsCollection",
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"type": "array",
"description": "List of custom labels",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Label object schema for a collection",
"description": "Custom Label object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.CustomLabel",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"customLabels"
],
"example": "customLabels"
},
"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}$"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Label Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.CustomLabelDataAttributes",
"additionalProperties": false,
"properties": {
"id": {
"type": "integer",
"description": "Label id",
"example": 1
},
"displayLabel": {
"type": "string",
"description": "Display Label Name",
"example": "User defined field 1"
},
"displayOnFullTextFinder": {
"type": "boolean",
"description": "Indicates if displayed on Full Text Finder",
"example": false
},
"displayOnPublicationFinder": {
"type": "boolean",
"description": "Indicates if displayed on Publication Finder",
"example": false
}
},
"required": [
"id",
"displayLabel",
"displayOnFullTextFinder",
"displayOnPublicationFinder"
]
}
},
"required": [
"type",
"attributes"
]
}
},
"meta": {
"type": "object",
"description": "metadata containing total results in packages collection",
"$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": [
{
"type": "customLabel",
"attributes": {
"id": 1,
"displayLabel": "Department",
"displayOnFullTextFinder": false,
"displayOnPublicationFinder": false
}
},
{
"type": "customLabel",
"attributes": {
"id": 2,
"displayLabel": "Faculty",
"displayOnFullTextFinder": false,
"displayOnPublicationFinder": false
}
}
],
"meta": {
"totalResults": 2
},
"jsonapi": {
"version": "1.0"
}
}
Not Found
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"
}
}
Update a list of custom labels.
PUT /eholdings/kb-credentials/{id}/custom-labels
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Label PUT Request Schema",
"description": "Custom Label PUT Request Schema",
"javaType": "org.folio.rest.jaxrs.model.CustomLabelsPutRequest",
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"description": "List of custom labels put request",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Label object schema for a collection",
"description": "Custom Label object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.CustomLabel",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"customLabels"
],
"example": "customLabels"
},
"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}$"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Label Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.CustomLabelDataAttributes",
"additionalProperties": false,
"properties": {
"id": {
"type": "integer",
"description": "Label id",
"example": 1
},
"displayLabel": {
"type": "string",
"description": "Display Label Name",
"example": "User defined field 1"
},
"displayOnFullTextFinder": {
"type": "boolean",
"description": "Indicates if displayed on Full Text Finder",
"example": false
},
"displayOnPublicationFinder": {
"type": "boolean",
"description": "Indicates if displayed on Publication Finder",
"example": false
}
},
"required": [
"id",
"displayLabel",
"displayOnFullTextFinder",
"displayOnPublicationFinder"
]
}
},
"required": [
"type",
"attributes"
]
}
}
},
"required": [
"data"
]
}
Example:
{
"data": [
{
"type": "customLabel",
"attributes": {
"id": 1,
"displayLabel": "Department",
"displayOnFullTextFinder": false,
"displayOnPublicationFinder": false
}
},
{
"type": "customLabel",
"attributes": {
"id": 2,
"displayLabel": "Faculty",
"displayOnFullTextFinder": false,
"displayOnPublicationFinder": false
}
}
]
}
OK
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Labels Collection Schema",
"description": "Custom Labels Collection Schema",
"javaType": "org.folio.rest.jaxrs.model.CustomLabelsCollection",
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"type": "array",
"description": "List of custom labels",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Label object schema for a collection",
"description": "Custom Label object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.CustomLabel",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"description": "Type of resource",
"enum": [
"customLabels"
],
"example": "customLabels"
},
"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}$"
},
"attributes": {
"type": "object",
"description": "Custom label object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Custom Label Object Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.CustomLabelDataAttributes",
"additionalProperties": false,
"properties": {
"id": {
"type": "integer",
"description": "Label id",
"example": 1
},
"displayLabel": {
"type": "string",
"description": "Display Label Name",
"example": "User defined field 1"
},
"displayOnFullTextFinder": {
"type": "boolean",
"description": "Indicates if displayed on Full Text Finder",
"example": false
},
"displayOnPublicationFinder": {
"type": "boolean",
"description": "Indicates if displayed on Publication Finder",
"example": false
}
},
"required": [
"id",
"displayLabel",
"displayOnFullTextFinder",
"displayOnPublicationFinder"
]
}
},
"required": [
"type",
"attributes"
]
}
},
"meta": {
"type": "object",
"description": "metadata containing total results in packages collection",
"$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": [
{
"type": "customLabel",
"attributes": {
"id": 1,
"displayLabel": "Department",
"displayOnFullTextFinder": false,
"displayOnPublicationFinder": false
}
},
{
"type": "customLabel",
"attributes": {
"id": 2,
"displayLabel": "Faculty",
"displayOnFullTextFinder": false,
"displayOnPublicationFinder": false
}
}
],
"meta": {
"totalResults": 2
},
"jsonapi": {
"version": "1.0"
}
}
Not Found
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"
}
}
Unprocessable Entity
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 Custom Label id",
"detail": "Custom Label id should be in range 1 - 5"
}
],
"jsonapi": {
"version": "1.0"
}
}