Interface Specifications
Last Updated:2020-07-20
Standard of Request Response Format
- HTTP request, Key of parameter in Querystring, in lower camel case. such as productType, serviceType, etc.
- Other Headers are defined in the form of x-bce-* except the standard Headers specified by RFC2616.
- The RESTful API of the financial system only supports JSON form.
- Keys all utilize the lower camel case in all JSONs.
- Related fields such as Date, Content-MD5, Content-Type, Content-Length in Headers should be subject to the restrictions of RFC 2616.
- According to the stipulations in the HTTP protocol, both MD5 and Base64 encoding should be performed for Content-MD5.The computation method of Content-MD5 is as follows: Content-MD5 = "Content-MD5" ":" md5-digest md5-digest = <base64 of 128 bit MD5 digest as per RFC 1864>
Public Request Header
Header | Description | Required or not |
---|---|---|
Authorization | Authentication information used to verify the validity of the request. For more information, please see Authentication Certification | Required |
x-bce-date | The time of creating the request, and the fields expressing the date all utilize the YYYY-MM-DD format, e.g.2014-06-01 which means June 1, 2014.If the user uses the standard Date domain, the header can be left blank. When the two exist simultaneously, x-bce-date shall prevail. | Optional |
Content-Length | Length of HTTP request content defined in RFC2616. | Optional |
Content-Type | Type of HTTP request content defined in RFC2616. | Optional |
Content-MD5 | MD5 summary of HTTP request defined by RFC2616 | Optional |
Date | GMT time specified in HTTP 1.1 protocol, such as Wed, 06 Apr 2016 06:34:40 GMT |
Optional |
Host | Visit Host value, and the value is billing.baidubce.com |
Optional |
The standard header fields for the html protocol are no longer listed here. Public headers will appear in every API of the financial system, and they are necessary.
Public Response Header
Name | Type | Description |
---|---|---|
Content-Length | String | Length of HTTP request content defined in RFC2616. |
Content-Type | String | Type of HTTP request content defined in RFC2616. |
Connection | String | Whether the server is disconnected. The value can be close orkeep-alive . |
Date | String | GMT time specified in HTTP 1.1 protocol, such as Wed, 06 Apr 2016 06:34:40 GMT . |
x-bce-request-id | String | Created by financial service, it is the unique identification for requesting Bce Billing and is identification ID used to help troubleshoot faulty. If you encounter problems when using the financial service, you can provide this field in the work order to quickly locate the problem. |
Among them, the request id uses UUID version 4 and is generated by the financial service.