foliolib.folio.api.kbEbscoJava.AccessTypes

class foliolib.folio.api.kbEbscoJava.AccessTypes(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)

Bases: foliolib.folio.FolioApi

mod-kb-ebsco-java

Implements the eholdings interface using EBSCO KB as backend.

Parameters
  • tenant (str) – Tenant id

  • okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.

Methods

delete_accessType(kbCredentialsId, accessTypeId)

Delete a Access Type by Id

get_accessType(accessTypesId)

Retrieve specific Access Types by Id

get_accessType_for_kbCredential(...)

Retrieve specific Access Types by Id related to specific KB credentials

get_accessTypes()

Get a list of access types.

get_accessTypes_by_kbCredential(kbCredentialsId)

Get a list of access types related to specific KB credentials.

modify_accessType(kbCredentialsId, ...)

Update a Access Type by Id related to specific KB credentials

set_accessType(kbCredentialsId, accessType)

Create an access type in specific KB Credentials

delete_accessType(kbCredentialsId: str, accessTypeId: str)

Delete a Access Type by Id

DELETE /eholdings/kb-credentials/{kbCredentialsId}/access-types/{accessTypeId}

Parameters
  • kbCredentialsId (str) –

  • accessTypeId (str) –

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

get_accessType(accessTypesId: str)

Retrieve specific Access Types by Id

GET /eholdings/access-types/{accessTypesId}

Parameters

accessTypesId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestNotFound – Not Found

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Access Type object schema for a collection",
  "description": "Access Type object schema for a collection",
  "javaType": "org.folio.rest.jaxrs.model.AccessType",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "description": "UUID of access type",
      "$ref": "../../raml-util/schemas/uuid.schema",
      "example": "f973c3b6-85fc-4d35-bda8-f31b568957bf"
    },
    "type": {
      "type": "string",
      "description": "Type of resource",
      "enum": [
        "accessTypes"
      ],
      "example": "accessTypes"
    },
    "attributes": {
      "type": "object",
      "description": "Custom label object data attributes",
      "$ref": "accessTypeDataAttributes.json"
    },
    "creator": {
      "type": "object",
      "description": "User display info for creator of the note",
      "$ref": "userDisplayInfo.json",
      "readonly": true
    },
    "updater": {
      "type": "object",
      "description": "User display info for updater of the note",
      "$ref": "userDisplayInfo.json",
      "readonly": true
    },
    "usageNumber": {
      "type": "integer",
      "description": "Number of records that use the access type",
      "readonly": true
    },
    "metadata": {
      "type": "object",
      "description": "Metadata for the entity",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "type",
    "attributes"
  ]
}
get_accessType_for_kbCredential(kbCredentialsId: str, accessTypeId: str)

Retrieve specific Access Types by Id related to specific KB credentials

GET /eholdings/kb-credentials/{kbCredentialsId}/access-types/{accessTypeId}

Parameters
  • kbCredentialsId (str) –

  • accessTypeId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestNotFound – Not Found

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Access Type object schema for a collection",
  "description": "Access Type object schema for a collection",
  "javaType": "org.folio.rest.jaxrs.model.AccessType",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "description": "UUID of access type",
      "$ref": "../../raml-util/schemas/uuid.schema",
      "example": "f973c3b6-85fc-4d35-bda8-f31b568957bf"
    },
    "type": {
      "type": "string",
      "description": "Type of resource",
      "enum": [
        "accessTypes"
      ],
      "example": "accessTypes"
    },
    "attributes": {
      "type": "object",
      "description": "Custom label object data attributes",
      "$ref": "accessTypeDataAttributes.json"
    },
    "creator": {
      "type": "object",
      "description": "User display info for creator of the note",
      "$ref": "userDisplayInfo.json",
      "readonly": true
    },
    "updater": {
      "type": "object",
      "description": "User display info for updater of the note",
      "$ref": "userDisplayInfo.json",
      "readonly": true
    },
    "usageNumber": {
      "type": "integer",
      "description": "Number of records that use the access type",
      "readonly": true
    },
    "metadata": {
      "type": "object",
      "description": "Metadata for the entity",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "type",
    "attributes"
  ]
}
get_accessTypes()

