Understanding live data
Live data is where the real power of the Rebase Dashboard API comes to life - connecting to external APIs to get real-time energy production, consumption, prices, and weather data. This comprehensive integration enables dynamic, up-to-the-minute energy monitoring and analysis.Creating live datasets
Basic live dataset
Connect to any REST API for real-time data feeds using thecreate_timeseries_live method.
- URL with params: The url is your external API endpoint, and params can use
{start}and{end}placeholders that get replaced with actual timestamps when fetching data - Column mapping: Use aliases to map your API’s column names to the expected timestamp and value format
- Flexible formats: Supports both JSON and CSV responses
- Custom datetime formatting: If your API needs a specific datetime format, you can specify it with
datetime_format - Headers: Add authentication or other headers as needed
- Column mapping is limited to
timestampandvaluefields only - Start and end parameters are required when fetching data
- Only JSON and CSV formats are supported
- No automatic refresh: Live datasets don’t automatically refresh - data is fetched on-demand
- No status monitoring: No built-in status tracking or error monitoring
- No real-time updates: Data is fetched when requested, not continuously updated
Using live datasets in components
The data gets fetched automatically when you use it in components:Advanced live dataset configurations
CSV data format
For APIs that return CSV data:Complex parameter mapping
For APIs with complex parameter requirements:Custom datetime formats
Handle various datetime formats from different APIs:Use cases
Energy trading
Wind farm monitoring
Grid monitoring
Best practices
Data quality
- Ensure your API returns consistent data formats
- Use appropriate datetime formats for your data source
- Validate that your aliases correctly map to the expected column names
- Test your live dataset connections before deploying to production
Performance
- Use appropriate time ranges in your params to avoid fetching too much data
- Consider the refresh rate of your external API
- Monitor data freshness and API response times
- Use caching when possible to reduce API calls
Reliability
- Implement proper error handling for API failures
- Use fallback data sources when possible
- Monitor connection health and data flow
- Set up alerts for data quality issues
Security
- Use secure authentication methods (Bearer tokens, API keys)
- Store sensitive credentials securely
- Implement proper access controls
- Monitor for suspicious activity
Troubleshooting
Common issues
Data not updating: Check that your{start} and {end} placeholders are being replaced correctly and that your API is returning data for the specified time range.
Authentication errors: Verify that your headers contain the correct authentication information and that your API key is valid.
Format errors: Ensure that your data_format matches what your API returns and that your aliases correctly map the column names.
Datetime parsing errors: Check that your datetime_format matches the format returned by your API.