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 |
---|---|---|
createUser() | POST /users | Create user |
deleteUser() | DELETE /users/{user_id} | Delete user |
getUser() | GET /users/{user_id} | Get user |
getUsers() | GET /users | Get users |
updateUser() | PUT /users/{user_id} | Update user |
createUser($userRequest): \Cloudinary\Provisioning\Model\User
Create user
Create a new user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Cloudinary\Provisioning\Api\UsersApi();
$userRequest = new \Cloudinary\Provisioning\Model\UserRequest(); // \Cloudinary\Provisioning\Model\UserRequest | User details
try {
$result = $apiInstance->createUser($userRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->createUser: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
userRequest | \Cloudinary\Provisioning\Model\UserRequest | User details | [optional] |
\Cloudinary\Provisioning\Model\User
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteUser($userId): \Cloudinary\Provisioning\Model\SuccessResponse
Delete user
Delete a specific user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Cloudinary\Provisioning\Api\UsersApi();
$userId = "0abed8dfcc039ea05e2a1d494fd442"; // string | The ID of the user.
try {
$result = $apiInstance->deleteUser($userId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->deleteUser: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
userId | string | The ID of the user. |
\Cloudinary\Provisioning\Model\SuccessResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUser($userId): \Cloudinary\Provisioning\Model\User
Get user
Retrieve a specific user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Cloudinary\Provisioning\Api\UsersApi();
$userId = "0abed8dfcc039ea05e2a1d494fd442"; // string | The ID of the user.
try {
$result = $apiInstance->getUser($userId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUser: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
userId | string | The ID of the user. |
\Cloudinary\Provisioning\Model\User
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUsers($pending, $ids, $emails, $prefix, $subAccountId, $lastLogin, $from, $to, $unionType, $sortOrder, $sortBy, $page, $pageSize): \Cloudinary\Provisioning\Model\UsersResponse
Get users
Returns an array of all users in the account, or if conditions are specified, returns the relevant users.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Cloudinary\Provisioning\Api\UsersApi();
$pending = false; // bool | Whether to return pending users. **Default**: `false` (all users)
$ids = array('ids_example'); // string[] | A list of up to 100 user IDs. When provided, other parameters are ignored.
$emails = array('emails_example'); // string[] | A list of up to 100 user Emails. When provided, other parameters are ignored.
$prefix = "john"; // string | Returns users where the name begins with the specified case-insensitive string.
$subAccountId = "'subAccountId_example'"; // string | Only returns users who have access to the specified account.
$lastLogin = True; // bool | Specifies a date range for last login.
$from = 2023-01-01; // \DateTime | All last logins after this date, given in the format: yyyy-mm-dd.
$to = 2024-12-31; // \DateTime | All last logins before this date, given in the format: yyyy-mm-dd.
$unionType = "'unionType_example'"; // string | Whether to return users who last logged in within the specified date range (include) or those who didn't last log in within the range (exclude). **Possible values**: `include`, `exclude`. **Default**: `include`.
$sortOrder = "'sortOrder_example'"; // string | Control the order of returned users. **Possible values**: `desc` (default), `asc`.
$sortBy = "'sortBy_example'"; // string
$page = 56; // int
$pageSize = 56; // int
try {
$result = $apiInstance->getUsers($pending, $ids, $emails, $prefix, $subAccountId, $lastLogin, $from, $to, $unionType, $sortOrder, $sortBy, $page, $pageSize);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUsers: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
pending | bool | Whether to return pending users. Default: `false` (all users) | [optional] |
ids | string[] | A list of up to 100 user IDs. When provided, other parameters are ignored. | [optional] |
emails | string[] | A list of up to 100 user Emails. When provided, other parameters are ignored. | [optional] |
prefix | string | Returns users where the name begins with the specified case-insensitive string. | [optional] |
subAccountId | string | Only returns users who have access to the specified account. | [optional] |
lastLogin | bool | Specifies a date range for last login. | [optional] |
from | \DateTime | All last logins after this date, given in the format: yyyy-mm-dd. | [optional] |
to | \DateTime | All last logins before this date, given in the format: yyyy-mm-dd. | [optional] |
unionType | string | Whether to return users who last logged in within the specified date range (include) or those who didn't last log in within the range (exclude). Possible values: `include`, `exclude`. Default: `include`. | [optional] |
sortOrder | string | Control the order of returned users. Possible values: `desc` (default), `asc`. | [optional] |
sortBy | string | [optional] | |
page | int | [optional] | |
pageSize | int | [optional] |
\Cloudinary\Provisioning\Model\UsersResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateUser($userId, $userRequest): \Cloudinary\Provisioning\Model\User
Update user
Update the details of a user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Cloudinary\Provisioning\Api\UsersApi();
$userId = "0abed8dfcc039ea05e2a1d494fd442"; // string | The ID of the user.
$userRequest = new \Cloudinary\Provisioning\Model\UserRequest(); // \Cloudinary\Provisioning\Model\UserRequest | Updated user details
try {
$result = $apiInstance->updateUser($userId, $userRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->updateUser: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
userId | string | The ID of the user. | |
userRequest | \Cloudinary\Provisioning\Model\UserRequest | Updated user details | [optional] |
\Cloudinary\Provisioning\Model\User
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]