Skip to main content

setSituationPrimaryTeam

A MoogDb v2 method that sets one of the teams already assigned to a Situation as the primary team.

Request arguments

Method setSituationPrimaryTeam takes the following request arguments:

Name

Type

Required

Description

sitn_id

Number

Yes

ID of the Situation.

team_id

Number

No, if you specify team_name.

ID of the team that you want to make the primary team.

team_name

String

No, if you specify team_id.

Name of the team that you want to make the primary team.

Response

Method setSituationPrimaryTeam returns the following response:

Type

Description

Object

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

API update behavior

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 setSituationPrimaryTeam:

Request example

Example request to set the team "Database Management System" as the primary team on Situation 1906:

var actions = moogdb.setSituationPrimaryTeam(1906, 12);

Response example

Example response returning that team 12 is the primary team on Situation 1906:

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