Export output
Retrieve a Data Studio project's generated result for download, shaped by the project's output configuration.
Export output
Session-authenticated portal API — authenticate with a portal Bearer token (session JWT), not an API key. It also requires the relevant organization permissions (DATA_STUDIO_ACCESS / DATA_STUDIO_CREATE / DATA_STUDIO_EXECUTE) and the Data Studio add-on on the organization.
When a Data Studio project's pipeline runs, it produces an output, the result of the layers and processing steps, shaped for download as a dataset or file.
How output is shaped
Output is part of the project's workspace configuration, set through PUT .../projects/:projectId. The output object controls the format and which fields are included:
| Field | Type | Description |
|---|---|---|
format |
string | csv, json, or geojson. |
includeCoordinates |
boolean | Whether to include geographic coordinates in the result. |
fields |
object | Field mapping, which source fields to include and how to name them in the output. |
Example
Configure a project to export GeoJSON with coordinates and a renamed field. Only the output portion is shown:
curl -X PUT \
-H "Authorization: Bearer eyJhbGci..." \
-H "Content-Type: application/json" \
-d '{
"pipeline": {
"version": 1,
"layers": [],
"transformers": [],
"output": {
"format": "geojson",
"includeCoordinates": true,
"fields": {
"mappings": [
{ "sourceField": "name", "outputField": "venue_name", "include": true },
{ "sourceField": "stars", "outputField": "rating", "include": true }
]
}
}
}
}' \
"https://api.topolab.nl/v1/organization/8f0c2e1a-4b6d-4c2a-9e3f-1a2b3c4d5e6f/data-studio/projects/c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
The response is the updated project with the stored output configuration.
Retrieving the result
Once a pipeline runs (see Run a pipeline), execute produces a generated result. List an organization's generated outputs to find its identifier:
curl -H "Authorization: Bearer eyJhbGci..." \
"https://api.topolab.nl/v1/organization/8f0c2e1a-4b6d-4c2a-9e3f-1a2b3c4d5e6f/data-studio/generated"
Then download a specific result by its generatedId, shaped by the output configuration above:
curl -L \
-H "Authorization: Bearer eyJhbGci..." \
"https://api.topolab.nl/v1/organization/8f0c2e1a-4b6d-4c2a-9e3f-1a2b3c4d5e6f/data-studio/generated/b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e/download" \
-o studio-output.geojson
Retrieval is gated behind a Data Studio permission and may consume credits depending on size, see Rate limits & credits.
Authentication
A Bearer JWT (see Authentication), organization membership, the data-studio addon, and the DATA_STUDIO_CREATE permission to edit the output configuration.
Next
- Run a pipeline, produce the result you export.
- Create a project, the
PUTbody that holds output settings. - Want Data Studio enabled? Contact us.