Skip to content

Latest commit

 

History

History
205 lines (132 loc) · 4.12 KB

scheduled-tasks.md

File metadata and controls

205 lines (132 loc) · 4.12 KB

Scheduled Tasks

scheduled_tasks_controller = client.scheduled_tasks

Class Name

ScheduledTasksController

Methods

Get Task

Get task by id.

def get_task(self,
            task_id)

Parameters

Parameter Type Tags Description
task_id string Template, Required Task Id.

Response Type

TaskInfo

Example Usage

task_id = 'taskId4'

result = scheduled_tasks_controller.get_task(task_id)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException
404 Task not found. ProblemDetailsException

Get Tasks

Get tasks.

def get_tasks(self,
             is_hidden=None,
             is_enabled=None)

Parameters

Parameter Type Tags Description
is_hidden bool Query, Optional Optional filter tasks that are hidden, or not.
is_enabled bool Query, Optional Optional filter tasks that are enabled, or not.

Response Type

List of TaskInfo

Example Usage

result = scheduled_tasks_controller.get_tasks()

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException

Start Task

Start specified task.

def start_task(self,
              task_id)

Parameters

Parameter Type Tags Description
task_id string Template, Required Task Id.

Response Type

void

Example Usage

task_id = 'taskId4'

result = scheduled_tasks_controller.start_task(task_id)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException
404 Task not found. ProblemDetailsException

Stop Task

Stop specified task.

def stop_task(self,
             task_id)

Parameters

Parameter Type Tags Description
task_id string Template, Required Task Id.

Response Type

void

Example Usage

task_id = 'taskId4'

result = scheduled_tasks_controller.stop_task(task_id)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException
404 Task not found. ProblemDetailsException

Update Task

Update specified task triggers.

def update_task(self,
               task_id,
               body)

Parameters

Parameter Type Tags Description
task_id string Template, Required Task Id.
body List of TaskTriggerInfo Body, Required Triggers.

Response Type

void

Example Usage

task_id = 'taskId4'
body = []

body.append(TaskTriggerInfo())

body.append(TaskTriggerInfo())


result = scheduled_tasks_controller.update_task(task_id, body)

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized APIException
403 Forbidden APIException
404 Task not found. ProblemDetailsException