Skip to content

Latest commit

 

History

History
504 lines (341 loc) · 17.5 KB

RolesApi.md

File metadata and controls

504 lines (341 loc) · 17.5 KB

Zoom\Api\RolesApi

All URIs are relative to https://api.zoom.us/v2.

Method HTTP request Description
addRoleMembers() POST /roles/{roleId}/members Assign a role
createRole() POST /roles Create a role
deleteRole() DELETE /roles/{roleId} Delete a role
getRoleInformation() GET /roles/{roleId} Get role information
roleMemberDelete() DELETE /roles/{roleId}/members/{memberId} Unassign a role
roleMembers() GET /roles/{roleId}/members List members in a role
roles() GET /roles List roles
updateRole() PATCH /roles/{roleId} Update role information

addRoleMembers()

addRoleMembers($role_id, $add_role_members_request): \Zoom\Api\Model\AddRoleMembers201Response

Assign a role

User roles can have a set of permissions that allows access only to the pages a user needs to view or edit. Use this API to assign a role to members. Scopes: role:write:admin
Rate Limit Label: Medium
Prerequisites:
* A Pro or a higher plan.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth
$config = Zoom\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zoom\Api\Api\RolesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$role_id = 2; // string | The role ID
$add_role_members_request = new \Zoom\Api\Model\AddRoleMembersRequest(); // \Zoom\Api\Model\AddRoleMembersRequest | Role members

try {
    $result = $apiInstance->addRoleMembers($role_id, $add_role_members_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->addRoleMembers: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
role_id string The role ID
add_role_members_request \Zoom\Api\Model\AddRoleMembersRequest Role members

Return type

\Zoom\Api\Model\AddRoleMembers201Response

Authorization

OAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createRole()

createRole($create_role_request): mixed

Create a role

Each Zoom user automatically has a role which can either be owner, administrator, or a member. Pre-requisite:
* Pro or higher plan. * For setting the initial role, you must be the Account Owner.
* For subsequent role management, you must be the Account Owner or user with role management permissions.
Scopes: role:write:admin
Rate Limit Label: Light

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth
$config = Zoom\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zoom\Api\Api\RolesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$create_role_request = new \Zoom\Api\Model\CreateRoleRequest(); // \Zoom\Api\Model\CreateRoleRequest

try {
    $result = $apiInstance->createRole($create_role_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->createRole: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_role_request \Zoom\Api\Model\CreateRoleRequest [optional]

Return type

mixed

Authorization

OAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteRole()

deleteRole($role_id)

Delete a role

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. Use this API to delete a role.
Pre-requisite:
* A Pro or higher plan.
* For role management and updates, you must be the Account Owner or user with role management permissions. Scopes: role:write:admin
Rate Limit Label: Light

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth
$config = Zoom\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zoom\Api\Api\RolesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$role_id = 2; // string

try {
    $apiInstance->deleteRole($role_id);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->deleteRole: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
role_id string

Return type

void (empty response body)

Authorization

OAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getRoleInformation()

getRoleInformation($role_id): \Zoom\Api\Model\GetRoleInformation200Response

Get role information

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 of privileges. Use this API to get information including specific privileges assigned to a role.
Pre-requisite:
* A Pro or higher plan.
* For role management and updates, you must be the Account Owner or user with role management permissions. Scopes: role:read:admin
Rate Limit Label: Light

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth
$config = Zoom\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zoom\Api\Api\RolesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$role_id = 2; // string | Role Id.

try {
    $result = $apiInstance->getRoleInformation($role_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->getRoleInformation: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
role_id string Role Id.

Return type

\Zoom\Api\Model\GetRoleInformation200Response

Authorization

OAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

roleMemberDelete()

roleMemberDelete($role_id, $member_id)

Unassign a role

User roles can have a set of permissions that allows access only to the pages a user needs to view or edit. Use this API to unassign a user's role. Scope: role:write:admin
Rate Limit Label: Light
Prerequisites:
* A Pro or a higher plan.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth
$config = Zoom\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zoom\Api\Api\RolesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$role_id = 2; // string | The role ID
$member_id = Cs97wug2RTm5TNvuvk4yRw; // string | Member's ID

try {
    $apiInstance->roleMemberDelete($role_id, $member_id);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->roleMemberDelete: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
role_id string The role ID
member_id string Member's ID

Return type

void (empty response body)

Authorization

OAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

roleMembers()

roleMembers($role_id, $page_count, $page_number, $next_page_token, $page_size): \Zoom\Api\Model\RoleMembersList

List members in a role

User roles can have a set of permissions that allows access only to the pages a user needs to view or edit. Use this API to list all the members that are assigned a specific role. Scope: role:read:admin
Rate Limit Label: Medium
Prerequisites:
* A Pro or a higher plan.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth
$config = Zoom\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zoom\Api\Api\RolesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$role_id = 2; // string | The role ID
$page_count = 2; // string | The number of pages returned for this request.
$page_number = 1; // int | **Deprecated.** We will no longer support this field in a future release. Instead, use the `next_page_token` for pagination.
$next_page_token = IAfJX3jsOLW7w3dokmFl84zOa0MAVGyMEB2; // string | The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes.
$page_size = 30; // int | The number of records returned within a single API call.

try {
    $result = $apiInstance->roleMembers($role_id, $page_count, $page_number, $next_page_token, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->roleMembers: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
role_id string The role ID
page_count string The number of pages returned for this request. [optional]
page_number int Deprecated. We will no longer support this field in a future release. Instead, use the `next_page_token` for pagination. [optional] [default to 1]
next_page_token string The next page token is used to paginate through large result sets. A next page token will be returned whenever the set of available results exceeds the current page size. The expiration period for this token is 15 minutes. [optional]
page_size int The number of records returned within a single API call. [optional] [default to 30]

Return type

\Zoom\Api\Model\RoleMembersList

Authorization

OAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

roles()

roles(): \Zoom\Api\Model\RoleList

List roles

List roles on your account Scopes: role:read:admin
Rate Limit Label: Medium
Prerequisites : * Pro or higher plan. * For setting the initial role, you must be the Account Owner. * For subsequent role management, you must be the Account Owner or user with role management permissions.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth
$config = Zoom\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zoom\Api\Api\RolesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->roles();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->roles: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Zoom\Api\Model\RoleList

Authorization

OAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateRole()

updateRole($role_id, $update_role_request): mixed

Update role information

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. Use this API to change the privileges, name and description of a specific role.
Pre-requisite:
* A Pro or higher plan.
* For role management and updates, you must be the Account Owner or user with role management permissions.
Scopes: role:write:admin
Rate Limit Label: Light

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth
$config = Zoom\Api\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Zoom\Api\Api\RolesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$role_id = 2; // string
$update_role_request = new \Zoom\Api\Model\UpdateRoleRequest(); // \Zoom\Api\Model\UpdateRoleRequest

try {
    $result = $apiInstance->updateRole($role_id, $update_role_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->updateRole: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
role_id string
update_role_request \Zoom\Api\Model\UpdateRoleRequest [optional]

Return type

mixed

Authorization

OAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]