Incidents
Extends:
* → Incidents
Incidents Class - Provides access to the Mux Data Incidents API
Example:
const { Data } = new Mux(accessToken, secret);
// Returns a list of all open incidents
Data.Incidents.list({ status: 'open' });
Method Summary
Public Methods | ||
public |
Returns the details for a single incident |
|
public |
Returns a list of all open incidents |
|
public |
Returns all the incidents that seem related to a specific incident |
Public Methods
public get(incidentId: string): Promise source
Returns the details for a single incident
Params:
Name | Type | Attribute | Description |
incidentId | string | The ID for the incident |
Example:
const muxClient = new Mux(accessToken, secret);
const { Data } = muxClient;
//Returns the details for a single incident
Data.Incidents.get('ABCD1234');
Test:
public list(params: Object): Promise source
Returns a list of all open incidents
Params:
Name | Type | Attribute | Description |
params | Object |
|
example { status: 'open', severity: 'warning' } |
Example:
const { Data } = new Mux(accessToken, secret);
// Returns a list of all open incidents
Data.Incidents.list({ status: 'open' });
public related(incidentId: string, params: Object): Promise source
Returns all the incidents that seem related to a specific incident
Example:
const muxClient = new Mux(accessToken, secret);
const { Data } = muxClient;
//Returns all the incidents that seem related to a specific incident
Data.Incidents.related('ABCD1234');