This topic describes how to call an API after the API is published to API Gateway.

Prerequisites

An API is published to API Gateway. For more information, see Publish an API.
The following conditions are met:

Background information

API Gateway allows you to authorize access to APIs and use SDKs to integrate APIs with applications. You can authorize your own account, a user in your enterprise, or a third party to call APIs.

Procedure

  1. 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.
    • Obtain the authorization from the independent software vendor (ISV) for calling the API.

    For more information, see Obtain the API documentation.

  2. 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. For more information, see Create an application.

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

  4. 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 Call an API.

View the authentication information for calling APIs

  1. Log on to the DataWorks console.
  2. In the left-side navigation pane, click Workspaces.
  3. 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.
  4. On the Service Development tab, click Service Management in the upper-right corner.
  5. 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.