Skip to main content

Kanban API

Usageโ€‹

import { epilot } from '@epilot/sdk'

epilot.authorize(() => '<token>')
const { data } = await epilot.kanban.createKanbanBoard(...)

Tree-shakeable importโ€‹

import { getClient, authorize } from '@epilot/sdk/kanban'

const kanbanClient = getClient()
authorize(kanbanClient, () => '<token>')
const { data } = await kanbanClient.createKanbanBoard(...)

Operationsโ€‹

Kanban

Query

Schemas

createKanbanBoardโ€‹

Create a Kanban board

POST /v1/kanban/board

const { data } = await client.createKanbanBoard(
null,
{
id: 'string',
title: 'Board 1',
description: 'Board description',
created_at: '1970-01-01T00:00:00.000Z',
updated_at: '1970-01-01T00:00:00.000Z',
created_by: 'string',
org_id: 'string',
updated_by: 'string',
shared_with: ['string'],
shared_with_org: true,
owners: ['string'],
config: {
dataset: 'workflow_tasks_overview',
swimlanes: [
{
id: 'string',
title: 'Swimlane 1',
position: 1,
filter: {
items: [
{
key: 'assignee',
operator: 'EQUALS',
value: '100020',
data_type: 'string'
}
],
combination: 'OR'
},
title_chip_variant: 'success'
}
],
card_config: {
fields: ['assignee']
},
board_filter: {
items: [
{
key: 'assignee',
operator: 'EQUALS',
value: '100020',
data_type: 'string'
}
],
combination: 'OR'
},
sorting: {
field: 'created_at',
direction: 'asc'
},
search_query: 'task 1'
}
},
)
Response
{
"id": "string",
"title": "Board 1",
"description": "Board description",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"org_id": "string",
"updated_by": "string",
"shared_with": ["string"],
"shared_with_org": true,
"owners": ["string"],
"config": {
"dataset": "workflow_tasks_overview",
"swimlanes": [
{
"id": "string",
"title": "Swimlane 1",
"position": 1,
"filter": {
"items": [
{
"key": "assignee",
"operator": "EQUALS",
"value": "100020",
"data_type": "string"
}
],
"combination": "OR"
},
"title_chip_variant": "success"
}
],
"card_config": {
"fields": ["assignee"]
},
"board_filter": {
"items": [
{
"key": "assignee",
"operator": "EQUALS",
"value": "100020",
"data_type": "string"
}
],
"combination": "OR"
},
"sorting": {
"field": "created_at",
"direction": "asc"
},
"search_query": "task 1"
}
}

getKanbanBoardsโ€‹

Get all Kanban boards

GET /v1/kanban/boards

const { data } = await client.getKanbanBoards({
filter: 'example',
})
Response
[
{
"id": "string",
"title": "Board 1",
"description": "Board description",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"org_id": "string",
"updated_by": "string",
"shared_with": ["string"],
"shared_with_org": true,
"owners": ["string"]
}
]

getKanbanBoardโ€‹

Get a Kanban board

GET /v1/kanban/board/{boardId}

const { data } = await client.getKanbanBoard({
boardId: 'example',
})
Response
{
"id": "string",
"title": "Board 1",
"description": "Board description",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"org_id": "string",
"updated_by": "string",
"shared_with": ["string"],
"shared_with_org": true,
"owners": ["string"],
"config": {
"dataset": "workflow_tasks_overview",
"swimlanes": [
{
"id": "string",
"title": "Swimlane 1",
"position": 1,
"filter": {
"items": [
{
"key": "assignee",
"operator": "EQUALS",
"value": "100020",
"data_type": "string"
}
],
"combination": "OR"
},
"title_chip_variant": "success"
}
],
"card_config": {
"fields": ["assignee"]
},
"board_filter": {
"items": [
{
"key": "assignee",
"operator": "EQUALS",
"value": "100020",
"data_type": "string"
}
],
"combination": "OR"
},
"sorting": {
"field": "created_at",
"direction": "asc"
},
"search_query": "task 1"
}
}

updateKanbanBoardโ€‹

Update a Kanban board

PUT /v1/kanban/board/{boardId}

