Module

shifts

Members

# inner constant fields

The key values from the object that can be synchronized.

View Source shifts.js, line 262

Methods

# async inner addMember(env, member, shiftId, groupId) → {Promise.<ShiftMember>}

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
member ShiftMember https://help.xmatters.com/xmapi/index.html#shift-member-object
shiftId string The unique identifier (id) or name (name) of the shift to delete.

Examples:
- Morning - b2341d69-8b83-4660-b8c8-f2e728f675f9
groupId string The unique identifier (id) or name (name) of the group that contains the shift.

Examples:
- Database - a5341d69-8b83-4660-b8c8-f2e728f675f9

View Source shifts.js, line 142

ShiftMember Object Created
Promise.<ShiftMember>

# async inner create(env, shift, groupId) → {Promise.<Shift>}

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
shift Shift https://help.xmatters.com/xmapi/index.html#shift-object
groupId string The unique identifier (id) or name (name) of the group that contains the shift.

Examples:
- Database - a5341d69-8b83-4660-b8c8-f2e728f675f9

View Source shifts.js, line 81

Shift Object Created
Promise.<Shift>

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

View Source shifts.js, line 158

Promise

# async inner get(env, shiftId, query, groupId) → {Promise.<Shift>}

Parameters:
Name Type Description
env module:environments.xMattersEnvironment The xmtoolbox representation of an xMatters instance.
shiftId string The unique identifier (id) of the shift to update.

Examples:
- b2341d69-8b83-4660-b8c8-f2e728f675f9
query Object A json object representing the query string parameters for this request.
groupId string The unique identifier (id) or name (name) of the group that contains the shift.

Examples:
- Database
- a5341d69-8b83-4660-b8c8-f2e728f675f9

View Source shifts.js, line 26

Shift Object Requested
Promise.<Shift>

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

Get all shifts in a group from xMatters matching the query. Please refer to the link below for the available query parameters.

https://help.xmatters.com/xmapi/index.html#get-shifts-in-a-group
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.
groupId string The unique identifier (id) or name (name) of the group that contains the shift.

Examples:
- Database
- a5341d69-8b83-4660-b8c8-f2e728f675f9

View Source shifts.js, line 43

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

# async inner getMembers(env, query, shiftId, groupId) → {Promise.<Shift>}

Get all shift members in a shift from xMatters matching the query. Please refer to the link below for the available query parameters.

https://help.xmatters.com/xmapi/index.html#get-shifts-in-a-group
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.
shiftId string The unique identifier (id) or name of the of the shift.

Examples:
- b2341d69-8b83-4660-b8c8-f2e728f675f9
- Morning
groupId string The unique identifier (id) or name (name) of the group that contains the shift.

Examples:
- Database
- a5341d69-8b83-4660-b8c8-f2e728f675f9

View Source shifts.js, line 64

Shift Object Requested
Promise.<Shift>

# async inner sync(destination, sourceShifts, destinationShifts, 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.
sourceShifts Array.<Shift> An array of the shift objects to synchronize from the source data.
destinationShifts Array.<Shift> An array of the shift objects to synchronize from the destination data.
options Object

View Source shifts.js, line 283

# async inner update(env, shift, shiftId, groupId) → {Promise.<Shift>}

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

Examples:
- b2341d69-8b83-4660-b8c8-f2e728f675f9
groupId string The unique identifier (id) or name (name) of the group that contains the shift.

Examples:
- Database - a5341d69-8b83-4660-b8c8-f2e728f675f9

View Source shifts.js, line 101

Shift Object Updated
Promise.<Shift>