createTeam
A MoogDb v2 method that creates a new team, by passing an object containing team information.
Back to MoogDb V2 API Method Reference.
Request arguments
Method createTeam
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| Object | Yes | An object containing the following parameters. |
| String | Yes | New team name. Must be unique. |
| String | No | Team alerts filter. An SQL-like filter or a JSON representation of the filter. |
| String | No | Situation filter. An SQL-like filter or a JSON representation of the filter. |
| Boolean | No | Set to |
| Array of Numbers or Strings | No | List of the team service names or IDs. |
| Array of Numbers or Strings | No | Users in the team, either usernames or IDs. |
| String | No | Team description. |
| String | No | Default landing page for the team. |
Response
Method createTeam
returns the following response:
Type | Description |
---|---|
| ID of the new team, or null if an error occurred. |
Examples
The following examples demonstrate typical use of method createTeam
:
Request example
Example request to create a team "MyTeam":
{ "name": "myTeam", "alert_filter": "{ \"column\": \"count\", \"op\": 1, \"value\": 1, \"type\": \"LEAF\" }", "sig_filter": "{ \"column\": \"severity\", \"op\": 1, \"value\": 5, \"type\": \"LEAF\" }", "active": true, "services": [1, 2, 4], "users": ["user1", "user4"], "description": "myDescription", "landing_page": "" }
Response example
Example response returning the new team ID:
46