foliolib.folio.api.folioSpringBase.Tenant

class foliolib.folio.api.folioSpringBase.Tenant(tenant: str)

Bases: foliolib.folio.FolioApi

Tenant API

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

deletetenant(operationId)

drop tenant id

gettenant(operationId)

Does tenant id already exist

posttenant(tenantAttributes)

Create tenant job (create, upgrade, delete)

deletetenant(operationId)

drop tenant id

DELETE /_/tenant/{operationId}

Raises
  • OkapiRequestError – Bad request

  • OkapiRequestFatalError – Internal server error

gettenant(operationId)

Does tenant id already exist

GET /_/tenant/{operationId}

Returns

See Schema below.

Return type

dict

Raises

OkapiRequestFatalError – Internal server error

Schema

{
    "type": "string",
    "example": true
}
posttenant(tenantAttributes)

Create tenant job (create, upgrade, delete)

POST /_/tenant

Parameters

tenantAttributes (dict) – See Schema below.

Raises
  • OkapiRequestError – Bad request

  • OkapiRequestUnprocessableEntity – Validation errors

  • OkapiRequestFatalError – Internal server error

Schema

{
    "title": "Tenant job attributes",
    "description": "Configuration how to install, upgrade or delete a module for a tenant",
    "type": "object",
    "properties": {
        "module_from": {
            "description": "Existing module ID. If omitted, the module is not enabled already",
            "type": "string"
        },
        "module_to": {
            "description": "Target module ID. If omitted, the existing module is disabled.",
            "type": "string"
        },
        "purge": {
            "description": "On disable should data also be purged",
            "type": "boolean"
        },
        "parameters": {
            "description": "List of key/value parameters of an error",
            "type": "array",
            "items": {
                "description": "List of key/value parameters of an error",
                "type": "object",
                "properties": {
                    "key": {
                        "description": "The key for this parameter",
                        "type": "string"
                    },
                    "value": {
                        "description": "The value of this parameter",
                        "type": "string"
                    }
                },
                "additionalProperties": false,
                "required": [
                    "key"
                ]
            },
            "additionalProperties": false
        }
    },
    "additionalProperties": false
}