/api/device/config

Use this interface to set your device.

Device operating permissions are required.

Prototype

Protocol HTTP/HTTPS POST
URL ip[:port]/api/device/config
Content-Type Request: Content-Type: application/json
Response: Content-Type: application/json

Request Cookies

Parameter Description
mwcloud-sid A string that is used to identify current logged-in user.
mwcloud-uid Current logged-in username.
Request Body
Parameter Secondary Parameter Description
sn Specified set of device serial numbers that have been approved.
config Configurations.
input Input configurations. If this field does not exist, the configurations on the corresponding device will be cleared. Refer to Input Device Configuration.
output Output configurations. If this field does not exist, the configurations on the corresponding device will be cleared. Refer to Output Device Configuration.
Input Device Configuration
Parameter Description
protocol Set the connection protocol for channel and its connected devices. Enumeration types including 0, 1 (rtmp), and 2 (srt). When the value is 0, it represents using the global default configuration. For the value list, refer to the Protocol Type Definition.
stream-index Stream index, 0 represents the main stream, 1 represents the sub stream.
latency SRT delay. Only supported by device type node when "protocol" is set to 2 (ts over srt). The default value is 120.
Output Device Configuration
Parameter Description
protocol Set the connection protocol for channel and its connected devices. Enumeration types including 0, 1 (rtmp), and 2 (srt). When the value is 0, it represents using the global default configuration. For the value list, refer to the Protocol Type Definition.
latency SRT delay in milliseconds. Only supported by device type node when "protocol" is set to 2 (ts over srt). The default value is 120.
buffer-ms Buffer time for device received stream data in milliseconds. Only supported by output device of a channel.

Request Example

POST /api/device/config HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=utf-8
Content-Length: 24
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
{
    "sn": "A304200731003",
    "config": {
        "input": {
            "protocol": 1,
            "latency": 325,
            "stream-index": 0
        }
    }
}

Response Parameters

Response Header
Parameter Description
Content-Type Value: 'application/json; charset=UTF-8'
Response Body
Parameter Description
result Result code

Response Example

HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
content-length: xx
{
  "result": 0
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""