Skip to main content

Imports

Asynchronous CSV imports into the workspace (portal users, for now). The file goes base64-encoded in the body; get returns the progress and the row-by-row errors.

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

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.

# Import portal users from CSV
kobana dashboards imports create \
--json '{"resource_type": "portal_users", "file_name": "usuarios.csv", "content_base64": "ZW1haWwsdGVuYW50X2lkCg=="}'

# Get import
kobana dashboards imports get \
--params '{"id": "IMPORT_ID"}' \
--fields "id,status,success_count,error_count,errors"

Next steps​