get-devs

Use the interface to obtain all approved applications.

After approval, you can perform the following operators remotely on the device:

Prototype

Protocol HTTP/HTTPS GET
URL ip[:port]/sc_cloud/scapi/get-devs?id=0&module=0
Data Format Response: Content-Type: application/json

Request URL

Parameter Description
id Device group ID.
0 indicates all hosted devices.
module module index refers to Product family ID.
id and module both are 0 indicate all hosted devices.

Request Cookies

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

Request Example

GET /sc_cloud/scapi/get-devs?id=0&module=0 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. The options are as follows:
  • 0: success.
  • Other values. For details about the result codes, please refer to API Status.
devs Device list waiting for approval.
devs
Parameter Description
catalog-id Device group ID.
sn Serial number.
module Product family ID.
dev-warning A number greater than 0 indicates the device has warning(s). The value and mask value in Status Mask of Abnormal Device perform binary logic "and" operator. There might be multiple warnings.
For example, if (dev-warning & 0x01)=== 0x01, means the device has no signal.
is-everyone Whether the device is available for all users. 0: no; 1: yes.
users Operators of the current device when the value of "is-everyone" is 0.
apply-date Time of applying to join the cloud.
online-date Device online state. A number greater than 0 indicates the device is online, otherwise it is offline.
is-upload-file Whether the device is uploading the firmware. 1 indicates it is uploading. Otherwise, it is not. Usage refers to update procedures.
upload-file-pos The upload process in percentage.
status Information of hosted device.
status
Parameter Description
name Product name.
product-id Product model ID.
module-name Product family name.
hardware-ver Product hardware version.
firmware-ver Product firmware version.
up-time Equipment uptime in seconds.
cur-status Current device status mask refers to Status Mask of Abnormal Device.
eth Ethernet IP.
wifi WI-FI IP.
rndis USB RNDIS IP.
upgrade-ret Firmware update status code refers to API Status Code.
Update usage refers to update procedures.
upgrade-step Current process of the firmware update procedure, there are 4 steps in total.
upgrade-percent Update process in percentage.

Update Procedures

  1. Load firmware from Cloud to hosted device;
  2. After load successfully, the device will automatically install the firmware and then reboot.

    When module is Pro Convert Encoder or Pro Convert Decoder, the workflow is as follows.

    getConvertUpgradeStatus (ret, step, percent) {
    // ret: upgrade-ret  step: upgrade-step  percent:upgrade-percent
    let desc = ''
    let progress = 0
    switch (ret) {
     case 106: // upgrading...
       desc = 'upgrading'
       progress = percent
       break
     case 107: // upgrade failed
       desc = 'upgrade-err'
       break
     case 109:
       desc = 'rebooting'
       progress = 100
       break
     // case 108: // Initialize update status
     // stepTitle = ''
     // progress = 0
     // break
    }
    return { step, desc, progress, isUpdating: desc !== '' }
    }
    

    When module is Ultra Stream or Ultra Encode, the workflow is as follows.

    getUpgradeStatus (ret, step, percent) {
    // ret: upgrade-ret  step: upgrade-step  percent:upgrade-percent
    let desc = ''
    let progress = 0
    switch (ret) {
     case 2:
       switch (step) {
         case 1: // download
           desc = 'upgrading'
           progress = Math.ceil(percent * 2 / 10)
           break
         case 2: // install
           desc = 'upgrading'
           progress = 20 + Math.ceil(percent * 0.78)
           break
         case 3: // install
           desc = 'upgrading'
           progress = 98 + Math.ceil(percent * 0.02)
           break
         case 4: // rebooting
           desc = 'rebooting'
           progress = 100
       }
       break
     case 0:
       if (step === 4) {
         desc = 'rebooting'
         progress = 100
       }
       break
     // case 5:
     // case 27: // Initialize update status
     // stepTitle = ''
     // progress = 0
     // break
    }
    return { step, desc, progress, isUpdating: desc !== '' }
    }
    

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "result": 0,
  "devs": [
    {
      "catalog-id": 0,
      "sn": "C301191111021",
      "module": 1,
      "dev-status": 2,
      "network": "",
      "is-upgrade": 0,
      "users": null,
      "is-everyone": 1,
      "apply-date": 1634797918,
      "online-date": 1635294552,
      "offline-date": 0,
      "is-upload-file": 0,
      "upload-file-pos": 0,
      "dev-warning": 0,
      "sid": "7e09c8036bea4a10d7e428a3403533e7",
      "cpu": [],
      "mem": [],
      "net": [],
      "net2": [],
      "net3": [],
      "status": {
        "name": "Ultra Stream C301191111021s",
        "product-id": 769,
        "module-name": "Ultra Stream HDMI",
        "hardware-ver": "D",
        "firmware-ver": "1.5.170",
        "conn-ip": "",
        "up-time": 5472,
        "eth": "192.168.123.47",
        "sd-total": 31895175168,
        "cur-status": 6,
        "wifi": "",
        "input": "1920x1080i, 59.95 Hz",
        "output": "",
        "usb-total": 0,
        "usb-free": 0,
        "usb-used": 0,
        "usb-status": 0,
        "usb-usage": 0,
        "sd-free": 30733156352,
        "sd-used": 88276992,
        "sd-status": 1,
        "sd-usage": 0,
        "rec-codec": "1920x1080, 29.97, 2048 Kbps",
        "rec-sec": 13448,
        "rec-kbps": 0,
        "live-codec": "1280x720, 30.00, 1024 Kbps",
        "live-sec": 23192,
        "live-kbps": 138703,
        "ndi-connected": false,
        "ndi-url": "",
        "ndi-enabled": false,
        "rndis": "",
        "ndi-name": "",
        "ndi-video-width": 0,
        "ndi-video-height": 0,
        "ndi-video-scan": "",
        "ndi-video-field-rate": 0,
        "ndi-audio-sample-rate": 0,
        "ndi-audio-channels": 0,
        "ndi-audio-bit-count": 0,
        "upgrade-ret": 27,
        "upgrade-step": 0,
        "upgrade-percent": 0,
        "usb-option": 0,
        "sd-option": 1,
        "CPUStatus": 35,
        "NetStatus": 1259264,
        "MemStatus": 48,
        "Net2Status": 0,
        "Net3Status": 0
      }
    }
  ]
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""