Workflows

9 Trellis API endpoints for workflows, with the scopes, parameters and response each one takes.

Create a workflow

POST/workspace/{handle}/workflows

Scopes

Needs a token holding workflows:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

Request bodyapplication/json

WorkflowCreate

descriptionstringnullable
namestringRequired
status_mappingsobjectnullable
statusesarray of WorkflowStatusnullable
11 fields
colorstring
heightnumber (double)
iconstring
idstring
is_defaultboolean
namestring
orderinteger
typestring
widthnumber (double)
xnumber (double)
ynumber (double)

Responses

201Created

WorkflowResponse

created_atstring
created_bystring
descriptionstring
idstring
is_defaultboolean
namestring
project_countinteger
statusesarray of WorkflowStatusnullable
11 fields
colorstring
heightnumber (double)
iconstring
idstring
is_defaultboolean
namestring
orderinteger
typestring
widthnumber (double)
xnumber (double)
ynumber (double)
updated_atstring
updated_bystring
workspace_idstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Get a workflow with its statuses

GET/workspace/{handle}/workflows/{id}

Scopes

Needs a token holding issues:read, issues:write, projects:read or workflows:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

idstringRequired

Responses

200OK

WorkflowResponse

created_atstring
created_bystring
descriptionstring
idstring
is_defaultboolean
namestring
project_countinteger
statusesarray of WorkflowStatusnullable
11 fields
colorstring
heightnumber (double)
iconstring
idstring
is_defaultboolean
namestring
orderinteger
typestring
widthnumber (double)
xnumber (double)
ynumber (double)
updated_atstring
updated_bystring
workspace_idstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Update a workflow and its statuses

PUT/workspace/{handle}/workflows/{id}

Scopes

Needs a token holding workflows:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

idstringRequired

Request bodyapplication/json

WorkflowCreate

descriptionstringnullable
namestringRequired
status_mappingsobjectnullable
statusesarray of WorkflowStatusnullable
11 fields
colorstring
heightnumber (double)
iconstring
idstring
is_defaultboolean
namestring
orderinteger
typestring
widthnumber (double)
xnumber (double)
ynumber (double)

Responses

200OK

WorkflowResponse

created_atstring
created_bystring
descriptionstring
idstring
is_defaultboolean
namestring
project_countinteger
statusesarray of WorkflowStatusnullable
11 fields
colorstring
heightnumber (double)
iconstring
idstring
is_defaultboolean
namestring
orderinteger
typestring
widthnumber (double)
xnumber (double)
ynumber (double)
updated_atstring
updated_bystring
workspace_idstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Delete a workflow

DELETE/workspace/{handle}/workflows/{id}

Scopes

Needs a token holding workflows:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

idstringRequired

Responses

200OK

Confirmation message.

string

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Make a workflow the workspace default

POST/workspace/{handle}/workflows/{id}/mark-as-default

Scopes

Needs a token holding workflows:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

idstringRequired

Responses

200OK

Confirmation message.

string

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

List a workflow's statuses

GET/workspace/{handle}/workflows/{id}/statuses

Scopes

Needs a token holding issues:read, issues:write, projects:read or workflows:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

idstringRequired

Responses

200OK

array of WorkflowStatusReference

colorstring
iconstring
idstring
is_defaultboolean
namestring
typestring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

List the workspace's workflows

POST/workspace/{handle}/workflows/all-by-workspace

Scopes

Needs a token holding issues:read, issues:write, projects:read or workflows:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

Request bodyapplication/json

PaginationAndFilters

exclude_pending_deletionboolean
exclude_user_idsarray of stringnullable
filtersanynullable
ids_onlyboolean
include_invitesboolean
label_idsarray of stringnullable
limitintegernullable
pageintegernullable
querystringnullable
role_excludearray of stringnullable
role_slugsarray of stringnullable
sort_bystringnullable
sort_dirstringnullable
statusesarray of stringnullable

Responses

200OK

object

countinteger

Unfiltered item count, where the endpoint reports one. Omitted when zero.

dataarray of WorkflowSummarynullable
12 fields
created_atstring
descriptionstring
idstring
is_defaultboolean
namestring
project_countinteger
status_countinteger
updated_atstring
updated_bystring
updated_by_avatarstring
updated_by_avatar_gradientstring
updated_by_emailstring
limitinteger

Page size used for this response. Omitted when zero.

pageinteger

Current page, starting at 1. Omitted when zero.

totalinteger

Number of items matching the filters. Omitted when zero.

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Get the workspace's default workflow

GET/workspace/{handle}/workflows/default

Scopes

Needs a token holding issues:read, issues:write, projects:read or workflows:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

Responses

200OK

WorkflowResponse

created_atstring
created_bystring
descriptionstring
idstring
is_defaultboolean
namestring
project_countinteger
statusesarray of WorkflowStatusnullable
11 fields
colorstring
heightnumber (double)
iconstring
idstring
is_defaultboolean
namestring
orderinteger
typestring
widthnumber (double)
xnumber (double)
ynumber (double)
updated_atstring
updated_bystring
workspace_idstring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.

Reorder a workflow's statuses

PUT/workspace/{handle}/workflows/statuses/order

Scopes

Needs a token holding workflows:write.

Path parameters

handlestringRequired

Workspace handle, as it appears in the Trellis URL.

Request bodyapplication/json

array of WorkflowStatusOrder

orderintegerRequired
status_idstringRequired

Responses

200OK

Message

messagestring

defaultError. Handlers answer with the JSON `Error` body; workspace, authentication and rate-limit checks that run before the handler answer with a plain-text message.

See Errors for the fields it carries.