Request headers
Public parameters are parameters that identify user and interface signatures and, if not necessary, are no longer descriptioned in separate interface documents for each interface, but need to be carried with each request in order to initiate a request properly.
Hearders | Type | Required | Description |
---|---|---|---|
Host | String | Yes | Domain. Default is bayer-rts-console-api.cloudhub.vip |
Authorization | String | Yes | Bearer token。 |
Content-Type | String | Yes | multipart/form-data; |
Content-Length | String | No | The length of transmission for the HTTP message entity |
HTTP POST (multipart/form-data). eg:
POST /record/start HTTP/1.1
Host: bayer-rts-console-api.cloudhub.vip
Authorization: Bearer token
Content-Length: 283
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="app_id"
app_id parameter
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="stream_url"
stream_url parameter
----WebKitFormBoundary7MA4YWxkTrZu0gW
token
The request type is POST request, and the token string call does not add Authorization in the request headers, and the request for this token domain is different from host in the request headers
URL
https://bayer-api.cloudhub.vip/auth/login/access_key
Parameter
Parameter | Type | Required | Description |
---|---|---|---|
access_key_id | String | Yes | Please contact your administrator for information |
access_key_secret | String | Yes | Please contact your administrator for information |
HTTP POST (multipart/form-data)eg:
POST /auth/login/access_key HTTP/1.1
Host: bayer-api.cloudhub.vip
Content-Length: 278
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="access_key_id"
access_key_id Parameter
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="access_key_secret"
access_key_secret Parameter
----WebKitFormBoundary7MA4YWxkTrZu0gW
Returns
http return 200 ,Get json structure as follows:
{
"data": {
"type": "<bearer>",
"expires_in": "< Expiration time is recommended for local token expiration times, 604800(s)>",
"access_token": "<token, assigned to the request headers Authorization >"
}
}
Status
http Status Description
Status | Description |
---|---|
200 | Success |
401 | Unauthorized |
404 | The request url does not exist |
422 | Request parameter or format is error |
500 | Internal error |
Status
http status 401 ,Get json structure as follows:
{
"message": "unauthorized",
"status_code": 401,
}
http status 404 ,Get json structure as follows:
{
"message": "404 Not Found",
"status_code": 404,
}
http status 422 ,Get json structure as follows:
{
"errors":{
}
"message": "The given data was invalid.",
"status_code": 422,
}
http status 500 ,Get json structure as follows:
{
"code":"500"
"message": "internal error",
"status_code": 500,
}