Skip to main content

setSituationPrimaryTeam

A Graze API POST request that sets one of the teams already assigned to a Situation as the primary team.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint setSituationPrimaryTeam takes the following request arguments:

Name

Type

Required

Description

auth_token

String

Yes

A valid auth_token returned from the authenticate request. Alternatively, basic authenticate headers can be used in place of this parameter. See the authenticate endpoint for more information and usage examples.

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

Endpoint setSituationPrimaryTeam returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

sitn_id

Number

ID of the Situation.

primary_team_id

Number

ID of the primary team.

primary_team_name

String

Name of the primary team.

API update behavior

The behavior of this endpoint 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 endpoint updates the alert or Situation as follows:

See API Update Behavior for more information on Situation statuses.

Examples

The following examples demonstrate typical use of endpoint setSituationPrimaryTeam:

Request example

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

curl -X POST -u graze:graze -k "https://localhost/graze/v1/setSituationPrimaryTeam" -H "Content-Type: application/json; charset=UTF-8" --data '{
    "sitn_id" : 1906,
    "team_name" : "Database Management System"
}'

Response example

Example response returning that team "Database Management System" is the primary team on Situation 1906:

{
    "sitn_id": 1906,
    "primary_team_id": 12,
    "primary_team_name": "Database Management System"
}