# alertservice.query

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: filters

#### filters

Type: array Default: []

List of filters for query results. See API documentation for "Query Methods" for more guidance.

No Additional Items

##### Each item of this array must be:

Type: object
Examples:

    [
        [
            "name",
            "=",
            "bob"
        ]
    ]

    [
        [
            "OR",
            [
                [
                    "name",
                    "=",
                    "bob"
                ],
                [
                    "name",
                    "=",
                    "larry"
                ]
            ]
        ]
    ]

##### Parameter 2: options

#### options

Type: object
Default:
{ "extra": {}, "order_by": [], "select": [], "count": false, "get": false, "offset": 0, "limit": 0, "force_sql_filters": false }

Query options including pagination, ordering, and additional parameters.

No Additional Properties

##

#### Extra

Type: object Default: {}

Extra options are defined on a per-endpoint basis and are described in the documentation for the associated query method.

##

#### Order By

Type: array of string Default: []

An array of field names describing the manner in which query results should be ordered. The field names may also have one of more of the following special prefixes: `-` (reverse sort direction), `nulls_first:` (place any null values at the head of the results list), `nulls_last:` (place any null values at the tail of the results list).

No Additional Items

##### Each item of this array must be:

Type: string
Example:

    [
        "size",
        "-devname",
        "nulls_first:-expiretime"
    ]

##

#### Select

Type: array Default: []

An array of field names specifying the exact fields to include in the query return. The dot character `.` may be used to explicitly select only subkeys of the query result.

No Additional Items

##### Each item of this array must be:

## Any of

Type: string
Type: array
No Additional Items

##### Each item of this array must be:

Type: object
Example:

    [
        "username",
        "Authentication.status"
    ]

##

#### Count

Type: boolean Default: false

Return a numeric value representing the number of items that match the specified `query-filters`.

##

#### Get

Type: boolean Default: false

Return the JSON object of the first result matching the specified `query-filters`. The query fails if there specified `query-filters` return no results.

##

#### Offset

Type: integer Default: 0

This specifies the beginning offset of the results array. When combined with the `limit` query-option it may be used to implement pagination of large results arrays. WARNING: some query methods provide volatile results and the onus is on the developer to understand whether pagination is appropriate for a particular query API method.

##

#### Limit

Type: integer Default: 0

This specifies the maximum number of results matching the specified `query-filters` to return. When combined wtih the `offset` query-option it may be used to implement pagination of large results arrays.

WARNING: Some query methods provide volatile results and the onus is on the developer to understand whether pagination is appropriate for a particular query API method.

##

#### Force Sql Filters

Type: boolean Default: false

Force use of SQL for result filtering to reduce response time. May not work for all methods.

##

#### Result

## Any of

Type: array of object
No Additional Items

##### Each item of this array must be:

#### AlertServiceQueryResultItem

Type: object
No Additional Properties

##

#### Name

Type: string

Human-readable name for the alert service.

Must be at least `1` characters long

##

#### Attributes

Service-specific configuration attributes (credentials, endpoints, etc.).

## One of

#### AWSSNSServiceModel

Type: object
No Additional Properties

##

#### Type

Type: const

Alert service type identifier for Amazon SNS.

Specific value: `"AWSSNS"`

##

#### Region

Type: string

AWS region where the SNS topic is located.

Must be at least `1` characters long

##

#### Topic Arn

Type: string

Amazon Resource Name (ARN) of the SNS topic to publish alerts to.

Must be at least `1` characters long

##

#### Aws Access Key Id

Type: string

AWS access key ID for authentication.

Must be at least `1` characters long

##

#### Aws Secret Access Key

Type: string

AWS secret access key for authentication.

Must be at least `1` characters long

#### InfluxDBServiceModel

Type: object
No Additional Properties

##

#### Type

Type: const

Alert service type identifier for InfluxDB.

Specific value: `"InfluxDB"`

##

#### Host

Type: string

InfluxDB server hostname or IP address.

Must be at least `1` characters long

##

#### Username

Type: string

Username for InfluxDB authentication.

Must be at least `1` characters long

##

#### Password

Type: string

Password for InfluxDB authentication.

Must be at least `1` characters long

##

#### Database

Type: string

InfluxDB database name to store alert data.

Must be at least `1` characters long

##

#### Series Name

Type: string

Name of the time series to store alert events.

Must be at least `1` characters long

#### MailServiceModel

Type: object
No Additional Properties

##

#### Type

Type: const

Alert service type identifier for email notifications.

Specific value: `"Mail"`

##

#### Email

Type: string Default: ""

Email address to send alerts to. Empty string uses system default.

#### MattermostServiceModel

Type: object
No Additional Properties

##

#### Type

Type: const

Alert service type identifier for Mattermost.

Specific value: `"Mattermost"`

##

#### Url

Type: stringFormat: uri

Mattermost webhook URL for posting alerts.

Must be at least `1` characters long

Must be at most `2083` characters long

##

#### Username

Type: string

Username to display when posting alerts to Mattermost.

Must be at least `1` characters long

##

#### Channel

Type: string Default: ""

Mattermost channel name to post alerts to. Empty string uses webhook default.

##

#### Icon Url

Default: ""

URL of icon image to display with alert messages. Empty string uses default.

## Any of

