API Settings
As an admin at the Wyn Enterprise portal, you can configure URL, query parameter, HTTP header, and HTTP body in the API settings. Let's see how to configure these settings. In this topic, we will configure API settings for Data Monitoring. The data monitor will use these API settings to send alerts.
Note: API settings are used in the Data Monitoring and Report Export.
Configuring API Settings for Data Monitoring
You need to first Enable the API setting by selecting the Yes option, and then click the Add API button to add the APIs.
Now you can add the APIs from the API Settings page.
Note: Only Global Administrators and Organization Administrators can configure API Settings.
Complete the API Settings form as described in the table below.
API Setting | Description |
---|---|
Usage Scenarios | Select the usage scenario as Data Monitoring from the dropdown list. |
API Name | Name of the API to be added. It should be a unique name. |
Request Method | It has two options: Post and Put. |
API Authorization | It supports three authentication methods: Basic, Password, and Client_credentials. |
Url | It is a valid IP address or domain name. |
Header | HTTP Header, Optional, you can configure the HTTP request headers required by the user, such as Authorization or Content-type. The name of the request header cannot be repeated. Currently, Wyn only supports requests with the Content-type as application/JSON, so you can fill in the Content-type as other types, but it has no effect. |
Body | HTTP Body, Optional, you should fill in a valid JSON. If the Type is GET, Body input will be disabled. |
System Variable | The variables that can be added will be displayed in the drop-down list. |
Test | Click the Test button to test the API. |
API Settings for Data Monitoring Based on Authorization Models
You can configure the Data Monitoring API settings based on the following Authorization methods: Basic, Password, and Client-credentials. In this example, we have selected Client-credentials.
On the API Settings page, from the field Usage Scenarios, select Data Monitoring.
In the field API Name, enter the name of the API to be added. In this example, we have entered the name as API1.
Select the Request Method. In this example, we have selected the Post method.
Click the Edit button against the API Authorization field.
The Add Authorization dialog box is displayed.
Click the Auth Model dropdown list and Authorization models are displayed, as shown below.
Select Client-credentials.
The Add Authorization dialog box for Client-credentials is displayed.
Complete the Client-credentials Settings as described below in the table.
Client-credentials Setting
Description
Auth Model
Selected authorization model. In this case, it is Client-credentials.
Token Endpoint
Request to get an access token.
Client Id
Client Id parameter specifies the public identifier for the user required for OAuth flows. It is fixed.
Client Secret
Client Secret parameter specifies a secret code used by the user to exchange an authorization code for a token. Client Secret should be kept confidential.
Scope
Scope parameter is used to customize data requests to a third-party application.
9. Click the Save button. The Client_credentials are added.
10. Enter the Url and the Body and click the Test button.
The API send success message is displayed.
11. Now, click the Add API button.
The API will be added.
Similarly, you can add settings using the Basic and Password authorization models.
Select Basic
Select the Basic Auth model.
The Add Authorization dialog box for Basic is displayed.
Complete the Basic Settings as described below in the table.
Basic Setting
Description
Auth Model
Selected authorization model. In this case, it is Basic.
UserName
API user's API username. This acts as an ID. It helps to authenticate each API operation.
Password
API user's API password. It helps to authenticate each API operation.
Select Password
Select Password as Auth model.
The Add Authorization dialog box for Password is displayed.
Complete the Password Settings as described below in the table.
Password Setting
Description
Auth Model
Selected authorization model. In this case, it is a Password.
Token Endpoint
Request to get an access token.
Client Id
Client Id parameter specifies the public identifier for the user required for OAuth flows. It is fixed.
Client Secret
Client Secret parameter specifies a secret code used by the user to exchange an authorization code for a token. Client Secret should be kept confidential.
UserName
API user's API username. This acts as an ID. It helps to authenticate each API operation.
Password
API user's API password. It helps to authenticate each API operation.
You can use these APIs for Data Monitoring for sending notifications.