Skip to main content

kobana dashboards exports

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

CommandHTTPDescription
exports listGET /v1/exportsList exports
exports createPOST /v1/exportsRequest export
exports getGET /v1/exports/{id}Get export
exports downloadGET /v1/exports/{id}/downloadDownload export file

exports list​

List exports

kobana dashboards exports list [OPTIONS]

GET /v1/exports

Lists the export requests of the workspace.

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.
resource_typestringnoExported resource, e.g. portal_users.
statusstringnoFilter by export status. Values: pending, processing, completed, failed.

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 exports.
404Resource not found in the current organization.

exports create​

Request export

kobana dashboards exports create [OPTIONS]

POST /v1/exports

Queues an export of the workspace portal users as CSV, XLSX or JSON. Asynchronous: answers 202 with the pending export; poll GET /exports/{id} until completed and download from /download. The file expires after 7 days.

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
resource_typestringyesWhat to export. Today: portal_users. Values: portal_users.
formatstringnocsv (default), xlsx or json. Values: csv, xlsx, json.
filtersobjectnoOptional filters of the exported rows.

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

Responses

HTTPDescription
202Export queued.
400Missing body, invalid JSON or incompatible fields.
404Resource not found in the current organization.

exports get​

Get export

kobana dashboards exports get [ID] [OPTIONS]

GET /v1/exports/{id}

Status and metadata of one export request.

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
200The export.
404Resource not found in the current organization.

exports download​

Download export file

kobana dashboards exports download [ID] [OPTIONS]

GET /v1/exports/{id}/download

Returns the file of a completed export (the dashboard redirects to a signed URL; the API serves the bytes). 404 while it is not ready.

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
200The file, as an attachment.
404Resource not found in the current organization.