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 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
update
parameter to true. To delete an existing table, exclude the table from the job template.Existing - 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
property
. 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.Name
Body parameter
{
"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
Name | Type | Required |
---|---|---|
|
|
Path parameters
Name | Type | Required |
---|---|---|
|
| |
|
| |
|
|
Examples
Request
# 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
{
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
| success | ||
| Invalid Job Template |