API
SquaredUp offers an API that can be used to:
Automate the configuration of entities (e.g. data sources, workspaces, dashboards, etc.)
Trigger specific actions (e.g. send a dashboard screenshot to Slack)
In general, perform many of the actions natively available to the SquaredUp Cloud web application
The API is exclusively available with an Enterprise license.
Access details
URLs
https://api.squaredup.com/api/<ENDPOINT>?apiKey=<YOUR_API_KEY>
https://eu.api.squaredup.com/api/<ENDPOINT>?apiKey=<YOUR_API_KEY>
( EU region customers)
API keys:
An API key is required to authenticate and interact with the API.
In SquaredUp browse to Settings > API Keys > Create new API Key. Copy the API key to your clipboard.
WARNING: An API key gives you admin access to all API endpoints. Treat it with caution.
Examples
The API covers many scenarios. The easiest way to get started is to browse the SquaredUp API Examples GitHub repository, which includes a number of common examples for interacting with the API- GitHub - squaredup/SquaredUpAPI: Example usage of SquaredUp API.
If you are using Terraform, we have also made available a Terraform provider here- Terraform Registry.
Send a dashboard screenshot to Slack, Teams or email
The following API endpoint lets you send a screenshot of a dashboard or a dashboard tile to either Slack, Teams or email.
Endpoint:
POST alerting/alert
Request body:
workspaceId | The ID of the workspace, found in the browser URL when navigating to the home of that workspace in SquaredUp |
dashboardId | The ID of the dashboard, found in the browser URL when navigating to the dashboard in SquaredUp |
channelId | Optional-A channel pre-configured in SquaredUp. See Notifications on how to configure a channel. channelId can be listed with this endpoint GET /alerting/channels |
channelTypeId |
The channel type to use if you don’t wish to re-use the configuration of an existing channel. If channelTypeId is specified, then the config property must be provided too. |
config | Optional- The full configuration for the provided channelTypeId , OR, if an existing channelId is provided, this property can be used to optionally override a subset of existing configuration. |
message | Optional- The text that appears above the screenshot |
Example:
{
"workspaceId": "space-qwertyuiop123456789",
"dashboardId": "dash-qwertyuiop123456789",
"channelId": "channel-qwertyuiop123456789",
"message": "Here is the {{name}} dashboard for your meeting this morning."
}
Comments
0 comments
Please sign in to leave a comment.