Chilkat Online Tools

DataFlex / Zoom API / Delete a role

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vResp
    Handle hoResp
    String sTemp1
    Integer iTemp1
    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

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

    Get ComQuickRequest Of hoHttp "DELETE" "https://api.zoom.us/v2/roles/:roleId" 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 ComStatusCode Of hoResp To iTemp1
    Showln iTemp1
    Get ComBodyStr Of hoResp To sTemp1
    Showln sTemp1
    Send Destroy of hoResp


End_Procedure

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": ""
    }
  ]
}