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.

Providers

Collection of available providers in eholdings.

GET /eholdings/providers

Get a list of providers based on the search query.

GET /eholdings/providers
Query Parameters
  • q: (string)

    String used to search to retrieve a collection

    Example:

    ABC-CLIO
  • sort: (string - default: relevance)

    Option by which results are sorted. Defaults to relevance if query or name if no query. Possible values are name, relevance.

    Example:

    name
  • page: (integer - default: 1 - minimum: 1 - maximum: 2147483647)

    Page offset to retrieve results from Ebsco KB

    Example:

    1
  • count: (integer - default: 25 - minimum: 0 - maximum: 100)

    Count of number of results to retrieve from Ebsco KB

    Example:

    100

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Provider Collection Schema",
  "description": "Provider Collection Schema",
  "javaType": "org.folio.rest.jaxrs.model.ProviderCollection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "array",
      "description": "List of providers",
      "items": {
        "type": "object",
        "$ref": "providers.json"
      }
    },
    "meta": {
      "type": "object",
      "description": "metadata containing total results in providers collection",
      "$ref": "../metaTotalResults.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data"
  ]
}

Example:

{
  "data": [{
      "id": "19",
      "type": "providers",
      "attributes": {
        "name": "EBSCO",
        "packagesTotal": 627,
        "packagesSelected": 49,
        "providerToken": null,
        "supportsCustomPackages": false
      },
      "relationships": {
        "packages": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "273",
      "type": "providers",
      "attributes": {
        "name": "EBSCO Open Access Lists",
        "packagesTotal": 23,
        "packagesSelected": 6,
        "providerToken": null,
        "supportsCustomPackages": false
      },
      "relationships": {
        "packages": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "meta": {
    "totalResults": 2
  },
  "jsonapi": {
    "version": "1.0"
  }
}

GET /eholdings/providers/{providerId}

Get provider given providerId

GET /eholdings/providers/{providerId}
URI Parameters
  • providerId: required (string)

    Provider Id of provider to get

Query Parameters
  • include: (string)

    Name of nested resource to include

    Example:

    packages

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Provider Object Schema",
  "description": "Provider Schema",
  "javaType": "org.folio.rest.jaxrs.model.Provider",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "Provider Data",
      "$ref": "providerData.json"
    },
    "included": {
      "type": "array",
      "description": "List of packages for a given provider",
      "items": {
        "type": "object",
        "$ref": "../packages/packageCollectionItem.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "json api",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data",
    "jsonapi"
  ]
}

Example:

{
  "data": {
    "id": "419",
    "type": "providers",
    "attributes": {
      "name": "ecch",
      "packagesTotal": 2,
      "packagesSelected": 0,
      "supportsCustomPackages": false,
      "providerToken": {
        "factName":"siteid",
        "prompt":"/itweb/",
        "helpText":"<ul><li>Enter your token</li></ul>",
        "value": "123456"
      },
      "proxy": {
        "id": "EZProxy",
        "inherited": true
      }
    },
    "relationships": {
      "packages": {
        "data": [{
            "type": "packages",
            "id": "419-3402"
          },
          {
            "type": "packages",
            "id": "419-3291"
          }
        ]
      }
    }
  },
  "included": [{
      "id": "419-3402",
      "type": "packages",
      "attributes": {
        "contentType": "Abstract and Index",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "Case Online Information System - COLIS",
        "packageId": 3402,
        "packageType": "Complete",
        "providerId": 419,
        "providerName": "ecch",
        "selectedCount": 0,
        "titleCount": 1,
        "vendorId": 419,
        "vendorName": "ecch",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        },
        "allowKbToAddTitles": null
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "vendor": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "419-3291",
      "type": "packages",
      "attributes": {
        "contentType": "Abstract and Index",
        "customCoverage": {
          "beginCoverage": "",
          "endCoverage": ""
        },
        "isCustom": false,
        "isSelected": false,
        "name": "European Case Clearing House Collection",
        "packageId": 3291,
        "packageType": "Complete",
        "providerId": 419,
        "providerName": "ecch",
        "selectedCount": 0,
        "titleCount": 1,
        "vendorId": 419,
        "vendorName": "ecch",
        "visibilityData": {
          "isHidden": false,
          "reason": ""
        },
        "allowKbToAddTitles": null
      },
      "relationships": {
        "resources": {
          "meta": {
            "included": false
          }
        },
        "vendor": {
          "meta": {
            "included": false
          }
        },
        "provider": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Response 404

Not Found

Body

Media type: application/vnd.api+json

Type: any

Example:

{
  "errors": [{
    "title": "Provider not found"
  }],
  "jsonapi": {
    "version": "1.0"
  }
}

PUT /eholdings/providers/{providerId}

Update proxy and token information for a given provider Id.

PUT /eholdings/providers/{providerId}
URI Parameters
  • providerId: required (string)

    Provider Id of provider to get

Headers
  • Content-Type: required (string)

    Example:

    application/vnd.api+json
Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Provider Put Request Schema",
  "description": "Provider Put Request Schema using JSON API",
  "javaType": "org.folio.rest.jaxrs.model.ProviderPutRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "Data object of provider put request",
      "$ref": "providerPutData.json"
    }
  }
}

Example:

{
  "data": {
    "type": "providers",
    "attributes": {
      "providerToken": {
        "value": "hellotoken"
      },
      "proxy": {
        "id": "EZProxy"
      }
    }
  }
}

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Provider Object Schema",
  "description": "Provider Schema",
  "javaType": "org.folio.rest.jaxrs.model.Provider",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "Provider Data",
      "$ref": "providerData.json"
    },
    "included": {
      "type": "array",
      "description": "List of packages for a given provider",
      "items": {
        "type": "object",
        "$ref": "../packages/packageCollectionItem.json"
      }
    },
    "jsonapi": {
      "type": "object",
      "description": "json api",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data",
    "jsonapi"
  ]
}

Example:

{
  "data": {
    "id": "18",
    "type": "providers",
    "attributes": {
      "name": "Gale | Cengage",
      "packagesTotal": 243,
      "packagesSelected": 18,
      "providerToken": {
        "factName": "[[galesiteid]]",
        "prompt": "/itweb/",
        "helpText": "\u003cul\u003e\r\n    \u003cli\u003eEnter your Gale\u003csup\u003e®\u003c/sup\u003e site ID in the space provided below. The site ID may contain a combination of alpha/numeric characters, varying in length. \u003cblockquote style=\"margin-right: 0px;\" dir=\"ltr\"\u003e\r\n    \u003cp\u003e Example: The site ID immediately follows /itweb/ in a URL. The site ID in the following URL is \u003ci\u003eaa11bb22\u003c/i\u003e. \u003c/p\u003e\r\n    \u003c/blockquote\u003e\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003cblockquote style=\"margin-right: 0px;\" dir=\"ltr\"\u003e\u003cblockquote style=\"margin-right: 0px;\" dir=\"ltr\"\u003e\r\n\u003cp\u003e\u003cspan style=\"text-decoration: underline;\"\u003ehttp://infotrac.galegroup.com/itweb/aa11bb22?db=AIM\u003c/span\u003e\u003c/p\u003e\r\n\u003c/blockquote\u003e\u003c/blockquote\u003e\u003cbr /\u003e\r\n\u003cul\u003e\r\n    \u003cli\u003eIf no site ID is specified, your Gale Group links may not function properly, as Gale Group requires this information for authentication. \u003c/li\u003e\r\n    \u003cli\u003eIf you are unable to locate the site ID, please contact Gale Group. For contact information, visit: \u003ca href=\"http://access.gale.com/authentication/\"\u003ehttp://access.gale.com/authentication/\u003c/a\u003e. \u003c/li\u003e\r\n\u003c/ul\u003e\r\n",
        "value": "hellotoken"
      },
      "supportsCustomPackages": false,
      "proxy": {
        "id": "EZProxy",
        "inherited": false
      }
    },
    "relationships": {
      "packages": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "jsonapi": {
    "version": "1.0"
  }
}

GET /eholdings/providers/{providerId}/packages

Search within a list of packages associated with a given provider.

GET /eholdings/providers/{providerId}/packages
URI Parameters
  • providerId: required (string)

    Provider Id of provider to get

Query Parameters
  • q: (string)

    String used to search to retrieve a collection

    Example:

    ABC-CLIO
  • filter[selected]: (string)

    Filter to narrow down results based on selection status. Possible values are all, true, false, ebsco.

    Example:

    all
  • filter[type]: (string - default: all)

    Filter to narrow down results based on content type. Defaults to all. Possible values are all, aggregatedfulltext, abstractandindex, ebook, ejournal, print, unknown, onlinereference.

    Example:

    ebook
  • sort: (string - default: relevance)

    Option by which results are sorted. Defaults to relevance if query or name if no query. Possible values are name, relevance.

    Example:

    name
  • page: (integer - default: 1 - minimum: 1 - maximum: 2147483647)

    Page offset to retrieve results from Ebsco KB

    Example:

    1
  • count: (integer - default: 25 - minimum: 0 - maximum: 100)

    Count of number of results to retrieve from Ebsco KB

    Example:

    100

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Package Collection Schema",
  "description": "Package Collection Schema",
  "javaType": "org.folio.rest.jaxrs.model.PackageCollection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "array",
      "description": "List of packages",
      "items": {
        "type": "object",
        "$ref": "packageCollectionItem.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": "0-1117849",
    "type": "packages",
    "attributes": {
      "contentType": "Unknown",
      "customCoverage": {
        "beginCoverage": "",
        "endCoverage": ""
      },
      "isCustom": false,
      "isSelected": false,
      "name": "",
      "packageId": 1117849,
      "packageType": "Complete",
      "providerId": 0,
      "providerName": "System Account",
      "selectedCount": 0,
      "titleCount": 0,
      "vendorId": 0,
      "vendorName": "System Account",
      "visibilityData": {
        "isHidden": false,
        "reason": ""
      }
    },
    "relationships": {
      "resources": {
        "meta": {
          "included": false
        }
      },
      "vendor": {
        "meta": {
          "included": false
        }
      },
      "provider": {
        "meta": {
          "included": false
        }
      }
    }
  }]
}

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": "Search parameter cannot be empty"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

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

Example:

{
  "errors": [
    {
      "title": "Provider not found"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}