- URL:https://[root]/community/users/[userName]/tasks/[taskID]/update(POST only)
- Version Introduced:10.8.1
Example usage
The following is a sample ArcGIS Online POST request for the update operation:
POST /sharing/rest/community/users/NBadmin/tasks/a7ce628005004e758f3387d735b3e1ca/update HTTP/1.1
Host: org.arcgis.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=?&maxOccurrences=30&f=pjson
The following is a sample ArcGIS Enterprise POST request for the update operation:
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=?&maxOccurrences=30&f=pjson
Description
The update operation allows you to edit and update the properties of a preexisting task. Updates made to a task take effect during its next scheduled run.
Note:
Support for scene services and ArcGIS Workflow Manager was added at Enterprise 10.9. Support for administrative reports (ExecuteReport) was added at Enterprise 11.0.
Request parameters
Parameter | Details |
---|---|
title (Optional) | Title of the task. Example
|
type (Required) | The type of task, either running a notebook or updating an Insights workbook, that will be run on the specified item. Values: ExecuteNotebook | UpdateInsightsWorkbook | ExecuteSceneCook | ExecuteWorkflowManager | ExecuteReport |
parameters (Optional; required for administrative reports) | JSON object of additional parameters that will be added to the task run request. Administrative reports example
|
itemId (Required; optional for administrative reports) | Item ID of the item the scheduled task will be run on. Example
|
startDate (Optional) | The date, in Epoch milliseconds, the scheduled task will begin running. Example
|
endDate (Optional) | The date, in Epoch milliseconds, the scheduled task will 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. The hour, dayOfWeek, and dayOfMonth parameters must be adjusted for UTC. Example
|
dayOfMonth (Required) | A valid CRON expression (, - * ? / L W C) that specifies the day of the month for the task's schedule. Adjust the dayOfMonth value to UTC hours. For example, 8:00 p.m. PDT on the fourth day of the month would be 3:00 a.m. UTC on the fifth day of the month. Values for this parameter can be 1 through 31, representing a day of the month. Example
|
month (Required) | A valid CRON expression (, - * /) that specifies the month for the task's schedule. To represent a specific month, use values 1 through 12 (January to December). Examples
|
dayOfWeek (Required) | A valid CRON expression (, - * ? / L C #) that specifies the day of the week for the task's schedule. Adjust the dayOfWeek value to UTC hours. For example, Monday, 8:00 p.m. PDT would be Tuesday, 3:00 a.m. UTC. Values for this parameter can be 1 through 7, representing Sunday through Saturday. Example
|
maxOccurrences (Optional) | The maximum number of times the task will run. Example
|
f | The response format. The default format is html. Values: html | json | pjson |
JSON Response example
{
"success": true,
"taskId": "a7ce628005004e758f3387d735b3e1ca"
}