const { data } = await client.updateKanbanBoard(
{
boardId: 'example',
},
{
id: 'string',
title: 'Board 1',
description: 'Board description',
created_at: '1970-01-01T00:00:00.000Z',
updated_at: '1970-01-01T00:00:00.000Z',
created_by: 'string',
org_id: 'string',
updated_by: 'string',
shared_with: ['string'],
shared_with_org: true,
owners: ['string'],
config: {
dataset: 'workflow_tasks_overview',
swimlanes: [
{
id: 'string',
title: 'Swimlane 1',
position: 1,
filter: {
items: [
{
key: 'assignee',
operator: 'EQUALS',
value: '100020',
data_type: 'string'
}
],
combination: 'OR'
},
title_chip_variant: 'success'
}
],
card_config: {
fields: ['assignee']
},
board_filter: {
items: [
{
key: 'assignee',
operator: 'EQUALS',
value: '100020',
data_type: 'string'
}
],
combination: 'OR'
},
sorting: {
field: 'created_at',
direction: 'asc'
},
search_query: 'task 1'
}
},
)
Response
{
"id": "string",
"title": "Board 1",
"description": "Board description",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"org_id": "string",
"updated_by": "string",
"shared_with": ["string"],
"shared_with_org": true,
"owners": ["string"],
"config": {
"dataset": "workflow_tasks_overview",
"swimlanes": [
{
"id": "string",
"title": "Swimlane 1",
"position": 1,
"filter": {
"items": [
{
"key": "assignee",
"operator": "EQUALS",
"value": "100020",
"data_type": "string"
}
],
"combination": "OR"
},
"title_chip_variant": "success"
}
],
"card_config": {
"fields": ["assignee"]
},
"board_filter": {
"items": [
{
"key": "assignee",
"operator": "EQUALS",
"value": "100020",
"data_type": "string"
}
],
"combination": "OR"
},
"sorting": {
"field": "created_at",
"direction": "asc"
},
"search_query": "task 1"
}
}

patchKanbanBoardโ€‹

Patch a Kanban board

PATCH /v1/kanban/board/{boardId}

const { data } = await client.patchKanbanBoard(
{
boardId: 'example',
},
{
title: 'Board 1',
description: 'Board description',
shared_with: ['string'],
shared_with_org: true,
owners: ['string']
},
)
Response
{
"id": "string",
"title": "Board 1",
"description": "Board description",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"org_id": "string",
"updated_by": "string",
"shared_with": ["string"],
"shared_with_org": true,
"owners": ["string"],
"config": {
"dataset": "workflow_tasks_overview",
"swimlanes": [
{
"id": "string",
"title": "Swimlane 1",
"position": 1,
"filter": {
"items": [
{
"key": "assignee",
"operator": "EQUALS",
"value": "100020",
"data_type": "string"
}
],
"combination": "OR"
},
"title_chip_variant": "success"
}
],
"card_config": {
"fields": ["assignee"]
},
"board_filter": {
"items": [
{
"key": "assignee",
"operator": "EQUALS",
"value": "100020",
"data_type": "string"
}
],
"combination": "OR"
},
"sorting": {
"field": "created_at",
"direction": "asc"
},
"search_query": "task 1"
}
}

deleteKanbanBoardโ€‹

Delete a Kanban board

DELETE /v1/kanban/board/{boardId}

const { data } = await client.deleteKanbanBoard({
boardId: 'example',
})

setDefaultKanbanBoardโ€‹

Set default board for organization

PUT /v1/kanban/org/default-board

const { data } = await client.setDefaultKanbanBoard({
boardId: 'example',
})
Response
{
"message": "string",
"default_board_id": "string"
}

clearDefaultKanbanBoardโ€‹

Clear default board for organization

DELETE /v1/kanban/org/default-board

const { data } = await client.clearDefaultKanbanBoard()
Response
{
"message": "string",
"default_board_id": "string"
}

flowsAutocompleteโ€‹

Autocomplete flows data

GET /v1/kanban/query/flows:autocomplete

const { data } = await client.flowsAutocomplete({
input: 'example',
attribute: 'example',
size: 1,
from: 1,
})
Response
{
"results": ["value"],
"hits": 42
}

executeFlowsQueryโ€‹

Query Flows Data for Kanban View.

POST /v1/kanban/query/flows:execute

