Members
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 |
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. |
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. |
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
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. |
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 |
# 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 |
Site Object Updated
Promise.<Site>