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.

Configuration

Setup KB Configuration.

GET /eholdings/configuration

Details of KB configuration currently being used.

GET /eholdings/configuration

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Configuration Schema",
  "description": "Configuration Schema using JSON API",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "Configuration Data",
      "$ref": "configurationData.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data"
  ]
}

Example:

{
  "data": {
    "id": "configuration",
    "type": "configurations",
    "attributes": {
      "customerId": "apidvcorp",
      "apiKey": "****************************************",
      "rmapiBaseUrl": "https://api.ebsco.io"
    }
  },
  "jsonapi": {
    "version": "1.0"
  }
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

PUT /eholdings/configuration

Update the currently set KB configuration.

PUT /eholdings/configuration
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": "Configuration Put Request Schema",
  "description": "Configuration Put Request Schema using JSON API",
  "javaType": "org.folio.rest.jaxrs.model.ConfigurationPutRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "Data object of configuration request",
      "$ref": "configurationData.json"
    }
  }
}

Example:

{
  "data": {
    "id": "configuration",
    "type": "configurations",
    "attributes": {
      "customerId": "apidvcorp",
      "apiKey": "****************************************",
      "rmapiBaseUrl": "https://api.ebsco.io"
    }
  }
}

Response 200

OK

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Configuration Schema",
  "description": "Configuration Schema using JSON API",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "description": "Configuration Data",
      "$ref": "configurationData.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data"
  ]
}

Example:

{
  "data": {
    "id": "configuration",
    "type": "configurations",
    "attributes": {
      "customerId": "apidvcorp",
      "apiKey": "****************************************",
      "rmapiBaseUrl": "https://api.ebsco.io"
    }
  },
  "jsonapi": {
    "version": "1.0"
  }
}

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

Example:

{
  "errors": [
    {
      "title": "Invalid KB API Credentials",
      "detail": "Kb api credentials are invalid",
      "source": {}
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

Status

Gives status of currently set KB configuration.

GET /eholdings/status

Gives status of currently set KB configuration.

GET /eholdings/status

Response 200

Body

Media type: application/vnd.api+json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Status Response Schema",
  "description": "Status Response Schema using JSON API",
  "type": "object",
  "javaType": "org.folio.rest.jaxrs.model.ConfigurationStatus",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "object",
      "javaType": "org.folio.rest.jaxrs.model.StatusData",
      "description": "Status Data",
      "$ref": "statusData.json"
    },
    "jsonapi": {
      "type": "object",
      "description": "JSON API Version",
      "$ref": "../jsonapi.json"
    }
  }
}

Example:

{
  "data": {
    "id": "status",
    "type": "statuses",
    "attributes": {
      "isConfigurationValid": true
    }
  },
  "jsonapi": {
    "version": "1.0"
  }
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

Cache

DELETE /eholdings/cache

Invalidate configuration cache for tenant

DELETE /eholdings/cache

Response 204

No Content