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 |
---|---|---|---|
| String | Yes | A valid |
| Number | Yes | ID of the Situation. |
| Number | No, if you specify | ID of the team that you want to make the primary team. |
| String | No, if you specify | 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 |
---|---|---|
| Number | ID of the Situation. |
| Number | ID of the primary team. |
| 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" }