Every API operation for Blockchain as a Service (BaaS) requires a set of common request parameters for authentication and request formatting. Responses always include a RequestId field that uniquely identifies the call.
Common request parameters
Authentication and signing parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
AccessKeyId | String | Yes | The AccessKey ID of your Alibaba Cloud account. |
Signature | String | Yes | The signature string for the current request, calculated using HMAC-SHA1. |
SignatureMethod | String | Yes | The algorithm used to create the signature. Valid value: HMAC-SHA1. |
SignatureVersion | String | Yes | The signature version. Valid value: 1.0. |
SignatureNonce | String | Yes | A unique, randomly generated value that prevents replay attacks. Use a different value for each request. |
Timestamp | String | Yes | The time at which the request is signed, in ISO 8601 format: YYYY-MM-DDThh:mm:ssZ. Example: 2013-01-10T12:00:00Z. |
Request format parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Format | String | No | The format of the response. Valid values: JSON (default) | XML. |
Version | String | Yes | The API version, in YYYY-MM-DD format. Valid value: 2018-12-21. |
ResourceOwnerAccount | String | No | The account name that owns the resource being accessed, that is, the name of the logged user. |
Example request
http://baas.aliyuncs.com/?Action=DescribeFabricOrganization
&TimeStamp=2018-12-21T10%3A33%3A56Z
&Format=xml
&AccessKeyId=testid
&SignatureMethod=Hmac-SHA1
&SignatureNonce=NwDAxvLU6tFE0DVb
&Version=2018-12-21
&SignatureVersion=1.0
&Signature=SignatureCommon response parameters
Responses are returned in JSON by default. To receive XML, set Format=XML in the request.
Every response includes a RequestId field, regardless of whether the call succeeds or fails.
| HTTP status code | Meaning |
|---|---|
2xx | The call succeeded. |
4xx or 5xx | The call failed. |
Sample responses
XML format
<?xml version="1.0" encoding="utf-8"?>
<!--Response root node-->
<API operation name+response>
<!--Request ID-->
<RequestId>4C467B38-3910-447D-87BC-AC049166F216</RequestId>
<!--Responses-->
</API operation name+response>JSON format
{
"RequestId": "4C467B38-3910-447D-87BC-AC049166F216"
/*Responses*/
}