foliolib.folio.api.scheduler.Scheduler
- class foliolib.folio.api.scheduler.Scheduler(tenant: str)
Bases:
foliolib.folio.FolioApiMod Scheduler API
Mod Scheduler API
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
Methods
createschedulertimers(timerDescriptor)Create timer for a module
delete scheduler timer by id
Retrieve scheduler timer by id
getschedulertimers(**kwargs)Retrieve timer list
updateschedulertimerbyid(timerDescriptor, id_)Update scheduler timer by id
- createschedulertimers(timerDescriptor)
Create timer for a module
POST /scheduler/timers- Parameters
timerDescriptor (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Error response in JSON format for validation errors.
OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "TimerDescriptor", "description": "Timer", "type": "object", "properties": { "id": { "description": "Timer identifier", "type": "string", "format": "uuid" }, "modified": { "description": "Whether modified", "type": "boolean" }, "routingEntry": { "$ref": "routingEntry.json" }, "enabled": { "description": "Whether enabled", "type": "boolean" } }, "required": [ "routingEntry", "enabled" ] }
- deleteschedulertimerbyid(id_)
delete scheduler timer by id
DELETE /scheduler/timers/{id}- Raises
OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.
- getschedulertimerbyid(id_)
Retrieve scheduler timer by id
GET /scheduler/timers/{id}- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestNotFound – Error response if entity is not found by id (in json format)
OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "TimerDescriptor", "description": "Timer", "type": "object", "properties": { "id": { "description": "Timer identifier", "type": "string", "format": "uuid" }, "modified": { "description": "Whether modified", "type": "boolean" }, "routingEntry": { "$ref": "routingEntry.json" }, "enabled": { "description": "Whether enabled", "type": "boolean" } }, "required": [ "routingEntry", "enabled" ] }
- getschedulertimers(**kwargs)
Retrieve timer list
GET /scheduler/timers- Keyword Arguments
offset (int) – Skip over a number of elements by specifying an offset value for the query. (minimum: 0, default: 0)
limit (int) – Limit the number of elements returned in the response. (minimum: 0, maximum: 500, default: 10)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Timer Descriptor list", "description": "Timer Descriptor List", "properties": { "timerDescriptors": { "description": "List of timer descriptors", "type": "array", "items": { "$ref": "timerDescriptor.json" } }, "totalRecords": { "type": "integer" } } }
- updateschedulertimerbyid(timerDescriptor, id_)
Update scheduler timer by id
PUT /scheduler/timers/{id}- Parameters
timerDescriptor (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestNotFound – Error response if entity is not found by id (in json format)
OkapiRequestFatalError – Error response for unhandled or critical server exceptions, e.g. NullPointerException.
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "TimerDescriptor", "description": "Timer", "type": "object", "properties": { "id": { "description": "Timer identifier", "type": "string", "format": "uuid" }, "modified": { "description": "Whether modified", "type": "boolean" }, "routingEntry": { "$ref": "routingEntry.json" }, "enabled": { "description": "Whether enabled", "type": "boolean" } }, "required": [ "routingEntry", "enabled" ] }