[]
        
(Showing Draft Content)

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.

apisetting-screen

Now you can add the APIs from the API Settings page.

Add API Settings screen

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.

  1. On the API Settings page, from the field Usage Scenarios, select Data Monitoring.

  2. In the field API Name, enter the name of the API to be added. In this example, we have entered the name as API1.

  3. Select the Request Method. In this example, we have selected the Post method.

  4. Click the Edit button against the API Authorization field.

    Click Edit


    The Add Authorization dialog box is displayed.

    add-authorization-dialogbox


  5. Click the Auth Model dropdown list and Authorization models are displayed, as shown below.

    authorization-models-list


  6. Select Client-credentials.

    select-client-credentials


  7. The Add Authorization dialog box for Client-credentials is displayed.

    addauth-cliet-credentials


  8. 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.

    created 2


    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.

    API Send Success Message


    11. Now, click the Add API button.


    tested api


    The API will be added.

    API added

Similarly, you can add settings using the Basic and Password authorization models.

Select Basic

  1. Select the Basic Auth model.

    basic-authmodel


  2. The Add Authorization dialog box for Basic is displayed.

    add-auth-basic

  3. 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

  1. Select Password as Auth model.

    auth-model-password


  2. The Add Authorization dialog box for Password is displayed.

    add-auth-password


  3. 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.

API on data monitoring