Skip to main content
8Space uses workflow columns to organize tasks in a Kanban-style board. This page documents endpoints for managing columns, moving tasks, and calculating project metrics.

Types

packages/app/src/domain/types.ts

List Workflow Columns

Query workflow columns for a project, ordered by position.
packages/app/src/domain/repositories/supabase.ts

Query Parameters

string
required
Filter by project UUID: eq.<uuid>
string
Sort order: position.asc (default) or position.desc
string
PostgREST select clause for field projection

Response

string
Workflow column UUID
string
Parent project UUID
string
Column display name
WorkflowColumnKind
Column type: backlog, todo, in_progress, done, or custom
integer
Display position (0-indexed)
integer | null
Work-in-progress limit for this column
string | null
Criteria for task completion in this column

Move Task (RPC)

Move a task to a different column and set its rank using the move_task RPC function.
packages/app/src/domain/repositories/supabase.ts

Request Body

string
required
Task UUID to move
string
required
Target workflow column UUID
number
required
New position rank within the target column

Response

Returns the updated task row with new status_column_id and order_rank.
string
Task UUID
string
Updated workflow column UUID
number
Updated position rank

Reorder Tasks

Reorder multiple tasks within or across columns by updating their rank.
packages/app/src/domain/repositories/supabase.ts

Implementation

This method updates the order_rank field for multiple tasks. Each task receives a rank based on its position in the array: (index + 1) * 1000.

Dashboard Metrics (RPC)

Calculate project metrics including task counts, overdue tasks, and completion trends.
packages/app/src/domain/repositories/supabase.ts

Request Body

string
required
Project UUID
integer
Number of days for completion trend (default: 14)

Response

object
Map of workflow column IDs to task counts
integer
Number of tasks past their due date
integer
Number of tasks due in the next 7 days
array
Array of workload items per assignee
array
Daily completion counts over the specified window

React Hook Usage

Workflow Columns

packages/app/src/hooks/use-project-data.ts

Move Task

packages/app/src/hooks/use-project-data.ts

Dashboard Metrics

packages/app/src/hooks/use-dashboard-metrics.ts

Example: Kanban Board Integration

RPC Functions Summary

8Space uses these PostgreSQL RPC functions for complex operations:
Move a task to a different column and set its rank atomically.Parameters:
  • p_task_id: Task UUID
  • p_to_column_id: Target column UUID
  • p_new_rank: New position rank
Returns: Updated task row