Search Alerts
Filter and Search alerts of the tenant.
Query String example usage
queryString
is Query Parameter creates simple and complex filters- Basic filtering with no page limits. eg Filter all Critical Alerts
{base-url}/api/v2/tenants/<tenantId>/sites/search?queryString=states:CRITICAL,WARNING
- Filtering with page limits . eg Get 500 Suppressed alerts in the first page
{base-url}/api/v2/tenants/<tenantId>/alerts/search?pageSize=500&pageNo=1&sortName=id&isDescendingOrder=false&queryString=actions:SUPPRESSED
- Filtering with multiple conditions . eg Get 500 Ticketed alerts in the first page occured in between these dates in descending order
{base-url}/api/v2/tenants/<tenantId>/alerts/search?pageSize=500&pageNo=1&sortName=id&isDescendingOrder=false&queryString=actions:TICKETED%2BstartDate:2016-02-24T09:19:47%200000%2BendDate:2016-02-26T10:20:47%200000
- Incorrect usage of queryString
<base-url>/api/v2/tenants/<tenantId>/alerts/search?pageSize=500&pageNo=1&sortName=id&isDescendingOrder=false&queryString=ticketed:True
ticketed
is avalue
here not anquery parameter attribute
, hence query fails- If the resultset has all the values irrespective of query, this would mean
failed query
like above example
Path Parameters
- tenantId
Describes the clientId or mspId of the tenant
Query Parameters
- pageNo
Current pagination number
- pageSize
No of records in each page
- isDescendingOrder
Pagination data ordering: true for descending false for ascending
- sortName
Field name on which paginated data is ordered
- Enum:
- idtsstartaltimec_namep_namesourcertypername
- queryString
Generic query string to be prepared using below query parameters See "api-overview"
- viewID
- statusHistory
- states
Current state of the alert
- Enum:
- OkWarningCriticalInfo
- startDate
Filter the alert with alert base. startDate denotes the from date. Example: 2016-02-24T09:19:47 0000 (GMT)
- endDate
endDate denotes to date. Example: 2016-02-26T10:20:47 0000 (GMT)
- uniqueId
uuid of the alert.
- deviceStatus
Status of the device
- Enum:
- manageunmanage
- resourceType
Type of resource. Example:LOAD_BALANCER, SQS, EBS, DEVICE, SNS, REDSHIFT, SERVICE
- resourceIds
ID of a resource. Example: DEV0000015754,148e892d-84ce-496c-a123-f91e1a8a3f7d.
- actions
Actions performed on the alert. Example: ACKNOWLEDGED, TICKETED.
- Enum:
- ACKNOWLEDGEDTICKETEDCLOSEDIGNORESUPPRESSEDOPENPURGEDCORRELATED
- alertTypes
Types of alerts
- Enum:
- MonitoringMaintenanceApplianceAgentScheduled MaintenanceObsoleteIntegration Failure
- metrics
Metric type of the alert. Example: PING, SNMP Response.
- duration
Duration of alert. Duration is represented in Number of Days Example: 1, 7.
- alertTimeBase
Search for the alert based on the updated or created time of an alert. Example: updated.
- Enum:
- updatedcreated
- clientIds
ID of clients. Example: client_1, client_2,526674ad-be06-4bdc-9634-e3b8c78b906e. Separate the IDs with a comma.
- ticketId
ID of the ticket to which the alert is attached. Example: INC0000000001
- apps
Apps from which the alert is generated. Example: Email, Nagios
Responses
- results
- totalResults
- orderBy
- pageNo
- pageSize
- totalPages
- nextPage
- previousPageNo
- descendingOrder