createJobs

Click to copy

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
dueDateOptional. Define the due date of the new jobs.String
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

Body parameter

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
37
38
39
40
41
42
{
  "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

NameTypeRequired

token

string

Path parameters

NameTypeRequired

jobTemplateId

string

orgId

string

itemId

string

Examples

Request

Use dark colors for code blocksCopy
1
2
3
4
5
# 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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{
  "jobIds": [
    "string"
  ],
  "message": "string",
  "autoExecuted": true
}
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.