Skip to content

Latest commit

 

History

History
385 lines (264 loc) · 13.8 KB

NotificationsApi.md

File metadata and controls

385 lines (264 loc) · 13.8 KB

PureCloudPlatform\Client\V2\NotificationsApi

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

deleteNotificationsChannelSubscriptions($channelId)

Remove all subscriptions

Example

<?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;
}
?>

Parameters

Name Type Description Notes
channelId string Channel ID

Return type

void (empty response body)

Authorization

[PureCloud OAuth](../../README.md#PureCloud 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]

getNotificationsAvailabletopics

\PureCloudPlatform\Client\V2\Model\AvailableTopicEntityListing getNotificationsAvailabletopics($expand)

Get available notification topics.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
expand string[] Which fields, if any, to expand [optional]

Return type

\PureCloudPlatform\Client\V2\Model\AvailableTopicEntityListing

Authorization

[PureCloud OAuth](../../README.md#PureCloud 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]

getNotificationsChannelSubscriptions

\PureCloudPlatform\Client\V2\Model\ChannelTopicEntityListing getNotificationsChannelSubscriptions($channelId)

The list of all subscriptions for this channel

Example

<?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;
}
?>

Parameters

Name Type Description Notes
channelId string Channel ID

Return type

\PureCloudPlatform\Client\V2\Model\ChannelTopicEntityListing

Authorization

[PureCloud OAuth](../../README.md#PureCloud 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]

getNotificationsChannels

\PureCloudPlatform\Client\V2\Model\ChannelEntityListing getNotificationsChannels($includechannels)

The list of existing channels

Example

<?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;
}
?>

Parameters

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]

Return type

\PureCloudPlatform\Client\V2\Model\ChannelEntityListing

Authorization

[PureCloud OAuth](../../README.md#PureCloud 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]

postNotificationsChannelSubscriptions

\PureCloudPlatform\Client\V2\Model\ChannelTopicEntityListing postNotificationsChannelSubscriptions($channelId, $body)

Add a list of subscriptions to the existing list of subscriptions

Example

<?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;
}
?>

Parameters

Name Type Description Notes
channelId string Channel ID
body \PureCloudPlatform\Client\V2\Model\ChannelTopic[] Body

Return type

\PureCloudPlatform\Client\V2\Model\ChannelTopicEntityListing

Authorization

[PureCloud OAuth](../../README.md#PureCloud 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]

postNotificationsChannels

\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.

Example

<?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;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\PureCloudPlatform\Client\V2\Model\Channel

Authorization

[PureCloud OAuth](../../README.md#PureCloud 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]

putNotificationsChannelSubscriptions

\PureCloudPlatform\Client\V2\Model\ChannelTopicEntityListing putNotificationsChannelSubscriptions($channelId, $body)

Replace the current list of subscriptions with a new list.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
channelId string Channel ID
body \PureCloudPlatform\Client\V2\Model\ChannelTopic[] Body

Return type

\PureCloudPlatform\Client\V2\Model\ChannelTopicEntityListing

Authorization

[PureCloud OAuth](../../README.md#PureCloud 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]