getTeamsForService
A MoogDb v2 method that returns details of all teams related to a service.
Back to MoogDb V2 API Method Reference.
Request arguments
Method getTeamsForService
takes the following request arguments:
Name |
Type |
Required |
Description |
---|---|---|---|
|
String |
No, if you specify |
ID of the service. |
|
String |
No, if you specify |
Name of the service. |
Response
Method getTeamsForService
returns the following response:
Type |
Description |
---|---|
JSON |
A JSON object containing information about all teams related to the specified services in Moogsoft AIOps. |
Examples
The following examples demonstrate typical use of method getTeamsForService
:
Request example
Example request to return all teams related to service ID 1:
var response = moogdb.getTeamsForService(1);
Response example
Example response returning details of the teams related to the service:
[{ "room_id": 2, "alert_filter": "{\"left\":{\"column\":\"severity\",\"op\":0,\"value\":0,\"type\":\"LEAF\"},\"oper\":\"AND\",\"right\":{\"column\":\"severity\",\"op\":0,\"value\":1,\"type\":\"LEAF\"},\"type\":\"BRANCH\"}", "user_ids": [5,6], "sig_filter": "{\"left\":{\"column\":\"internal_priority\",\"op\":0,\"value\":0,\"type\":\"LEAF\"},\"oper\":\"AND\",\"right\":{\"column\":\"internal_priority\",\"op\":0,\"value\":1,\"type\":\"LEAF\"},\"type\":\"BRANCH\"}", "landing_page": "", "description": "Team based in Kingston", "active": true, "team_id": 2, "services": ["Kingston::AD::Server","Kingston::Application::Server"], "users": ["AllieAdams1","JennyGray2","LucyCurtis3"], "deleted": false, "name": "Team Kingston", "service_ids": [1,2,3,] }]