Product APIs support HTTP calls, CLI calls, SDK calls, and OpenAPI Explorer calls.

Call API operations by using HTTP requests

You can call ACM API operations by sending HTTP GET requests. The request syntax is as follows:

http://Endpoint/?Action=xx&Parameters

In this example:

  • Endpoint: The server access address of the trusted ledger database API is: ledgerdb.aliyuncs.com.
  • Action: The operation to be performed, such as calling CreateLedger to create a trusted Ledger instance.
  • Version: The API version to use. The API version of the trusted ledger database is 2019-11-22.
  • Parameters: the request parameters for the operation. Separate multiple parameters with ampersands (&).
    • Request parameters include both common parameters and operation-specific parameters. Common parameters include the API version number, authentication information, and signature information. For more information, see common parameters.
    • Before you call APIs over HTTP, you must add a signature to the request. This ensures account security. For more information, see request signatures.
The following is a call CreateLedger interface to create a trusted Ledger instance:
Note To improve readability, the following code has been formatted.
https://ledgerdb.aliyuncs.com/?Action=CreateLedger
&Format=xml
&Version=2019-11-22
&Signature=xxxx%xxxx%3D
&SignatureMethod=HMAC-SHA1
&SignatureNonce=15215528852396
&SignatureVersion=1.0
&AccessKeyId=key-test
&Timestamp=2012-06-01T12:00:00Z
...

Call API operations by using SDKs

Alibaba Cloud trusted ledger database (RAM) provides SDKs for Java, Python, Go,. NET, Node.js, PHP, and C ++. Alibaba Cloud SDKs frees you from manually making signatures and is easy to use. The following table lists the download URLs of SDK in different programming languages.

SDK GitHub address
Java SDK Download URL
Python SDK Download URL
Go SDK Download URL
.NET SDK Download URL
PHP SDK Download URL
C++ Download URL

CLI call

Alibaba Cloud CLI(Alibaba Cloud CLI) is a management tool based on Alibaba Cloud openapi. You can use this tool to manage Alibaba Cloud products by calling the Alibaba Cloud open API. This command line tool is similar to the Alibaba Cloud open API. It is flexible and easy to expand. Using this CLI tool, you can encapsulate Alibaba Cloud Native APIs to obtain all relevant functions. For more instructions, see what is Alibaba Cloud CLI?.

The basic structure of calling an RPC API by using Alibaba Cloud CLI is as follows:

aliyun <product> <ApiName> [--parameter1 value1 --parameter2 value2]

Sample code:

aliyun ledgerdb CreateLedger

Call API operations by using OpenAPI Explorer

OpenAPI Explorer is a visual tool for calling APIs. OpenAPI Explorer allows you to call APIs of Alibaba Cloud services and APIs provided in Alibaba Cloud Marketplace. You can call these APIs on a webpage or command-line interface (CLI). In addition, OpenAPI Explorer allows you to view the request and response of each API call and dynamically generates SDK sample code.

You can directly access https://api.aliyun.com / to call APIs or use the debugging feature in the API reference.