Datadog Saved View Links
Create static URLs for Datadog Saved Views.
Saved Views are a powerful feature of Datadog dashboards — they let you save specific combinations of template variables so you can quickly switch between filtered views of your data.
Unfortunately, Datadog doesn’t currently offer a way to create links that automatically apply those Saved View template variable settings when opening a dashboard. This tool aims to bridge that gap.
Datadog Saved View Links provides a simple, serverless redirect service that allows links like:
https://your-api.amazonaws.com/dashboard/prod-errors
to redirect users directly to the correct Datadog dashboard with the corresponding template variables applied.
This can be useful when linking to dashboards from runbooks, documentation, other tools, or even other dashboards — giving your team a consistent and reliable way to navigate directly to the views that matter most.
- Python 3.12+
- AWS SAM CLI
- AWS CLI configured with appropriate permissions
-
Clone the repository:
git clone <repository-url> cd datadog-savedview-links
-
Configure deployment settings:
cp samconfig.toml.example samconfig.toml # Edit samconfig.toml with your settings: # - DatadogApiKey: Your Datadog API key # - DatadogAppKey: Your Datadog Application key # - DatadogSite: Your Datadog site (e.g., us5.datadoghq.com)
-
Deploy to AWS:
sam build sam deploy
Note:
samconfig.tomlcontains sensitive information and is not committed to version control.
The deployed API URL will be shown in the CloudFormation outputs.
Once deployed, you can create shareable links like:
https://{your-api}.amazonaws.com/dashboard/{dashboard-id}?view={saved-view-name} This will redirect to your Datadog dashboard with the saved view's template variables applied.
| Name | Description | Default |
|---|---|---|
DATADOG_API_KEY | Datadog API key | None |
DATADOG_APP_KEY | Datadog application key | None |
DATADOG_SITE | Datadog site domain | datadoghq.com |
LOG_LEVEL | Logging level | INFO |
-
Setup development environment:
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt pip install -r test-requirements.txt -
Run tests:
pytest -v
-
Run tests with coverage:
pytest --cov=src --cov-report=html
-
Optional: Test local API (requires Docker):
sam build sam local start-api curl http://127.0.0.1:3000/dashboard/test-123
This project follows Test-Driven Development (TDD):
- Write failing tests first
- Implement minimal code to pass tests
- Refactor and improve
- Repeat
- Create a feature branch
- Write tests for new functionality
- Implement the feature
- Ensure all tests pass
- Submit a pull request
See LICENSE file for details.