FRAMES | NO FRAMES Description | Parameters | Examples | Response
Create Job (Operation)
URL http://<jobs-url>/create
Parent Resource Jobs

Description

Creates a new job based upon a preconfigured job type template. A job consists of a set of basic properties, and it can have an associated spatial component known as an area of interest (AOI) or a point of interest (POI).

Note: When a feature service data workspace is used for the job, the parent version can only be set to sde.Default.

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json
user Required
Description: The username of the client.
jobTypeId Required
Description: The numeric ID of the job type on which to base the new job.
id Description: A unique numeric ID to identify the new job. If this parameter is not specified, then a job ID will be automatically generated by the Workflow Manager database. This parameter is meaningful only if numJobs either is not specified or is set to the value 1 (one).
name Description: A name for the new job. If this parameter is not specified, then a job name will be automatically generated by the Workflow Manager system based on the job type configuration.

This parameter is supported from 10.1 onwards.
startDate Description: The date on which the job is scheduled to begin. If this parameter is not specified, then the job's start date is based on the default start date of the specified job type.

Syntax: startDate=<timeInstant>
Example: startDate=1230768000000 (1 Jan 2009 00:00:00 GMT)
dueDate Description: The date on which the job is scheduled to be complete. If this parameter is not specified, then the job's due date is based on the default due date of the specified job type.

Syntax: dueDate=<timeInstant>
Example: dueDate=1230768000000 (1 Jan 2009 00:00:00 GMT)
priority Description: The numeric priority value.
parentJobId Description: The numeric ID of a parent job.
dataWorkspaceId Description: The ID of the data workspace for the job.
parentVersion Description: The name of the geodatabase version that will be the parent version for this job's geodatabase version.
description Description: A description of the job.
ownedBy Description: The name of the user who will have ownership of the job. If this parameter is not specified, then it defaults to the user who is creating the job.
assignedType Description: Determines whether to assign to a user (1) or group (2), or to leave the job unassigned (0). The parameters assignedType and assignedTo must be specified together. You cannot specify one and not the other.
assignedTo Description: The name of the user or group to assign the job to. The parameters assignedType and assignedTo must be specified together. You cannot specify one and not the other.
aoi Description: The polygon geometry of the job's area of interest (AOI). The spatial reference of the polygon should match the spatial reference configured for the JTX_JOBS_AOI feature class. The structure of the polygon is the same as the structure of the JSON polygon objects returned by the ArcGIS REST API.

Example:

{
  "rings" : [
    [[-117,34],[-116,34],[-117,33],[-117,34]],
    [[-115,44],[-114,43],[-115,43],[-115,44]]
  ],
  "spatialReference" : { "wkid" : 4326 }
}
poi Description: The geometry of the job's point of interest (POI). The spatial reference of the geometry should match the spatial reference configured for the JTX_JOBS_AOI and JTX_JOBS_POI feature classes. The structure of the multipoint is the same as the structure of the JSON multipoint objects returned by the ArcGIS REST API.

This parameter is supported from 10.4 onwards.

Example:

{
  "points" : [ [-97.06138,32.837], [-97.06133,32.836], [-97.06124,32.834], [-97.06127,32.832] ],
  "spatialReference" : { "wkid" : 4326 }
}
numJobs Description: The number of jobs to create.
autoCommitWorkflow Description: Determines whether the job workflow should be committed upon creation of the job. If this parameter is not specified, then a default value is chosen based on the "AUTOCOMMITWORKFLOW" configuration property.

Values: true | false
autoExecute Description: Determines whether the job workflow should be executed upon creation of the job. If this parameter is not specified, then a default value is chosen based on the job type configuration.

Values: true | false

This parameter is supported from 10.1 onwards.

Example Usage

Example 1: URL for creating a job with the default properties based on a job type.

http://sampleserver/arcgis/rest/services/Workflow/WMServer/jobs/create?user=cjones&jobTypeId=1&f=pjson

Example 2: URL for creating a job with user-specified properties.

http://sampleserver/arcgis/rest/services/Workflow/WMServer/jobs/create?user=cjones&jobTypeId=1&priority=3&dueDate=1230768000000&f=pjson

JSON Response Syntax

{
  "jobIds": [ <jobId1>, <jobId2>, ... ]
}

JSON Response Example

{
  "jobIds": [ 123 ]
}