Views

POST /workspace/{workspaceId}/views

Changed on

Create a workspace or personal view and return a link that opens it.

Request

  • Base URL
    https://api.craft.io
  • URL
    https://api.craft.io/workspace/{workspaceId}/views
  • Auth
    API key in header x-api-key

Path parameters

workspaceIdstring required

Request body

namestring required
viewTypestring

One of table, kanban, timeline, swimlanes, okr-table. Defaults to table.

ownerType'personal' | 'workspace'

personal (default) or workspace. Workspace views need admin rights.

categorystring

Category name from the list endpoint. Required for workspace views.

columnsstring[]

Visible columns, table and okr-table only.

layoutstring[]

Card fields, kanban / timeline / swimlanes only.

columnColorsobject

Per-column colours as #RRGGBB, keyed like columns. Send {} to clear. Duplicating a view: pass what get_view returned, or the copy loses them.

compactModestring

Card density, kanban / timeline / swimlanes only: compact or default.

Response

The created view

viewIdstring required
namestring required
viewTypestring required
ownerType'personal' | 'workspace' required
categorystring
workspaceIdstring
portfolioIdstring
webUrlstring
columnsstring[]
layoutstring[]
compactModestring

Card density on a card-based view: compact or default.

filtersRecordStringUnknown required

Construct a type with a set of properties K of type T

listItemsParamsRecordStringString required

Construct a type with a set of properties K of type T

listItemsTool'list_items' | 'list_portfolio_items' | 'list_feedback_items' required

Which list tool listItemsParams belongs to. Feedback views are the reason this is stated rather than assumed — their items are not work items.

columnColorsRecordStringString

Construct a type with a set of properties K of type T

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status