foliolib.folio.api.organizationsStorage.Interface

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

Bases: foliolib.folio.FolioApi

Interfaces

CRUD APIs used to manage interfaces.

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_credential(interfacesId)

Delete credential item with given {credentialId}

delete_interface(interfacesId)

Delete interface item with given {interfaceId}

get_credential(interfacesId)

Retrieve credential item with given {credentialId}

get_interface(interfacesId)

Retrieve interface item with given {interfaceId}

get_interfaces(**kwargs)

Get list of interfaces

modify_credential(interfacesId, credential)

Update credential item with given {credentialId}

modify_interface(interfacesId, interface)

Update interface item with given {interfaceId}

set_credential(interfacesId)

POST /organizations-storage/interfaces/{interfacesId}/credentials

set_interface(interface)

Create a new interface item.

set_interface_by_interfacesId(interfacesId)

POST /organizations-storage/interfaces/{interfacesId}

delete_credential(interfacesId: str)

Delete credential item with given {credentialId}

DELETE /organizations-storage/interfaces/{interfacesId}/credentials

Parameters

interfacesId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

delete_interface(interfacesId: str)

Delete interface item with given {interfaceId}

DELETE /organizations-storage/interfaces/{interfacesId}

Parameters

interfacesId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_credential(interfacesId: str)

Retrieve credential item with given {credentialId}

GET /organizations-storage/interfaces/{interfacesId}/credentials

Parameters

interfacesId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An interface credential record",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this interface credential",
      "$ref": "../../common/schemas/uuid.json"
    },
    "username": {
      "description": "The login username for this interface",
      "type": "string"
    },
    "password": {
      "description": "The login password for this interface",
      "type": "string"
    },
    "interfaceId": {
      "description": "The unique id of the associated interface",
      "$ref": "../../common/schemas/uuid.json"
    }
  },
  "additionalProperties": false,
  "required": [
    "interfaceId",
    "username",
    "password"
  ]
}
get_interface(interfacesId: str)

Retrieve interface item with given {interfaceId}

GET /organizations-storage/interfaces/{interfacesId}

Parameters

interfacesId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An interface record",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this interface",
      "$ref": "../../common/schemas/uuid.json"
    },
    "name": {
      "description": "The name of this interface",
      "type": "string"
    },
    "uri": {
      "description": "The URI of this interface",
      "type": "string"
    },
    "notes": {
      "description": "The notes for this interface",
      "type": "string"
    },
    "available": {
      "description": "The availability setting for this interface",
      "type": "boolean"
    },
    "deliveryMethod": {
      "description": "The delivery method for this interface",
      "type": "string",
      "enum": [
        "Online",
        "FTP",
        "Email",
        "Other"
      ]
    },
    "statisticsFormat": {
      "description": "The format of the statistics for this interface",
      "type": "string"
    },
    "locallyStored": {
      "description": "The locally stored location of this interface",
      "type": "string"
    },
    "onlineLocation": {
      "description": "The online location for this interface",
      "type": "string"
    },
    "statisticsNotes": {
      "description": "The notes regarding the statistics for this interface",
      "type": "string"
    },
    "type": {
      "description": "Interface types",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "interface_type.json"
      }
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false
}
get_interfaces(**kwargs)

Get list of interfaces

GET /organizations-storage/interfaces

Parameters

**kwargs (properties) – Keyword Arguments

