Chilkat Online Tools

Swift / Zoom API / List tracking fields

Back to Collection Items

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

    let http = CkoHttp()
    var success: Bool

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

    let sbResponseBody = CkoStringBuilder()
    success = http.QuickGetSb("https://api.zoom.us/v2/tracking_fields", sbContent: sbResponseBody)
    if success == false {
        print("\(http.LastErrorText)")
        return
    }

    let jResp = CkoJsonObject()
    jResp.LoadSb(sbResponseBody)
    jResp.EmitCompact = false

    print("Response Body:")
    print("\(jResp.Emit())")

    var respStatusCode: Int = http.LastStatus.intValue
    print("Response Status Code = \(respStatusCode)")
    if respStatusCode >= 400 {
        print("Response Header:")
        print("\(http.LastHeader)")
        print("Failed.")
        return
    }


}

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/tracking_fields

Postman Collection Item JSON

{
  "name": "List tracking fields",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/tracking_fields",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "tracking_fields"
      ]
    },
    "description": "Use this API to list all the [tracking fields](https://support.zoom.us/hc/en-us/articles/115000293426-Scheduling-Tracking-Fields) on your Zoom account. Tracking fields let you analyze usage by various fields within an organization. \n\n**Scopes:** `tracking_fields:read:admin` <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Medium` \n\n**Prerequisites:** \n* A Business, Education, API or higher plan."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nList of Tracking Fields returned.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/tracking_fields",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "tracking_fields"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "\"{\\n  \\\"total_records\\\": 1,\\n  \\\"tracking_fields\\\": [\\n  {\\n  \\\"id\\\": \\\"3746374637\\\",\\n  \\\"field\\\": \\\"Meeting Purpose\\\",\\n  \\\"required\\\": true,\\n  \\\"visible\\\": false,\\n  \\\"recommended_values\\\": [\\n    \\\"Support\\\",\\n    \\\"Onboarding\\\",\\n    \\\"Sales\\\",\\n    \\\"Other\\\"\\n  ]\\n}\\n}\""
    }
  ]
}