Chilkat Online Tools

PowerBuilder / Zoom API / Get meeting poll reports

Back to Collection Items

integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
string ls_Name
string ls_Email
integer j
integer li_Count_j
string ls_Question
string ls_Answer
integer li_Id
string ls_Uuid
string ls_Status
string ls_Start_time
string ls_Title
integer i
integer li_Count_i

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

loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

// Adds the "Authorization: Bearer <access_token>" header.
loo_Http.AuthToken = "<access_token>"

loo_SbResponseBody = create oleobject
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat_9_5_0.StringBuilder")

li_Success = loo_Http.QuickGetSb("https://api.zoom.us/v2/report/meetings/:meetingId/polls",loo_SbResponseBody)
if li_Success = 0 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_SbResponseBody
    return
end if

loo_JResp = create oleobject
li_rc = loo_JResp.ConnectToNewObject("Chilkat_9_5_0.JsonObject")

loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0

Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()

li_RespStatusCode = loo_Http.LastStatus
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
    Write-Debug "Response Header:"
    Write-Debug loo_Http.LastHeader
    Write-Debug "Failed."
    destroy loo_Http
    destroy loo_SbResponseBody
    destroy loo_JResp
    return
end if

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

// {
//   "id": 123456,
//   "uuid": "gsdjfhsdfkhjdsf",
//   "status": "ended",
//   "start_time": "2019-02-01T12:34:12.660Z",
//   "title": "Learn something new",
//   "questions": [
//     {
//       "name": "Sam S",
//       "email": "example@example.com",
//       "question_details": [
//         {
//           "question": "How are you?",
//           "answer": "I am wonderful."
//         }
//       ]
//     }
//   ]
// }

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

li_Id = loo_JResp.IntOf("id")
ls_Uuid = loo_JResp.StringOf("uuid")
ls_Status = loo_JResp.StringOf("status")
ls_Start_time = loo_JResp.StringOf("start_time")
ls_Title = loo_JResp.StringOf("title")
i = 0
li_Count_i = loo_JResp.SizeOfArray("questions")
do while i < li_Count_i
    loo_JResp.I = i
    ls_Name = loo_JResp.StringOf("questions[i].name")
    ls_Email = loo_JResp.StringOf("questions[i].email")
    j = 0
    li_Count_j = loo_JResp.SizeOfArray("questions[i].question_details")
    do while j < li_Count_j
        loo_JResp.J = j
        ls_Question = loo_JResp.StringOf("questions[i].question_details[j].question")
        ls_Answer = loo_JResp.StringOf("questions[i].question_details[j].answer")
        j = j + 1
    loop
    i = i + 1
loop


destroy loo_Http
destroy loo_SbResponseBody
destroy loo_JResp

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/report/meetings/:meetingId/polls

Postman Collection Item JSON

{
  "name": "Get meeting poll reports",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/report/meetings/:meetingId/polls",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "report",
        "meetings",
        ":meetingId",
        "polls"
      ],
      "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": "Retrieve a report of [poll](https://support.zoom.us/hc/en-us/articles/213756303-Polling-for-Meetings) results for a past meeting. <br><br>\n**Scopes:** `report:read:admin`<br>\n \n**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`<br>\n**Prerequisites:**<br>\n* Pro or a higher plan.<br>\n "
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nMeeting polls report returned.<br>\nThis is only available for paid account:{accountId}.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/meetings/:meetingId/polls",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "meetings",
            ":meetingId",
            "polls"
          ],
          "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 \"id\": 123456,\n \"uuid\": \"gsdjfhsdfkhjdsf\",\n \"status\": \"ended\",\n \"start_time\": \"2019-02-01T12:34:12.660Z\",\n \"title\": \"Learn something new\",\n \"questions\": [\n  {\n   \"name\": \"Sam S\",\n   \"email\": \"example@example.com\",\n   \"question_details\": [\n    {\n     \"question\": \"How are you?\",\n     \"answer\": \"I am wonderful.\"\n    }\n   ]\n  }\n ]\n}"
    },
    {
      "name": "**HTTP Status Code:** `404`<br>\nMeeting ID not found.<br>\n**Error Code:** `3001`<br>\nMeeting  {meetingId} not found or has expired.<br>\n",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/meetings/:meetingId/polls",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "meetings",
            ":meetingId",
            "polls"
          ],
          "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": ""
    }
  ]
}