A module related to xMatters subscriptions.
https://help.xmatters.com/xmapi/index.html#subscriptions
https://help.xmatters.com/xmapi/index.html#subscriptions
Members
Methods
# async inner create(env, subscription) → {Promise.<Subscription>}
Parameters:
Name | Type | Description |
---|---|---|
env |
module:environments.xMattersEnvironment | The xmtoolbox representation of an xMatters instance. |
subscription |
Subscription | https://help.xmatters.com/xmapi/index.html#subscription-object |
Subscription Object Created
Promise.<Subscription>
# async inner deleteSubscriber(env, subscriberId, subscriptionId) → {Promise}
Remove a subscriber from a subscription in xMatters
https://help.xmatters.com/xmapi/index.html#unsubscribe-a-user
https://help.xmatters.com/xmapi/index.html#unsubscribe-a-user
Parameters:
Name | Type | Description |
---|---|---|
env |
module:environments.xMattersEnvironment | The xmtoolbox representation of an xMatters instance. |
subscriberId |
string | The unique identifier (id) for the person to remove from the subscription Examples: - a1341d69-8b83-4660-b8c8-f2e728f675f9 |
subscriptionId |
string | The unique identifier (id) for the subscription. Examples: - b2341d69-8b83-4660-b8c8-f2e728f675f9 |
Promise
# async inner exportToImport(destination, subscriptions, destinationData) → {Promise}
Transforms an array of records exported from xMatters to the format needed to import into xMatters.
Parameters:
Name | Type | Description |
---|---|---|
destination |
module:environments.xMattersEnvironment | The xmtoolbox representation of the target or destination xMatters instance. |
subscriptions |
Subscription | https://help.xmatters.com/xmapi/index.html#subscription-object |
destinationData |
xMattersObjects | The xMatters data for the destination. |
Promise
# async inner get(env, subscriptionId, query) → {Subscription}
Parameters:
Name | Type | Description |
---|---|---|
env |
module:environments.xMattersEnvironment | The xmtoolbox representation of an xMatters instance. |
subscriptionId |
string | The unique identifier (id) or name of the subscription. Examples: - b2341d69-8b83-4660-b8c8-f2e728f675f9 - High Security Events |
query |
Object | A json object representing the query string parameters for this request. |
Subscription Object Requested
Subscription
# async inner getMany(env, query) → {Promise.<Array.<Subscription>>}
Get all subscriptions from xMatters matching the query. Please refer to the link below for the available query parameters.
https://help.xmatters.com/xmapi/index.html#get-subscriptions
https://help.xmatters.com/xmapi/index.html#get-subscriptions
Parameters:
Name | Type | Description |
---|---|---|
env |
module:environments.xMattersEnvironment | The xmtoolbox representation of an xMatters instance. |
query |
Object | A json object representing the query string parameters for this request. |
Array of Subscription Objects Requested
Promise.<Array.<Subscription>>
# async inner getSubscribers(env, query, subscriptionId) → {Promise.<Array.<Person>>}
Get all people in a subscription from xMatters matching the query. Please refer to the link below for the available query parameters.
https://help.xmatters.com/xmapi/index.html#get-subscribers
https://help.xmatters.com/xmapi/index.html#get-subscribers
Parameters:
Name | Type | Description |
---|---|---|
env |
module:environments.xMattersEnvironment | The xmtoolbox representation of an xMatters instance. |
query |
Object | A json object representing the query string parameters for this request. |
subscriptionId |
string | The unique identifier (id) for the subscription. Examples: - b2341d69-8b83-4660-b8c8-f2e728f675f9 |
Array of Person Objects Requested
Promise.<Array.<Person>>
# async inner sync(destination, sourceSubscriptions, destinationSubscriptions, options)
Synchronizes an array of objects from a source with destination objects and updates the destination as necessary.
Parameters:
Name | Type | Description |
---|---|---|
destination |
module:environments.xMattersEnvironment | The xmtoolbox representation of the target or destination xMatters instance. |
sourceSubscriptions |
Array.<Subscription> | An array of the subscription objects to synchronize from the source data. |
destinationSubscriptions |
Array.<Subscription> | An array of the subscription objects to synchronize from the destination data. |
options |
Object |
# async inner update(env, subscription, subscriptionId) → {Promise.<Subscription>}
Parameters:
Name | Type | Description |
---|---|---|
env |
module:environments.xMattersEnvironment | The xmtoolbox representation of an xMatters instance. |
subscription |
Subscription | https://help.xmatters.com/xmapi/index.html#subscription-object |
subscriptionId |
string | The unique identifier (id) for the subscription. Examples: - b2341d69-8b83-4660-b8c8-f2e728f675f9 |
Subscription Object Updated
Promise.<Subscription>