All Products
Search
Document Center

Tair (Redis® OSS-Compatible):API integration

Last Updated:Jul 16, 2024

You can use the visual console and other methods such as OpenAPI Explorer, Alibaba Cloud SDKs, and Resource Orchestration Service (ROS) to integrate ApsaraDB for Redis.

Overview of OpenAPI Explorer

Alibaba Cloud provides OpenAPI Explorer to allow you to understand and efficiently use the API operations of various Alibaba Cloud services. OpenAPI Explorer integrates multiple features related to API operations, including intelligent search, documentation, online debugging, SDK download, sample code, error diagnostics, and call statistics. In OpenAPI Explorer, you can call the 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?

API versions

Alibaba Cloud OpenAPI Explorer manages the API operations of ApsaraDB for Redis by API version.

API version

Description

2015-01-01

Recommended.

Online debugging

ApsaraDB for Redis provides features such as API debugging in OpenAPI Explorer. Before you call API operations, make sure that you are familiar with the information about ApsaraDB for Redis, such as the API version, endpoint, and integration method.

URL of the online debugging page: https://api.alibabacloud.com/api/R-kvstore/2015-01-01/CreateInstance

image

Endpoints

Select an endpoint based on the region in which your instance resides to reduce latency.

For example, if your instance resides in the China (Zhangjiakou) region, the Virtual Private Cloud (VPC) endpoint of the instance is r-kvstore-vpc.cn-zhangjiakou.aliyuncs.com. For more information, see Endpoints.

Supported user identities

After you log on to OpenAPI Explorer by using your Alibaba Cloud account, the system automatically uses the account for online debugging. An Alibaba Cloud account has the permissions to call all API operations. Performing online debugging by using an Alibaba Cloud account is a high-risk operation. We recommend that you create and use a Resource Access Management (RAM) user to call API operations or perform routine O&M. Before you call API operations by using a RAM user, grant the required permissions to the RAM user based on your business requirements. The RAM user must have the permissions to manage ApsaraDB for Redis resources. For more information, see Use RAM for access control.

Identity

Supported

Alibaba Cloud account

Yes

RAM user (recommended)

Yes

RAM role (recommended)

Yes

Integration methods

ApsaraDB for Redis provides multiple integration methods, such as Alibaba Cloud SDKs and ROS. You can select a method based on your business requirements.

Integration method

Supported

Description

Alibaba Cloud SDKs (recommended)

Alibaba Cloud provides SDKs in multiple programming languages, including Java, C#, Go, Python, Swift, TypeScript, PHP, and C++. Alibaba Cloud SDKs free you from considering the implementation details of API operations, such as identities, authentication information, and signature rules. You can integrate Alibaba Cloud SDKs into your applications to directly call API operations.

Yes

For information about the programming languages supported by ApsaraDB for Redis SDKs and methods to install dependencies, see ApsaraDB for Redis SDKs.

Alibaba Cloud CLI

Alibaba Cloud CLI allows you to run aliyun commands to interact with Alibaba Cloud services and manage cloud service resources.

Yes

You can enter aliyun r-kvstore <apiName> help in Alibaba Cloud CLI to query the parameter syntax required for the corresponding API operation.

ROS

ROS is an Alibaba Cloud service that helps you manage cloud computing resources in a simplified manner. You can compile stack templates to describe cloud computing resources such as Elastic Compute Service (ECS) and ApsaraDB RDS instances, and the dependencies between resources in the templates. The ROS engine automatically creates and configures all resources in a stack based on a template to implement automated deployment and O&M.

Yes

ApsaraDB for Redis supports the common resources and data resources that can be called in ROS. For more information, see ROS resource list (Redis).

If the preceding methods do not meet your business requirements, you can encapsulate custom API requests. However, this method is not recommended. For more information, see Request syntax and signature method V3.

Usage notes

If an error is returned after you call an API operation, you must check whether the request parameters and their values are valid based on the returned error code. For more information, see Error codes.

You can also use the Alibaba Cloud OpenAPI Diagnostics platform to perform self-service diagnostics based on the returned request ID or SDK error information.