Description:
- Send command to stop stream pulling
API Version:
| Version | Author | Date | Revision |
|---|---|---|---|
| 2.0.0 | lenny | 2023-04-07 |
Request URL:
- http://icloud.assetscontrols.com:8092/OpenApi/Admin
- https://icloud.assetscontrols.com:3443/OpenApi/Admin
Request Method:
- POST
Request Header:
| Parameter | Required | Type | Description |
|---|---|---|---|
| Content-Type | Yes | string | Request type: application/json |
Request Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| FTokenID | Yes | string | Token ID |
| FAction | Yes | string | Method name (RealTimeVideoPlayControl) |
| FAssetGUID | Yes | string | Unique Device Identifier |
| FChannel | No | Int | Playback channel; defaults to channel 1 if not specified. |
Response Example:
Success:
{
"Result": 200,
"Message": "ins send ok",
"FObject": []
}Error:
{
"Result": 102,
"Message": "Action is error",
"FObject": []
}Response Parameter:
| Parameter | Type | Description |
|---|---|---|
Remarks:
- Additional error codes are as follows:
- 102: Parameter error
- 105: System exception
- 108: Exception in sending command
- 122: Monitoring server not configured for the device
- 123: Not supported by the device
- 111: Device is offline or in sleep mode
Request Example:
Java:
String result = "";
//Request path
String url = "https://cloud.assetscontrols.com:3443/OpenApi/Monitor";
//Request parameters, json format parameters, it is recommended to use objects to pass in
String body = "{FAction:\"RealTimeVideoPlayControl\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FAssetGUID:\"7f6b94c8-abda-48aa-9eec-9e2d8c5f6a3c\",FChannel:1}";
URL realUrl = new URL(url);
// Set the properties of the common request
URLConnection conn = realUrl.openConnection();
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "keep-Alive");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
conn.setRequestProperty("method", "post");
// Must set the following two lines when sending a POST request
conn.setDoOutput(true);
conn.setDoInput(true);
PrintWriter pw = new PrintWriter(conn.getOutputStream());
// Send request parameters
pw.print(body);
// flush output stream buffer
pw.flush();
// Define BufferedReader input stream to read URL response
BufferedReader bufReader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
// Define BufferedReader input stream to read URL response
String line;
while ((line = bufReader.readLine()) != null) {
result += line;
}
// The returned value is a JSON string
return result;C#:
// Request URL
string url = "https://cloud.assetscontrols.com:3443/OpenApi/Monitor";
// Request parameters, use json format and recommend using an object to pass it in
string body = "{FAction:\"RealTimeVideoPlayControl\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FAssetGUID:\"7f6b94c8-abda-48aa-9eec-9e2d8c5f6a3c\",FChannel:1}";
Encoding encoding = Encoding.UTF8;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
// Request method post / get
request.Method = "post";
request.Accept = "*/*";
request.ContentType = "application/json";
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
byte[] buffer = encoding.GetBytes(body);
request.ContentLength = buffer.Length;
request.GetRequestStream().Write(buffer, 0, buffer.Length);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
{
// The return value is a json string
return reader.ReadToEnd();
}Python:
url = 'https://cloud.assetscontrols.com:3443/OpenApi/Monitor'
data = {
'FAction': 'RealTimeVideoPlayControl',
'FTokenID': '3acef045-d302-4032-b40a-d9ee6c1519cd',
'FAssetGUID':'7f6b94c8-abda-48aa-9eec-9e2d8c5f6a3c',
'FChannel':1
}
data = parse.urlencode(data).encode('utf-8')
headers = {
'User-Agent': r'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) '
r'Chrome/45.0.2454.85 Safari/537.36 115Browser/6.0.3',
'Connection': 'keep-alive'
}
req = request.Request(url, headers=headers, data=data)
page = request.urlopen(req).read()
page = page.decode('utf-8')
# json_array = json.loads(page)
return page;文档更新时间: 2026-11-02 10:11 作者:Jeson