Interface TimeseriesApi


  • public interface TimeseriesApi
    • Method Detail

      • getAllTimeseriesDefinitions

        @Headers("Content-Type:application/json; charset=utf-8")
        @GET("timeseries")
        retrofit2.Call<List<TimeseriesDefinition>> getAllTimeseriesDefinitions​(@Query("source")
                                                                               String source,
                                                                               @Query("detailedSource")
                                                                               String detailedSource)
        Lists all metric definitions, along with parameters of each metric. You can specify filtering paramters to return only matched metrics. If no parameters are specified, the call will list all the defined and exposed metrics.
        Parameters:
        source - Metric type. Allowed values are `BUILTIN`, `PLUGIN`, and `CUSTOM`. (optional)
        detailedSource - The feature, where metrics originate, such as Synthetic or RUM. (optional)
        Returns:
        Call<List<TimeseriesDefinition>>
      • readTimeseriesComplex

        @Headers("Content-Type:application/json; charset=utf-8")
        @POST("timeseries")
        retrofit2.Call<TimeseriesDataPointQueryResult.Container> readTimeseriesComplex​(@Body
                                                                                       TimeseriesQueryMessage body)
        Lists all available metric data points, matching specified parameters. Provides advanced filtering possibilities, comparing to the `GET /timeseries/{metricIdentifier}` request.
        Parameters:
        body - JSON body of the request, containing parameters to identify the required data points.
        Returns:
        Call<TimeseriesQueryResultWrapper.Container>
      • readTimeseriesData

        @Headers("Content-Type:application/json; charset=utf-8")
        @GET("timeseries/{timeseriesIdentifier}")
        retrofit2.Call<TimeseriesQueryResult> readTimeseriesData​(@Path("timeseriesIdentifier")
                                                                 String timeseriesIdentifier,
                                                                 @Query("includeData")
                                                                 Boolean includeData,
                                                                 @Query("aggregationType")
                                                                 String aggregationType,
                                                                 @Query("startTimestamp")
                                                                 Long startTimestamp,
                                                                 @Query("endTimestamp")
                                                                 Long endTimestamp,
                                                                 @Query("predict")
                                                                 Boolean predict,
                                                                 @Query("relativeTime")
                                                                 String relativeTime,
                                                                 @Query("queryMode")
                                                                 String queryMode,
                                                                 @Query("entity")
                                                                 List<String> entity,
                                                                 @Query("tag")
                                                                 List<String> tag,
                                                                 @Query("percentile")
                                                                 Integer percentile)
        Gets the parameters of the specified metric and optionally data points. To obtain data points, set **includeData** to `true`. You can obtain either data points or the scalar result of the specified timeseries, depending on the **queryMode**. To obtain data points you must specify the timeframe, either as **relativeTime** or as combination of **startTimestamp** and **endTimestamp**. You must also provide **aggregationType**, supported by the metric.
        Parameters:
        timeseriesIdentifier - Case-sensitive identifier of the timeseries, where you want to read parameters and data points. (required)
        includeData - Flag to include data points to the response. \\n\\n To obtain data points you must specify the timeframe and aggregation type. (optional)
        aggregationType - The aggregation type for the resulting data points. \\n\\n\" + \"If the requested metric doesn't support the specified aggregation, the request will result in an error. (optional)
        startTimestamp - Start timestamp of the requested timeframe, in milliseconds (UTC). The start time must be earlier than the end time. (optional)
        endTimestamp - End timestamp of the requested timeframe, in milliseconds (UTC). End time must be later than the start time. \\n\\n \" + \"If later than the current time, Dynatrace automatically uses current time instead. (optional)
        predict - Used to predict future data points. (optional)
        relativeTime - Relative timeframe, back from the current time. (optional)
        queryMode - The type of result that the call should return. Valid result modes are: \\n\" + \"`series`: returns all the data points of the timeseries in specified timeframe. \\n `total`: returns one scalar value for the specified timeframe. \\n\\n\"+ \"By default, the `series` mode is used. (optional)
        entity - Filters requested data points by entity which should deliver them. \\n\\n\" + \"Allowed values are Dynatrace entity IDs. You can find them in the URL of the corresponding Dynatrace entity page, for example, `HOST-007`. \\n\\n\" + \"If the selected entity doesn't support the requested timeseries, the request will result in an error. (optional)
        tag - Filters the resulting set of applications by the specified tag. \\n\\n\" + \"Use multiple tag parameters to combine multiple tag filters using the logical operator AND. \\n\\n\" + \"In case of key-value tags, such as imported AWS or CloudFoundry tags use following format: `[context]key:value`. (optional)
        percentile - In case of the percentile aggregation type, this parameter specifies which percentile of the selected response time metric should be delivered. \" + \"Valid values for percentile are between 1 and 99. \\n\\n\" + \"Please keep in mind that percentile export is only possible for response-time based metrics such as application and service response times. (optional)
        Returns:
        Call<List<TimeseriesQueryResult>>