foliolib.folio.api.inventoryStorage.IdentifierType

class foliolib.folio.api.inventoryStorage.IdentifierType(tenant: str)

Bases: foliolib.folio.FolioApi

Identifier Types API

This documents the API calls that can be made to query and manage instance identifier types

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

delete_identifierType(identifierTypeId)

Delete identifierType item with given {identifierTypeId}

get_identifierType(identifierTypeId)

Retrieve identifierType item with given {identifierTypeId}

get_identifierTypes(**kwargs)

Return a list of identifier types

modify_identifierType(identifierTypeId, ...)

Update identifierType item with given {identifierTypeId}

set_identifierType(identifierType)

Create a new identifier type

delete_identifierType(identifierTypeId: str)

Delete identifierType item with given {identifierTypeId}

DELETE /identifier-types/{identifierTypeId}

Parameters

identifierTypeId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestFatalError – Server Error

get_identifierType(identifierTypeId: str)

Retrieve identifierType item with given {identifierTypeId}

GET /identifier-types/{identifierTypeId}

Parameters

identifierTypeId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An identifier type",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "description": "label for the identifier type",
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "label indicating where the identifier type entry originates from, i.e. 'folio' or 'local'"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "name"
  ]
}
get_identifierTypes(**kwargs)

Return a list of identifier types

GET /identifier-types

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

    Example

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

    • name=aaa

  • 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

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of identifier types",
  "type": "object",
  "properties": {
    "identifierTypes": {
      "description": "List of identifier types",
      "id": "identifierType",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "identifiertype.json"
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    }
  },
  "required": [
    "identifierTypes",
    "totalRecords"
  ]
}
modify_identifierType(identifierTypeId: str, identifierType: dict)

Update identifierType item with given {identifierTypeId}

PUT /identifier-types/{identifierTypeId}

Parameters
  • identifierTypeId (str) –

  • identifierType (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestConflict – Conflict

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An identifier type",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "description": "label for the identifier type",
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "label indicating where the identifier type entry originates from, i.e. 'folio' or 'local'"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "name"
  ]
}
set_identifierType(identifierType: dict)

Create a new identifier type

POST /identifier-types

Parameters

identifierType (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiRequestFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created identifierType item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "An identifier type",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "description": "label for the identifier type",
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "label indicating where the identifier type entry originates from, i.e. 'folio' or 'local'"
    },
    "metadata": {
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema",
      "readonly": true
    }
  },
  "required": [
    "name"
  ]
}