curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/workspace' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"name": "Sales Analytics"
},
{
"name": "Customer Insights"
},
{
"name": "Marketing Dashboard"
}
],
"error": null
}
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/workspace' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"name": "Sales Analytics"
},
{
"name": "Customer Insights"
},
{
"name": "Marketing Dashboard"
}
],
"error": null
}
Retrieve all workspaces in your organization with optional pagination support for efficient data retrieval.
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/workspace' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"name": "Sales Analytics"
},
{
"name": "Customer Insights"
},
{
"name": "Marketing Dashboard"
}
],
"error": null
}
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/workspace' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"name": "Sales Analytics"
},
{
"name": "Customer Insights"
},
{
"name": "Marketing Dashboard"
}
],
"error": null
}
Authorization: Bearer dbn_live_abc123...
"true" to enable pagination.Note: Query parameters are passed as strings. Use "true" or "false" (not boolean values)."true": Enable pagination with page-based retrieval (10 items per page)"false" (default): Return all workspaces in a single responseShow When to use pagination
"1", "2", "3").Note: This parameter is only used when isPagination is set to "true".Show workspace object properties
| Status Code | Description |
|---|---|
200 | OK - Workspaces retrieved successfully |
401 | Unauthorized - Invalid or missing API key |
500 | Internal Server Error - Server error occurred |
| Error Code | HTTP Status | Description | Solution |
|---|---|---|---|
INVALID_DATA_APP_API_KEY | 401 | Invalid API key | Verify your API key is correct and has proper permissions |
INTERNAL_SERVER_ERROR | 500 | Server error | Contact support if error persists |
How pagination works
isPagination is set to true:pageNumber=1)When to use pagination
Best practices
Implement pagination
async function loadWorkspacePage(pageNumber) {
const response = await fetch(
`https://api.usedatabrain.com/api/v2/workspace?isPagination=true&pageNumber=${pageNumber}`,
{
headers: { 'Authorization': 'Bearer dbn_live_abc123...' }
}
);
return await response.json();
}
// Load first page
const page1 = await loadWorkspacePage(1);