Skip to main content

Workspaces

The organization's workspaces — each with its own portal, connectors, entities and portal users. A workspace's id or public_id is what goes in the X-Workspace-Id header (see Authentication). export downloads a workspace's configuration as JSON, import create restores it into a new workspace and usage counts what deleting it would hide.

CommandHTTPDescription
workspaces listGET /v1/workspacesList workspaces
workspaces createPOST /v1/workspacesCreate workspace
workspaces getGET /v1/workspaces/{id}Get workspace
workspaces updatePATCH /v1/workspaces/{id}Rename workspace
workspaces deleteDELETE /v1/workspaces/{id}Delete workspace
workspaces exportGET /v1/workspaces/{id}/exportExport workspace
workspaces usageGET /v1/workspaces/{id}/usageCount what deleting the workspace would hide
workspaces import createPOST /v1/workspaces/importImport workspace

Examples​

--params carries query, path and header parameters (id, page, filters, X-Workspace-Id); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.

# List workspaces
kobana dashboards workspaces list --fields "id,public_id,name,role"

# Create workspace
kobana dashboards workspaces create --json '{"name": "Portal de clientes"}'

# Rename workspace
kobana dashboards workspaces update \
--params '{"id": "WORKSPACE_ID"}' \
--json '{"name": "Portal de parceiros"}'

# Export workspace
kobana dashboards workspaces export \
--params '{"id": "WORKSPACE_ID"}' \
--output workspace.json

# Count what deleting the workspace would hide
kobana dashboards workspaces usage --params '{"id": "WORKSPACE_ID"}'

Next steps​