Skip to main content

kobana dashboards imports

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

CommandHTTPDescription
imports listGET /v1/importsList imports
imports createPOST /v1/importsImport portal users from CSV
imports getGET /v1/imports/{id}Get import

imports list​

List imports

kobana dashboards imports list [OPTIONS]

GET /v1/imports

Lists the import requests of the workspace, with success and error counters.

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_typestringnoImported resource, e.g. portal_users.
statusstringnoFilter by import status. Values: pending, processing, completed, completed_with_errors, 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 imports.
404Resource not found in the current organization.

imports create​

Import portal users from CSV

kobana dashboards imports create [OPTIONS]

POST /v1/imports

Sends a base64 CSV and queues the import of portal users into the workspace. The dashboard uploads the file first; the API takes it in the body (2 MB request limit). Follows the organization setting "allow creating portal users" (403 when off). Asynchronous: 202; poll GET /imports/{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
resource_typestringyesWhat to import. Today: portal_users. Values: portal_users.
file_namestringyesOriginal file name, e.g. users.csv.
content_base64stringyesThe CSV, base64-encoded.
content_typestringnoFile type. Default text/csv.

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

Responses

HTTPDescription
202Import queued.
400Missing body, invalid JSON or incompatible fields.
404Resource not found in the current organization.
422Request body failed validation.

imports get​

Get import

kobana dashboards imports get [ID] [OPTIONS]

GET /v1/imports/{id}

Status, counters and per-row errors of an import. An import still pending 2 minutes after the request is shown as failed (stalled queue); the read does not change the record.

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