Chilkat Online Tools

autoit / Zoom API / Get webinar participant QoS

Back to Collection Items

; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oHttp = ObjCreate("Chilkat_9_5_0.Http")
Local $bSuccess

$oQueryParams = ObjCreate("Chilkat_9_5_0.JsonObject")
$oQueryParams.UpdateString("type","live")

; Adds the "Authorization: Bearer <access_token>" header.
$oHttp.AuthToken = "<access_token>"

Local $oResp = $oHttp.QuickRequestParams("GET","https://api.zoom.us/v2/metrics/webinars/:webinarId/participants/:participantId/qos",$oQueryParams)
If ($oHttp.LastMethodSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

$oSbResponseBody = ObjCreate("Chilkat_9_5_0.StringBuilder")
$oResp.GetBodySb($oSbResponseBody)

$oJResp = ObjCreate("Chilkat_9_5_0.JsonObject")
$oJResp.LoadSb($oSbResponseBody)
$oJResp.EmitCompact = False

ConsoleWrite("Response Body:" & @CRLF)
ConsoleWrite($oJResp.Emit() & @CRLF)

Local $iRespStatusCode = $oResp.StatusCode
ConsoleWrite("Response Status Code = " & $iRespStatusCode & @CRLF)
If ($iRespStatusCode >= 400) Then
    ConsoleWrite("Response Header:" & @CRLF)
    ConsoleWrite($oResp.Header & @CRLF)
    ConsoleWrite("Failed." & @CRLF)

    Exit
EndIf

; Sample JSON response:
; (Sample code for parsing the JSON response is shown below)

; {
;   "user_id": "1670000000",
;   "user_name": "User",
;   "device": "Android",
;   "ip_address": "192.0.2.0",
;   "location": "San Jose (US)",
;   "join_time": "2021-06-24T20:00:00Z",
;   "leave_time": "2021-06-24T20:00:00Z",
;   "pc_name": "User's Phone",
;   "domain": "user-android",
;   "mac_addr": "",
;   "harddisk_id": "",
;   "version": "4.4.55383.0726",
;   "user_qos": [
;     {
;       "date_time": "2021-06-24T20:00:00Z",
;       "audio_input": {
;         "bitrate": "23 kbps",
;         "latency": "126 ms",
;         "jitter": "6 ms",
;         "avg_loss": "0.3%",
;         "max_loss": "1.9%"
;       },
;       "audio_output": {
;         "bitrate": "63 kbps",
;         "latency": "134 ms",
;         "jitter": "6 ms",
;         "avg_loss": "0.0%",
;         "max_loss": "0.0%"
;       },
;       "video_input": {
;         "bitrate": "1055 kbps",
;         "latency": "129 ms",
;         "jitter": "11 ms",
;         "avg_loss": "0.0%",
;         "max_loss": "4.9%",
;         "resolution": "1280*720",
;         "frame_rate": "12 fps"
;       },
;       "video_output": {
;         "bitrate": "673 kbps",
;         "latency": "135 ms",
;         "jitter": "11 ms",
;         "avg_loss": "0.0%",
;         "max_loss": "0.0%",
;         "resolution": "640*360",
;         "frame_rate": "22 fps"
;       },
;       "as_input": {
;         "bitrate": "70 kbps",
;         "latency": "135 ms",
;         "jitter": "8 ms",
;         "avg_loss": "0.0%",
;         "max_loss": "0.0%",
;         "resolution": "0*0",
;         "frame_rate": ""
;       },
;       "as_output": {
;         "bitrate": "70 kbps",
;         "latency": "135 ms",
;         "jitter": "8 ms",
;         "avg_loss": "0.0%",
;         "max_loss": "0.0%",
;         "resolution": "0*0",
;         "frame_rate": ""
;       },
;       "cpu_usage": {
;         "zoom_min_cpu_usage": "8%",
;         "zoom_avg_cpu_usage": "12%",
;         "zoom_max_cpu_usage": "18%",
;         "system_max_cpu_usage": "40%"
;       }
;     }
;   ]
; }

; Sample code for parsing the JSON response...
; Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

$oDate_time = ObjCreate("Chilkat_9_5_0.DtObj")
Local $sBitrate
Local $sLatency
Local $sJitter
Local $sAvg_loss
Local $sMax_loss
Local $sAudio_outputBitrate
Local $sAudio_outputLatency
Local $sAudio_outputJitter
Local $sAudio_outputAvg_loss
Local $sAudio_outputMax_loss
Local $sVideo_inputBitrate
Local $sVideo_inputLatency
Local $sVideo_inputJitter
Local $sVideo_inputAvg_loss
Local $sVideo_inputMax_loss
Local $sResolution
Local $sFrame_rate
Local $sVideo_outputBitrate
Local $sVideo_outputLatency
Local $sVideo_outputJitter
Local $sVideo_outputAvg_loss
Local $sVideo_outputMax_loss
Local $sVideo_outputResolution
Local $sVideo_outputFrame_rate
Local $sAs_inputBitrate
Local $sAs_inputLatency
Local $sAs_inputJitter
Local $sAs_inputAvg_loss
Local $sAs_inputMax_loss
Local $sAs_inputResolution
Local $sAs_inputFrame_rate
Local $sAs_outputBitrate
Local $sAs_outputLatency
Local $sAs_outputJitter
Local $sAs_outputAvg_loss
Local $sAs_outputMax_loss
Local $sAs_outputResolution
Local $sAs_outputFrame_rate
Local $sZoom_min_cpu_usage
Local $sZoom_avg_cpu_usage
Local $sZoom_max_cpu_usage
Local $sSystem_max_cpu_usage

Local $sUser_id = $oJResp.StringOf("user_id")
Local $sUser_name = $oJResp.StringOf("user_name")
Local $sDevice = $oJResp.StringOf("device")
Local $sIp_address = $oJResp.StringOf("ip_address")
Local $sLocation = $oJResp.StringOf("location")
Local $sJoin_time = $oJResp.StringOf("join_time")
Local $sLeave_time = $oJResp.StringOf("leave_time")
Local $sPc_name = $oJResp.StringOf("pc_name")
Local $sDomain = $oJResp.StringOf("domain")
Local $sMac_addr = $oJResp.StringOf("mac_addr")
Local $sHarddisk_id = $oJResp.StringOf("harddisk_id")
Local $sVersion = $oJResp.StringOf("version")
Local $i = 0
Local $iCount_i = $oJResp.SizeOfArray("user_qos")
While $i < $iCount_i
    $oJResp.I = $i
    $oJResp.DtOf("user_qos[i].date_time",False,$oDate_time)
    $sBitrate = $oJResp.StringOf("user_qos[i].audio_input.bitrate")
    $sLatency = $oJResp.StringOf("user_qos[i].audio_input.latency")
    $sJitter = $oJResp.StringOf("user_qos[i].audio_input.jitter")
    $sAvg_loss = $oJResp.StringOf("user_qos[i].audio_input.avg_loss")
    $sMax_loss = $oJResp.StringOf("user_qos[i].audio_input.max_loss")
    $sAudio_outputBitrate = $oJResp.StringOf("user_qos[i].audio_output.bitrate")
    $sAudio_outputLatency = $oJResp.StringOf("user_qos[i].audio_output.latency")
    $sAudio_outputJitter = $oJResp.StringOf("user_qos[i].audio_output.jitter")
    $sAudio_outputAvg_loss = $oJResp.StringOf("user_qos[i].audio_output.avg_loss")
    $sAudio_outputMax_loss = $oJResp.StringOf("user_qos[i].audio_output.max_loss")
    $sVideo_inputBitrate = $oJResp.StringOf("user_qos[i].video_input.bitrate")
    $sVideo_inputLatency = $oJResp.StringOf("user_qos[i].video_input.latency")
    $sVideo_inputJitter = $oJResp.StringOf("user_qos[i].video_input.jitter")
    $sVideo_inputAvg_loss = $oJResp.StringOf("user_qos[i].video_input.avg_loss")
    $sVideo_inputMax_loss = $oJResp.StringOf("user_qos[i].video_input.max_loss")
    $sResolution = $oJResp.StringOf("user_qos[i].video_input.resolution")
    $sFrame_rate = $oJResp.StringOf("user_qos[i].video_input.frame_rate")
    $sVideo_outputBitrate = $oJResp.StringOf("user_qos[i].video_output.bitrate")
    $sVideo_outputLatency = $oJResp.StringOf("user_qos[i].video_output.latency")
    $sVideo_outputJitter = $oJResp.StringOf("user_qos[i].video_output.jitter")
    $sVideo_outputAvg_loss = $oJResp.StringOf("user_qos[i].video_output.avg_loss")
    $sVideo_outputMax_loss = $oJResp.StringOf("user_qos[i].video_output.max_loss")
    $sVideo_outputResolution = $oJResp.StringOf("user_qos[i].video_output.resolution")
    $sVideo_outputFrame_rate = $oJResp.StringOf("user_qos[i].video_output.frame_rate")
    $sAs_inputBitrate = $oJResp.StringOf("user_qos[i].as_input.bitrate")
    $sAs_inputLatency = $oJResp.StringOf("user_qos[i].as_input.latency")
    $sAs_inputJitter = $oJResp.StringOf("user_qos[i].as_input.jitter")
    $sAs_inputAvg_loss = $oJResp.StringOf("user_qos[i].as_input.avg_loss")
    $sAs_inputMax_loss = $oJResp.StringOf("user_qos[i].as_input.max_loss")
    $sAs_inputResolution = $oJResp.StringOf("user_qos[i].as_input.resolution")
    $sAs_inputFrame_rate = $oJResp.StringOf("user_qos[i].as_input.frame_rate")
    $sAs_outputBitrate = $oJResp.StringOf("user_qos[i].as_output.bitrate")
    $sAs_outputLatency = $oJResp.StringOf("user_qos[i].as_output.latency")
    $sAs_outputJitter = $oJResp.StringOf("user_qos[i].as_output.jitter")
    $sAs_outputAvg_loss = $oJResp.StringOf("user_qos[i].as_output.avg_loss")
    $sAs_outputMax_loss = $oJResp.StringOf("user_qos[i].as_output.max_loss")
    $sAs_outputResolution = $oJResp.StringOf("user_qos[i].as_output.resolution")
    $sAs_outputFrame_rate = $oJResp.StringOf("user_qos[i].as_output.frame_rate")
    $sZoom_min_cpu_usage = $oJResp.StringOf("user_qos[i].cpu_usage.zoom_min_cpu_usage")
    $sZoom_avg_cpu_usage = $oJResp.StringOf("user_qos[i].cpu_usage.zoom_avg_cpu_usage")
    $sZoom_max_cpu_usage = $oJResp.StringOf("user_qos[i].cpu_usage.zoom_max_cpu_usage")
    $sSystem_max_cpu_usage = $oJResp.StringOf("user_qos[i].cpu_usage.system_max_cpu_usage")
    $i = $i + 1
Wend

Curl Command

curl -G -d "type=live"
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/metrics/webinars/:webinarId/participants/:participantId/qos

Postman Collection Item JSON

{
  "name": "Get webinar participant QoS",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants/:participantId/qos?type=live",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "metrics",
        "webinars",
        ":webinarId",
        "participants",
        ":participantId",
        "qos"
      ],
      "query": [
        {
          "key": "type",
          "value": "live",
          "description": "The type of webinar to query: \n* `past` — All past webinars. \n* `live` - All live webinars. \n\nThis value defaults to `live`."
        }
      ],
      "variable": [
        {
          "key": "webinarId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
        },
        {
          "key": "participantId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The participant's ID."
        }
      ]
    },
    "description": "Use this API to return the quality of service (QoS) for participants during live or past webinars. This data returned indicates the connection quality for sending/receiving video, audio, and shared content. The API returns this data for either the API request or when the API request was last received. \n\nWhen the sender sends its data, a timestamp is attached to the sender’s data packet. The receiver then returns this timestamp to the sender. This helps determine the upstream and downstream latency, which includes the application processing time. The latency data returned is the five second average and five second maximum. \n\nThis API will **not** return data if there is no data being sent or received at the time of request. \n\n**Note:** \n\nThis API may return empty values for participants' `user_name`, `ip_address`, `location`, and `email` responses when the account calling this API: \n* Does **not** have a signed HIPAA business associate agreement (BAA). \n* Is a [**legacy** HIPAA BAA account](https://marketplace.zoom.us/docs/api-reference/other-references/legacy-business-associate-agreements). \n\n**Scopes:** `dashboard_webinars:read:admin` <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy` \n\n**Prerequisites:** \n* A Business, Education, or API Plan with Zoom Rooms set up."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nWebinar participant QOS returned.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants/:participantId/qos?type=live",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "metrics",
            "webinars",
            ":webinarId",
            "participants",
            ":participantId",
            "qos"
          ],
          "query": [
            {
              "key": "type",
              "value": "live"
            }
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
            },
            {
              "key": "participantId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The participant's ID."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"user_id\": \"1670000000\",\n \"user_name\": \"User\",\n \"device\": \"Android\",\n \"ip_address\": \"192.0.2.0\",\n \"location\": \"San Jose (US)\",\n \"join_time\": \"2021-06-24T20:00:00Z\",\n \"leave_time\": \"2021-06-24T20:00:00Z\",\n \"pc_name\": \"User's Phone\",\n \"domain\": \"user-android\",\n \"mac_addr\": \"\",\n \"harddisk_id\": \"\",\n \"version\": \"4.4.55383.0726\",\n \"user_qos\": [\n  {\n   \"date_time\": \"2021-06-24T20:00:00Z\",\n   \"audio_input\": {\n    \"bitrate\": \"23 kbps\",\n    \"latency\": \"126 ms\",\n    \"jitter\": \"6 ms\",\n    \"avg_loss\": \"0.3%\",\n    \"max_loss\": \"1.9%\"\n   },\n   \"audio_output\": {\n    \"bitrate\": \"63 kbps\",\n    \"latency\": \"134 ms\",\n    \"jitter\": \"6 ms\",\n    \"avg_loss\": \"0.0%\",\n    \"max_loss\": \"0.0%\"\n   },\n   \"video_input\": {\n    \"bitrate\": \"1055 kbps\",\n    \"latency\": \"129 ms\",\n    \"jitter\": \"11 ms\",\n    \"avg_loss\": \"0.0%\",\n    \"max_loss\": \"4.9%\",\n    \"resolution\": \"1280*720\",\n    \"frame_rate\": \"12 fps\"\n   },\n   \"video_output\": {\n    \"bitrate\": \"673 kbps\",\n    \"latency\": \"135 ms\",\n    \"jitter\": \"11 ms\",\n    \"avg_loss\": \"0.0%\",\n    \"max_loss\": \"0.0%\",\n    \"resolution\": \"640*360\",\n    \"frame_rate\": \"22 fps\"\n   },\n   \"as_input\": {\n    \"bitrate\": \"70 kbps\",\n    \"latency\": \"135 ms\",\n    \"jitter\": \"8 ms\",\n    \"avg_loss\": \"0.0%\",\n    \"max_loss\": \"0.0%\",\n    \"resolution\": \"0*0\",\n    \"frame_rate\": \"\"\n   },\n   \"as_output\": {\n    \"bitrate\": \"70 kbps\",\n    \"latency\": \"135 ms\",\n    \"jitter\": \"8 ms\",\n    \"avg_loss\": \"0.0%\",\n    \"max_loss\": \"0.0%\",\n    \"resolution\": \"0*0\",\n    \"frame_rate\": \"\"\n   },\n   \"cpu_usage\": {\n    \"zoom_min_cpu_usage\": \"8%\",\n    \"zoom_avg_cpu_usage\": \"12%\",\n    \"zoom_max_cpu_usage\": \"18%\",\n    \"system_max_cpu_usage\": \"40%\"\n   }\n  }\n ]\n}"
    },
    {
      "name": "**Error Code:** `300`<br>\nCan not access webinar info, {webinarId}.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants/:participantId/qos?type=live",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "metrics",
            "webinars",
            ":webinarId",
            "participants",
            ":participantId",
            "qos"
          ],
          "query": [
            {
              "key": "type",
              "value": "live"
            }
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
            },
            {
              "key": "participantId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The participant's ID."
            }
          ]
        }
      },
      "status": "Multiple Choices",
      "code": 300,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404`<br>\n**Error Code:** `3001`<br>\nThis webinar's detail info is not available or ID is not valid.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/metrics/webinars/:webinarId/participants/:participantId/qos?type=live",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "metrics",
            "webinars",
            ":webinarId",
            "participants",
            ":participantId",
            "qos"
          ],
          "query": [
            {
              "key": "type",
              "value": "live"
            }
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The webinar's ID or universally unique ID (UUID). \n* If you provide a webinar ID, the API will return a response for the latest webinar instance. \n* If you provide a webinar UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the webinar UUID before making an API request."
            },
            {
              "key": "participantId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) The participant's ID."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}