Web API provider
What are Integrations?
SquaredUp DS Integrations allow you to create your own providers. Each Integration has its own form to help you input the information required for different providers.
What is a provider?
Providers contain the connection details to external platforms. A provider only needs to be set up once and can then be used when creating tiles on a dashboard.
There are two types of integrations and therefore providers:
- generic Web API providers that can connect to any REST API
- dedicated providers that connect to a specific external platform or database (SQL, ServiceNow, Azure Active App Insights, Elasticsearch, etc.)
About Web API providers
The Web API integration allows you to create Web API providers. A Web API provider is a generic provider that contains the connection details to any REST API that returns JSON.
Which Integrations can I use for Web API tiles?
You can use generic and dedicated integrations to create your own providers. Of course, a dedicated provider like ServiceNow will only work with the ServiceNow API.
You need to have at least one provider before you can use Web API tiles (see How to use the Web API tile).
Generic Web API providers
Simple | No authentication, basic authentication (username and password in a header) or Windows authentication (configured automatically to use the application pool identity account). |
Basic auth | Basic authentication. Your specified username and password will be Base64 encoded automatically. |
OAuth | Token-based authentication according to the OAuth 2.0 standard. Many APIs use OAuth 2.0 for authorization, and will require an OAuth provider to include the additional information about how to authorize against the service. |
Walkthroughs for creating generic Web API providers for popular APIs
In SquaredUp DS navigate to the right-hand menu ☰ > system > Integrations
- Under Integrations click Web API.
- Click the authentication type Simple
- In the service name box type in a suitable name, e.g. PagerDuty
- The base URL should be the current PagerDuty API URL, for example:
https://api.PagerDuty.com/
- Under default headers click add
- Add the following information to the boxes as shown below:
First box (name):authorization
Second box (value):Token token=API token from PagerDuty
You can create an API access key (token) by logging in to PagerDuty > Integrations > API Access Keys > Create New API Key, and ticking Read-only API Key. See Generating API Keys
Copy the API access key from PagerDuty before closing the window:
Paste into the authorization value box in SquaredUp DS, prepended byToken token=
as shown above. - Click Save.
In SquaredUp DS navigate to the right-hand menu ☰ > system > Integrations
- Under Integrations click Web API.
- Click the authentication type Simple
- In the service name box type in a suitable name, e.g. Pingdom
- The base URL should be the current Pingdom API URL, for example:
https://api.pingdom.com/api/3.1/
We recommend you include the API version here in the base URL, so if the API version changes you only need to update it here, rather than in every tile. - Under default headers click add
- Add the following:
name:authorization
value:Bearer
<API token from Pingdom>
You can create an API key (token) by logging in to Pingdom > Settings > Pingdom API > Add API token
Enter a Name, leave the Access Level set to Read access and click Generate token.
Copy the API token from Pingdom before closing the window:
Paste the API token into the authorization value box in SquaredUp DS, prepended by the wordBearer
and a space - Click Save.
1. Add a new provider in SquaredUp DS for Azure
In SquaredUp DS navigate to the right-hand menu ☰ > system > Integrations
- Under Integrations click Web API
- Click on the authentication type OAuth
- In the service name box type in a suitable name for this provider. This name is used to create a URL so it is best to avoid spaces and non-alphanumeric characters., e.g. GoogleAnalytics.
- Leave the grant type as authorization code
- The base URL should be
https://www.googleapis.com/
- The authorization URL should
https://accounts.google.com/o/oauth2/v2/auth?prompt=consent&access_type=offline&include_granted_scopes=true
The parameters appended to the authorization URL allow SquaredUp DS to continue to access the API after the first hour. Without them SquaredUp DS can't reauthorize the provider automatically after the first token has expired. access_type=offline - requests that the API return a refresh token to keep the connection alive. If you omit the prompt=consent and the app is already authorized, you will not receive a refresh token back. The token expires every hour and without a refresh token, you have to manually reauthorize the provider each time. include_granted_scopes=true - allows the refreshed token to have the same permissions as the original request when the user was present.
- The token URL should be
https://oauth2.googleapis.com/token
At this point we need to save the provider and follow the next steps to obtain a client ID and secret from the Google Developer Console, after which we will return to complete these provider details. - Click save to save the provider.
- Copy the redirect url displayed. This will be used in the next section.
2. Configure the Google Developer Console
- Visit the Google Developer Console
- Create a new project as required.
- Select Create Credentials > OAuth Client ID
- Select Web Application
- Enter the following:
Name: This can be anything
Authorized JavaScript origins: Should be the hostname of your SquaredUp server including the http/https
Authorized Redirect URIs: Should be the redirect url copied from SquaredUp DS right-hand menu ☰ > system > web api. It will be your SquaredUp DS instance followed by/ext-core-webapi/callback/GoogleAPIProvider
whereGoogleAPIProvider
is the name of the provider you created.
For example:https://SquaredUpServer/SquaredUp/ext-core-webapi/callback/GoogleAnalytics
WhereSquaredUpServer
is the name of the server where SquaredUp DS is installed. - Click save/create
- Copy the client ID and secret to use in the next section.
3. Complete the provider setup in SquaredUp DS
In SquaredUp DS navigate to the right-hand menu ☰ > system > Integrations
- Click on the provider you created earlier to edit it.
- Paste in the client id and secret copied from the Google Developer Console.
- Paste in the relevant authorization scope from OAuth 2.0 Scopes for Google APIs. For example, for Google Analytics it should be the URL scope listed for 'View your Google Analytics data' which is
https://www.googleapis.com/auth/analytics.readonly
- Click save. You will be redirected to Google to login and authorize and then back to SquaredUp DS.
If the configuration is correct then you will see a green tick.
If the provider is not authorized it could be that some of the provider configuration is incorrect (for example the username, password, secret etc), or if you use a proxy it could be that the proxy is not configured. See How to configure SquaredUp DS to use a proxy.
You can now add Web API tiles using this Google API provider, see How to use the Web API tile with Google APIs, such as Google Analytics
In SquaredUp DS navigate to the right-hand menu ☰ > system > Integrations
- Under Integrations click Web API.
- Click the authentication type Simple
- In the service name box type in a suitable name, e.g. UptimeRobot
- The base URL should be the current Uptime Robot API URL, for example:
https://api.uptimerobot.com/v2/
We recommend you include the API version here in the base URL, so if the API version changes you only need to update it here, rather than in every tile. - Under url parameters click add
- Add the following:
name:api-key
value:<API token from Uptime Robot>
See Uptime Robot: Authentication - Which api-key type to use - Click Save.
Dedicated providers
Azure Active Directory | When using Azure Active Directory authentication with an app or service |
Azure Application Insights | You only need to create this provider if want to use the Web API tile with an application outside of your tenant or an Azure service that DS for Azure doesn't natively support. |
Azure Log Analytics | You only need to create this provider if want to use the Web API tile with an application outside of your tenant or an Azure service that DS for Azure doesn't natively support. |
ServiceNow | |
Elasticsearch | |
Splunk |
Adding a Web API provider
In SquaredUp DS navigate to the right-hand menu ☰ > system > Integrations
- Under Integrations click on Web API and choose either Simple, Basic Auth or OAuth depending on the API you are using. Note: When adding an OAuth provider you may get an message that the provider is not authorized if some of the provider configuration is incorrect (for example the username, password, secret etc), or if you use a proxy it could be that the proxy is not configured. See How to configure SquaredUp DS to use a proxy.Simple
No authentication, basic authentication (username and password in a header) or Windows authentication (configured automatically to use the application pool identity account).
Basic authBasic authentication. Your specified username and password will be Base64 encoded automatically.
OAuthToken-based authentication according to the OAuth 2.0 standard. Many APIs use OAuth 2.0 for authorization, and will require an OAuth provider to include the additional information about how to authorize against the service.
- Complete the provider fields, using your API provider's online documentation as a guide.
ignore invalid ssl: Turn the on/off switch to on if you are using a self-signed certificate.
default headers headers sent with all requests using this provider, for example the API token in the format the API requires.
url parameters url parameters sent with all requests using this provider. For example, a query parameter that is always used can be added here in the provider to save adding it to every dashboard configuration.
- You are now ready to use this provider in a Web API tile (see How to use the Web API tile).
Further help for adding Web API providers
- Blog: Integrating SquaredUp DS with external APIs: UptimeRobot
- Webinar that includes New Relic
For other APIs, take a look at our Community Answers site, where there's a wealth of knowledge about APIs.