All URIs are relative to https://api.mypurecloud.com
Method | HTTP request | Description |
---|---|---|
getLicenseDefinition | GET /api/v2/license/definitions/{licenseId} | Get PureCloud license definition. |
getLicenseDefinitions | GET /api/v2/license/definitions | Get all PureCloud license definitions available for the organization. |
getLicenseToggle | GET /api/v2/license/toggles/{featureName} | Get PureCloud license feature toggle value. |
getLicenseUser | GET /api/v2/license/users/{userId} | Get licenses for specified user. |
getLicenseUsers | GET /api/v2/license/users | Get a page of users and their licenses |
postLicenseOrganization | POST /api/v2/license/organization | Update the organization's license assignments in a batch. |
postLicenseToggle | POST /api/v2/license/toggles/{featureName} | Switch PureCloud license feature toggle value. |
postLicenseUsers | POST /api/v2/license/users | Fetch user licenses in a batch. |
\PureCloudPlatform\Client\V2\Model\LicenseDefinition getLicenseDefinition($licenseId)
Get PureCloud license definition.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: PureCloud OAuth
$config = PureCloudPlatform\Client\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new PureCloudPlatform\Client\V2\Api\LicenseApi(
// 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
);
$licenseId = "licenseId_example"; // string | ID
try {
$result = $apiInstance->getLicenseDefinition($licenseId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LicenseApi->getLicenseDefinition: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
licenseId | string | ID |
\PureCloudPlatform\Client\V2\Model\LicenseDefinition
[PureCloud OAuth](../../README.md#PureCloud OAuth)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\PureCloudPlatform\Client\V2\Model\LicenseDefinition[] getLicenseDefinitions()
Get all PureCloud license definitions available for the organization.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: PureCloud OAuth
$config = PureCloudPlatform\Client\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new PureCloudPlatform\Client\V2\Api\LicenseApi(
// 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->getLicenseDefinitions();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LicenseApi->getLicenseDefinitions: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\PureCloudPlatform\Client\V2\Model\LicenseDefinition[]
[PureCloud OAuth](../../README.md#PureCloud OAuth)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\PureCloudPlatform\Client\V2\Model\LicenseOrgToggle getLicenseToggle($featureName)
Get PureCloud license feature toggle value.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: PureCloud OAuth
$config = PureCloudPlatform\Client\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new PureCloudPlatform\Client\V2\Api\LicenseApi(
// 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
);
$featureName = "featureName_example"; // string | featureName
try {
$result = $apiInstance->getLicenseToggle($featureName);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LicenseApi->getLicenseToggle: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
featureName | string | featureName |
\PureCloudPlatform\Client\V2\Model\LicenseOrgToggle
[PureCloud OAuth](../../README.md#PureCloud OAuth)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\PureCloudPlatform\Client\V2\Model\LicenseUser getLicenseUser($userId)
Get licenses for specified user.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: PureCloud OAuth
$config = PureCloudPlatform\Client\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new PureCloudPlatform\Client\V2\Api\LicenseApi(
// 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
);
$userId = "userId_example"; // string | ID
try {
$result = $apiInstance->getLicenseUser($userId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LicenseApi->getLicenseUser: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
userId | string | ID |
\PureCloudPlatform\Client\V2\Model\LicenseUser
[PureCloud OAuth](../../README.md#PureCloud OAuth)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\PureCloudPlatform\Client\V2\Model\UserLicensesEntityListing getLicenseUsers($pageSize, $pageNumber)
Get a page of users and their licenses
Retrieve a page of users in an organization along with the licenses they possess.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: PureCloud OAuth
$config = PureCloudPlatform\Client\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new PureCloudPlatform\Client\V2\Api\LicenseApi(
// 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
);
$pageSize = 25; // int | Page size
$pageNumber = 1; // int | Page number
try {
$result = $apiInstance->getLicenseUsers($pageSize, $pageNumber);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LicenseApi->getLicenseUsers: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
pageSize | int | Page size | [optional] [default to 25] |
pageNumber | int | Page number | [optional] [default to 1] |
\PureCloudPlatform\Client\V2\Model\UserLicensesEntityListing
[PureCloud OAuth](../../README.md#PureCloud OAuth)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\PureCloudPlatform\Client\V2\Model\LicenseUpdateStatus[] postLicenseOrganization($body)
Update the organization's license assignments in a batch.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: PureCloud OAuth
$config = PureCloudPlatform\Client\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new PureCloudPlatform\Client\V2\Api\LicenseApi(
// 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
);
$body = new \PureCloudPlatform\Client\V2\Model\LicenseBatchAssignmentRequest(); // \PureCloudPlatform\Client\V2\Model\LicenseBatchAssignmentRequest | The license assignments to update.
try {
$result = $apiInstance->postLicenseOrganization($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LicenseApi->postLicenseOrganization: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \PureCloudPlatform\Client\V2\Model\LicenseBatchAssignmentRequest | The license assignments to update. | [optional] |
\PureCloudPlatform\Client\V2\Model\LicenseUpdateStatus[]
[PureCloud OAuth](../../README.md#PureCloud OAuth)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\PureCloudPlatform\Client\V2\Model\LicenseOrgToggle postLicenseToggle($featureName)
Switch PureCloud license feature toggle value.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: PureCloud OAuth
$config = PureCloudPlatform\Client\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new PureCloudPlatform\Client\V2\Api\LicenseApi(
// 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
);
$featureName = "featureName_example"; // string | featureName
try {
$result = $apiInstance->postLicenseToggle($featureName);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LicenseApi->postLicenseToggle: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
featureName | string | featureName |
\PureCloudPlatform\Client\V2\Model\LicenseOrgToggle
[PureCloud OAuth](../../README.md#PureCloud OAuth)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string,object] postLicenseUsers($body)
Fetch user licenses in a batch.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: PureCloud OAuth
$config = PureCloudPlatform\Client\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new PureCloudPlatform\Client\V2\Api\LicenseApi(
// 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
);
$body = array(new \PureCloudPlatform\Client\V2\Model\string[]()); // string[] | The user IDs to fetch.
try {
$result = $apiInstance->postLicenseUsers($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LicenseApi->postLicenseUsers: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | string[] | The user IDs to fetch. | [optional] |
map[string,object]
[PureCloud OAuth](../../README.md#PureCloud OAuth)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]