Moogsoft Docs

getSituationPrimaryTeam

A MoogDb v2 method that returns the primary team assigned to a Situation.

Request arguments

Method getSituationPrimaryTeam takes no request arguments.

Name

Type

Required

Description

sitn_id

Number

Yes

ID of the Situation you want to return the primary team for.

Response

Method getSituationPrimaryTeam returns the following response:

Type

Description

Object

A Javascript object containing the Situation ID and the primary team ID.

API behavior in active and historic databases

The behavior of this method depends on whether the relevant alert or Situation is open, closed and still in the active database, or closed and archived to the historic database. This method updates or returns information about the alert or Situation as follows:

See API Update Behavior for more information on Situation statuses.

Examples

The following examples demonstrate typical use of method getSituationPrimaryTeam:

Request example

Example request to return the primary team for Situation 1906:

var actions = moogdb.getSituationPrimaryTeam(1906);

Response examples

Example response returning that team 36 is the primary team for Situation 1906:

{
    "primary_team_name": "Infrastructure",
    "sitn_id":1906,
    "primary_team_id":36
}

Example response returning that Situation 1906 does not have a primary team assigned to it:

{
    "sitn_id":1906,
}