Chilkat Online Tools

DataFlex / Zoom API / Get sign In / sign out activity report

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vQueryParams
    Handle hoQueryParams
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sTemp1
    Boolean bTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Get Create (RefClass(cComChilkatJsonObject)) To hoQueryParams
    If (Not(IsComObjectCreated(hoQueryParams))) Begin
        Send CreateComObject of hoQueryParams
    End
    Get ComUpdateString Of hoQueryParams "from" "1989-05-07" To iSuccess
    Get ComUpdateString Of hoQueryParams "to" "1989-05-07" To iSuccess
    Get ComUpdateInt Of hoQueryParams "page_size" 68423085 To iSuccess
    Get ComUpdateString Of hoQueryParams "next_page_token" "quis officia in reprehenderit" To iSuccess

    // Adds the "Authorization: Bearer <access_token>" header.
    Set ComAuthToken Of hoHttp To "<access_token>"

    Get pvComObject of hoQueryParams to vQueryParams
    Get ComQuickRequestParams Of hoHttp "GET" "https://api.zoom.us/v2/report/activities" vQueryParams To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp


End_Procedure

Curl Command

curl -G -d "from=1989-05-07"
	-d "to=1989-05-07"
	-d "page_size=68423085"
	-d "next_page_token=quis%20officia%20in%20reprehenderit"
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/report/activities

Postman Collection Item JSON

{
  "name": "Get sign In / sign out activity report",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/report/activities?from=1989-05-07&to=1989-05-07&page_size=68423085&next_page_token=quis officia in reprehenderit",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "report",
        "activities"
      ],
      "query": [
        {
          "key": "from",
          "value": "1989-05-07",
          "description": "Start date for which you would like to view the activity logs report. Using the `from` and `to` parameters, specify a monthly date range for the report as the API only provides one month worth of data in one request. The specified date range should fall within the last six months."
        },
        {
          "key": "to",
          "value": "1989-05-07",
          "description": "End date up to which you would like to view the activity logs report."
        },
        {
          "key": "page_size",
          "value": "68423085",
          "description": "The number of records to be returned within a single API call"
        },
        {
          "key": "next_page_token",
          "value": "quis officia in reprehenderit",
          "description": "Next page token is used to paginate through large result sets"
        }
      ]
    },
    "description": "Retrieve a list of sign in / sign out activity logs [report](https://support.zoom.us/hc/en-us/articles/201363213-Getting-Started-with-Reports) of users under a Zoom account.<br>\n**Prerequisites**<br>\n* Pro or higher plan.<br>\n**Scopes:** `report:read:admin`<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`"
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nSuccess",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/report/activities?from=1989-05-07&to=1989-05-07&page_size=68423085&next_page_token=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "report",
            "activities"
          ],
          "query": [
            {
              "key": "from",
              "value": "1989-05-07"
            },
            {
              "key": "to",
              "value": "1989-05-07"
            },
            {
              "key": "page_size",
              "value": "68423085"
            },
            {
              "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            \\\"email\\\": \\\"sfkjsldfhjdsf@dskjflhdsf.com\\\",\\n            \\\"time\\\": \\\"2019-09-15T20:56:09Z\\\",\\n            \\\"type\\\": \\\"Sign in\\\",\\n            \\\"ip_address\\\": \\\"38.99.100.6\\\",\\n            \\\"client_type\\\": \\\"Browser\\\",\\n            \\\"version\\\": \\\"-\\\"\\n        },\\n        {\\n            \\\"email\\\": \\\"dfdsfdfdf@gidfdfdl.com\\\",\\n            \\\"time\\\": \\\"2019-09-15T19:13:41Z\\\",\\n            \\\"type\\\": \\\"Sign in\\\",\\n            \\\"ip_address\\\": \\\"38.99.100.6\\\",\\n            \\\"client_type\\\": \\\"Browser\\\",\\n            \\\"version\\\": \\\"-\\\"\\n        },\\n        {\\n            \\\"email\\\": \\\"fdfdfdf@gfdgfdgdsfg.com\\\",\\n            \\\"time\\\": \\\"2019-09-15T18:50:15Z\\\",\\n            \\\"type\\\": \\\"Sign out\\\",\\n            \\\"ip_address\\\": \\\"38.99.100.6\\\",\\n            \\\"client_type\\\": \\\"Browser\\\",\\n            \\\"version\\\": \\\"-\\\"\\n        }\""
    }
  ]
}