Skip to main content

kobana dashboards workspaces

Commands of kobana dashboards workspaces. Every global option (Global options) applies here.

CommandHTTPDescription
workspaces listGET /v1/workspacesList workspaces
workspaces createPOST /v1/workspacesCreate workspace
workspaces importPOST /v1/workspaces/importImport 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 list​

List workspaces

kobana dashboards workspaces list [OPTIONS]

GET /v1/workspaces

Lists the workspaces of the organization you can open, with your role in each — the same ones as the dashboard switcher. A machine token sees every workspace of the organization. Does not require X-Workspace-Id.

Query parameters

NameTypeRequiredDescription
pageintegernoPage (starts at 1). Default: 1.
per_pageintegernoItems per page. Default: 20. Maximum: 100.
sort_bystringnoSort field. Default depends on the resource.
sort_orderstringnoSort direction. Default: desc. Values: asc, desc.
searchstringnoSubstring of the workspace name, case-insensitive.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Page of workspaces.
404Resource not found in the current organization.

workspaces create​

Create workspace

kobana dashboards workspaces create [OPTIONS]

POST /v1/workspaces

Creates an empty workspace in the organization. The token person becomes its owner. Created by a machine token, the workspace has no owner: the organization owners receive it on their next sign-in, and PUT /dashboard_users/{id}/workspaces grants it to other members.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
namestringyesWorkspace name, 1 to 100 characters.

More fields and nested objects: kobana schema dashboards.workspaces.create.

Responses

HTTPDescription
201Workspace created.
400Request body failed validation.
404Resource not found in the current organization.

workspaces import​

Import workspace

kobana dashboards workspaces import [OPTIONS]

POST /v1/workspaces/import

Restores a file from GET /workspaces/{id}/export into a NEW workspace owned by the token person. Answers what could not be brought back (warnings) so it can be finished by hand. Requires a person token (a machine token gets 403) holding the permissions to create workspaces, configure the portal and create data sources. The entities in the file go through the same checks as when created one by one (keys, expressions, the field limit of the workspace). The body is limited to 2 MB.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
dataobjectyesThe exported file, as returned by the export.
namestringnoName of the new workspace; defaults to the one in the file.

More fields and nested objects: kobana schema dashboards.workspaces.import.

Responses

HTTPDescription
201Workspace imported.
400Request body failed validation.
404Resource not found in the current organization.
422The file is not a valid workspace export (INVALID_WORKSPACE_FILE).

workspaces get​

Get workspace

kobana dashboards workspaces get [ID] [OPTIONS]

GET /v1/workspaces/{id}

Returns a workspace you can open. A workspace you hold no grant on answers 404.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Workspace found.
404Resource not found in the current organization.

workspaces update​

Rename workspace

kobana dashboards workspaces update [ID] [OPTIONS]

PATCH /v1/workspaces/{id}

Renames the workspace. Only the workspace owners can (403 for a plain member).

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
namestringyesWorkspace name, 1 to 100 characters.

More fields and nested objects: kobana schema dashboards.workspaces.update.

Responses

HTTPDescription
200Workspace renamed.
400Request body failed validation.
404Resource not found in the current organization.

workspaces delete​

Delete workspace

kobana dashboards workspaces delete [ID] [OPTIONS]

DELETE /v1/workspaces/{id}

Deletes the workspace (soft delete), for its owners only: the portal goes offline, connectors stop syncing and members lose access. The last workspace of the organization cannot be deleted.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Workspace deleted.
404Resource not found in the current organization.
422It is the last workspace of the organization (WORKSPACE_LAST).

workspaces export​

Export workspace

kobana dashboards workspaces export [ID] [OPTIONS]

GET /v1/workspaces/{id}/export

Downloads the workspace configuration (portal builder, portal access and settings, user mapping, connectors and entities) as a JSON file, for its owners only. Secrets and data stay out. The response is the file itself, with no data envelope; send it as data to POST /workspaces/import.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Export file (Content-Disposition: attachment).
404Resource not found in the current organization.

workspaces usage​

Count what deleting the workspace would hide

kobana dashboards workspaces usage [ID] [OPTIONS]

GET /v1/workspaces/{id}/usage

Counts what deleting the workspace would hide — the same summary as the dashboard delete dialog.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Workspace counts.
404Resource not found in the current organization.