Request Syntax

Last update:2023-03-06 16:26:06

API Domain

api.cloudv.haplat.net

Protocol

You can send requests via HTTP or HTTPS. To ensure the security of your request, we recommend sending the requests via HTTPS.

Request Methods

The APIs support POST or GET.

  • For POST Request: Supports content-type of ‘application/json’ and ‘application/x-www-form-urlencoded’.
  • For Get Request: Supports only ‘content-type: application/x-www-form-urlencoded’.

Request Parameters

The request should be send to an appropriate API, carrying Common Parameters, as well as Specific Parameters of each API.

For HTTP Headers, in addition to some common used Headers, you should include some additional Headers defined by Cloud VoD as well, such as X-WS-AccessKey, X-WS-Timestamp, Authorization, content-Type, and host.

Below are Cloud VoD defined Headers:

Header Description
X-WS-AccessKey Your AccessKey ID. You can check it under Security Settings > Access Control > User Information Management > AccessKey Management on console.
X-WS-Timestamp Current TimeStamp, unit second.
Authorization HTTP standard authentication header. Visit Authentication V3: Signature Calculation for more details.
content-Type The type of data actually sent to the server.
host Cloud VoD API domain, fixed at api.cloudv.haplat.net.

Example

# Common Headers
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip, deflate
Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
# Cloud VoD Headers
Authorization: WS3-HMAC-SHA256 Credential=AKIDz8krbsJ5yKBZQpn74WFkmLPx3EXAMPLE, SignedHeaders=content-type;host, Signature=792dcb6d648a456a030c9c6683fa7bde2a31cb4c72cfeaa354da000adf7c288d
Content-Type: application/json; charset=utf-8
Host: api.cloudv.haplat.net
X-WS-AccessKey: AKIDz8krbsJ5yKBZQpn74WFkmLPx3EXAMPLE
X-WS-Timestamp: 1564645579

Character Encoding

All requests and responses should be encoded in UTF-8.

Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!