Skip to main content

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

auth_token

String

Yes

A valid auth_token returned from the authenticate request. Alternatively, basic authenticate headers can be used in place of this parameter. See the authenticate endpoint for more information and usage examples.

service_id

String

No, if you specify name.

ID of the service.

name

String

No, if you specify service_id.

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": "((severity = 0) OR (severity = 1)) AND (agent_location = \"Test\")",
        "user_ids": [3],
        "sig_filter": "((internal_priority = 0) AND (internal_priority = 1)) OR (description = \"Test\")",
        "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"]
    }
]