Report Export API
As an admin at the Wyn Enterprise portal, you can configure URL, query parameter, HTTP header, and HTTP body in the API settings. The Report Export API will use these API settings to send notifications when the report is exported using the Export API. Let's see how to configure these settings.
Configuring API Settings for Report Export API
You first need to Enable the API setting by selecting the Yes option, and then click the Add API button to add the APIs.
API Settings dialog box is displayed to add the APIs.
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 Report Export API 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 box. The successful web API can use the keywords: $ResultKey and $ResultURL. The failed web API can use the keywords: $ErrorCode and $ErrorMessage. |
Test | Click the Test button for testing. |
API Settings for Export Report API Based on Authorization Models
You can configure API settings based on the following Authorization methods: Basic, Password, and Client-credentials. In the below example, we have selected Client-credentials.
On the API Settings page, from the field Usage Scenarios, select Report Export API.
In the field API Name, enter the name of the API to be added. In this example, we have entered the name as ReportExport.
Select the Request Method. In this example, we have selected the Post method.
Click the Edit button against the API Authorization field
Add Authorization dialog box is displayed.
Click the Auth Model dropdown list and authorization models are displayed.
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.
Click the Save button. The Client_credentials are added.
Enter the Url and the Body and click the Test button.
API send success message is displayed.
Now, click the Add API button.
The API will be added.
Similarly, you can add settings using the Basic and Password authorization models as described in the below sections.
Basic Authorization Model
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.
Password Authorization Model
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 username. It helps to authenticate each API operation.