All Products
Search
Document Center

API Gateway:Integration Overview

Last Updated:Aug 27, 2024

Alibaba Cloud provides multiple ways for you to interact with and use API Gateway. This topic describes the API version supported by API Gateway and the supported integration methods.

Overview of OpenAPI Explorer

Alibaba Cloud provides OpenAPI Explorer for you to efficiently understand and use the API operations of various Alibaba Cloud services. OpenAPI Explorer integrates the following features for API operations: intelligent search, documentation, online debugging, SDK obtaining, sample code, call error diagnostics, and call statistics. In OpenAPI Explorer, you can call API operations of Alibaba Cloud services and view API requests and responses. In addition, OpenAPI Explorer automatically generates the corresponding SDK sample code to facilitate the use of Alibaba Cloud services. For more information, see What is an API?

Versions

OpenAPI Explorer uses versions to manage the API operations of cloud services that are made available in different periods. For example, API Gateway supports API operations of the 2016-07-14 version, in which 2016-07-14 represents the API version instead of a time. The version provides all latest API operations and does not mean that API operations have not been updated since 2016-07-14.

Version

Description

2016-07-14

Recommended.

Online API debugging

OpenAPI Explorer allows you to debug API operations for API Gateway. Before you call an API operation, you must understand the operation version, endpoint, style, and call method provided by API Gateway.

image

Debugging page

To debug an API operation, go to the Debugging page.

Endpoints

We recommend that you select an endpoint based on the region in which the resource you want to access resides to reduce latency. For example, if the resource that you want to access resides in the China (Hangzhou) region, you can use the apigateway.cn-hangzhou.aliyuncs.com endpoint for Internet-based access or apigateway-vpc.cn-hangzhou-finance.aliyuncs.com for virtual private cloud (VPC)-based access.

  • The endpoint for Internet-based access can be accessed from anywhere in the world with an Internet connection.

  • An endpoint for VPC-based access can be accessed only from the specified VPC. VPCs are isolated from each other, and each VPC corresponds to a virtual network. VPC endpoints provide the following benefits:

    • Higher security: VPC endpoints are accessible only within the corresponding VPCs. This provides higher security and privacy.

    • Faster response: VPC endpoints use internal network environments to deliver faster responses than public endpoints. In addition, you are free from issues such as network latency and bandwidth limits.

    • Lower cost: VPC endpoints are accessed over an internal network, which saves you the cost of data transmission that is incurred in Internet communications.

API style

The remote procedure call (RPC) style is used. For more information, see Request syntax and signature method V2 for RPC APIs.

Identity

After you log on to OpenAPI Explorer by using your Alibaba Cloud account, OpenAPI Explorer uses your Alibaba Cloud account to perform online debugging by default. An Alibaba Cloud account has permissions on all API operations. Security risks may arise if you use an Alibaba Cloud account to debug API operations online. We recommend that you call API operations or perform routine O&M as a Resource Access Management (RAM) user. Before you call API operations as a RAM user, you must grant the required permissions to the RAM user based on your business requirements. The RAM user must have the permissions to manage Cloud Backup resources. For more information, see Create a RAM user and authorize the RAM user to access Cloud Backup.

Identity

Supported

Alibaba Cloud account

Yes

RAM user (recommended)

Yes

RAM role (recommended)

Yes

References

Integration methods

API Gateway provides multiple methods that you can use to integrate its API into your application. These methods include Alibaba Cloud SDKs, Alibaba Cloud CLI, Alibaba Cloud Resource Orchestration Service (ROS), Terraform, and custom encapsulation.

Note

Alibaba Cloud SDKs are the easiest and most compatible method to integrate the API Gateway API. We recommend that you use Alibaba Cloud SDKs.

Integration method

Supported

Alibaba Cloud SDK

Yes

Alibaba Cloud CLI

Yes

ROS

Partially

Terraform

Partially

Custom encapsulation

Yes

  • Alibaba Cloud SDKs

    • Alibaba Cloud provides SDKs in multiple programming languages, such as Java, C#, Go, Python, Node.js, TypeScript, PHP, and C++. You can integrate the SDKs with your applications to directly call API operations. SDKs encapsulate the signature logic, timeout mechanism, and retry mechanism and provide the request and response objects to facilitate development. For more information, see Alibaba Cloud SDKs.

    • You can use Domain Names SDKs to call API operations. For more information about the supported programming languages and how to install dependencies, see Example of using an SDK for Java.

  • Alibaba Cloud CLI

    Alibaba Cloud CLI allows you to run aliyun commands to interact with Alibaba Cloud services and manage cloud service resources. For more information, see What is Alibaba Cloud CLI?

  • ROS

    ROS is an Alibaba Cloud service that can simplify the management of cloud computing resources. You can create a template to describe the cloud computing resources that you want to use, such as Elastic Compute Service (ECS) and ApsaraDB RDS instances, and the relationship between the resources. ROS automatically creates and configures all the resources based on the template to implement automated deployment and O&M. For more information, see What is ROS?.

  • Terraform

    Terraform is an open source tool that is used to preview, configure, and manage cloud infrastructure and resources in a secure and efficient manner. Terraform works in a similar way as ROS. Terraform calls API operations by interpreting templates. For more information, see What is Terraform?

  • Custom encapsulation

    To make native HTTP calls, you must construct custom requests and sign the requests on your own. For more information about the signature method, see Request syntax and signature method V3.

Usage notes

  • If an error is returned after you call an API operation, you must check for parameter and value errors in your request based on the returned error code.

  • You can also perform self-service diagnostics based on the returned request ID or SDK error information on the OpenAPI problem diagnosis page.