ApsaraDB for Redis provides a variety of API operations. You can call them by using OpenAPI Explorer, writing code, or using a CLI. These API operations help you manage cloud resources. If you use the ApsaraDB for Redis API together with the APIs of other cloud services, you can implement more complex features.

Precautions

The API described in this topic is used only to manage ApsaraDB for Redis instances. To perform read and write operations on instance data, use the commands that are provided by open source Redis. For more information, see Overview.

Note ApsaraDB for Redis supports multiple programming languages. You can use ApsaraDB for Redis SDKs that encapsulate the commands provided by open source Redis to develop applications. For more information, see Redis SDKs.

What is API

API is short for application programming interface. The ApsaraDB for Redis API consists of API operations that allow you to manage cloud resources. API operations are easy to use, which allows you to get started without the need to access or understand the source code or internal logic. For more information about the API operations that are supported by ApsaraDB for Redis, see List of operations by function.

Request syntax and responses

Item Description
Request structure The ApsaraDB for Redis API allows you to send HTTP or HTTPS GET requests by using URLs. You must add parameters to a request based on the operation description. After you send the request, ApsaraDB for Redis returns a response.
Responses Responses can be returned in the XML or JSON format. You can specify the response format in the request. The default response format is XML.

Call methods

Call method Description Scenario
Call the ApsaraDB for Redis API by using Alibaba Cloud SDK for Java Alibaba Cloud provides Alibaba Cloud SDKs for multiple programming languages, such as Java and Python. You can use the SDKs to call API operations without the need to write complex code, calculate complex signatures, or set common parameters.
  • Manage a large number of cloud resources at a time by writing code
  • Develop programs to customize features
Use Alibaba Cloud CLI to call API operations Alibaba Cloud CLI is an open source tool that is developed based on Alibaba Cloud SDK for Go. You can use this tool to interact with and manage your Alibaba Cloud services.
  • Manage a large number of cloud resources at a time by running commands
  • Develop shell scripts to customize features

Troubleshooting

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