Interface EventApi
-
public interface EventApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description retrofit2.Call<EventRestEntry>
getEventById(String eventId)
Delivers a single Event by its IDretrofit2.Call<EventStoreResult>
postNaturalEvent(EventPushMessage body)
Pushes custom events to one or more monitored entities.retrofit2.Call<EventQueryResult>
queryEvents(Long from, Long to, String relativeTime, String eventType, String entityId, String cursor)
Delivers a collection of events that fit the given filters As the number of uncorrelated events in an environment can be huge, this REST endpoint is limited to a maximum of 150 single events per request.
-
-
-
Method Detail
-
getEventById
@GET("events/{eventId}") retrofit2.Call<EventRestEntry> getEventById(@Path("eventId") String eventId)
Delivers a single Event by its ID- Parameters:
eventId
- Unique environment identifier for a specific event (required)- Returns:
- Call<EventRestEntry>
-
postNaturalEvent
@Headers("Content-Type:application/json") @POST("events") retrofit2.Call<EventStoreResult> postNaturalEvent(@Body EventPushMessage body)
Pushes custom events to one or more monitored entities. The events REST endpoint enables 3rd party integrations to push custom events to one or more monitored entities via the API. The intent of this interface is to allow 3rd party systems, such as CI platforms (Jenkins, Bamboo, Electric Cloud, etc.) to provide additional detail for Dynatrace automated root cause analysis. The events API offers a set of semantically predefined event types that allow the Dynatrace problem correlation engine to correctly handle information provided by external systems. The predefined semantics of these event types allows for more precise root cause detection.- Parameters:
body
- (optional)- Returns:
- Call<EventStoreResult>
-
queryEvents
@GET("events") retrofit2.Call<EventQueryResult> queryEvents(@Query("from") Long from, @Query("to") Long to, @Query("relativeTime") String relativeTime, @Query("eventType") String eventType, @Query("entityId") String entityId, @Query("cursor") String cursor)
Delivers a collection of events that fit the given filters As the number of uncorrelated events in an environment can be huge, this REST endpoint is limited to a maximum of 150 single events per request. This means that API consumers must use filters to further focus their queries, either on specific monitored entities or to requests that occurred during a specific time frame.- Parameters:
from
- Start of timeframe in milliseconds since Unix epoch. (optional)to
- End of timeframe in milliseconds since Unix epoch. Default timeframe is the last 30 days (optional)relativeTime
- Relative timeframe, back from the current time. (optional)eventType
- Filter the event feed based on a specific event type (optional)entityId
- Only receive events for a given monitored entity, such as a host, process, or service (optional)cursor
- If a query returns a cursor string this string can be used to fetch the next 150 events of a query.Note that there is no need to specify additional parameters (for instance eventType, from or to) as the cursor string already contains all these parameters (optional)- Returns:
- Call<EventQueryResult>
-
-