foliolib.folio.api.inventoryStorage.RecordBulk

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

Bases: foliolib.folio.FolioApi

Inventory Storage records Bulk Download API

API for downloading a bulk set of instances or holdings IDs

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

get_ids(**kwargs)

Retrieve a list of record IDs.

get_ids(**kwargs)

Retrieve a list of record IDs.

GET /record-bulk/ids

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

  • OkapiRequestNotFound – Not Found

  • OkapiRequestFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of IDs",
  "type": "object",
  "properties": {
    "ids": {
      "description": "List of IDs",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "totalRecords": {
      "description": "Estimated or exact total number of records",
      "type": "integer"
    },
    "resultInfo": {
      "$ref": "raml-util/schemas/resultInfo.schema",
      "readonly": true
    }
  },
  "additionalProperties": false,
  "required": [
    "ids",
    "totalRecords"
  ]
}