Skip To Content

Jobs

Description

This resource is a collection of all the administrative jobs (asynchronous operations) created in your site. When operations that support asynchronous execution are run, ArcGIS Notebook Server creates a job entry that can be queried for its current status and messages.

Note:

This resource is for administrative jobs, not geoprocessing jobs.

Request parameters

ParameterDetails
detail

(Optional)

Set this value to true to obtain full job details. By default, the jobs resource returns an abbreviated response.

Values: true | false

num

(Optional)

The number of jobs returned. By default, 100 jobs are returned. You can specify a different value for this parameter.

sortByDate

(Optional)

Set this value to true to sort the list of jobs returned from most recent to oldest based on the start time of the job. The default value is false.

Values: true | false

f

(Optional)

The response format. The default response format is html.

Values: html | json | pjson

Example usage


https://notebookserver.domain.com:11443/arcgis/admin/system/jobs
detail=true
num=500
sortByDate=true
f=json

JSON Response syntax (default abbreviated response)

{
  "asyncJobs": [{
    "jobId": "<jobId_1>",
    "startTime": <start_time in epoch milliseconds>,
    "type": "openNotebook",
    "username": "user_1"
  },
  {
    "jobId": "<jobId_2>",
    "startTime": <start_time in epoch milliseconds>,
    "type": "executeNotebook",
    "username": "<user_2>"
  }
 ]
 "total": 2
}

JSON Response syntax (full details)

{
  "asyncJobs": [{
    "jobId": "<jobid_1>",
    "inputs": {},
    "startTime": <start_time in epoch milliseconds>,
    "endTime": <end_time in epoch milliseconds>,
    "type": "openNotebook",
    "results": {
      "notebookUrl": "<url to notebook.ipynb>",
      "notebookId": "<notebook_id>",
      "webToolVersion": <web tool version if exists>
    },
    "status": "COMPLETED",
    "username": "user_1",
    "customAttributes": {
      "isCancelled": true|false
    }
  },
  {
    "jobId": "<jobid_1>",
    "inputs": {
      "itemId": "<notebook_itemId>",
      "updatePortalItem": true|false,
      "saveInjectedParameters": true|false,
      "notebookParameters": "{}",
      "runId": "<runId>",
      "executeJobUpdated": true|false,
      "taskId": "<task_id>"
    },
    "startTime": <starttime in epoch milliseconds>,
    "type": "executeNotebook",
    "status": "PROCESSING",
    "username": "user_2",
    "customAttributes": {
      "isCancelled": false
    }
  }
 ]
 "total": 2
}

JSON Response example (default abbreviated response)

{
 "asyncJobs": [{
    "jobId": "j0bc73e29-3725-4eb1-b6c7-db2cdc56799c",
    "startTime": 1612162576231,
    "type": "openNotebook",
    "username": "j_doe"
  },
  {
    "jobId": "j9ed8e170-21d8-412f-bea2-609a82f1b436",
    "startTime": 1612172292858,
    "type": "executeNotebook",
    "username": "a_doe"
  },
  {
    "jobId": "jbaa73a13-96d4-4090-8354-a1bbcf2ca573",
    "startTime": 1612172123312,
    "type": "openNotebook",
    "username": "m_doe"
  }
 ]
 "total": 3
}

JSON Response example (full details)

{
 "asyncJobs": [{
    "jobId": "j0bc73e29-3725-4eb1-b6c7-db2cdc56799c",
    "inputs": {},
    "startTime": 1612162576231,
    "endTime": 1612162578198,
    "type": "openNotebook",
    "results": {
      "notebookUrl": "https://notebookserver.domain.com:11443/notebookserver/notebooks/d1483e6f189f4c2190ce8a15dad6e91c/notebooks/newnb9970c07397334a6980829c53895b68d5.ipynb",
      "notebookId": "64c21f6c929443089d3ebf5184553a95",
      "webToolVersion": "11.2"
    },
    "status": "COMPLETED",
    "username": "j_doe",
    "customAttributes": {
      "isCancelled": false
    }
  },
  {
    "jobId": "j9ed8e170-21d8-412f-bea2-609a82f1b436",
    "inputs": {
      "itemId": "e18af37c680b40f082a8ed49a91beb0a",
      "updatePortalItem": true,
      "saveInjectedParameters": false,
      "notebookParameters": "{}",
      "runId": "6abddcae013d4dfc8b435aea25b187f0",
      "executeJobUpdated": false,
      "taskId": "4596975e57c84a05b46d0ba1403fdad9"
    },
    "startTime": 1612172292858,
    "type": "executeNotebook",
    "status": "PROCESSING",
    "username": "a_doe",
    "customAttributes": {
      "isCancelled": false
    }
  }
 ]
 "total": 2
}