foliolib.folio.api.folioVertxLib.Tenant
- class foliolib.folio.api.folioVertxLib.Tenant(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiTenant API
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
deletetenantjob(id_)delete tenant job
gettenantjob(id_, **kwargs)Get tenant job
posttenant(tenantAttributes)Start tenant operation
- deletetenantjob(id_)
delete tenant job
DELETE /_/tenant/{id}- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – job id not found
OkapiFatalError – Internal error
- gettenantjob(id_, **kwargs)
Get tenant job
GET /_/tenant/{id}- Keyword Arguments
wait (int) – wait until job change, but no longer than the wait time - in milliseconds. 0 means “no wait” and is behavior if omitted.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – job id not found
OkapiFatalError – Internal error
Schema
{ "title": "Tenant job", "description": "Tenant job information", "type": "object", "properties": { "id": { "description": "Job ID", "type": "string", "format": "uuid" }, "tenant": { "description": "Tenant ID", "type": "string" }, "tenantAttributes": { "description": "Module information - content to initiate operation", "$ref": "tenantAttributes.json" }, "complete": { "description": "Whether job is complete (true) or ongoing (false)", "type": "boolean" }, "error": { "description": "Error message if error has occurred", "type": "string" }, "messages": { "description": "Additional messages (warnings, errors)", "type": "array", "items": { "type": "string" } } } }
- posttenant(tenantAttributes)
Start tenant operation
POST /_/tenant- Parameters
tenantAttributes (dict) – See Schema below.
- Raises
OkapiRequestError – Bad request
OkapiRequestPayloadToLarge – Payload Too large
OkapiRequestUnprocessableEntity – Validation errors
OkapiFatalError – Internal 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": "Parameters that controls what tenant init (eg reference data)", "$ref": "parameters.json" } }, "additionalProperties": false }