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 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:
Parameter | Description | Data Type |
---|---|---|
numberOfJobs | Optional. Define the number of jobs to be created with the specified job configuration. | Integer |
jobName | Optional. Define the name of the job to be created. If not defined, the default job name defined in the job template is used. | String |
startDate | Optional. Define the start date of the new jobs. | String |
dueDate | Optional. Define the due date of the new jobs. | String |
priority | Optional. Define the priority of jobs to be created. | Integer |
description | Optional. Define the descrition of jobs to be created with the specified job configuration. | String |
ownedBy | Optional. Define the ownder of jobs to be created with the specified job configuration. | String |
assignedType | Optional. Define the assignment type of jobs to be created with the specified job configuration. It can be set to Unassigned , User or Group . | String |
assignedTo | Optional. Define the assignment of jobs to be created with the specified job configuration. The job assignment must be consistent with assigned . | Integer |
percentComplete | Optional. Define the complete percentage of jobs to be created with the specified job configuration. | Integer |
notes | Optional. Define the notes of the job to be created. | String |
parentJob | Optional. Define the parent jobId of jobs to be created. | String |
location | Optional. Define an area of location for your job. | Location |
jobStatus | Optional. Define the status of the job to be created. If not defined, the default job status defined in the job template is used. | String |
extendedProperties | Optional. Define additional properties on a job template specific to your business needs. | Array[ExtendedProperties] |
relatedProperties | Optional. Define additional 1-M properties on a job template specific to your business needs. | Array[RelatedProperties] |
Location Parameters:
Parameter | Description | Data Type |
---|---|---|
geometryType | Optional. 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 |
geometry | Optional. Coordinates and spatial reference for the location. | String |
ExtendedProperties Parameters:
Parameter | Description | Data Type |
---|---|---|
identifier | Required. Combination of the extended property table name and the extended property field name created in the job template, for example, "tableName.fieldName" | String |
value | Optional. 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-01 for a date. If the value is null or not defined, the extended property value is cleared. | String |
RelatedProperties Parameters:
Parameter | Description | Data Type |
---|---|---|
tableName | Required. The name of the table to be updated. | String |
entries | Required. Add multiple entries for a property in a 1-M table to associate with a single JobId | Array[Entries] |
Entries Parameters:
Parameter | Description | Data Type |
---|---|---|
properties | Required. Property parameters for the property that will be associated with the job | Array[Properties] |
Properties Parameters:
Parameter | Description | Data Type |
---|---|---|
propertyName | Required. Name of the property to be added to the Job as an entry. | String |
values | Required. Value for the related property to be associated with the job. | String |
Body parameter
{
"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,
"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"
}
]
}
]
}
]
}
Query parameters
Name | Type | Required |
---|---|---|
|
|
Path parameters
Name | Type | Required |
---|---|---|
|
| |
|
| |
|
|
Examples
Request
# 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}'
Response
200 Response
{
"jobIds": [
"string"
],
"message": "string",
"autoExecuted": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
| List of jobs IDs of the created jobs. If the job's first step is set to run automatically, it returns | ||
| error |