Query Alert Groups Using POST

Query Alert Groups Using POST

Example: POST /api/alerts/group/{groupingCondition}/query

Request
URI
POST
https://{api_host}/api/alerts/group/{groupingCondition}/query
COPY
Path Parameters
string
groupingCondition
Required

The condition to be used for grouping

Possible values are : GROUP_BY_ALERT_DEFINITION, GROUP_BY_RESOURCE_KIND, GROUP_BY_CRITICALITY, GROUP_BY_TIME, GROUP_BY_SCOPE,
Query Parameters
string
adapterKind
Optional

Adapter kind to be used for grouping alerts by SCOPE

integer
page
Optional

Page number from which data needs to be displayed (0-based)

integer
pageSize
Optional

Expected number of entries per page

string
resourceKind
Optional

Resource kind to be used for grouping alerts by SCOPE

string
resourceNameFilter
Optional

Filter based on alert resource name (Used only in SCOPE flow)


Request Body

The alertQuery criteria

alert-query of type(s) application/json
Required
{
    "activeOnly": false,
    "alertControlState": [
        "string"
    ],
    "alertCriticality": [
        "string"
    ],
    "alertDefinitionId": [
        "string"
    ],
    "alertId": [
        "string"
    ],
    "alertImpact": [
        "string"
    ],
    "alertName": "string",
    "alertStatus": [
        "string"
    ],
    "alertTypeSubtype": [
        {
            "subtypeIds": [
                0
            ],
            "typeId": 0
        }
    ],
    "cancelTimeRange": {
        "endTime": 0,
        "startTime": 0
    },
    "compositeOperator": "string",
    "extractOwnerName": false,
    "groupId": "string",
    "groupingCondition": "string",
    "includeChildrenResources": false,
    "resource-query": {
        "adapterInstanceId": [
            "string"
        ],
        "adapterKind": [
            "string"
        ],
        "collectorId": [
            0
        ],
        "collectorName": [
            "string"
        ],
        "credentialId": [
            "string"
        ],
        "includeRelated": "string",
        "maintenanceScheduleId": [
            "string"
        ],
        "name": [
            "string"
        ],
        "parentId": [
            "string"
        ],
        "propertyConditions": {
            "conditions": [
                {
                    "doubleValue": "number",
                    "key": "string",
                    "operator": "string",
                    "stringValue": "string"
                }
            ],
            "conjunctionOperator": "string"
        },
        "propertyName": "string",
        "propertyValue": "string",
        "recentlyAdded": 0,
        "regex": [
            "string"
        ],
        "resourceHealth": [
            "string"
        ],
        "resourceId": [
            "string"
        ],
        "resourceKind": [
            "string"
        ],
        "resourceState": [
            "string"
        ],
        "resourceStatus": [
            "string"
        ],
        "resourceTag": [
            {
                "category": "string",
                "name": "string"
            }
        ],
        "statConditions": {
            "conditions": [
                {
                    "doubleValue": "number",
                    "key": "string",
                    "operator": "string",
                    "stringValue": "string"
                }
            ],
            "conjunctionOperator": "string"
        },
        "statKey": "string",
        "statKeyInclusive": false,
        "statKeyLowerBound": "number",
        "statKeyUpperBound": "number"
    },
    "resourceKind": "string",
    "startTimeRange": {
        "endTime": 0,
        "startTime": 0
    },
    "updateTimeRange": {
        "endTime": 0,
        "startTime": 0
    },
    "userId": "string",
    "userName": "string"
}
boolean
activeOnly
Optional

Filter to return only Active alerts, if true, the query will exclude Suspended and Cancelled Alerts

array of string
alertControlState
Optional

Filter based on the Alert Control State

Possible values are : OPEN, ASSIGNED, SUSPENDED, SUPPRESSED,
array of string
alertCriticality
Optional

Filter based on Alert Criticality

Possible values are : UNKNOWN, NONE, INFORMATION, WARNING, IMMEDIATE, CRITICAL, AUTO,
array of string
alertDefinitionId
Optional

Filter based on the Alert definition id

array of string
alertId
Optional

Filter based on Alert identifiers

array of string
alertImpact
Optional

Filter based on the Alert Impact

string
alertName
Optional

Filter based on Alert name using 'contains' logic

array of string
alertStatus
Optional

Filter based on the Alert Status. If looking for only active alerts combined with other filter criteria then use the activeOnly property instead.

Possible values are : NEW, ACTIVE, UPDATED, CANCELED,
alertTypeSubtype
Optional

Filter based on Alert Type

cancelTimeRange
Optional

cancelTimeRange

string
compositeOperator
Optional

Indicates the composition of the filtering criteria. Either all of the filtering criteria apply together (AND operation) or any of the filtering criteria could be applied (OR operation) Defaults to AND. Note: backend only supports AND currently

Possible values are : AND, OR,
boolean
extractOwnerName
Optional

Indicates whether need to report alert owner's name in addition to owner's id

string
groupId
Optional

Filter based on alert group id

string
groupingCondition
Optional

Condition that should be used for grouping

Possible values are : GROUP_BY_ALERT_DEFINITION, GROUP_BY_RESOURCE_KIND, GROUP_BY_CRITICALITY, GROUP_BY_TIME, GROUP_BY_SCOPE,
boolean
includeChildrenResources
Optional

True to include alerts generated by child resources

resource-query
Optional

Object used to lookup resources with various filtering criteria

string
resourceKind
Optional

Filter based on resource kind using 'contains' logic

startTimeRange
Optional

startTimeRange

updateTimeRange
Optional

updateTimeRange

string
userId
Optional

Filter based on user id

string
userName
Optional

Filter based on user name using 'contains' logic

Authentication
This operation uses the following authentication methods.
Responses
200

AlertGroups of alerts matching the specified Query Spec and grouped using specified grouping-condition(Collection can be empty)

Returns alert-groups of type(s) application/json
{
    "alertGroups": [
        {
            "alertCount": 0,
            "extension": {
                "anyObjects": [
                    {}
                ]
            },
            "groupId": "string",
            "groupName": "string",
            "links": [
                {
                    "description": "string",
                    "href": "string",
                    "name": "string",
                    "rel": "string"
                }
            ],
            "maxCriticalityLevel": 0
        }
    ],
    "links": [
        {
            "description": "string",
            "href": "string",
            "name": "string",
            "rel": "string"
        }
    ],
    "pageInfo": {
        "page": 0,
        "pageSize": 0,
        "sortBy": "string",
        "sortOrder": "string",
        "totalCount": 0
    }
}
alertGroups
Optional

List of alert groups

array of link
links
Optional

Collection of links

pageInfo
Optional

Represents page information for a paged result


500

Error occurred while retrieving the AlertGroups

Operation doesn't return any data structure