Views

POST /workspace/{workspaceId}/views/validate

Changed on

Check a new view without creating it.

Runs every check a create runs and answers with the view as it would be stored, or the same 422 a create would give. Nothing is saved. An agent asks a person to confirm a view before saving it; when the API refused the view only afterwards — a hierarchy level or quarter the workspace does not have — the person saw an error on a card they had just approved. A separate route rather than a flag on the create: an API that predates it answers 404, never a real create.

Request

  • Base URL
    https://api.craft.io
  • URL
    https://api.craft.io/workspace/{workspaceId}/views/validate
  • 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 view as it would be created

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