/api/device/list

Use this interface to obtain a list of specified devices. It is used to query device information for a list of specified serial numbers in POST mode, refer to Query devices with specified serial number list.

Device viewing permissions are required.

Prototype

Protocol HTTP/HTTPS GET
URL ip[:port]/api/device/list
Content-Type Response: Content-Type: application/json

You can specify the desired device list through parameters. Specifying multiple different parameters will get the intersection:

  • reg-state: registration status, the default value is accepted if not specified, available values are as follows:
    • accepted: accepted devices
    • rejected: rejected devices
    • waiting: devices awaiting approval
  • catalog: belonging group, only valid when reg-state is accepted.
  • module: product family number
  • sort: sorting method
  • order: options are descending, ascending.
  • is-favorite: Whether in the favorite list, 1 represents only getting devices from the favorite list, 0 represents no filtering
  • dir: device-supported stream direction, leaving it empty means no-direction. Setting to input means can be added as a source to the channel, setting to output means can be added as an output to the channel.
  • status: device status, select 1 or multiple of the following values separated by commas, resulting in the union of each condition:
    • dev-warns: device has warnings
    • offline: offline
    • warns: device has warnings in the ControlHub platform
  • key: keyword, return devices with serial numbers or names containing key.

Refer to Device Definition.

Request URL parameters

Parameter Description
reg-state Registration status
catalog Belonging group
module Product family number
is-favorite Whether it is in favourites list.
dir Stream direction.
status Device status
key sn/keyword of device name
start Starting number
count Maximum number returned
sort Sorting algorithms, options are online-state, sn, name, time, model-name. online-state (online or not) is used by default if not specified.

Sorting rule for online-stat is:

  • First, put the online devices at the top.
  • Among the online/offline devices, put the devices with the latest application/approval time at the top.
  • Among the devices with the same time in the previous rule, put the devices with the smaller serial number in front.

Request Cookies

Parameter Description
mwcloud-sid A string that is used to identify current logged-in user.
mwcloud-uid Current logged-in username.

Request Example

Request for pending devices list.

GET /api/device/list?reg-state=waiting&start=0&count=1 HTTP/1.1
Accept: application/json, text/plain, */*
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;

Response Parameters

Response Header
Parameter Description
Content-Type Value: 'application/json; charset=UTF-8'
Response Body
Parameter Description
result Result code
start Starting number
total Total number of devices.
global-config Refer to Device Connection Global Configuraions
list Device list.

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "list": [
        {
            "apply-date": 1686791151226,
            "catalog-id": 0,
            "config": null,
            "dev-type": 3329,
            "dev-warns": 0,
            "dir": 256,
            "firmware-ver": "1.5.248",
            "group-mask": 1,
            "hardware-ver": "A",
            "id": 605,
            "is-favorite": 0,
            "is-inherit": 1,
            "module": 1,
            "module-name": "Ultra Stream SDI",
            "name": "Ultra Stream A302190930002",
            "online-date": 0,
            "owner-i": [
                "Push"
            ],
            "private-id": 1658596456,
            "pro-feature": {
                "input": "",
                "live-ms": 0,
                "rec-ms": 0,
                "sd-option": 0,
                "sd-status": 0,
                "sd-total": 0,
                "sd-used": 0,
                "usb-option": 0,
                "usb-status": 0,
                "usb-total": 0,
                "usb-used": 0
            },
            "product-id": 770,
            "push-key": "[MGDEV]-A302190930002-6f6d33cc",
            "reg-state": 101,
            "sn": "A302190930002",
            "status": {
                "cur-status": 0,
                "eth": "",
                "firmware-ver": "1.5.248",
                "hardware-ver": "A",
                "is-online": false,
                "module-name": "Ultra Stream SDI",
                "name": "Ultra Stream A302190930002",
                "rndis": "",
                "up-time": 0,
                "upgrade-status": {
                    "percent": 0,
                    "ret": 0,
                    "step": 0
                },
                "wifi": ""
            },
            "type": 257,
            "usr-mask": 0,
            "warns": 0
        }
    ],
    "result": 0,
    "start": 0,
    "total": 1
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""