Chilkat Online Tools

Swift3 / Zoom API / Delete a webinar survey

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>"

    var resp: CkoHttpResponse? = http.quickRequest("DELETE", url: "https://api.zoom.us/v2/webinars/:webinarId/survey")
    if http.lastMethodSuccess == false {
        print("\(http.lastErrorText!)")
        return
    }

    var respStatusCode: Int = resp!.statusCode.intValue
    print("Response Status Code = \(respStatusCode)")
    if respStatusCode != 204 {
        print("Response Header:")
        print("\(resp!.header!)")
        print("Response Body:")
        print("\(resp!.bodyStr!)")
        print("Failed.")
        resp = nil
        return
    }

    resp = nil
    print("Success.")

}

Curl Command

curl -X DELETE
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/webinars/:webinarId/survey

Postman Collection Item JSON

{
  "name": "Delete a webinar survey",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/webinars/:webinarId/survey",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "webinars",
        ":webinarId",
        "survey"
      ],
      "variable": [
        {
          "key": "webinarId",
          "value": "68423085",
          "description": "(Required) The webinar's ID."
        }
      ]
    },
    "description": "Use this API to delete a [webinar survey](https://support.zoom.us/hc/en-us/articles/360048745651). \n\n **Scopes:** `webinar:write`, `webinar:write:admin` <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` \n\n **Prerequisites:** \n* A Pro or higher plan with the Webinar Add-on. \n* The [**Webinar Survey**](https://support.zoom.us/hc/en-us/articles/360061293191-Enabling-webinar-survey) feature enabled in the host's account."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `204` <br>\n Webinar survey deleted.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/survey",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "survey"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `400` <br> Bad Request \n\n **Error Code:** `300` <br>\n Invalid webinar ID. \n\n **Error Code:** `3000` <br>\n Webinar survey disabled. To enable this feature, enable the \"Webinar Survey\" setting in the Zoom web portal's \"Settings\" interf",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/survey",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "survey"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404` <br> Not Found \n\n **Error Code:** `300` <br>\n Webinar ID does not exist. \n\n **Error Code:** `3001` <br>\n Webinar does not exist: {webinarId}.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/webinars/:webinarId/survey",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "webinars",
            ":webinarId",
            "survey"
          ],
          "variable": [
            {
              "key": "webinarId",
              "value": "68423085",
              "description": "(Required) The webinar's ID."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}