16.1.1.22. Periodic Task endpoints¶
These endpoints are used to create, modify and delete periodic tasks.
This module is tested in tests/test_api_periodictask.py
- GET /periodictask/taskmodules/¶
Return a list of task module identifiers.
- GET /periodictask/nodes/¶
Return a list of available nodes
- GET /periodictask/¶
Return a list of objects of defined periodic tasks.
- POST /periodictask/¶
Create or replace an existing periodic task definition.
- Parameters
id – ID of an existing periodic task definition that should be updated
name – Name of the periodic task
active – true if the periodic task should be active
retry_if_failed – privacyIDEA will retry to execute the task if failed
interval – Interval at which the periodic task should run (in cron syntax)
nodes – Comma-separated list of nodes on which the periodic task should run
taskmodule – Task module name of the task
ordering – Ordering of the task, must be a number >= 0.
options – A dictionary (possibly JSON) of periodic task options, mapping unicodes to unicodes
- Return
ID of the periodic task
- GET /periodictask/options/(taskmodule)¶
Return the available options for the given taskmodule.
- Parameters
taskmodule – Identifier of the task module
- Return
a dictionary mapping option keys to description dictionaries
- POST /periodictask/disable/(ptaskid)¶
Disable a certain periodic task.
- Parameters
ptaskid – ID of the periodic task
- Return
ID of the periodic task
- POST /periodictask/enable/(ptaskid)¶
Enable a certain periodic task.
- Parameters
ptaskid – ID of the periodic task
- Return
ID of the periodic task
- GET /periodictask/(ptaskid)¶
Return the dictionary describing a periodic task.
- Parameters
ptaskid – ID of the periodic task
- DELETE /periodictask/(ptaskid)¶
Delete a certain periodic task.
- Parameters
ptaskid – ID of the periodic task
- Return
ID of the periodic task