Reports & Dashboards API
The Reports API provides endpoints for building and managing custom dashboards, calculating widget data, and generating report templates. Create interactive visualizations of emissions data with configurable metrics, periods, and aggregation across organizations and facilities.New API: These endpoints are part of the new API architecture.
Key Features
- Custom Dashboards: Create and configure dashboards per project with responsive grid layouts
- Widget Templates: Quick-start with predefined templates for carbon footprint, waste, water, and logistics visualizations
- Dynamic Calculations: Calculate widget data with flexible metrics, filters, and period configurations
- Dashboard Comments: Collaborate by adding comments to individual widgets
- Report Builder: Upload and manage report models with presigned URL support
- Multi-language: Widget templates available in English, Spanish, Portuguese, Catalan, German, and Italian
Authentication
All endpoints require authentication using either:- API Key: Include in
x-api-keyheader - JWT Token: Include in
Authorizationheader asBearer {JWT_TOKEN}
Headers
All requests must include:Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faYour API key for authenticationExample:
sk_live_1234567890abcdefAvailable Endpoints
Dashboard Management
Create Dashboard
Create an empty dashboard for a project
Get Dashboard
Retrieve a dashboard with all widgets and layouts
Update Dashboard
Modify dashboard layouts and widgets
Create from Template
Create a widget from a predefined template
Widgets
List All Widgets
Get all widgets across the organization
List Project Widgets
Get widgets for a specific project
Calculate Widget
Calculate widget data with metrics and filters
Dashboard Comments
Create Comment
Add a comment to a dashboard widget
Get Comments
Retrieve all comments for a widget
Delete Comment
Remove a comment
Report Builder
Upload Model
Get a presigned URL to upload a report model file
Get Model
Retrieve a report model for a project
Update Model
Update report model content
Delete Model
Remove a report model
Data Model
Dashboard Object
A dashboard contains a responsive grid layout and a collection of widgets:Widget Configuration
Widgets are calculated using a flexible metric/filter/period configuration:Dashboard Comment Object
Dashboard Attributes
| Field | Type | Description |
|---|---|---|
project_id | UUID | Associated project |
layouts | object | Responsive grid layouts (lg, md, sm, xs, xxs) |
widgets | array | List of widget configurations |
created_at | datetime | Creation timestamp |
updated_at | datetime | Last update timestamp |
Layout Item Attributes
| Field | Type | Description |
|---|---|---|
i | string | Widget ID reference |
x | integer | Grid column position |
y | integer | Grid row position |
w | integer | Width in grid units |
h | integer | Height in grid units |
Widget Templates
Create widgets instantly from predefined templates:| Template | Description |
|---|---|
carbonFootprint | Carbon footprint breakdown by scope |
totalAndHazardousWaste | Total and hazardous waste comparison |
recycledVsNonRecycled | Recycled vs non-recycled waste |
waterConsumption | Water consumption tracking |
logisticsClientData | Logistics data by client |
logisticsLoadByToc | Load distribution by TOC |
logisticsDistanceByToc | Distance by TOC |
logisticsActivityByMode | Activity breakdown by transport mode |
logisticsTkmByToc | Tonne-kilometers by TOC |
logisticsCfPerTkm | Carbon footprint per tonne-kilometer |
Error Handling
Common HTTP Status Codes
| Status | Meaning | Solution |
|---|---|---|
| 200 | Success | - |
| 201 | Created | - |
| 204 | No Content (delete successful) | - |
| 400 | Bad Request | Check request parameters and format |
| 401 | Unauthorized | Verify API key |
| 404 | Not Found | Check resource ID or organization |
| 422 | Validation Error | Review error details in response |
| 500 | Server Error | Contact support if persists |
Common Use Cases
Create a dashboard with a template widget
Calculate custom widget data
Add a comment to a widget
Related Documentation
Emissions API
View aggregated emissions summaries
Projects API
Manage projects linked to dashboards
Facilities API
Manage facilities referenced in widgets
Automation Guide
Automate report generation pipelines

