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.

Custom Labels

GET /eholdings/custom-labels

Get a list of custom labels.

GET /eholdings/custom-labels

Response 200

OK

Body

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",
        "$ref": "customLabel.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", "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"
  }
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

Custom labels

Custom labels belongs to specific KB Credentials

GET /eholdings/kb-credentials/{id}/custom-labels

Get a custom labels related to specific KB credentials

GET /eholdings/kb-credentials/{id}/custom-labels
URI Parameters
  • id: required (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)

Response 200

OK

Body

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",
        "$ref": "customLabel.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", "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"
  }
}

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": "KB credentials with id '99999999-9999-9999-9999-999999999999' not found"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}

PUT /eholdings/kb-credentials/{id}/custom-labels

Update a list of custom labels.

PUT /eholdings/kb-credentials/{id}/custom-labels
URI Parameters
  • id: required (string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
Body

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",
        "$ref": "customLabel.json"
      }
    }
  },
  "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
      }
    }
  ]
}

Response 200

OK

Body

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",
        "$ref": "customLabel.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", "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"
  }
}

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": "KB credentials with id '99999999-9999-9999-9999-999999999999' not found"
    }
  ],
  "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 Custom Label id",
      "detail": "Custom Label id should be in range 1 - 5"
    }
  ],
  "jsonapi": {
    "version": "1.0"
  }
}