Moogsoft Docs

getTeamsForService

A Graze API GET request to return all teams related to the 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. See the authenticate endpoint for more information.

service_id

String

No, if name is used.

ID of the service.

name

String

No, if service_id is used.

Name of the service.

Response

Endpoint getTeamsForService returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

JSON Object

JSON

Details of the teams 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 team and service details:

[
    {
        "room_id": 1,
        "alert_filter": "",
        "user_ids": [
            3
        ],
        "sig_filter": "",
        "name": "Cloud DevOps",
        "landing_page": "",
        "description": "Example Team",
        "active": true,
        "service_ids": [
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11
        ],
        "team_id": 1,
        "services": [
            "Commerce",
            "Compute",
            "CRM",
            "Database",
            "Mobile",
            "Networking",
            "Remote",
            "Social",
            "Storage",
            "Switch",
            "Web"
        ],
        "users": [
            "admin"
        ]
    }
]