Search

1.2. http://localhost:7080/rest/alert : Deal with Alerts

download PDF

This api deals with alerts that have fired.

Defining class: org.rhq.enterprise.server.rest.AlertHandlerBean

Produces: application/json, application/xml, text/html, application/vnd.rhq.wrapped+json

Methods

  • GET /alert

    Description

    List all alerts, possibly limiting by resource or alert definition, priority and start time

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    page Query Page number false int all 0
    size Query Page size; use -1 for 'unlimited' false int all 100
    prio Query Limit to priority false String High, Medium, Low, All All
    slim Query Should full resources and definitions be sent false boolean all false
    since Query If non-null only send alerts that have fired after this time, time is millisecond since epoch false Long all
    resourceId Query Id of a resource to limit search for false Integer all
    definitionId Query If of an alert definition to search for false Integer all
    unacknowledgedOnly Query Should only unacknowledged alerts be sent false boolean all false

    Return type: List<AlertRest> (multi)

    Error codes:
    CodeReason
    406 There are 'resourceId' and 'definitionId' passed as query parameters
    406 Page size was 0
    406 Page number was < 0
  • GET /alert/count

    Description

    Return a count of alerts in the system depending on criteria
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    since Query If non-null only send alerts that have fired after this time, time is millisecond since epoch false Long all

    Return type: IntegerValue

  • GET /alert/{id}

    Description

    Get one alert with the passed id
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the alert to retrieve true int all
    slim Query Should full resources and definitions be sent false boolean all false

    Return type: AlertRest

  • GET /alert/{id}/conditions

    Description

    Return the condition logs for the given alert
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the alert to retrieve true int all

    Return type: javax.ws.rs.core.Response

  • GET /alert/{id}/notifications

    Description

    Return the notification logs for the given alert
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the alert to retrieve true int all

    Return type: javax.ws.rs.core.Response

  • PUT /alert/{id}

    Description

    Mark the alert as acknowledged (by the caller)

    Notes

    Returns a slim version of the alert

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the alert to acknowledge true int all

    Return type: AlertRest

  • DELETE /alert/{id}

    Description

    Remove the alert from the list of alerts

    Notes

    This operation is by default idempotent, returning 204.If you want to check if the alert existed at all, you need to pass the 'validate' query parameter.

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the alert to remove true int all
    validate Query Validate if the alert exists false boolean all false

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    204 Alert was deleted or did not exist with validation not set
    404 Alert did not exist and validate was set
  • GET /alert/{id}/definition

    Description

    Get the alert definition (basics) for the alert
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the alert to show the definition true int all

    Return type: AlertDefinitionRest

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.