unicodeC / Zoom API / List meeting participants QoS
Back to Collection Items
#include <C_CkHttpW.h>
#include <C_CkJsonObjectW.h>
#include <C_CkHttpResponseW.h>
#include <C_CkStringBuilderW.h>
#include <C_CkDtObjW.h>
void ChilkatSample(void)
{
HCkHttpW http;
BOOL success;
HCkJsonObjectW queryParams;
HCkHttpResponseW resp;
HCkStringBuilderW sbResponseBody;
HCkJsonObjectW jResp;
int respStatusCode;
HCkDtObjW date_time;
const wchar_t *user_id;
const wchar_t *user_name;
const wchar_t *device;
const wchar_t *ip_address;
const wchar_t *location;
const wchar_t *join_time;
const wchar_t *leave_time;
const wchar_t *pc_name;
const wchar_t *domain;
const wchar_t *mac_addr;
const wchar_t *harddisk_id;
const wchar_t *version;
int j;
int count_j;
const wchar_t *Bitrate;
const wchar_t *Latency;
const wchar_t *Jitter;
const wchar_t *Avg_loss;
const wchar_t *Max_loss;
const wchar_t *audio_outputBitrate;
const wchar_t *audio_outputLatency;
const wchar_t *audio_outputJitter;
const wchar_t *audio_outputAvg_loss;
const wchar_t *audio_outputMax_loss;
const wchar_t *video_inputBitrate;
const wchar_t *video_inputLatency;
const wchar_t *video_inputJitter;
const wchar_t *video_inputAvg_loss;
const wchar_t *video_inputMax_loss;
const wchar_t *Resolution;
const wchar_t *Frame_rate;
const wchar_t *video_outputBitrate;
const wchar_t *video_outputLatency;
const wchar_t *video_outputJitter;
const wchar_t *video_outputAvg_loss;
const wchar_t *video_outputMax_loss;
const wchar_t *video_outputResolution;
const wchar_t *video_outputFrame_rate;
const wchar_t *as_inputBitrate;
const wchar_t *as_inputLatency;
const wchar_t *as_inputJitter;
const wchar_t *as_inputAvg_loss;
const wchar_t *as_inputMax_loss;
const wchar_t *as_inputResolution;
const wchar_t *as_inputFrame_rate;
const wchar_t *as_outputBitrate;
const wchar_t *as_outputLatency;
const wchar_t *as_outputJitter;
const wchar_t *as_outputAvg_loss;
const wchar_t *as_outputMax_loss;
const wchar_t *as_outputResolution;
const wchar_t *as_outputFrame_rate;
const wchar_t *Zoom_min_cpu_usage;
const wchar_t *Zoom_avg_cpu_usage;
const wchar_t *Zoom_max_cpu_usage;
const wchar_t *System_max_cpu_usage;
const wchar_t *page_count;
const wchar_t *page_size;
const wchar_t *total_records;
const wchar_t *next_page_token;
int i;
int count_i;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http = CkHttpW_Create();
queryParams = CkJsonObjectW_Create();
CkJsonObjectW_UpdateString(queryParams,L"type",L"live");
CkJsonObjectW_UpdateInt(queryParams,L"page_size",1);
CkJsonObjectW_UpdateString(queryParams,L"next_page_token",L"quis officia in reprehenderit");
// Adds the "Authorization: Bearer <access_token>" header.
CkHttpW_putAuthToken(http,L"<access_token>");
resp = CkHttpW_QuickRequestParams(http,L"GET",L"https://api.zoom.us/v2/metrics/meetings/:meetingId/participants/qos",queryParams);
if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
wprintf(L"%s\n",CkHttpW_lastErrorText(http));
CkHttpW_Dispose(http);
CkJsonObjectW_Dispose(queryParams);
return;
}
sbResponseBody = CkStringBuilderW_Create();
CkHttpResponseW_GetBodySb(resp,sbResponseBody);
jResp = CkJsonObjectW_Create();
CkJsonObjectW_LoadSb(jResp,sbResponseBody);
CkJsonObjectW_putEmitCompact(jResp,FALSE);
wprintf(L"Response Body:\n");
wprintf(L"%s\n",CkJsonObjectW_emit(jResp));
respStatusCode = CkHttpResponseW_getStatusCode(resp);
wprintf(L"Response Status Code = %d\n",respStatusCode);
if (respStatusCode >= 400) {
wprintf(L"Response Header:\n");
wprintf(L"%s\n",CkHttpResponseW_header(resp));
wprintf(L"Failed.\n");
CkHttpResponseW_Dispose(resp);
CkHttpW_Dispose(http);
CkJsonObjectW_Dispose(queryParams);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
return;
}
CkHttpResponseW_Dispose(resp);
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "page_count": "integer [int64]",
// "page_size": "integer",
// "total_records": "integer [int64]",
// "next_page_token": "string",
// "participants": [
// {
// "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
// Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
date_time = CkDtObjW_Create();
page_count = CkJsonObjectW_stringOf(jResp,L"page_count");
page_size = CkJsonObjectW_stringOf(jResp,L"page_size");
total_records = CkJsonObjectW_stringOf(jResp,L"total_records");
next_page_token = CkJsonObjectW_stringOf(jResp,L"next_page_token");
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"participants");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
user_id = CkJsonObjectW_stringOf(jResp,L"participants[i].user_id");
user_name = CkJsonObjectW_stringOf(jResp,L"participants[i].user_name");
device = CkJsonObjectW_stringOf(jResp,L"participants[i].device");
ip_address = CkJsonObjectW_stringOf(jResp,L"participants[i].ip_address");
location = CkJsonObjectW_stringOf(jResp,L"participants[i].location");
join_time = CkJsonObjectW_stringOf(jResp,L"participants[i].join_time");
leave_time = CkJsonObjectW_stringOf(jResp,L"participants[i].leave_time");
pc_name = CkJsonObjectW_stringOf(jResp,L"participants[i].pc_name");
domain = CkJsonObjectW_stringOf(jResp,L"participants[i].domain");
mac_addr = CkJsonObjectW_stringOf(jResp,L"participants[i].mac_addr");
harddisk_id = CkJsonObjectW_stringOf(jResp,L"participants[i].harddisk_id");
version = CkJsonObjectW_stringOf(jResp,L"participants[i].version");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"participants[i].user_qos");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
CkJsonObjectW_DtOf(jResp,L"participants[i].user_qos[j].date_time",FALSE,date_time);
Bitrate = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].audio_input.bitrate");
Latency = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].audio_input.latency");
Jitter = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].audio_input.jitter");
Avg_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].audio_input.avg_loss");
Max_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].audio_input.max_loss");
audio_outputBitrate = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].audio_output.bitrate");
audio_outputLatency = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].audio_output.latency");
audio_outputJitter = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].audio_output.jitter");
audio_outputAvg_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].audio_output.avg_loss");
audio_outputMax_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].audio_output.max_loss");
video_inputBitrate = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_input.bitrate");
video_inputLatency = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_input.latency");
video_inputJitter = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_input.jitter");
video_inputAvg_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_input.avg_loss");
video_inputMax_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_input.max_loss");
Resolution = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_input.resolution");
Frame_rate = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_input.frame_rate");
video_outputBitrate = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_output.bitrate");
video_outputLatency = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_output.latency");
video_outputJitter = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_output.jitter");
video_outputAvg_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_output.avg_loss");
video_outputMax_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_output.max_loss");
video_outputResolution = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_output.resolution");
video_outputFrame_rate = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].video_output.frame_rate");
as_inputBitrate = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_input.bitrate");
as_inputLatency = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_input.latency");
as_inputJitter = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_input.jitter");
as_inputAvg_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_input.avg_loss");
as_inputMax_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_input.max_loss");
as_inputResolution = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_input.resolution");
as_inputFrame_rate = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_input.frame_rate");
as_outputBitrate = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_output.bitrate");
as_outputLatency = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_output.latency");
as_outputJitter = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_output.jitter");
as_outputAvg_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_output.avg_loss");
as_outputMax_loss = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_output.max_loss");
as_outputResolution = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_output.resolution");
as_outputFrame_rate = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].as_output.frame_rate");
Zoom_min_cpu_usage = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].cpu_usage.zoom_min_cpu_usage");
Zoom_avg_cpu_usage = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].cpu_usage.zoom_avg_cpu_usage");
Zoom_max_cpu_usage = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].cpu_usage.zoom_max_cpu_usage");
System_max_cpu_usage = CkJsonObjectW_stringOf(jResp,L"participants[i].user_qos[j].cpu_usage.system_max_cpu_usage");
j = j + 1;
}
i = i + 1;
}
CkHttpW_Dispose(http);
CkJsonObjectW_Dispose(queryParams);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
CkDtObjW_Dispose(date_time);
}
Curl Command
curl -G -d "type=live"
-d "page_size=1"
-d "next_page_token=quis%20officia%20in%20reprehenderit"
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/metrics/meetings/:meetingId/participants/qos
Postman Collection Item JSON
{
"name": "List meeting participants QoS",
"request": {
"auth": {
"type": "oauth2"
},
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/metrics/meetings/:meetingId/participants/qos?type=live&page_size=1&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"metrics",
"meetings",
":meetingId",
"participants",
"qos"
],
"query": [
{
"key": "type",
"value": "live",
"description": "The type of meeting to query: \n* `past` — All past meetings. \n* `live` - All live meetings. \n\nThis value defaults to `live`."
},
{
"key": "page_size",
"value": "1",
"description": "The number of items returned per page."
},
{
"key": "next_page_token",
"value": "quis officia in reprehenderit",
"description": "The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes."
}
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) The meeting's ID or universally unique ID (UUID). \n* If you provide a meeting ID, the API will return a response for the latest meeting instance. \n* If you provide a meeting UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the meeting UUID before making an API request."
}
]
},
"description": "Use this API to return a list of meeting participants from live or past meetings and their quality of service recieved during the meeting. The data returned indicates the connection quality for sending/receiving video, audio, and shared content. \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_meetings:read:admin` <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy` \n\n**Prerequisites:** \n* A Business or a higher plan."
},
"response": [
{
"name": "**HTTP Status Code:** `200`<br>\nMeeting participants returned.<br>\nOnly available for paid accounts that have enabled the dashboard feature.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/metrics/meetings/:meetingId/participants/qos?type=live&page_size=1&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"metrics",
"meetings",
":meetingId",
"participants",
"qos"
],
"query": [
{
"key": "type",
"value": "live"
},
{
"key": "page_size",
"value": "1"
},
{
"key": "next_page_token",
"value": "quis officia in reprehenderit"
}
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) The meeting's ID or universally unique ID (UUID). \n* If you provide a meeting ID, the API will return a response for the latest meeting instance. \n* If you provide a meeting UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the meeting UUID before making an API request."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"page_count\": \"integer [int64]\",\n \"page_size\": \"integer\",\n \"total_records\": \"integer [int64]\",\n \"next_page_token\": \"string\",\n \"participants\": [\n {\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 }\n ]\n}"
},
{
"name": "**Error Code:** `300`<br>\nCan not access webinar info, {meetingId}.<br>\nThe next page token is either invalid or expired.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/metrics/meetings/:meetingId/participants/qos?type=live&page_size=1&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"metrics",
"meetings",
":meetingId",
"participants",
"qos"
],
"query": [
{
"key": "type",
"value": "live"
},
{
"key": "page_size",
"value": "1"
},
{
"key": "next_page_token",
"value": "quis officia in reprehenderit"
}
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) The meeting's ID or universally unique ID (UUID). \n* If you provide a meeting ID, the API will return a response for the latest meeting instance. \n* If you provide a meeting UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the meeting UUID before making an API request."
}
]
}
},
"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 meeting's detail info is not available.<br>\nThe Meeting ID is not valid or the meeting has not ended yet.\n",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/metrics/meetings/:meetingId/participants/qos?type=live&page_size=1&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"metrics",
"meetings",
":meetingId",
"participants",
"qos"
],
"query": [
{
"key": "type",
"value": "live"
},
{
"key": "page_size",
"value": "1"
},
{
"key": "next_page_token",
"value": "quis officia in reprehenderit"
}
],
"variable": [
{
"key": "meetingId",
"value": "quis officia in reprehenderit",
"description": "(Required) The meeting's ID or universally unique ID (UUID). \n* If you provide a meeting ID, the API will return a response for the latest meeting instance. \n* If you provide a meeting UUID that begins with a `/` character or contains the `//` characters, you **must** double-encode the meeting UUID before making an API request."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}