Workflow Types API
List Workflow Types
Section titled “List Workflow Types”List all workflow types for an account:
GET /workflow_typesResponse
Section titled “Response”Status: 200 OK[ { "id": 2, "sourceID": null, "reference": "application_change", "name": "Application Change", "description": "", "position": 1, "created_at": "2016-12-23T05:09:03-06:00", "updated_at": "2016-12-23T05:09:03-06:00" }, { "id": 3, "sourceID": null, "reference": "infrastructure_change", "name": "Infrastructure Change", "description": "", "position": 2, "created_at": "2016-12-23T05:09:03-06:00", "updated_at": "2016-12-23T05:09:03-06:00" }]The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of workflow types.
Collection Fields
Section titled “Collection Fields”By default the following fields will appear in collections of workflow types:
id
sourceID
reference
name
description
position
created_at
updated_at
Obtain a different set of fields using the ?fields=parameter .
Filtering
Section titled “Filtering”Filtering is available for the following fields :
id
sourceID
reference
name
disabled
created_at
updated_at
The filters on
sourceID
,
reference
and
name
are not case sensitive.
Sorting
Section titled “Sorting”By default a collection of workflow types is sorted
ascending
by
id
.
The following fields are accepted by the ?sort=parameter :
id
sourceID
reference
name
position
created_at
updated_at
Get a single workflow type
Section titled “Get a single workflow type”GET /workflow_types/:idResponse
Section titled “Response”Status: 200 OK{ "attachments": [], "created_at": "2016-12-23T05:09:03-06:00", "description": "", "disabled": false, "id": 2, "information": "Default workflow type for application changes", "name": "Application Change", "position": 1, "reference": "application_change", "source": null, "sourceID": null, "updated_at": "2016-12-23T05:09:03-06:00"}The response contains these fields .
Create a workflow type
Section titled “Create a workflow type”POST /workflow_typesWhen creating a new workflow type these fields are available.
Response
Section titled “Response”Status: 201 Created{ "id": "...", "...": "..."}The response contains all fields of the created workflow type and is similar to the response in Get a single workflow type
Update a workflow type
Section titled “Update a workflow type”PATCH /workflow_types/:idWhen updating a workflow type these fields are available.
Response
Section titled “Response”Status: 200 OK{ "id": "...", "...": "..."}The response contains all fields of the updated workflow type and is similar to the response in Get a single workflow type
Fields
Section titled “Fields”attachments
Readonly aggregated Attachments
created_at
Readonly datetime — The date and time at which the workflow type was created.
description
Optional string (max 255) — The Description field is used to enter a very short description of the workflow type, for example “More than 200 workdays or $200K”.
disabled
Optional
boolean
, default:
false
— The Disabled box is checked when the workflow type may not be related to any more workflows.
id
Readonly integer — The unique ID of the workflow type.
information
Optional text (max 64KB) — The Information field is used to add any additional information about the workflow type that might prove useful, especially for workflow managers when they need to decide which workflow type to select for a workflow.
information_attachments
Writeonly attachments The attachments used in the Information field.
name
Required string (max 128) — The Name field is used to enter the name of the workflow type. Ideally the name of a workflow type consists of a single word, such as “Large”.
position
Optional integer — The Position field dictates the position that the workflow type takes when it is displayed in a sorted list.
reference
Readonly string (max 128) — The Reference field is automatically set to the Name field value, written in lower case characters and with all spaces replaced by the underscore character. This reference can be used to link the workflow type to a workflow using the R-Service REST API or the R-Service Import functionality.
source
Optional string (max 30) - See source
sourceID
Optional string (max 128) - See source
updated_at
Readonly
datetime
— The date and time of the last update of the workflow type. If the workflow type has no updates it contains the
created_at
value.