Get Metric Timeseries
GET {{host}}/{{version}}/{{destination_name}}/metrics/successes
Get timeseries data for a specific metric for a source-destination pair.
If you have multi-instance destinations configured for your source you must send the destination configuration id of the instance you are fetching metric timeseries data for. An example request, List - Multi Destination Enabled, can be found in the Example requests dropdown. To find the destinationConfigurationId navigate to the destination overview page of the destination which you are querying metrics for in the Segment app. You can retieve the destinationConfigurationId from the URL where it is configured as instances/$destinationConfigurationId/configuration
.
RESPONSES
status: OK
{"name":"workspaces/myworkspace/sources/js/destinations/google-analytics/metrics/successes","granularity":"DAY","datapoints":[{"value":172615,"timestamp":"2019-01-20T00:00:00Z"},{"value":170609,"timestamp":"2019-01-21T00:00:00Z"},{"value":170668,"timestamp":"2019-01-22T00:00:00Z"},{"value":170422,"timestamp":"2019-01-23T00:00:00Z"},{"value":170519,"timestamp":"2019-01-24T00:00:00Z"},{"value":166422,"timestamp":"2019-01-25T00:00:00Z"}],"start_time":"2019-01-20T00:00:00Z","end_time":"2019-01-25T00:00:00Z"}