Get a list of access types.

GET /eholdings/access-types

Returns

See Schema below

Return type

dict

Raises

OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Access Types Collection Schema",
  "description": "Access Types Collection Schema",
  "javaType": "org.folio.rest.jaxrs.model.AccessTypeCollection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "array",
      "description": "List of access types",
      "items": {
        "type": "object",
        "$ref": "accessType.json"
      }
    },
    "meta": {
      "type": "object",
      "description": "metadata containing total results in collection",
      "$ref": "../metaTotalResults.json",
      "readonly": true
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data",
    "meta",
    "jsonapi"
  ]
}
get_accessTypes_by_kbCredential(kbCredentialsId: str)

Get a list of access types related to specific KB credentials.

GET /eholdings/kb-credentials/{kbCredentialsId}/access-types

Parameters

kbCredentialsId (str) –

Returns

See Schema below

Return type

dict

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Access Types Collection Schema",
  "description": "Access Types Collection Schema",
  "javaType": "org.folio.rest.jaxrs.model.AccessTypeCollection",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "data": {
      "type": "array",
      "description": "List of access types",
      "items": {
        "type": "object",
        "$ref": "accessType.json"
      }
    },
    "meta": {
      "type": "object",
      "description": "metadata containing total results in collection",
      "$ref": "../metaTotalResults.json",
      "readonly": true
    },
    "jsonapi": {
      "type": "object",
      "description": "version of json api",
      "$ref": "../jsonapi.json"
    }
  },
  "required": [
    "data",
    "meta",
    "jsonapi"
  ]
}
modify_accessType(kbCredentialsId: str, accessTypeId: str, accessType: dict)

Update a Access Type by Id related to specific KB credentials

PUT /eholdings/kb-credentials/{kbCredentialsId}/access-types/{accessTypeId}

Parameters
  • kbCredentialsId (str) –

  • accessTypeId (str) –

  • accessType (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestNotFound – Not Found

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "PUT Request To Access Type Collection Schema",
  "description": "PUT Request To Access Type Collection Schema",
  "javaType": "org.folio.rest.jaxrs.model.AccessTypePutRequest",
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "description": "Access type object",
      "$ref": "accessType.json"
    }
  },
  "required": [
    "data"
  ]
}
set_accessType(kbCredentialsId: str, accessType: dict)

Create an access type in specific KB Credentials

POST /eholdings/kb-credentials/{kbCredentialsId}/access-types

Parameters
  • kbCredentialsId (str) –

  • accessType (dict) – See Schema below

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestNotFound – Not Found

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "POST Request To Access Type Collection Schema",
  "description": "POST Request To Access Type Collection Schema",
  "javaType": "org.folio.rest.jaxrs.model.AccessTypePostRequest",
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "description": "Access type object",
      "$ref": "accessType.json"
    }
  },
  "required": [
    "data"
  ]
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Access Type object schema for a collection",
  "description": "Access Type object schema for a collection",
  "javaType": "org.folio.rest.jaxrs.model.AccessType",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "description": "UUID of access type",
      "$ref": "../../raml-util/schemas/uuid.schema",
      "example": "f973c3b6-85fc-4d35-bda8-f31b568957bf"
    },
    "type": {
      "type": "string",
      "description": "Type of resource",
      "enum": [
        "accessTypes"
      ],
      "example": "accessTypes"
    },
    "attributes": {
      "type": "object",
      "description": "Custom label object data attributes",
      "$ref": "accessTypeDataAttributes.json"
    },
    "creator": {
      "type": "object",
      "description": "User display info for creator of the note",
      "$ref": "userDisplayInfo.json",
      "readonly": true
    },
    "updater": {
      "type": "object",
      "description": "User display info for updater of the note",
      "$ref": "userDisplayInfo.json",
      "readonly": true
    },
    "usageNumber": {
      "type": "integer",
      "description": "Number of records that use the access type",
      "readonly": true
    },
    "metadata": {
      "type": "object",
      "description": "Metadata for the entity",
      "$ref": "../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "type",
    "attributes"
  ]
}