Type: const
Specific value: `""`
Type: stringFormat: uri

Must be at least `1` characters long

Must be at most `2083` characters long

#### OpsGenieServiceModel

Type: object
No Additional Properties

##

#### Type

Type: const

Alert service type identifier for OpsGenie.

Specific value: `"OpsGenie"`

##

#### Api Key

Type: string

OpsGenie API key for authentication.

Must be at least `1` characters long

##

#### Api Url

Default: ""

OpsGenie API URL. Empty string uses default OpsGenie endpoint.

## Any of

Type: const
Specific value: `""`
Type: stringFormat: uri

Must be at least `1` characters long

Must be at most `2083` characters long

#### PagerDutyServiceModel

Type: object
No Additional Properties

##

#### Type

Type: const

Alert service type identifier for PagerDuty.

Specific value: `"PagerDuty"`

##

#### Service Key

Type: string

PagerDuty service integration key for sending alerts.

Must be at least `1` characters long

##

#### Client Name

Type: string

Client name to identify the source of alerts in PagerDuty.

Must be at least `1` characters long

#### SlackServiceModel

Type: object
No Additional Properties

##

#### Type

Type: const

Alert service type identifier for Slack.

Specific value: `"Slack"`

##

#### Url

Type: stringFormat: uri

Slack webhook URL for posting alert messages.

Must be at least `1` characters long

Must be at most `2083` characters long

#### SNMPTrapServiceModel

Type: object
No Additional Properties

##

#### Type

Type: const

Alert service type identifier for SNMP traps.

Specific value: `"SNMPTrap"`

##

#### Host

Type: string

SNMP trap receiver hostname or IP address.

##

#### Port

Type: integer

TCP port number for SNMP trap receiver.

Value must be greater or equal to `1` and lesser or equal to `65535`

##

#### V3

Type: boolean

Whether to use SNMP v3 instead of v1/v2c.

##

#### Community

Default: null

SNMP community string for v1/v2c authentication or `null` for v3.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### V3 Username

Default: null

SNMP v3 username for authentication or `null` for v1/v2c.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### V3 Authkey

Default: null

SNMP v3 authentication key or `null` if not using authentication.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### V3 Privkey

Default: null

SNMP v3 privacy key for encryption or `null` if not using privacy.

## Any of

Type: string

Must be at least `1` characters long

Type: null

##

#### V3 Authprotocol

Type: enum (of null or string) Default: null

SNMP v3 authentication protocol or `null` for no authentication.

##### Must be one of:

- null
- "MD5"
- "SHA"
- "128SHA224"
- "192SHA256"
- "256SHA384"
- "384SHA512"

##

#### V3 Privprotocol

Type: enum (of null or string) Default: null

SNMP v3 privacy protocol for encryption or `null` for no privacy.

##### Must be one of:

- null
- "DES"
- "3DESEDE"
- "AESCFB128"
- "AESCFB192"
- "AESCFB256"
- "AESBLUMENTHALCFB192"
- "AESBLUMENTHALCFB256"

#### TelegramServiceModel

Type: object
No Additional Properties

##

#### Type

Type: const

Alert service type identifier for Telegram.

Specific value: `"Telegram"`

##

#### Bot Token

Type: string

Telegram bot token for API authentication.

Must be at least `1` characters long

##

#### Chat Ids

Type: array of integer

List of Telegram chat IDs to send alerts to (minimum 1 required).

Must contain a minimum of `1` items

No Additional Items

##### Each item of this array must be:

Type: integer

#### VictorOpsServiceModel

Type: object
No Additional Properties

##

#### Type

Type: const

Alert service type identifier for VictorOps (now Splunk On-Call).

Specific value: `"VictorOps"`

##

#### Api Key

Type: string

VictorOps API key for authentication.

Must be at least `1` characters long

##

#### Routing Key

Type: string

VictorOps routing key to determine alert destination and escalation policy.

Must be at least `1` characters long

##

#### Level

Type: enum (of string)

Minimum alert severity level that triggers notifications through this service.

##### Must be one of:

- "INFO"
- "NOTICE"
- "WARNING"
- "ERROR"
- "CRITICAL"
- "ALERT"
- "EMERGENCY"

##

#### Enabled

Type: boolean

Whether the alert service is active and will send notifications.

##

#### Id

Type: integer

Unique identifier for the alert service.

##

#### Type Title

Type: string

Human-readable title for the alert service type.

#### AlertServiceQueryResultItem

Type: object
No Additional Properties

##

#### Name

Type: string

Human-readable name for the alert service.

Must be at least `1` characters long

##

#### Attributes

Service-specific configuration attributes (credentials, endpoints, etc.).

## One of

Type: object
Type: object
Type: object
Type: object
Type: object
Type: object
Type: object
Type: object
Type: object
Type: object

##

#### Level

Type: enum (of string)

Minimum alert severity level that triggers notifications through this service.

##### Must be one of:

- "INFO"
- "NOTICE"
- "WARNING"
- "ERROR"
- "CRITICAL"
- "ALERT"
- "EMERGENCY"

##

#### Enabled

Type: boolean

Whether the alert service is active and will send notifications.

##

#### Id

Type: integer

Unique identifier for the alert service.

##

#### Type Title

Type: string

Human-readable title for the alert service type.

Type: integer

Required roles: ALERT_READ