foliolib.folio.api.circulationStorage.TlrFeatureToggleJob

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

Bases: foliolib.folio.FolioApi

TLR Feature Toggle Job API

Storage for TLR feature toggle job

Parameters
  • tenant (str) – Tenant id

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

Methods

delete_tlrFeatureToggleJob(...)

Removes TLR feature toggle job

get_tlrFeatureToggleJob(tlrFeatureToggleJobsId)

Checks status of TLR feature toggle job

get_tlrFeatureToggleJobs(**kwargs)

Retrieve a list of tlrFeatureToggleJob items.

modify_tlrFeatureToggleJob(...)

Updates TLR feature toggle job

set_start()

POST /tlr-feature-toggle-job/start

set_tlrFeatureToggleJob(tlrFeatureToggleJob)

Create a new tlrFeatureToggleJob item.

delete_tlrFeatureToggleJob(tlrFeatureToggleJobsId: str, **kwargs)

Removes TLR feature toggle job

DELETE /tlr-feature-toggle-job-storage/tlr-feature-toggle-jobs/{tlrFeatureToggleJobsId}

Parameters
  • tlrFeatureToggleJobsId (str) –

  • **kwargs (properties) – Keyword Arguments

Keyword Arguments

lang (str) – (default=en) Requested language. Optional. [lang=en]

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_tlrFeatureToggleJob(tlrFeatureToggleJobsId: str)

Checks status of TLR feature toggle job

GET /tlr-feature-toggle-job-storage/tlr-feature-toggle-jobs/{tlrFeatureToggleJobsId}

Parameters

tlrFeatureToggleJobsId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "TLR feature toggle job schema",
  "properties": {
    "id": {
      "description": "TLR feature toggle job ID",
      "type": "string",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "status": {
      "description": "Status of TLR feature toggle job",
      "type": "string",
      "enum": [
        "open",
        "in-progress",
        "done",
        "failed"
      ]
    },
    "numberOfUpdatedRequests": {
      "description": "Number of updated requests",
      "type": "integer"
    },
    "errors": {
      "description": "Contains array of errors",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema"
    }
  },
  "additionalProperties": false
}
get_tlrFeatureToggleJobs(**kwargs)

Retrieve a list of tlrFeatureToggleJob items.

GET /tlr-feature-toggle-job-storage/tlr-feature-toggle-jobs

Parameters

**kwargs (properties) – Keyword Arguments

Keyword Arguments
  • 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

  • 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.

    by using CQL

    Example

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

    • status=”in-progress”

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 TLR feature toggle jobs",
  "type": "object",
  "properties": {
    "tlrFeatureToggleJobs": {
      "description": "List of TLR feature toggle jobs",
      "id": "tlrFeatureToggleJobs",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "tlr-feature-toggle-job.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "tlrFeatureToggleJobs",
    "totalRecords"
  ]
}
modify_tlrFeatureToggleJob(tlrFeatureToggleJobsId: str, tlrFeatureToggleJob: dict)

Updates TLR feature toggle job

PUT /tlr-feature-toggle-job-storage/tlr-feature-toggle-jobs/{tlrFeatureToggleJobsId}

Parameters
  • tlrFeatureToggleJobsId (str) –

  • tlrFeatureToggleJob (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestConflict – Conflict

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "TLR feature toggle job schema",
  "properties": {
    "id": {
      "description": "TLR feature toggle job ID",
      "type": "string",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "status": {
      "description": "Status of TLR feature toggle job",
      "type": "string",
      "enum": [
        "open",
        "in-progress",
        "done",
        "failed"
      ]
    },
    "numberOfUpdatedRequests": {
      "description": "Number of updated requests",
      "type": "integer"
    },
    "errors": {
      "description": "Contains array of errors",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema"
    }
  },
  "additionalProperties": false
}
set_start()

POST /tlr-feature-toggle-job/start

set_tlrFeatureToggleJob(tlrFeatureToggleJob: dict)

Create a new tlrFeatureToggleJob item.

POST /tlr-feature-toggle-job-storage/tlr-feature-toggle-jobs

Parameters

tlrFeatureToggleJob (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created tlrFeatureToggleJob item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "TLR feature toggle job schema",
  "properties": {
    "id": {
      "description": "TLR feature toggle job ID",
      "type": "string",
      "$ref": "raml-util/schemas/uuid.schema"
    },
    "status": {
      "description": "Status of TLR feature toggle job",
      "type": "string",
      "enum": [
        "open",
        "in-progress",
        "done",
        "failed"
      ]
    },
    "numberOfUpdatedRequests": {
      "description": "Number of updated requests",
      "type": "integer"
    },
    "errors": {
      "description": "Contains array of errors",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "raml-util/schemas/metadata.schema"
    }
  },
  "additionalProperties": false
}