Keyword Arguments
  • query (str) –

    A query expressed as a CQL string (see [dev.folio.org/reference/glossary#cql](https://dev.folio.org/reference/glossary#cql)) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.

    with valid searchable fields: for example code

    Example

    • (username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode

    • [“code”, “MEDGRANT”, “=”]

  • totalRecords (str) –

    (default=auto) How to calculate the totalRecords property. “exact” for the correct number, “estimated” for an estimation, “auto” to automatically select “exact” or “estimated”, “none” for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    Example

    • none

  • offset (int) –

    (default=0) Skip over a number of elements by specifying an offset value for the query

    Example

    • 0

  • limit (int) –

    (default=10) Limit the number of elements returned in the response

    Example

    • 10

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Collection of interface records",
  "type": "object",
  "properties": {
    "interfaces": {
      "description": "The list of interfaces in this collection",
      "type": "array",
      "id": "interfaces",
      "items": {
        "type": "object",
        "$ref": "interface.json"
      }
    },
    "totalRecords": {
      "description": "The number of interface records returned in this collection",
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "interfaces",
    "totalRecords"
  ]
}
modify_credential(interfacesId: str, credential: dict)

Update credential item with given {credentialId}

PUT /organizations-storage/interfaces/{interfacesId}/credentials

Parameters
  • interfacesId (str) –

  • credential (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestConflict – Conflict

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An interface credential record",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this interface credential",
      "$ref": "../../common/schemas/uuid.json"
    },
    "username": {
      "description": "The login username for this interface",
      "type": "string"
    },
    "password": {
      "description": "The login password for this interface",
      "type": "string"
    },
    "interfaceId": {
      "description": "The unique id of the associated interface",
      "$ref": "../../common/schemas/uuid.json"
    }
  },
  "additionalProperties": false,
  "required": [
    "interfaceId",
    "username",
    "password"
  ]
}
modify_interface(interfacesId: str, interface: dict)

Update interface item with given {interfaceId}

PUT /organizations-storage/interfaces/{interfacesId}

Parameters
  • interfacesId (str) –

  • interface (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestConflict – Conflict

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An interface record",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this interface",
      "$ref": "../../common/schemas/uuid.json"
    },
    "name": {
      "description": "The name of this interface",
      "type": "string"
    },
    "uri": {
      "description": "The URI of this interface",
      "type": "string"
    },
    "notes": {
      "description": "The notes for this interface",
      "type": "string"
    },
    "available": {
      "description": "The availability setting for this interface",
      "type": "boolean"
    },
    "deliveryMethod": {
      "description": "The delivery method for this interface",
      "type": "string",
      "enum": [
        "Online",
        "FTP",
        "Email",
        "Other"
      ]
    },
    "statisticsFormat": {
      "description": "The format of the statistics for this interface",
      "type": "string"
    },
    "locallyStored": {
      "description": "The locally stored location of this interface",
      "type": "string"
    },
    "onlineLocation": {
      "description": "The online location for this interface",
      "type": "string"
    },
    "statisticsNotes": {
      "description": "The notes regarding the statistics for this interface",
      "type": "string"
    },
    "type": {
      "description": "Interface types",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "interface_type.json"
      }
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false
}
set_credential(interfacesId: str)

POST /organizations-storage/interfaces/{interfacesId}/credentials

Parameters

interfacesId (str) –

set_interface(interface: dict)

Create a new interface item.

POST /organizations-storage/interfaces

Parameters

interface (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

Headers

  • Location - URI to the created interface item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An interface record",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique id of this interface",
      "$ref": "../../common/schemas/uuid.json"
    },
    "name": {
      "description": "The name of this interface",
      "type": "string"
    },
    "uri": {
      "description": "The URI of this interface",
      "type": "string"
    },
    "notes": {
      "description": "The notes for this interface",
      "type": "string"
    },
    "available": {
      "description": "The availability setting for this interface",
      "type": "boolean"
    },
    "deliveryMethod": {
      "description": "The delivery method for this interface",
      "type": "string",
      "enum": [
        "Online",
        "FTP",
        "Email",
        "Other"
      ]
    },
    "statisticsFormat": {
      "description": "The format of the statistics for this interface",
      "type": "string"
    },
    "locallyStored": {
      "description": "The locally stored location of this interface",
      "type": "string"
    },
    "onlineLocation": {
      "description": "The online location for this interface",
      "type": "string"
    },
    "statisticsNotes": {
      "description": "The notes regarding the statistics for this interface",
      "type": "string"
    },
    "type": {
      "description": "Interface types",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "interface_type.json"
      }
    },
    "metadata": {
      "type": "object",
      "$ref": "../../../raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "additionalProperties": false
}
set_interface_by_interfacesId(interfacesId: str)

POST /organizations-storage/interfaces/{interfacesId}

Parameters

interfacesId (str) –