URL:
https://[root]/community/users/[userName]/tasks/[taskID]/update
Methods:
POST
Version Introduced:
ArcGIS Enterprise 10.8.1

Example usage

The following is a sample ArcGIS Online POST request for the update operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
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&parameters=&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:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /<context>/sharing/rest/community/users/NBadmin/tasks/a7ce628005004e758f3387d735b3e1ca/update HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

title=OnceAMinute30Times&type=ExecuteNotebook&parameters=&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.

Request parameters

ParameterDetails

title

(Optional)

Title of the task.

Example:

Use dark colors for code blocksCopy
1
title=OnceAMinute30Times

type

(Required)

The type of task that will be run on the specified item. The following are the tasks this operation supports:

  • ExecuteNotebook: Schedule the automated run of a notebook
  • UpdateInsightsWorkbook: Schedule updates for Insights reports
  • ExecuteSceneCook: Schedule generation or updates for scene layers
  • ExecuteWorkflowManager: Schedule reoccuring jobs in ArcGIS Workflow Manager
  • ExecuteReport: Schedule the creation of administrative reports (introduced at ArcGIS Enterprise 11.0)
  • GPService: Schedule a web tool to run (introduced at ArcGIS Enterprise 11.4) or schedule a task for a geoprocessing service (introduced at ArcGIS Enterprise 11.2)
  • CreateEnterpriseBackup: Schedule a backup of an ArcGIS Enterprise organization (introduced at ArcGIS Enterprise 12.2)

Values: ExecuteNotebook | UpdateInsightsWorkbook | ExecuteSceneCook | ExecuteWorkflowManager | ExecuteReport | GPService | CreateEnterpriseBackup

parameters

(Optional; required for some types)

A JSON object of additional parameters that will be added to the task run request. This parameter is required for scene services, administrative reports, geoprocessing services, and backups.

Syntax example for a scene service (formatted for readability):

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "service_url": <scene service URL>,
  "num_of_caching_service_instances": 2, //2 instances are required
  "layer": "{<list of scene layers to cook>}", //The default is all layers
  "update_mode": "PARTIAL_UPDATE_NODES" //RECREATE_ALL_NODES (Re-cook full scene cache) |
                  PARTIAL_UPDATE_NODES //(Update scene cache from latest edits to the scene service) |
                  PARTIAL_UPDATE_ATTRIBUTES //(Update only attributes and not geometries)
}

Syntax example for creating a backup:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "backupName": "<prefix for the backup name>", //the date the backup is created will be appended to to this
  "storeId": "<store ID>", //retrieved from the Portal for ArcGIS administrative API
  "mode": "<backup | full | incremental>",  //the type of backup to create
  "description": "<description of backups the task creates>",
  "includeObjectStoreData": <true | false>, //determines whether to include object store data
  "setReadOnly": <true | false>, //determines whether read-only mode will be set during the backup
  "retentionOffset": <Unix timestamp in milliseconds> //define date after which the backup is deleted
}

Scene service example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
parameters={
  "service_url": https://machine.esri.com/wedadaptor/rest/services/Hosted/ServiceName/SceneServer,
  "num_of_caching_service_instances": 2,
  "layer": "{}",
  "update_mode":"PARTIAL_UPDATE_NODES"
}

Backup example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "backupName": "backup",
  "storeId": "d658b6fe-253e-41ca-9fac-53f19f9301f7",
  "mode": "backup",
  "description": "Scheduled enterprise backup",
  "includeObjectStoreData": false,
  "setReadOnly": false,
  "retentionOffset": 1791763200000
}

Administrative reports example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
parameters={
  ​​"reportType":"org",
  "reportSubType":"activity",
  "timeDuration":"daily",
  "title":"MyTitle"
}​​

Geoprocessing service example (formatted for readability):

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  "in_features": {
    "url": "https://organization.example.com/<context>/rest/services/Hosted/ServiceName/FeatureServer/0"
  },
  "buffer_distance_or_field": {
    "distance": 5,
    "units": "esriKilometers"
  },
  "esri_out_feature_service_name": {
    "serviceProperties": {
      "serviceUrl": "https://organization.example.com/<context>/rest/services/Hosted/
        OutputFeatureServiceName/FeatureServer"
    },
    "itemProperties": {
      "overwrite": true,
      "newFeatureServiceOnOverwriteFail": true
    }
  }
}

itemId

(Required; optional for administrative reports)

Item ID of the item the scheduled task will be run on.

Example:

Use dark colors for code blocksCopy
1
itemID=029b61ca770e428d9468a2a55f40b9fb

startDate

(Optional)

A Unix timestamp in milliseconds representing the date the schedule task will begin running.

Example:

Use dark colors for code blocksCopy
1
startDate=1589428800000

endDate

(Optional)

A Unix timestamp in milliseconds representing the date the schedule task will stop running.

Example:

Use dark colors for code blocksCopy
1
endDate=1589428800000

minute

(Required)

A valid CRON expression (, - * /) that specifies the minute value for the task's schedule.

Example:

Use dark colors for code blocksCopy
1
minute=*/1

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:

Use dark colors for code blocksCopy
1
2
hour=3
hour=*

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:

Use dark colors for code blocksCopy
1
2
dayOfMonth=5
dayOfMonth=*

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:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
//Any month
month=*

//A specific month (August)
month=8

//Every two months
month=*/2

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:

Use dark colors for code blocksCopy
1
2
dayOfWeek=2
dayOfWeek=?

maxOccurrences

(Optional)

The maximum number of times the task will run.

Example:

Use dark colors for code blocksCopy
1
maxOccurrences=30

f

The response format. The default format is html.

Values: html | json | pjson

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
{
  "success": true,
  "taskId": "a7ce628005004e758f3387d735b3e1ca"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.