Skip to content

updateJobTemplate

PUT
Use dark colors for code blocksCopy
1
/{orgId}/{itemId}/jobTemplates/{jobTemplateId}
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.

Query parameters

NameTypeRequired
tokenstring¦null

Body parameters

Supported content types: application/json

Type: JobTemplate

A job template object with the job template properties and their values for the update.

NameTypeRequiredDefault value
jobTemplateIdstring¦null
jobTemplateNamestring
categorystring¦null
defaultJobDurationinteger(int32)¦null
defaultAssignedTostring¦null
defaultDueDatestring(date-time)¦null
defaultStartDatestring(date-time)¦null
jobStartDateTypestring¦null
diagramIdstring
diagramNamestring
diagramThumbnailstring¦null
defaultPriorityNamestring
defaultAssignedTypeAssignedTypeUnassigned
descriptionstring¦null
defaultDescriptionstring¦null
statestring
defaultJobNamestring¦null
defaultFinalStatusstring¦null
defaultStatusstring¦null
activities[Activity]¦null
extendedPropertyTableDefinitions[ExtendedPropertyTableDefinition]¦null
lastUpdatedBystring¦null
lastUpdatedDatestring(date-time)¦null

jobStartDateType

Enumerated values

CreationDate
Click to copy
SpecificDate
Click to copy

defaultAssignedType

Default
Unassigned

Enumerated values

Unassigned
Click to copy
Group
Click to copy
User
Click to copy

state

Enumerated values

Draft
Click to copy
Active
Click to copy
Automated
Click to copy
Retired
Click to copy

Path parameters

NameTypeRequired
jobTemplateIdstring
orgIdstring
itemIdstring

Response status

StatusMeaningDescriptionSchema
200OK

success

Success
404Not Found

Invalid Job Template

WorkflowExceptionDTO

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 'Authorization: Bearer <YOUR_TOKEN>' \
  --data '{"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":[{"code":"string","name":"string"}],"range":["string"]}}],"updateExisting":true,"associateToExisting":true,"isAssociated":true}],"lastUpdatedBy":"string","lastUpdatedDate":"2019-08-24T14:15:22Z"}'

Response

Use dark colors for code blocksCopy
1
2
3
{
  "success": true
}

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