PowerBuilder / Zoom API / Get telephone reports
Back to Collection Items
integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_QueryParams
oleobject loo_Resp
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loo_Http = create oleobject
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
destroy loo_Http
MessageBox("Error","Connecting to COM object failed")
return
end if
loo_QueryParams = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_QueryParams.ConnectToNewObject("Chilkat.JsonObject")
loo_QueryParams.UpdateInt("type",1)
loo_QueryParams.UpdateString("query_date_type","start_time")
loo_QueryParams.UpdateString("from","1989-05-07")
loo_QueryParams.UpdateString("to","1989-05-07")
loo_QueryParams.UpdateInt("page_size",30)
loo_QueryParams.UpdateInt("page_number",1)
loo_QueryParams.UpdateString("next_page_token","quis officia in reprehenderit")
// Adds the "Authorization: Bearer <access_token>" header.
loo_Http.AuthToken = "<access_token>"
loo_Resp = loo_Http.QuickRequestParams("GET","https://api.zoom.us/v2/report/telephone",loo_QueryParams)
if loo_Http.LastMethodSuccess = 0 then
Write-Debug loo_Http.LastErrorText
destroy loo_Http
destroy loo_QueryParams
return
end if
loo_SbResponseBody = create oleobject
// Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat.StringBuilder")
loo_Resp.GetBodySb(loo_SbResponseBody)
loo_JResp = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JResp.ConnectToNewObject("Chilkat.JsonObject")
loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0
Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()
li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
Write-Debug "Response Header:"
Write-Debug loo_Resp.Header
Write-Debug "Failed."
destroy loo_Resp
destroy loo_Http
destroy loo_QueryParams
destroy loo_SbResponseBody
destroy loo_JResp
return
end if
destroy loo_Resp
destroy loo_Http
destroy loo_QueryParams
destroy loo_SbResponseBody
destroy loo_JResp
Curl Command
curl -G -d "type=1"
-d "query_date_type=start_time"
-d "from=1989-05-07"
-d "to=1989-05-07"
-d "page_size=30"
-d "page_number=1"
-d "next_page_token=quis%20officia%20in%20reprehenderit"
-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/report/telephone
Postman Collection Item JSON
{
"name": "Get telephone reports",
"request": {
"auth": {
"type": "oauth2"
},
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/report/telephone?type=1&query_date_type=start_time&from=1989-05-07&to=1989-05-07&page_size=30&page_number=1&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"report",
"telephone"
],
"query": [
{
"key": "type",
"value": "1",
"description": "Audio types:<br>`1` - Toll-free Call-in & Call-out.<br>`2` - Toll <br>\n`3` - SIP Connected Audio"
},
{
"key": "query_date_type",
"value": "start_time",
"description": "The type of date to query: \n* `start_time` — Query by call start time. \n* `end_time` — Query by call end time. \n* `meeting_start_time` — Query by meeting start time. \n* `meeting_end_time` — Query by meeting end time. \n\nThis value defaults to `start_time`."
},
{
"key": "from",
"value": "1989-05-07",
"description": "(Required) Start date in 'yyyy-mm-dd' format. The date range defined by the \"from\" and \"to\" parameters should only be one month as the report includes only one month worth of data at once."
},
{
"key": "to",
"value": "1989-05-07",
"description": "(Required) End date."
},
{
"key": "page_size",
"value": "30",
"description": "The number of records returned within a single API call."
},
{
"key": "page_number",
"value": "1",
"description": "The page number of the current page in the returned records. This field is **not** available if the `query_date_type` parameter is the `meeting_start_time` or `meeting_end_time` value. \n\n**DEPRECATED** — This field is deprecated and we will no longer support it in a future release. Instead, use the `next_page_token` query parameter for pagination."
},
{
"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."
}
]
},
"description": "The [telephone report](https://support.zoom.us/hc/en-us/articles/206514816-Telephone-reports) allows you to view who dialed into meetings via phone (Audio Conferencing or SIP Connected Audio) and which number they dialed into and other details. Use this API to get telephone report for a specified period of time.\n\n**Scopes:** `report:read:admin`<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`<br>**Prerequisites:**<br>\n* Pro or higher plan."
},
"response": [
{
"name": "**HTTP Status Code:** `200`<br>\nTelephone report returned.<br>\nThis is only available for paid account:{accountId}.<br>\nThe requested report cannot be generated for this account because this account has not subscribed to toll-free audio conference plan.<b",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"url": {
"raw": "{{baseUrl}}/report/telephone?type=1&query_date_type=start_time&from=1989-05-07&to=1989-05-07&page_size=30&page_number=1&next_page_token=quis officia in reprehenderit",
"host": [
"{{baseUrl}}"
],
"path": [
"report",
"telephone"
],
"query": [
{
"key": "type",
"value": "1"
},
{
"key": "query_date_type",
"value": "start_time"
},
{
"key": "from",
"value": "1989-05-07"
},
{
"key": "to",
"value": "1989-05-07"
},
{
"key": "page_size",
"value": "30"
},
{
"key": "page_number",
"value": "1"
},
{
"key": "next_page_token",
"value": "quis officia in reprehenderit"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "\"{\\n \\\"from\\\": \\\"2019-06-20\\\",\\n \\\"to\\\": \\\"2019-07-20\\\",\\n \\\"page_count\\\": 1,\\n \\\"page_number\\\": 1,\\n \\\"page_size\\\": 30,\\n \\\"total_records\\\": 1,\\n \\\"telephony_usage\\\": [\\n {\\n \\\"meeting_id\\\": 00000,\\n \\\"phone_number\\\": \\\"000002001\\\",\\n \\\"host_name\\\": \\\"John Dev\\\",\\n \\\"host_email\\\": \\\"example@example.com\\\",\\n \\\"dept\\\": \\\"Billing\\\",\\n \\\"start_time\\\": \\\"2019-07-15T23:24:52Z\\\",\\n \\\"end_time\\\": \\\"2019-07-15T23:30:19Z\\\",\\n \\\"duration\\\": 6,\\n \\\"total\\\": 11,\\n \\\"country_name\\\": \\\"Macau SAR\\\",\\n \\\"meeting_type\\\": \\\"Meeting\\\",\\n \\\"call_in_number\\\": \\\"+85123456789\\\"\\n }\\n ]\\n}\""
}
]
}