Component Endpoints
Create and manage different types of visualization components for dashboards.
POST /components/map
Creates a new map component for geospatial data visualization.
# Create a map component
map_component = client.components.create_map(
name="Wind Farm Map",
config={...},
layer_ids=[...]
)
POST /components/timeseries
Creates a new time series component for charts and graphs.
# Create a time series component
timeseries_component = client.components.create_timeseries(
name="DK2",
title="DK2",
datasets=[dk2_dayahead_dataset.id, dk2_prod_dataset.id],
theme="wind_dark",
echarts_options={"color": ["#6464FF", "#555555"]}
)
GET /components
Retrieves all components in the user’s library.
# List all components
components = client.components.list_components()
GET /components/
Retrieves a specific component by ID.
# Get a specific component by ID string
component = client.components.get_component("comp_123")
# Or if you have a component object
component = client.components.get_component(component.id)
PUT /components/map/
Updates an existing map component.
# Update a map component by ID string
updated_component = client.components.update_map(
"comp_123",
name="Updated Wind Farm Map",
config={...},
layer_ids=[...]
)
# Or if you have a component object
updated_component = client.components.update_map(
component.id,
name="Updated Wind Farm Map",
config={...},
layer_ids=[...]
)
PUT /components/timeseries/
Updates an existing time series component.
# Update a time series component by ID string
updated_component = client.components.update_timeseries(
"comp_456",
name="Updated Energy Chart",
title="New DK2",
echarts_options={
"color": ["#6464FF", "#555555"],
}
)
# Or if you have a component object
updated_component = client.components.update_timeseries(
component.id,
name="Updated Energy Chart",
title="New DK2",
echarts_options={
"color": ["#6464FF", "#555555"],
}
)
DELETE /components/
Permanently deletes a component from the user’s library.
# Delete a component by ID string
client.components.delete_component("comp_123")
# Or if you have a component object
client.components.delete_component(component.id)
Component Types
Map Component
- Type:
map
- Required:
name, config (latitude, longitude, zoom)
- Optional:
layer_ids (array of layer IDs)
Time Series Component
- Type:
timeseries
- Required:
name, config (title, datasets)
- Optional:
config.y_axis_label, config.unit