This topic describes how to call an API after the API is published to API Gateway.
- The parameter definition of the API is obtained.
- The AppKey and AppSecret of the application that needs to call the API are obtained. For more information.
- The application is authorized to call the API. For more information, see Authorize an application to call an API operation.
- Obtain the API documentation.The method of obtaining the API documentation varies depending on how you obtain the API. You can obtain an API in one of the following ways:
- Purchase the API in Alibaba Cloud Marketplace. For more information about the APIs that you have purchased, log on to the Alibaba Cloud Marketplace console.
- Obtain the authorization from the independent software vendor (ISV) for calling the API. For more information about the APIs that you are authorized to call, log on to the API Gateway console.
- Create an application in API Gateway.
In API Gateway, applications are identities that you use to call APIs. Each application has a key pair: AppKey and AppSecret, which are equivalent to an account and the corresponding password.
- Obtain the permission to call the API.Authorization means granting the application the permission to call an API. Your application must be authorized to call the API.
The authorization method varies depending on how you obtain the API. For more information, see Authorize an application to call an API operation.
- Call the API.
You can send an HTTP or HTTPS request to call the API. Before you call the API, you can use examples of calling APIs in multiple languages in the API Gateway console to test the call. For more information, see Enable HTTPS for an API operation.
View the authentication information for calling APIs
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- In the top navigation bar, select the region where the target workspace resides. Find the target workspace and click DataService Studio in the Actions column.
- On the Service Development tab, click Service Management in the upper-right corner.
- In the left-side navigation pane, click Call APIs.On the Call APIs page, view or copy the authentication information that is required to call APIs.