foliolib.folio.api.licenses.Licenses

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

Bases: foliolib.folio.FolioApi

mod-licenses API

This documents the API calls that can be made to query and manage licenses

Parameters
  • tenant (str) – Tenant id

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

Methods

get_license(licenseId)

Retrieve a specific license

get_licenses()

List current licenses

modify_license(licenseId)

Update a specific license

set_license(license)

Create a new license

get_license(licenseId: str)

Retrieve a specific license

GET /licenses/licenses/{licenseId}

Parameters

licenseId (str) –

get_licenses()

List current licenses

GET /licenses/licenses

modify_license(licenseId: str)

Update a specific license

PUT /licenses/licenses/{licenseId}

Parameters

licenseId (str) –

set_license(license: dict)

Create a new license

POST /licenses/licenses

Parameters

license (dict) – See Schema below

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "A license",
  "additionalProperties": true,
  "properties": {
    "id": {
      "description": "The ID of the license",
      "type": "string"
    },
    "tags": {
      "description": "Tags are not a string",
      "type": "string"
    },
    "name": {
      "description": "Name of license",
      "type": "string"
    },
    "description": {
      "description": "Description of license",
      "type": "string"
    },
    "customProperties": {
      "description": "Custom properties",
      "type": "string"
    }
  },
  "required": [
    "name"
  ]
}