Workflow Templates API
- List workflow templates
- Get a single workflow template
- Create a workflow template
- Update a workflow template
- Fields
List workflow templates
List all workflow templates for an account:
GET /workflow_templates
Response
Status: 200 OK
[
{
"created_at": "2016-03-14T03:13:47-06:00",
"sourceID": null,
"updated_at": "2016-03-14T03:13:47-06:00",
"service": {
"name": "Windows Server",
"id": 33,
"provider": {
"name": "Widget Data Center, External IT",
"id": 30
}
},
"subject": "Windows server hardware upgrade",
"id": 9,
"disabled": false
},
{
"created_at": "2016-03-14T03:13:47-06:00",
"sourceID": null,
"updated_at": "2016-03-14T03:13:47-06:00",
"service": {
"name": "Personal Computing",
"id": 22,
"provider": {
"name": "Widget Data Center, Internal IT",
"id": 32
}
},
"subject": "Move desktop personal computer",
"id": 8,
"disabled": false,
"recurrence": {
"start_date": "2016-03-16",
"day_of_week": true,
"day_of_week_index": "first",
"next_occurrence_at": "2016-04-02T02:00:00-05:00",
"day_of_week_day": "monday",
"last_occurrence_at": null,
"day": null,
"time_of_day": "09:00",
"day_of_month": null,
"interval": 1,
"ical": "DTSTART;TZID=CET:20160316T000000\nRRULE:FREQ=YEARLY;BYMONTH=1,4,7,10;BYDAY=1MO",
"disabled": false,
"frequency": "yearly",
"last_occurrence_object": null,
"month_of_year": "1,4,7,10",
"time_zone": "Amsterdam",
"end_date": null,
"last_occurrence_errors": null
}
},
"..."
]
The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of workflow templates.
Predefined Filters
The following predefined filters are available:
/workflow_templates/disabled
: List all disabled workflow templates/workflow_templates/enabled
: List all enabled workflow templates
Collection Fields
By default the following fields will appear in collections of workflow templates:
id
sourceID
subject
service
created_at
updated_at
Obtain a different set of fields using the ?fields= parameter.
Filtering
Filtering is available for the following fields:
id
source
sourceID
subject
disabled
service
created_at
updated_at
Sorting
By default a collection of workflow templates is sorted descending by id
.
The following fields are accepted by the ?sort= parameter:
id
sourceID
subject
service
created_at
updated_at
times_applied
Get a single workflow template
GET /workflow_templates/:id
Response
Status: 200 OK
{
"created_at": "2016-03-14T03:13:47-06:00",
"category": "non_standard",
"sourceID": null,
"workflow_manager_id": null,
"recurrence": null,
"updated_at": "2016-03-14T03:13:47-06:00",
"service": null,
"subject": "Empty workflow template",
"id": 1,
"times_applied": 0,
"note": null,
"justification": null,
"impact": "none",
"disabled": false,
"source": null,
"instructions": "Add tasks to this workflow to ensure risk and impact analysis is performed, approvals are collected and all implementation steps defined.",
"workflow_type": null,
"ui_extension": null
}
The response contains these fields.
Create a workflow template
POST /workflow_templates
When creating a new workflow template these fields are available.
Response
Status: 201 Created
{
"category": "...",
"...": "..."
}
The response contains all fields of the created workflow template and is similar to the response in Get a single workflow template
Update a workflow template
PATCH /workflow_templates/:id
When updating a workflow template these fields are available.
Response
Status: 200 OK
{
"category": "...",
"...": "..."
}
The response contains all fields of the updated workflow template and is similar to the response in Get a single workflow template
Fields
- assign_relations_to_workflow_manager
- Optional boolean, default:
true
— Whether relations like Requests and Problems are assigned to the workflow manager when the relations are linked to the workflow. - attachments
- Readonly aggregated Attachments
- category
- Optional enum — The Category field is used to select the category that needs to be selected in the Category field of a new workflow when it is being created based on the template. Valid values are:
-
standard
: Standard - Approved Workflow Template Was Usednon_standard
: Non-Standard - Approved Workflow Template Not Availableemergency
: Emergency - Required for Incident Resolutionorder
: Order - Organization Order Workflow
- created_at
- Readonly datetime — The date and time at which the workflow template was created.
- disabled
- Optional boolean, default:
false
— The Disabled box is checked when the workflow template may not be used to help register new workflows. - id
- Readonly integer — The unique ID of the workflow template.
- impact
- Readonly enum, default:
none
— The Impact field shows the maximum impact level that is selected in the task templates that are a part of the workflow template. Valid values are: -
none
: None - Service Not Degradedlow
: Low - Service Degraded for One Usermedium
: Medium - Service Down for One Userhigh
: High - Service Degraded for Several Userstop
: Top - Service Down for Several Users
- instructions
- Optional text (max 64KB) — The Instructions field is used to enter the information that needs to be shown when a new workflow is being created based on the template. This field typically contains instructions about how to register the workflow.
- instructions_attachments
- Writeonly attachments The attachments used in the Instructions field.
- justification
- Optional enum — The Justification field is used to select the justification that needs to be selected in the Justification field of a new workflow when it is being created based on the template. This field is required when there are request templates linked to the workflow template. Valid values are:
-
compliance
: Compliancecorrection
: Correctionexpansion
: Expansionimprovement
: Improvementmaintenance
: Maintenancemove
: Moveremoval
: Removalreplacement
: Replacementpurchase
: Purchase
- note
- Optional text (max 64KB) — The Note field is used to enter the information that needs to be copied to the Note field of a new workflow when it is being created based on the template.
- note_attachments
- Writeonly attachments The inline attachments used in the Note field.
- recurrence
- Optional aggregated — The recurrence settings hash, missing in case the workflow template has no recurrency defined. See Recurrence for the fields in the recurrence hash.
- service
- Optional reference to Service — The Service field is used to select the Service that should be selected in the Service field of a new workflow when it is being created based on the template.
- source
- Optional string (max 30) - See source
- sourceID
- Optional string (max 128) - See source
- subject
- Required string (max 255) — The Subject field is used to enter a short description that needs to be copied to the Subject field of a new Workflow when it is being created based on the template.
- times_applied
- Readonly integer — The number of times the workflow template is used to create a Workflow.
- ui_extension
- Optional reference to UI Extension — The UI extension field is used to select the UI extension that is to be added to a new workflow when it is being created based on the template.
- updated_at
- Readonly datetime — The date and time of the last update of the workflow template. If the workflow template has no updates it contains the
created_at
value. - workflow_manager
- Optional reference to Person — The Workflow manager field is used to select the Person who will be responsible for coordinating the workflows that will be generated automatically in accordance with the recurrence schedule.
- workflow_type
- Optional enum — The Type field is used to select the type of a new workflow when it is being created based on the template. It contains the value of the Reference field of a Workflow Type.