mod-kb-ebsco-java (v1)

https://github.com/folio-org/mod-kb-ebsco-java

Table of contents

mod-kb-ebsco-java

Implements the eholdings interface using EBSCO KB as backend.

Tags

GET /eholdings/tags

Retrieve a collection of tags associated with eholding records.

GET /eholdings/tags
Query Parameters
  • filter[rectype]: (array of recordType)

    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"
    ]

Response 200

OK

Body

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",
        "$ref": "tagCollectionItem.json"
      }
    },
    "meta": {
      "type": "object",
      "description": "metadata containing total results in packages collection",
      "$ref": "../metaTotalResults.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$ref": "../jsonapi.json"
    }
  },
  "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"
  }
}

Response 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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [{
    "title": "Invalid filter parameter"
  }],
  "jsonapi": {
    "version": "1.0"
  }
}

GET /eholdings/tags/summary

Retrieve a collection of unique tags associated with eholding records.

GET /eholdings/tags/summary
Query Parameters
  • filter[rectype]: (array of recordType)

    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"
    ]

Response 200

OK

Body

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",
        "$ref": "tagUniqueCollectionItem.json"
      }
    },
    "meta": {
      "type": "object",
      "description": "metadata containing total results in packages collection",
      "$ref": "../metaTotalResults.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$ref": "../jsonapi.json"
    }
  },
  "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"
  }
}

Response 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",
        "$ref": "jsonapiErrorResponse.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "jsonapi.json"
    }
  }
}

Example:

{
  "errors": [{
    "title": "Invalid filter parameter"
  }],
  "jsonapi": {
    "version": "1.0"
  }
}