Skip to content

Latest commit

 

History

History
439 lines (292 loc) · 11.9 KB

UserGroupsApi.md

File metadata and controls

439 lines (292 loc) · 11.9 KB

Cloudinary\Provisioning\UserGroupsApi

All URIs are relative to https://api.cloudinary.com/v1_1/provisioning/accounts/ACCOUNT_ID, except if the operation defines another base path.

Method HTTP request Description
addUserToUserGroup() POST /user_groups/{group_id}/users/{user_id} Add User to User Group
createUserGroup() POST /user_groups Create User Group
deleteUserGroup() DELETE /user_groups/{group_id} Delete User Group
getUserGroup() GET /user_groups/{group_id} Get User Group
getUserGroups() GET /user_groups Get User Groups
getUsersInUserGroup() GET /user_groups/{group_id}/users Get Users in User Group
removeUserFromUserGroup() DELETE /user_groups/{group_id}/users/{user_id} Remove User from User Group
updateUserGroup() PUT /user_groups/{group_id} Update User Group

addUserToUserGroup()

addUserToUserGroup($groupId, $userId): \Cloudinary\Provisioning\Model\UserGroupUser

Add User to User Group

Add a user to a group with the specified ID.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\UserGroupsApi();

$groupId = "7f08f1f1fc910bf1f25274aef11d27"; // string | The ID of the user group.
$userId = "0abed8dfcc039ea05e2a1d494fd442"; // string | The ID of the user.

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

Parameters

Name Type Description Notes
groupId string The ID of the user group.
userId string The ID of the user.

Return type

\Cloudinary\Provisioning\Model\UserGroupUser

Authorization

basicAuth

HTTP request headers

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

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

createUserGroup()

createUserGroup($userGroupRequest): \Cloudinary\Provisioning\Model\UserGroup

Create User Group

Create a new user group for the account.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\UserGroupsApi();

$userGroupRequest = new \Cloudinary\Provisioning\Model\UserGroupRequest(); // \Cloudinary\Provisioning\Model\UserGroupRequest | User group details

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

Parameters

Name Type Description Notes
userGroupRequest \Cloudinary\Provisioning\Model\UserGroupRequest User group details [optional]

Return type

\Cloudinary\Provisioning\Model\UserGroup

Authorization

basicAuth

HTTP request headers

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

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

deleteUserGroup()

deleteUserGroup($groupId): \Cloudinary\Provisioning\Model\SuccessResponse

Delete User Group

Delete a user group with the specified ID.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\UserGroupsApi();

$groupId = "7f08f1f1fc910bf1f25274aef11d27"; // string | The ID of the user group.

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

Parameters

Name Type Description Notes
groupId string The ID of the user group.

Return type

\Cloudinary\Provisioning\Model\SuccessResponse

Authorization

basicAuth

HTTP request headers

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

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

getUserGroup()

getUserGroup($groupId, $extendedDetails): \Cloudinary\Provisioning\Model\UserGroup

Get User Group

Retrieve a specific user group.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\UserGroupsApi();

$groupId = "7f08f1f1fc910bf1f25274aef11d27"; // string | The ID of the user group.
$extendedDetails = true; // bool | Whether to only return extended (true) or basic information about the group (false).  **Default**: false.

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

Parameters

Name Type Description Notes
groupId string The ID of the user group.
extendedDetails bool Whether to only return extended (true) or basic information about the group (false). Default: false. [optional]

Return type

\Cloudinary\Provisioning\Model\UserGroup

Authorization

basicAuth

HTTP request headers

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

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

getUserGroups()

getUserGroups($extendedDetails): \Cloudinary\Provisioning\Model\UserGroupsResponse

Get User Groups

Retrieve an array of all user groups in the account.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\UserGroupsApi();

$extendedDetails = true; // bool | Whether to only return extended (true) or basic information about the group (false).  **Default**: false.

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

Parameters

Name Type Description Notes
extendedDetails bool Whether to only return extended (true) or basic information about the group (false). Default: false. [optional]

Return type

\Cloudinary\Provisioning\Model\UserGroupsResponse

Authorization

basicAuth

HTTP request headers

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

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

getUsersInUserGroup()

getUsersInUserGroup($groupId): \Cloudinary\Provisioning\Model\UserGroupUsersResponse

Get Users in User Group

Retrieve the users in the group with the specified ID.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\UserGroupsApi();

$groupId = "7f08f1f1fc910bf1f25274aef11d27"; // string | The ID of the user group.

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

Parameters

Name Type Description Notes
groupId string The ID of the user group.

Return type

\Cloudinary\Provisioning\Model\UserGroupUsersResponse

Authorization

basicAuth

HTTP request headers

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

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

removeUserFromUserGroup()

removeUserFromUserGroup($groupId, $userId): \Cloudinary\Provisioning\Model\UserGroupUsersResponse

Remove User from User Group

Remove a user from a group with the specified ID.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\UserGroupsApi();

$groupId = "7f08f1f1fc910bf1f25274aef11d27"; // string | The ID of the user group.
$userId = "0abed8dfcc039ea05e2a1d494fd442"; // string | The ID of the user.

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

Parameters

Name Type Description Notes
groupId string The ID of the user group.
userId string The ID of the user.

Return type

\Cloudinary\Provisioning\Model\UserGroupUsersResponse

Authorization

basicAuth

HTTP request headers

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

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

updateUserGroup()

updateUserGroup($groupId, $userGroupRequest): \Cloudinary\Provisioning\Model\UserGroup

Update User Group

Update the name of a specified user group.

Example

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

$apiInstance = new Cloudinary\Provisioning\Api\UserGroupsApi();

$groupId = "7f08f1f1fc910bf1f25274aef11d27"; // string | The ID of the user group.
$userGroupRequest = new \Cloudinary\Provisioning\Model\UserGroupRequest(); // \Cloudinary\Provisioning\Model\UserGroupRequest | Updated user group details

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

Parameters

Name Type Description Notes
groupId string The ID of the user group.
userGroupRequest \Cloudinary\Provisioning\Model\UserGroupRequest Updated user group details [optional]

Return type

\Cloudinary\Provisioning\Model\UserGroup

Authorization

basicAuth

HTTP request headers

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

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