const { data } = await client.executeFlowsQuery(
null,
{
filters: {
items: [
{
key: 'assignee',
operator: 'EQUALS',
value: '100020',
data_type: 'string'
}
],
combination: 'OR'
},
sorting: {
field: 'created_at',
direction: 'asc'
},
from: 0,
size: 10
},
)
Response
{
"results": [
{}
],
"hits": 0,
"page_number": 0,
"page_size": 0,
"total_pages": 0
}

Schemasโ€‹

BoardSummaryโ€‹

type BoardSummary = {
id?: string
title?: string
description?: string
created_at?: string // date-time
updated_at?: string // date-time
created_by?: string
org_id?: string
updated_by?: string
shared_with?: string[]
shared_with_org?: boolean
owners?: string[]
}

Boardโ€‹

type Board = {
id?: string
title: string
description?: string
created_at?: string // date-time
updated_at?: string // date-time
created_by?: string
org_id?: string
updated_by?: string
shared_with?: string[]
shared_with_org?: boolean
owners?: string[]
config: {
dataset?: string
swimlanes?: Array<{
id?: { ... }
title?: { ... }
position?: { ... }
filter?: { ... }
title_chip_variant?: { ... }
}>
card_config?: {
fields?: { ... }
}
board_filter?: {
items: { ... }
combination: { ... }
}
sorting?: {
field: { ... }
direction?: { ... }
}
search_query?: string
}
}

Swimlaneโ€‹

type Swimlane = {
id?: string
title?: string
position?: number
filter?: {
items: Array<{
key: { ... }
operator: { ... }
value?: { ... }
data_type?: { ... }
} | {
items: { ... }
combination: { ... }
}>
combination: "AND" | "OR"
}
title_chip_variant?: string
}

Sortingโ€‹

type Sorting = {
field: string
direction?: "asc" | "desc"
}

BoardFilterโ€‹

type BoardFilter = {
items: Array<{
key: string
operator: "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"
value?: string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | number | boolean[]
data_type?: "string" | "number" | "boolean" | "date"
} | {
items: Array<{
key: { ... }
operator: { ... }
value?: { ... }
data_type?: { ... }
}>
combination: "AND" | "OR"
}>
combination: "AND" | "OR"
}

FilterGroupโ€‹

type FilterGroup = {
items: Array<{
key: string
operator: "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"
value?: string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | number | boolean[]
data_type?: "string" | "number" | "boolean" | "date"
}>
combination: "AND" | "OR"
}

FilterOperatorโ€‹

The comparison operator for filtering

type FilterOperator = "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"

DynamicDateValueโ€‹

Dynamic date keywords that resolve to actual dates at runtime

type DynamicDateValue = "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH"

ValueTypeโ€‹

The value to compare against - can be a single value (string, number, boolean, or dynamic date) or an array of values

type ValueType = string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | number | boolean[]

FlowsQueryRequestโ€‹

type FlowsQueryRequest = {
filters?: {
items: Array<{
key: { ... }
operator: { ... }
value?: { ... }
data_type?: { ... }
} | {
items: { ... }
combination: { ... }
}>
combination: "AND" | "OR"
}
sorting?: {
field: string
direction?: "asc" | "desc"
}
from?: number
size?: number
}

FlowsQueryResultโ€‹

type FlowsQueryResult = {
results?: Record<string, unknown>[]
hits?: number
page_number?: number
page_size?: number
total_pages?: number
}

FilterItemโ€‹

type FilterItem = {
key: string
operator: "EQUALS" | "NOT_EQUALS" | "EMPTY" | "NOT_EMPTY" | "CONTAINS" | "NOT_CONTAINS" | "IS_ONE_OF" | "IS_NONE_OF" | "GREATER_THAN" | "LESS_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN_OR_EQUAL"
value?: string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | number | boolean | string | "TODAY" | "TOMORROW" | "YESTERDAY" | "IN_THE_FUTURE" | "IN_THE_PAST" | "THIS_WEEK" | "NEXT_WEEK" | "LAST_WEEK" | "THIS_MONTH" | "NEXT_MONTH" | "LAST_MONTH" | number | boolean[]
data_type?: "string" | "number" | "boolean" | "date"
}