- URL:https://<task-url>/update(POST only)
- Version Introduced:10.8.1
Description
This operation allows you to edit and update the properties of a preexisting task. Updates that have been made to a task will go into affect during it's next scheduled execution.
Request parameters
Parameter | Details |
---|---|
title (Optional) | Title of the task. Example
|
type (Required) | The type of task, either executing a notebook or updating an Insights workbook, that will be executed against the specified item. Values: ExecuteNotebook | UpdateInsightsWorkbook |
parameters (Optional) | JSON object of additional parameters that will be added to the task run request.
|
itemId (Required) | Item ID of the item the scheduled task will be run against
|
startDate (Optional) | Defines the date, in Epoch miliseconds, of when the scheduled task should begin running. Example
|
endDate (Optional) | Defines the date, in Epoch miliseconds, fo when the scheduled task should stop running. Example
|
minute (Required) | A valid CRON expression (, - * /) that specifies the minute value for the task's schedule. Example
|
hour (Required) | A valid CRON expression (, - * /) that specifies the hour value for the task's schedule. Example
|
dayOfMonth (Required) | A valid CRON expression (, - * ? / L W C) that specifies the day of the month for the task's schedule. Example
|
month (Required) | A valid CRON expression (, - * /) that specifies the month for the task's schedule. Example
|
dayOfWeek (Required) | A valid CRON expression (, - * ? / L C #) that specifies the day of the week for the task's schedule. Example
|
maxOccurences (Optional) | The maximum number of occurrences this task should execute. Example
|
f | The response format. The default format is html. Values: html | json | pjson |
Example usage
Below is a sample POST request for update:
POST /webadaptor/sharing/rest/community/users/NBadmin/tasks/a7ce628005004e758f3387d735b3e1ca/update HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
title=OnceAMinute30Times&type=ExecuteNotebook¶meters=&itemId=029b61ca770e428d9468a2a55f40b9fb&startDate=1589428800000&endDate=1589428800000&minute=*/1&hour=*&dayOfMonth=*&month=*&dayOfWeek=?&maxOccurences=30&f=pjson
JSON Response example
{
"success": true,
"taskId": "a7ce628005004e758f3387d735b3e1ca"
}