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

auth_token

String

Yes

A valid auth_token returned from the authenticate request. See the authenticate endpoint for more information.

name

String

Yes

New team name. Must be unique.

alert_filter

String

No

An SQL-like or JSON filter that alerts must match to be assigned to the team.

See Filter Search Data for more information on creating SQL-like filters.

services

Array of Strings or Numbers

No

List of the team service names or IDs.

sig_filter

String

No

An SQL-like or JSON filter that Situations must match to be assigned to the team.

See Filter Search Data for more information on creating SQL-like filters.

landing_page

String

No

Default landing page for the team.

active

Boolean

No

Set to true if the team is active; set to false if the team is inactive. Default is true.

description

String

No

Team description.

users

Array of Numbers or Strings

No

List of users in the team, either usernames or IDs.

Response

Endpoint createTeam returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

team_id

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}