Module

scenarios

Members

# inner constant fields

The key values from the object that can be synchronized.

View Source scenarios.js, line 155

Methods

# async inner create(env, scenario, formId) → {Promise.<Scenario>}

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
scenario * https://help.xmatters.com/xmapi/index.html#scenario-object
formId *

View Source scenarios.js, line 57

Scenario Object Created
Promise.<Scenario>

# inner exportToImport(destination, scenarios, 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.
scenarios Array.<Scenario> https://help.xmatters.com/xmapi/index.html#scenario-object
destinationData xMattersObjects The xMatters data for the destination.

View Source scenarios.js, line 85

Promise

# async inner get(env, scenarioId, query) → {Promise.<Scenario>}

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
scenarioId string The unique identifier (id) or name of the scenario.

Examples:
- b2341d69-8b83-4660-b8c8-f2e728f675f9
query Object A json object representing the query string parameters for this request.

View Source scenarios.js, line 22

Scenario Object Requested
Promise.<Scenario>

# async inner getMany(env, query, formId, planId) → {Promise.<Array.<Scenario>>}

Get all scenarios from xMatters matching the query. Please refer to the link below for the available query parameters.

https://help.xmatters.com/xmapi/index.html#get-scenarios
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.
formId string The unique identifier (id) or name of the form.

Examples:
- a1341d69-8b83-4660-b8c8-f2e728f675f9
- Executive Communications
planId string The unique identifier (id) or name of the communication plan.

Examples:
- b2341d69-8b83-4660-b8c8-f2e728f675f9
- MIM

View Source scenarios.js, line 43

Array of Scenario Objects Requested
Promise.<Array.<Scenario>>

# async inner sync(destination, sourceScenarios, destinationScenarios, 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.
sourceScenarios Array.<Scenario> An array of the scenario objects to synchronize from the source data.
destinationScenarios Array.<Scenario> An array of the scenario objects to synchronize from the destination data.
options Object

View Source scenarios.js, line 179

# async inner update(env, scenario, scenarioId, formId) → {Promise.<Scenario>}

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
scenario * https://help.xmatters.com/xmapi/index.html#scenario-object
scenarioId * The unique identifier (id) of the scenario to update.

Examples:
- b2341d69-8b83-4660-b8c8-f2e728f675f9
formId * The UUID of the form you want to add the scenario for. To get the ID of a form, use forms.get() or forms.getMany() or a form in a plan using plans.get() or plans.getMany().

View Source scenarios.js, line 74

Scenario Object Updated
Promise.<Scenario>