https://github.com/folio-org/mod-kb-ebsco-java
Implements the eholdings interface using EBSCO KB as backend.
Retrieve a collection of tags associated with eholding records.
GET /eholdings/tags
Filter tags by one or more record types. Several types can be specified in form of filter[rectype]=provider&filter[rectype]=package
Possible values are provider
, package
, title
, resource
Example:
[
"provider",
"package"
]
OK
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Tag Collection Schema",
"description": "Tag Collection Schema",
"javaType": "org.folio.rest.jaxrs.model.TagCollection",
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"type": "array",
"description": "List of tags",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Tag object schema for a collection",
"description": "Tag object schema for a collection",
"javaType": "org.folio.rest.jaxrs.model.TagCollectionItem",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "UUID of tag assigned to the record",
"example": "eab7a945-9d0c-487a-a4d8-a6df4dd8d0fd"
},
"type": {
"type": "string",
"description": "Type of resource",
"example": "tags"
},
"attributes": {
"type": "object",
"description": "Tag object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Tag Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.TagDataAttributes",
"additionalProperties": false,
"properties": {
"value": {
"type": "string",
"description": "Tag value/label",
"example": "very-important"
}
}
},
"relationships": {
"type": "object",
"description": "Displays if any record is included in relationships",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Tag relationships object schema in tag collection item",
"javaType": "org.folio.rest.jaxrs.model.TagRelationship",
"additionalProperties": false,
"properties": {
"record": {
"type": "object",
"description": "Displays relationship to record",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Relationship for a given object",
"javaType": "org.folio.rest.jaxrs.model.HasOneRelationship",
"additionalProperties": false,
"properties": {
"data": {
"type": "object",
"description": "relationship Data Information",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Data of relationships for a given object",
"javaType": "org.folio.rest.jaxrs.model.RelationshipData",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"description": "The Type Schema",
"example": "resources"
},
"id": {
"type": "string",
"description": "The Id Schema",
"example": "269-1565-316875"
}
}
},
"meta": {
"type": "object",
"description": "Meta information",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Metadata of packages related to a provider",
"javaType": "org.folio.rest.jaxrs.model.MetaDataIncluded",
"additionalProperties": false,
"properties": {
"included": {
"type": "boolean",
"description": "Relationship between objects",
"example": false
}
}
}
}
}
}
}
}
}
},
"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",
"jsonapi"
]
}
Example:
{
"data": [
{
"id": "2cf21797-d25b-46dc-8427-1759d1db2057",
"type": "tags",
"attributes": {
"value": "package-tag1"
},
"relationships": {
"record": {
"data": {
"type": "packages",
"id": "11111-23456"
}
}
}
},
{
"id": "8c415595-ec6b-4dec-a1a7-91711e093d05",
"type": "tags",
"attributes": {
"value": "provider-tag1"
},
"relationships": {
"record": {
"data": {
"type": "providers",
"id": "11111"
}
}
}
},
{
"id": "07a4dd13-c749-459e-84a7-8db208c3059e",
"type": "tags",
"attributes": {
"value": "provider-tag2"
},
"relationships": {
"record": {
"data": {
"type": "providers",
"id": "11111"
}
}
}
}
],
"meta": {
"totalResults": 3
},
"jsonapi": {
"version": "1.0"
}
}
Bad Request
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 filter parameter"
}],
"jsonapi": {
"version": "1.0"
}
}
Retrieve a collection of unique tags associated with eholding records.
GET /eholdings/tags/summary
Filter tags by one or more record types. Several types can be specified in form of filter[rectype]=provider&filter[rectype]=package
Possible values are provider
, package
, title
, resource
Example:
[
"provider",
"package"
]
OK
Media type: application/vnd.api+json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Tag Collection Schema of Unique Items",
"description": "Tag Collection Schema of Unique Items",
"javaType": "org.folio.rest.jaxrs.model.TagUniqueCollection",
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"type": "array",
"description": "List of unique tags",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Tag object schema for a collection",
"description": "Tag object schema for a collection of unique tags",
"javaType": "org.folio.rest.jaxrs.model.TagUniqueCollectionItem",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"description": "Randomly generated UUID of tag assigned to the record",
"example": "eab7a945-9d0c-487a-a4d8-a6df4dd8d0fd",
"$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",
"example": "tags"
},
"attributes": {
"type": "object",
"description": "Tag object data attributes",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Tag Data Attributes Schema",
"javaType": "org.folio.rest.jaxrs.model.TagDataAttributes",
"additionalProperties": false,
"properties": {
"value": {
"type": "string",
"description": "Tag value/label",
"example": "very-important"
}
}
}
}
}
},
"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",
"jsonapi"
]
}
Example:
{
"data": [
{
"id": "01276405-a07b-47d5-b224-742af3fe0387",
"type": "tags",
"attributes": {
"value": "title-tag"
}
},
{
"id": "52687cb3-ecd6-4570-a2e2-3e212f26bef8",
"type": "tags",
"attributes": {
"value": "package-tag"
}
},
{
"id": "ed0fdcac-1292-4354-adc2-7b80b58638e3",
"type": "tags",
"attributes": {
"value": "provider-tag2"
}
}
],
"meta": {
"totalResults": 3
},
"jsonapi": {
"version": "1.0"
}
}
Bad Request
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 filter parameter"
}],
"jsonapi": {
"version": "1.0"
}
}