updateJobTemplate

Click to copy

Update a job template

Update a job template by specifying the update values for the job template properties in the json body. All job template properties, except for the jobTemplateId must be passed in the json body to update the job template. If an optional job template property is not passed a value or passed as null in the json body, no updates will occur to the property. The jobTemplateId of a job template cannot be updated once it is created. Updates to job templates will only be reflected in the new jobs. Existing jobs will not be updated. The job template name provided for the update must be unique and cannot be the same as another job template in the system. To automatically assign the first step of a job to the user creating the job, update the job template's default assignment to JobCreator($job). The properties follow the same rule for required or optional, as creating a job template. The adminBasic or adminAdvanced privilege is required.

Extended Properties

Extended property tables and their properties in a job template can be created, modified and deleted using this request.

  • To create a new table, define a new extended property table definition. To update an existing table, include the full extended property table definition and set the updateExisting parameter to true. To delete an existing table, exclude the table from the job template.
  • To add a field, define a new extended property definition within an extended property table definition. To update an existing property, include the extended property definition with corresponding propertyName. When updating existing extended property field definitions, data type and string field length cannot be modified and will be ignored. Updates to default values for existing extended property field definitions will only apply if the data type matches the existing data type, otherwise it will also be ignored. To delete a field, exclude it from the extended property table definition.

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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
  "jobTemplateId": "string",
  "jobTemplateName": "string",
  "category": "string",
  "defaultJobDuration": 0,
  "defaultAssignedTo": "string",
  "defaultDueDate": "2019-08-24T14:15:22Z",
  "defaultStartDate": "2019-08-24T14:15:22Z",
  "jobStartDateType": "CreationDate",
  "diagramId": "string",
  "diagramName": "string",
  "diagramThumbnail": "string",
  "defaultPriorityName": "string",
  "defaultAssignedType": "Unassigned",
  "description": "string",
  "defaultDescription": "string",
  "state": "Draft",
  "defaultJobName": "string",
  "defaultFinalStatus": "string",
  "defaultStatus": "string",
  "activities": [
    {
      "typeName": "CloseJob",
      "actionName": "Email",
      "templateId": "string"
    }
  ],
  "extendedPropertyTableDefinitions": [
    {
      "tableName": "string",
      "tableAlias": "string",
      "tableOrder": 0,
      "relationshipType": "OneToOne",
      "featureServiceProperties": {
        "itemId": "string",
        "itemType": "SurveyForm",
        "layerId": "string",
        "portalType": "Current",
        "portalUrl": "string",
        "featureServiceUniqueId": "string",
        "secure": true
      },
      "extendedPropertyDefinitions": [
        {
          "propertyName": "string",
          "propertyAlias": "string",
          "propertyOrder": 0,
          "dataType": "String",
          "defaultValue": {},
          "fieldLength": 0,
          "required": true,
          "editable": true,
          "visible": true,
          "domain": {
            "type": "codedValue",
            "codedValues": [
              {}
            ],
            "range": [
              "string"
            ]
          }
        }
      ],
      "updateExisting": true,
      "associateToExisting": true,
      "isAssociated": true
    }
  ],
  "lastUpdatedBy": "string",
  "lastUpdatedDate": "2019-08-24T14:15:22Z"
}

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 PUT /{orgId}/{itemId}/jobTemplates/{jobTemplateId} \
  -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
{
  "success": true
}
StatusMeaningDescriptionSchema

200

OK

success

Success

404

Not Found

Invalid Job Template

WorkflowExceptionDTO

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