getTeamsForService
A Graze API GET request to return all teams related to a service with the specified ID or name.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint getTeamsForService
takes the following request arguments:
Name |
Type |
Required |
Description |
---|---|---|---|
|
String |
Yes |
A valid |
|
String |
No, if you specify |
ID of the service. |
|
String |
No, if you specify |
Name of the service. |
Response
Endpoint getTeamsForService
returns the following response:
Successful requests return an array of JSON objects containing the following:
Type |
Description |
---|---|
JSON Object |
A JSON object containing details of each team related to the specified service. |
Examples
The following examples demonstrate typical use of endpoint getTeamsForService
:
Request examples
Example cURL requests to return the teams related to service ID 1:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getTeamsForService?service_id=1"
Example cURL requests to return the teams related to service "web":
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getTeamsForService?service_name=web"
Response example
Example response returning details of a team related to service "web":
[ { "room_id": 1, "alert_filter": "{\"left\":{\"column\":\"description\",\"op\":0,\"value\":\"Test\",\"type\":\"LEAF\"},\"oper\":\"AND\",\"right\":{\"left\":{\"column\":\"severity\",\"op\":0,\"value\":0,\"type\":\"LEAF\"},\"oper\":\"OR\",\"right\":{\"column\":\"severity\",\"op\":0,\"value\":1,\"type\":\"LEAF\"},\"type\":\"BRANCH\"},\"type\":\"BRANCH\"}", "user_ids": [3], "sig_filter": "{\"left\":{\"left\":{\"column\":\"internal_priority\",\"op\":0,\"value\":0,\"type\":\"LEAF\"},\"oper\":\"AND\",\"right\":{\"column\":\"internal_priority\",\"op\":0,\"value\":1,\"type\":\"LEAF\"},\"type\":\"BRANCH\"},\"oper\":\"OR\",\"right\":{\"column\":\"primary_teams\",\"op\":0,\"value\":[1],\"type\":\"LEAF\"},\"type\":\"BRANCH\"}", "name": "Cloud DevOps", "landing_page": "", "description": "Example Team", "active": true, "service_ids": [1,2,3,4], "team_id": 1, "services": ["Commerce","Compute","CRM","Database"], "users": ["admin"] } ]