tasks: All User Scheduled Tasks

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

Example usage

The following is a sample ArcGIS Online request URL used to access the tasks resource, demonstrating how to filter a specific item that has an inactive ExecuteNotebook task associated with it:

Use dark colors for code blocksCopy
1
https://www.arcgis.com/sharing/rest/community/users/NBadmin/tasks?types=ExecuteNotebook&active=false&itemId=b181b9ab14d0442faa183215ec2c615e&f=pjson

The following is a sample ArcGIS Enterprise request URL used to access the tasks resource, demonstrating how to filter a specific item that has an inactive ExecuteNotebook task associated with it:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/sharing/rest/community/users/NBadmin/tasks?types=ExecuteNotebook&active=false&itemId=b181b9ab14d0442faa183215ec2c615e&f=pjson

Description

The tasks resource returns a list of all the scheduled tasks owned by a user. These results can be further filtered by specifying the task ID, its active state, or its task type.

Request parameters

ParameterDetails

itemId

(Optional)

The ID of a task owned by a user. This is a single item ID filter, and does not support a list of task IDs as values.

Example:

Use dark colors for code blocksCopy
1
itemId=029b61ca770e428d9468a2a55f40b9fb

active

(Optional)

Filters user owned tasks by their active state. Tasks that are scheduled to continue running will have an active state of true; tasks that are completed, paused, or deleted will have an active state of false.

Values: true | false

types

(Optional)

The task type. The task type is specified during task creation.

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

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
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  "total": 1,
  "start": 1,
  "num": 1,
  "nextStart": -1,
  "activeTasksAvailable": 20,
  "tasks": [
    {
      "id": "5837c7bc37ac404e8e3c16d9022b2b59",
      "itemId": "029b61ca770e428d9468a2a55f40b9fb",
      "type": "ExecuteNotebook",
      "title": "OnceAMinute30times",
      "userId": "NBadmin",
      "cronSchedule": {
        "minute": "*/1",
        "hour": "*",
        "dayOfMonth": "*",
        "month": "*",
        "dayOfWeek": "?"
      },
      "runIntervalSeconds": 60,
      "lastStart": 1589457360000,
      "maxOccurrences": 10,
      "parameters": {
        "updatePortalItem": true,
        "saveInjectedParameters": false,
        "notebookParameters": "{}"
      },
      "created": 1589456737000,
      "updated": 1589457404000,
      "startDate": 1589428800000,
      "active": false,
      "taskState": "completed"
    }
  ]
}

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