foliolib.folio.api.inventoryStorage.HoldingsSyncUnsafe

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

Bases: foliolib.folio.FolioApi

Inventory Storage Holdings Batch Sync Unsafe API

Batch API for synchronously uploading holdings records into the inventory with optimistic locking disabled

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

set_synchronousUnsafe(synchronousUnsafe)

Create or update a collection of holdings in a single synchronous request; if any holding fails the complete batch will be rejected (all or nothing).

set_synchronousUnsafe(synchronousUnsafe: dict)

Create or update a collection of holdings in a single synchronous request; if any holding fails the complete batch will be rejected (all or nothing). Environment variable DB_ALLOW_SUPPRESS_OPTIMISTIC_LOCKING is required, see https://github.com/folio-org/raml-module-builder#environment-variables for details. The _version property is ignored, optimistic locking is disabled - this is known to lead to data loss in some cases, don’t use in production, you have been warned!

POST /holdings-storage/batch/synchronous-unsafe

Parameters

synchronousUnsafe (dict) – See Schema below

Raises
  • OkapiRequestPayloadToLarge – Payload Too Large

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of holdings records",
  "type": "object",
  "properties": {
    "holdingsRecords": {
      "description": "List of holdings records",
      "id": "holdingsRecord",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "holdingsRecord.json"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "holdingsRecords"
  ]
}