Workflows
List of valid attributes:
Attribute | Description | Specifics |
---|---|---|
account_id | ID of an account a workflow belongs to | Cannot be set |
active | Whether a workflow is active or not | Can be true or false , defaults to false |
created_at | Timestamp of creation | Cannot be set |
description | Description of a workflow | Optional |
name | Name of a workflow | Must be set |
The following relationships can be included in requests:
Relationship | Type | Description |
---|---|---|
actions | has_many | All the actions that are part of the workflow |
workflow_implementation | has_one | A record that has references to the workflow’s trigger and actions |
Meta data: Permissions
Group | Description |
---|---|
actions | Contains permissions to edit or delete a workflow |
Create
Example request:
{ "data": { "type": "workflow", "attributes": { "name": "Workflow Name", "description": "Workflow Description" } }}
Example response:
{ "data": { "id": "95579c3b-20ed-43b8-ab79-d60d05690be5", "type": "workflow", "attributes": { ... } }}
This endpoint creates a new workflow.
HTTP Request
POST /api/v1/workflows
Update
Example request:
{ "data": { "type": "workflow", "attributes": { "name": "Updated Workflow Name", "description": "Updated Workflow Description" } }}
Example response:
{ "data": { "id": "95579c3b-20ed-43b8-ab79-d60d05690be5", "type": "workflow", "attributes": { ... } }}
This endpoint updates a workflow.
HTTP Request
PUT /api/v1/workflows/:workflow_id
URL Parameters
Parameter | Description |
---|---|
workflow_id | The ID of the workflow to update |
Show
Example response:
{ "data": { "id": "14833508-e59c-4177-86db-dda7575ff61e", "type": "workflow", "attributes": { ... } }}
This endpoint returns a workflow.
HTTP Request
GET /api/v1/workflows/:workflow_id
URL Parameters
Parameter | Description |
---|---|
workflow_id | The ID of the workflow to return |
List
Example response:
{ "data": [ { "id": "14833508-e59c-4177-86db-dda7575ff61e", "type": "workflow", "attributes": { ... } }, { ... } ]}
This endpoint returns all workflows.
HTTP Request
GET /api/v1/workflows
Delete
Example response:
{ "data": { "id": "14833508-e59c-4177-86db-dda7575ff61e", "type": "workflow", "attributes": { ... } }}
This endpoint deletes a workflow.
HTTP Request
DELETE /api/v1/workflows/:workflow_id
URL Parameters
Parameter | Description |
---|---|
workflow_id | The ID of the workflow to delete |