Work Units

This endpoint manages work units within the workflow system.

Overview

The Work Units API allows you to create, update, and manage individual work units that represent discrete deliverables within a project. Work units are the fundamental building blocks of project workflows and track the progress of specific pieces of work.

Key Features

Work Unit States

Work units can exist in various states throughout their lifecycle:

Endpoints


get/api/v3/workflow/work_units

Return a paginated list of workflow/work_units

Input Schema

Typescript

object
page?:
object
The page number, default to 1
number?: integer
The number of items per page, default to 1000
size?: integer
The sort order, comma separated list of fields. See sorting section for more details
sort?: string
Set to true to return the total number of items in the collection
count?: boolean
filter?:
object
id?: unknown
project_id?: unknown
name?: unknown
created_at?: unknown
status?: unknown
created_by_id?: unknown
priority?: unknown
name__match?: unknown
status__in?: unknown
The related resources to include in the response. Allowed resources are:
- `nodes`
included?:
array
Elements: string
The fields to include in the response.
The key is the resource type and the value is an array of fields.
fields?:
dictionary
Values: array

Output Schema

Typescript

object
data:
array
Elements:
object
type: string
id?: string
attributes?:
object
id?: integer
name?: string
created_at?: datetime
status?: string
created_by_id?: integer
priority?: integer
relationships?: open struct
included?:
array
Elements: open struct

post/api/v3/workflow/work_units

Create a new workflow/work_units

Input Schema

Typescript

object
data:
object
type: string
attributes:
object
id?: integer
name?: string
created_at?: datetime
status?: string
created_by_id?: integer
priority?: integer
relationships?:
object
project:
object
data:
object
type: string
id?: string

post/api/v3/workflow/work_units/:id/cancel

Cancel a work unit by setting its status to canceled.

This endpoint will:

  1. Set the work unit’s status to ‘canceled’
  2. Cancel any pending or in-progress related activities and unassign any assigned users
  3. Cancel any pending or in-progress related workflow nodes

This action can only be performed on work units with status pending or in-progress. (not already completed, canceled, or in error state)

Authorization

User must have permission to update the work unit.

Response

Returns the canceled work unit record.

Input Schema

Typescript

object
id: integer

Output Schema

Typescript

object
data:
object
type: string
id?: string
attributes?:
object
id?: integer
name?: string
created_at?: datetime
status?: string
created_by_id?: integer
priority?: integer
relationships?: open struct
included?:
array
Elements: open struct

get/api/v3/workflow/work_units/:id/workflow

Retrieve the complete workflow definition for a specific work unit.

This endpoint returns the full workflow configuration for a work unit, including:

This information is useful for understanding the complete lifecycle of a work unit and determining what actions are available at the current stage.

Note: This endpoint is currently not implemented and will return a NotImplementedError.

Input Schema

Typescript

object
id: integer

get/api/v3/workflow/work_units/:resource_id

Show a specific workflow/work_units

Input Schema

Typescript

object
resource_id: integer
included?:
array
Elements: string
fields?:
dictionary
Values: array

Output Schema

Typescript

object
data:
object
type: string
id?: string
attributes?:
object
id?: integer
name?: string
created_at?: datetime
status?: string
created_by_id?: integer
priority?: integer
relationships?: open struct
included?:
array
Elements: open struct

patch/api/v3/workflow/work_units/:resource_id

Update a workflow/work_units

Input Schema

Typescript

object
resource_id: integer
data:
object
type: string
attributes:
object
id?: integer
name?: string
priority?: integer