Moogsoft Docs

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

Yes

Team alerts filter. Either a SQL like filter or an JSON representation of the filter.

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

services

Array of Strings or Numbers

Yes

List of the team services or IDs.

sig_filter

String

Yes

Situation filters. Either a SQL-like filter or a JSON representation of the filter.

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

landing_page

String

Yes

Team default landing page.

active

Boolean

Yes

False if the team is inactive, true if the team is active. Default is true.

description

String

Yes

Team description.

users

Array of Numbers or Strings

Yes

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

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}