Module

sites

Members

# inner constant fields

The key values from the object that can be synchronized.

View Source sites.js, line 108

Methods

# async inner create(env, site) → {Promise.<Site>}

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

View Source sites.js, line 49

Site Object Created
Promise.<Site>

# async inner exportToImport(destination, sites) → {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.
sites Array.<Site> Array of site objects to transform.

View Source sites.js, line 91

Promise

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

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

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

View Source sites.js, line 23

Site Object Requested
Promise.<Site>

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

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

https://help.xmatters.com/xmapi/index.html#get-sites
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 sites.js, line 36

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

# async inner sync(destination, sourceSites, destinationSites, 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.
sourceSites Array.<Site> An array of the site objects to synchronize from the source data.
destinationSites Array.<Site> An array of the site objects to synchronize from the destination data.
options Object

View Source sites.js, line 134

# async inner update(env, site, siteId) → {Promise.<Site>}

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

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

View Source sites.js, line 65

Site Object Updated
Promise.<Site>