Moogsoft Docs

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

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

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,
      7,
      8,
      9
    ],
    "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 ",
      "Kingston::Catalog::Server ",
      "Kingston::Communications::Server ",
      "Kingston::Computing::Server ",
      "Kingston::Database::Server ",
      "Kingston::Fax::Server ",
      "Kingston::File::Server ",
      "Kingston::Game::Server ",
      "Kingston::Mail::Server ",
      "Kingston::Media::Server ",
      "Kingston::Print::Server ",
      "Kingston::Proxy::Server ",
      "Kingston::Sound::Server ",
      "Kingston::Virtual::Server "
    ],
    "users": [
      "AllieAdams1",
      "JennyGray2",
      "LucyCurtis3",
      "AvaFletcher4",
      "NicoleBishop5"
    ],
    "deleted": false,
    "name": "Team Kingston",
    "service_ids": [
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8,
      9,
      10,
      11,
      12,
      13,
      14,
      15
    ]
  }
]