Chilkat Online Tools

delphiDll / Zoom API / Delete a role

Back to Collection Items

var
http: HCkHttp;
success: Boolean;
resp: HCkHttpResponse;

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

http := CkHttp_Create();

// Adds the "Authorization: Bearer <access_token>" header.
CkHttp_putAuthToken(http,'<access_token>');

resp := CkHttp_QuickRequest(http,'DELETE','https://api.zoom.us/v2/roles/:roleId');
if (CkHttp_getLastMethodSuccess(http) = False) then
  begin
    Memo1.Lines.Add(CkHttp__lastErrorText(http));
    Exit;
  end;

Memo1.Lines.Add(IntToStr(CkHttpResponse_getStatusCode(resp)));
Memo1.Lines.Add(CkHttpResponse__bodyStr(resp));
CkHttpResponse_Dispose(resp);

CkHttp_Dispose(http);

Curl Command

curl -X DELETE
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/roles/:roleId

Postman Collection Item JSON

{
  "name": "Delete a role",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/roles/:roleId",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "roles",
        ":roleId"
      ],
      "variable": [
        {
          "key": "roleId",
          "value": "quis officia in reprehenderit",
          "description": "(Required) Role Id."
        }
      ]
    },
    "description": "Each Zoom user automatically has a role which can either be owner, administrator, or a member. Account Owners and users with edit privileges for Role management can add customized roles with a list.\n\nUse this API to delete a role.<br>\n**Pre-requisite:**<br>\n* A Pro or higher plan.<br>\n* For role management and updates, you must be the Account Owner or user with role management permissions.\n\n**Scopes:** `role:write:admin`<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`"
  },
  "response": [
    {
      "name": "**Error Code:** `200`<br>\nRole not found.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/roles/:roleId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "roles",
            ":roleId"
          ],
          "variable": [
            {
              "key": "roleId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) Role Id."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**Status Code:** `204`<br>\nRole deleted.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/roles/:roleId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "roles",
            ":roleId"
          ],
          "variable": [
            {
              "key": "roleId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) Role Id."
            }
          ]
        }
      },
      "status": "No Content",
      "code": 204,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{}"
    },
    {
      "name": "**Error Code:** `300`<br>\nRole not found.",
      "originalRequest": {
        "method": "DELETE",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/roles/:roleId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "roles",
            ":roleId"
          ],
          "variable": [
            {
              "key": "roleId",
              "value": "quis officia in reprehenderit",
              "description": "(Required) Role Id."
            }
          ]
        }
      },
      "status": "Multiple Choices",
      "code": 300,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}