createTeam
A Graze API POST request that creates a new team.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint createTeam
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| String | Yes | New team name. Must be unique. |
| String | No | An SQL-like filter that alerts must match to be assigned to the team. See Filter Search Data for more information on creating SQL-like filters. |
| Array of Strings or Numbers | No | List of the team service names or IDs. |
| String | No | An SQL-like filter that Situations must match to be assigned to the team. See Filter Search Data for more information on creating SQL-like filters. |
| String | No | Team default landing page. |
| Boolean | No | False if the team is inactive, true if the team is active. Default is |
| String | No | Team description. |
| Array of Numbers or Strings | No | Team users (either IDs or usernames). |
Response
Endpoint createTeam
returns the following response:
Successful requests return a JSON object containing the following:
Name | Type | Description |
---|---|---|
| Number | ID of the new team. |
Examples
The following examples demonstrate typical use of endpoint createTeam
:
Request example
Example cURL request to create a team called "my team name" consisting of user1, user2, and user3:
curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/createTeam" -H "Content-Type: application/json; charset=UTF-8" -d '{"name" : "my team name 1", "alert_filter" : "manager = \"my_manager\" and (class = \"my_class_12345\" or external_id = \"my_ext_12345\")", "services" : ["Identity Management","Yellow Pages"], "sig_filter" : "description = \"my_description_12345\" or queue = 50", "landing_page" : {"type":"situations","id":"open"}, "active" : true, "description" : "The team description 12345", "users" : ["user1","user2","user3"]}'
Response example
Example response returning the ID of the created team:
{"team_id":16}