Skip to main content

Exports

Asynchronous exports of workspace data (portal users, for now) as CSV, XLSX or JSON. create requests the export, get tracks its status and download fetches the file once it is ready.

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

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.

# Request export
kobana dashboards exports create \
--json '{"resource_type": "portal_users", "format": "csv"}'

# Get export
kobana dashboards exports get \
--params '{"id": "EXPORT_ID"}' \
--fields "id,status,total_rows"

# Download export file
kobana dashboards exports download \
--params '{"id": "EXPORT_ID"}' \
--output usuarios.csv

Next steps​