Module

planConstants

A module related to xMatters communication plan constants.

https://help.xmatters.com/xmapi/index.html#plan-constants

View Source planConstants.js, line 3

Members

# inner constant fields

The key values from the object that can be synchronized.

View Source planConstants.js, line 110

Methods

# async inner create(env, constant, planId) → {Promise.<PlanConstant>}

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
constant PlanConstant https://help.xmatters.com/xmapi/index.html#constant-object
planId string The unique identifier (id) or of the plan that will contain the constant.

View Source planConstants.js, line 49

Plan Constant Object Created
Promise.<PlanConstant>

# async inner exportToImport(destination, planConstants, 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.
planConstants Array.<PlanConstant> Array of plan constant objects to transform.
destinationData xMattersObjects The xMatters data for the destination.

View Source planConstants.js, line 92

Promise

# async inner get(env, constantId, query, planId) → {Promise.<PlanConstant>}

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
constantId string
query Object A json object representing the query string parameters for this request.
planId string The unique identifier (id) or name of the plan you want to list the constants for.

View Source planConstants.js, line 21

Plan Constant Object Requested
Promise.<PlanConstant>

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

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

https://help.xmatters.com/xmapi/index.html#get-plan-constants
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.
planId string The unique identifier (id) or name of the plan you want to list the constants for.

View Source planConstants.js, line 35

Array of Plan Constant Objects Requested
Promise.<Array.<PlanConstant>>

# async inner sync(destination, sourcePlanConstants, destinationPlanConstants, options) → {Promise.<module:sync.SyncResults>}

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.
sourcePlanConstants Array.<PlanConstant> An array of the plan constants objects to synchronize from the source data.
destinationPlanConstants Array.<PlanConstant> An array of the plan constants objects to synchronize from the destination data.
options Object

View Source planConstants.js, line 120

Promise.<module:sync.SyncResults>

# async inner update(env, constant, constantId, planId) → {Promise.<PlanConstant>}

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
constant PlanConstant https://help.xmatters.com/xmapi/index.html#constant-object
constantId string The unique identifier (id) of the constant.

Examples:
- b2341d69-8b83-4660-b8c8-f2e728f675f9
planId string The unique identifier (id) or name of the plan containing the constant.

View Source planConstants.js, line 66

Plan Constant Object Updated
Promise.<PlanConstant>