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
- Create and manage work units within projects
- Track work unit status and progress
- Associate work units with specific team members
- Define dependencies between work units
- Support for workflow transitions and state management
Work Unit States
Work units can exist in various states throughout their lifecycle:
- Draft: Initial creation state
- In Progress: Work has begun
- Review: Work is being evaluated
- Complete: Work has been finished
- Cancelled: Work has been abandoned
- Errored: Work has encountered an issue
Related Endpoints
- Projects API: Manage the parent projects containing work units
- Activities API: Group related work units together
- Work Periods API: Track time spent on work units
Endpoints
- get /api/v3/workflow/work_units
- post /api/v3/workflow/work_units
- post /api/v3/workflow/work_units/:id/cancel
- get /api/v3/workflow/work_units/:id/workflow
- get /api/v3/workflow/work_units/:resource_id
- patch /api/v3/workflow/work_units/:resource_id
get/api/v3/workflow/work_units
Return a paginated list of workflow/work_units
Input Schema
Typescript
object
object
object
- `nodes`
array
The key is the resource type and the value is an array of fields.
dictionary
Output Schema
Typescript
object
array
object
object
array
post/api/v3/workflow/work_units
Create a new workflow/work_units
Input Schema
Typescript
object
object
object
object
object
object
post/api/v3/workflow/work_units/:id/cancel
Cancel a work unit by setting its status to canceled.
This endpoint will:
- Set the work unit’s status to ‘canceled’
- Cancel any
pending
orin-progress
related activities and unassign any assigned users - Cancel any
pending
orin-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
Output Schema
Typescript
object
object
object
array
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:
- Current state and available transitions
- Workflow nodes and their relationships
- Validation rules and constraints
- Required approvals and sign-offs
- Historical state transitions
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
get/api/v3/workflow/work_units/:resource_id
Show a specific workflow/work_units
Input Schema
Typescript
object
array
dictionary
Output Schema
Typescript
object
object
object
array
patch/api/v3/workflow/work_units/:resource_id
Update a workflow/work_units