createJobs

POST
1
/{orgId}/{itemId}/jobTemplates/{jobTemplateId}/job

Create a job

Create a new job by defining the basic properties of a job. A job is a unit of work performed by one or more people. For example, updating parcel data, creating a new work plan for a residential subdivision, and creating a map of a specific scale each qualifies as a job. Each individual job is an instance of the job template, which serves as the blueprint for a job. You can choose to assign the first step in a job to the user creating the job by setting the job's default assignment to JobCreator($job). During job creation, the job's default assignment takes precedence over the job template's default assignment. Values for extended properties configured on the job template can be updated during job creation. If no properties are provided while creating a job, the job is created with the default values in the job template. The first step runs automatically at job creation if it is configured to run automatically and assigned to the job creator. The jobCreate privilege is required.

Note: Bulk job creation must not exceed 10,000 jobs per request. For jobs configured to run automatically, only the first 25 jobs will run automatically per request.

A job will not be created in the following cases:

  • Invalid or no job template is provided
  • Job template is not in Active state
  • A value other than User, Group or Unassigned is provided for assignedType
  • If the due date is before the provided start date
  • An invalid number of jobs is provided

Job Parameters:

ParameterDescriptionData Type
numberOfJobsOptional. Define the number of jobs to be created with the specified job configuration.Integer
jobNameOptional. Define the name of the job to be created. If not defined, the default job name defined in the job template is used.String
startDateOptional. Define the start date of the new jobs.String representation of the timestamp in RFC3339 format
dueDateOptional. Define the due date of the new jobs.String representation of the timestamp in RFC3339 format
priorityOptional. Define the priority of jobs to be created.Integer
descriptionOptional. Define the descrition of jobs to be created with the specified job configuration.String
ownedByOptional. Define the ownder of jobs to be created with the specified job configuration.String
assignedTypeOptional. Define the assignment type of jobs to be created with the specified job configuration. It can be set to Unassigned, User or Group.String
assignedToOptional. Define the assignment of jobs to be created with the specified job configuration. The job assignment must be consistent with assignedType.Integer
percentCompleteOptional. Define the complete percentage of jobs to be created with the specified job configuration.Integer
notesOptional. Define the notes of the job to be created.String
parentJobOptional. Define the parent jobId of jobs to be created.String
locationOptional. Define an area of location for your job.Location
jobStatusOptional. Define the status of the job to be created. If not defined, the default job status defined in the job template is used.String
extendedPropertiesOptional. Define additional properties on a job template specific to your business needs.Array[ExtendedProperties]
relatedPropertiesOptional. Define additional 1-M properties on a job template specific to your business needs.Array[RelatedProperties]

Location Parameters:

ParameterDescriptionData Type
geometryTypeOptional. Type of location defined. geometryType is required if a geometry is specified. Supported geometry types are Multipoint, Polyline, Polygon. Curve geometries are not supported.String
geometryOptional. Coordinates and spatial reference for the location.String

ExtendedProperties Parameters:

ParameterDescriptionData Type
identifierRequired. Combination of the extended property table name and the extended property field name created in the job template, for example, "tableName.fieldName"String
valueOptional. The value placed in the field when the record is created for this property. It must be a string representation of the extended property value. For example, "true" for a boolean, or "2020-11-01T22:00:32Z" for a date. If the value is null or not defined, the extended property value is cleared.String

RelatedProperties Parameters:

ParameterDescriptionData Type
tableNameRequired. The name of the table to be updated.String
entriesRequired. Add multiple entries for a property in a 1-M table to associate with a single JobIdArray[Entries]

Entries Parameters:

ParameterDescriptionData Type
propertiesRequired. Property parameters for the property that will be associated with the jobArray[Properties]

Properties Parameters:

ParameterDescriptionData Type
propertyNameRequired. Name of the property to be added to the Job as an entry.String
valuesRequired. Value for the related property to be associated with the job.String

Query parameters

NameTypeRequired

token

string

Body parameters

Supported content types: application/json

NameTypeRequiredDefault valueDescription

A job object defining the job

numberOfJobs

number(integer)

jobName

string

startDate

string(date-time)

dueDate

string(date-time)

priority

string

description

string

ownedBy

string

assignedTo

string

percentComplete

number(double)

jobStatus

string

notes

string

parentJob

string

location

object

string¦null

» geometry

string¦null

extendedProperties

» identifier

string

» value

string¦null

» dataType

string¦null

» uniqueId

string¦null

relatedProperties

» tableName

string

» entries

»» properties

»»» propertyName

string

»»» value

string¦null

body

A job object defining the job

assignedType

undefined

Default
Unassigned
Enumerated values
Unassigned
Group
User

» geometryType

undefined

Default
Polygon
Enumerated values
Multipoint
Polyline
Polygon

Path parameters

NameTypeRequired

jobTemplateId

string

orgId

string

itemId

string

Examples

Request

1
2
3
4
5
6
# You can also use wget
curl -X POST /{orgId}/{itemId}/jobTemplates/{jobTemplateId}/job \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  --data '{"numberOfJobs":1,"jobName":"string","startDate":"2019-08-24T14:15:22Z","dueDate":"2019-08-24T14:15:22Z","priority":"string","description":"string","ownedBy":"string","assignedType":"Unassigned","assignedTo":"string","percentComplete":0.1,"jobStatus":"string","notes":"string","parentJob":"string","location":{"geometryType":"Multipoint","geometry":"string"},"extendedProperties":[{"identifier":"string","value":"string","dataType":"string","uniqueId":"string"}],"relatedProperties":[{"tableName":"string","entries":[{"properties":[{"propertyName":"string","value":"string"}]}]}]}'

Response

StatusMeaningDescriptionSchema

200

OK

List of jobs IDs of the created jobs. If the job's first step is set to run automatically, it returns true for autoExecuted.

CreateJobsResponse

400

Bad Request

error

WorkflowJsonExceptionDTO

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close