All URIs are relative to https://api.mypurecloud.com
Method | HTTP request | Description |
---|---|---|
deleteNotificationsChannelSubscriptions | DELETE /api/v2/notifications/channels/{channelId}/subscriptions | Remove all subscriptions |
getNotificationsAvailabletopics | GET /api/v2/notifications/availabletopics | Get available notification topics. |
getNotificationsChannelSubscriptions | GET /api/v2/notifications/channels/{channelId}/subscriptions | The list of all subscriptions for this channel |
getNotificationsChannels | GET /api/v2/notifications/channels | The list of existing channels |
postNotificationsChannelSubscriptions | POST /api/v2/notifications/channels/{channelId}/subscriptions | Add a list of subscriptions to the existing list of subscriptions |
postNotificationsChannels | POST /api/v2/notifications/channels | Create a new channel |
putNotificationsChannelSubscriptions | PUT /api/v2/notifications/channels/{channelId}/subscriptions | Replace the current list of subscriptions with a new list. |
deleteNotificationsChannelSubscriptions($channelId)
Remove all subscriptions
<?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\NotificationsApi(
// 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
);
$channelId = "channelId_example"; // string | Channel ID
try {
$apiInstance->deleteNotificationsChannelSubscriptions($channelId);
} catch (Exception $e) {
echo 'Exception when calling NotificationsApi->deleteNotificationsChannelSubscriptions: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
channelId | string | Channel ID |
void (empty response body)
[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\AvailableTopicEntityListing getNotificationsAvailabletopics($expand)
Get available notification topics.
<?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\NotificationsApi(
// 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
);
$expand = array("expand_example"); // string[] | Which fields, if any, to expand
try {
$result = $apiInstance->getNotificationsAvailabletopics($expand);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationsApi->getNotificationsAvailabletopics: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
expand | string[] | Which fields, if any, to expand | [optional] |
\PureCloudPlatform\Client\V2\Model\AvailableTopicEntityListing
[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\ChannelTopicEntityListing getNotificationsChannelSubscriptions($channelId)
The list of all subscriptions for this channel
<?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\NotificationsApi(
// 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
);
$channelId = "channelId_example"; // string | Channel ID
try {
$result = $apiInstance->getNotificationsChannelSubscriptions($channelId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationsApi->getNotificationsChannelSubscriptions: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
channelId | string | Channel ID |
\PureCloudPlatform\Client\V2\Model\ChannelTopicEntityListing
[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\ChannelEntityListing getNotificationsChannels($includechannels)
The list of existing channels
<?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\NotificationsApi(
// 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
);
$includechannels = "token"; // string | Show user's channels for this specific token or across all tokens for this user and app. Channel Ids for other access tokens will not be shown, but will be presented to show their existence.
try {
$result = $apiInstance->getNotificationsChannels($includechannels);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationsApi->getNotificationsChannels: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
includechannels | string | Show user's channels for this specific token or across all tokens for this user and app. Channel Ids for other access tokens will not be shown, but will be presented to show their existence. | [optional] [default to token] |
\PureCloudPlatform\Client\V2\Model\ChannelEntityListing
[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\ChannelTopicEntityListing postNotificationsChannelSubscriptions($channelId, $body)
Add a list of subscriptions to the existing list of subscriptions
<?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\NotificationsApi(
// 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
);
$channelId = "channelId_example"; // string | Channel ID
$body = array(new \PureCloudPlatform\Client\V2\Model\ChannelTopic()); // \PureCloudPlatform\Client\V2\Model\ChannelTopic[] | Body
try {
$result = $apiInstance->postNotificationsChannelSubscriptions($channelId, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationsApi->postNotificationsChannelSubscriptions: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
channelId | string | Channel ID | |
body | \PureCloudPlatform\Client\V2\Model\ChannelTopic[] | Body |
\PureCloudPlatform\Client\V2\Model\ChannelTopicEntityListing
[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\Channel postNotificationsChannels()
Create a new channel
There is a limit of 10 channels per user/app combination. Creating an 11th channel will remove the channel with oldest last used date.
<?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\NotificationsApi(
// 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->postNotificationsChannels();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationsApi->postNotificationsChannels: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\PureCloudPlatform\Client\V2\Model\Channel
[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\ChannelTopicEntityListing putNotificationsChannelSubscriptions($channelId, $body)
Replace the current list of subscriptions with a new list.
<?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\NotificationsApi(
// 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
);
$channelId = "channelId_example"; // string | Channel ID
$body = array(new \PureCloudPlatform\Client\V2\Model\ChannelTopic()); // \PureCloudPlatform\Client\V2\Model\ChannelTopic[] | Body
try {
$result = $apiInstance->putNotificationsChannelSubscriptions($channelId, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NotificationsApi->putNotificationsChannelSubscriptions: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
channelId | string | Channel ID | |
body | \PureCloudPlatform\Client\V2\Model\ChannelTopic[] | Body |
\PureCloudPlatform\Client\V2\Model\ChannelTopicEntityListing
[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]