Red Hat Training

A Red Hat training course is available for Red Hat JBoss Operations Network

1.5. http://localhost:7080/rest/event : Api that deals with Events (e.g snmp traps, log file lines)

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

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

Methods

  • GET /event/{id}/sources

    Description

    List the defined event sources for the resource
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path id of the resource true int all

    Return type: EventSourceRest (multi)

  • GET /event/{id}/definitions

    Description

    List the defined event source definitions for the resource
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path id of the resource true int all

    Return type: EventDefinitionRest (multi)

  • GET /event/source/{id}

    Description

    Retrieve the event source with the passed id
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the source to retrieve true int all

    Return type: EventSourceRest

    Error codes:
    CodeReason
    404 There is no event source with the passed id
  • POST /event/{id}/sources

    Description

    Add a new event source for a resource. This can e.g. be a different log file. The source name must match an existing definition for this resource. If an event source for the definition name and resource with the same location already exists, no new source is created. NOTE: An Event source added this way will not show up in the connection properties.
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path id of the resource true int all
    -body- The event source to be added. true EventSourceRest -all- -none-

    Return type: EventSourceRest

    Error codes:
    CodeReason
    404 Resource with the passed id does not exist
    404 Event definition with the passed name not found
    406 Tried to create an event source on the same definition with the same location
  • DELETE /event/source/{id}

    Description

    Delete the event source with the passed id

    Notes

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

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

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

    Error codes:
    CodeReason
    204 Source was deleted or did not exist with validation not set
    404 Source did not exist and validate was set
  • GET /event/source/{id}/events

    Description

    List the events for the event source with the passed id. If no time range is given, the last 200 entries will be displayed

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path none int -all- -none-
    startTime Query none long -all- -none-
    endTime Query none long -all- -none-
    severity Query Select the severity to display. Default is to show all false String DEBUG, INFO, WARN, ERROR, FATAL
    ps Query Page size for paging false int all 20
    page Query Page for paging, 0-based false Integer all

    Return type: EventRest (multi)

  • GET /event/{id}/events

    Description

    List the events for the resource with the passed id. If no time range is given, the last 200 entries will be displayed

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path none int -all- -none-
    startTime Query none long -all- -none-
    endTime Query none long -all- -none-
    ps Query Page size for paging false int all 20
    page Query Page for paging, 0-based false Integer all
    severity Query Select the severity to display. Default is to show all false String DEBUG, INFO, WARN, ERROR, FATAL

    Return type: EventRest (multi)

  • POST /event/source/{id}/events

    Description

    Submit multiple events for one given event source; the event source in the passed Events is ignored. Make sure your events are ordered by timestamp to get alerts fired correctly.
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the source to add data to true int all
    -body- A list of events to add. true List<EventRest> -all- -none-

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