Module

devices

Members

# inner constant fields

The key values from the object that can be synchronized.

View Source devices.js, line 155

Methods

# async inner create(env, device) → {Promise.<Device>}

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

View Source devices.js, line 49

Device Object Created
Promise.<Device>

# async inner exportToImport(env, devices, destinationData, options) → {Promise}

Transforms an array of records exported from xMatters to the format needed to import into xMatters.
Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance
devices Array.<Device> Array of devices to transform.
destinationData xMattersObjects The xMatters data for the destination.
options Object

View Source devices.js, line 97

Promise

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

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
deviceId string The unique identifier or target name of the device to retrieve. The target name of a device is the user name, followed by the | (pipe) character, followed by the device name.

Examples:
- 254c95ee-4abe-47ea-ae7c-ae84fb4bee4f
- mmcbride|Work Phone
query Object A json object representing the query string parameters for this request.

View Source devices.js, line 23

Device Object Requested
Promise.<Device>

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

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

https://help.xmatters.com/xmapi/index.html#get-devices
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.

View Source devices.js, line 36

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

# async inner sync(destination, sourceDevices, destinationDevices, 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.
sourceDevices Array.<Device> An array of the device objects to synchronize from the source data.
destinationDevices Array.<Device> An array of the device objects to synchronize from the destination data.
options Object

View Source devices.js, line 179

Promise.<module:sync.SyncResults>

# async inner update(env, device, deviceId) → {Promise.<Device>}

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
device Device https://help.xmatters.com/xmapi/index.html#device-object
deviceId string The unique identifier (id) of the device you want to modify. You can get this value from the response of Create a device or Get a person’s devices.

Examples:
- 254c95ee-4abe-47ea-ae7c-ae84fb4bee4f

View Source devices.js, line 67

Device Object Updated
Promise.<Device>