Skip to main content
Read metric data with the Public API (V2). Fetch a timeseries for graphs, an aggregated list for tables, or discover which metrics and tags a site has. All endpoints authenticate with your personal API token and are scoped to a single site_id.

Migrate from GraphQL metrics

Reading metrics through the GraphQL API is deprecated. If your integration reads metric data through GraphQL, use this comparison to move it to the REST API (V2) timeseries endpoint.

Query a timeseries

This endpoint returns one or more series of data points over a time range. Use it to draw graphs.

Request body

Each select entry requests one metric field. Provide a metric name, a tags object, and a field (see fields). Tag values may use * as a wildcard. You can also provide an aggregation (see aggregations) and a fill value. The fill values are ZERO (the default), PREVIOUS, and NONE. Existing integrations can also use the optional draw_null_as_zero field. If you send both fields, fill takes precedence. Use uppercase values for field and aggregation. The timeseries endpoint does not support group_by.

Response

Returns a Timeseries with the queried resolution, from, to, and a series array. Each series has an id, the metric name, its tags, the field it represents, min and max across the range, and a data array of points. Each point has a timestamp and a numeric value. Unlike the GraphQL metrics API, this endpoint does not require a separate metric keys request. Use the series array to see which tag and field combinations returned data. If a query may reach the processing limits, do not use series.length as the total number of matching metric keys.

Query a list

This endpoint returns aggregated metric values grouped into rows. Use it to build tables.

Request body

A ListSelector is like a timeseries selector, with an extra id that names the selector’s value in each row’s data object. group_by entries are Name (group by metric name) or Tag (group by a tag value). Use uppercase values for field and aggregation. The case-sensitive group_by values are Name and Tag. If a selector uses * for a tag in tags, add the same tag to group_by as {"Tag": "tag_name"} or the request fails.

Response

Returns a List with the queried resolution, from, to, and a rows array. Each row has an id, a group object of the tag values that define it, and a data object of aggregated values keyed by selector id (for example, { "mean": 42.5 }).

List metric names

Return every metric name available for a site.
Returns an array of strings.

Get a metric’s type and tags

Return a metric’s type and the tag combinations it can be queried with.
Returns a metric_type (GAUGE, COUNTER, or MEASUREMENT) and available_tags, an array where each entry is one valid combination of tag keys.

High-cardinality metric queries

A metric query has high cardinality when it matches more series than the endpoint can process. AppSignal stores each unique tag combination as a separate metric key. For example, every combination of queue and worker values creates a separate metric key. The limits in this section apply to custom metrics and transaction_duration. They also apply to incident_error_count when a query uses a wildcard for incident_digest or revision. They do not apply to other metrics in the current V2 implementation. Each metric key and field combination counts as one series. For example, requesting MEAN and COUNT for one metric key counts as two series. For affected metrics, AppSignal limits how many series it processes before fetching their data:
  • /api/v2/metrics/timeseries processes up to 100 series.
  • /api/v2/metrics/list processes up to 1,000 series.
These limits protect the metrics database from queries that would take too long to complete. They apply to the whole response, not separately to each select entry. The limit field cannot raise them. Dashboard charts load their data from /api/v2/metrics/timeseries, so the 100-series limit applies to charts too. If a query matches more series than the endpoint can process, AppSignal returns only part of the data. The response does not indicate that it is incomplete, so aggregated totals may be too low. Repeating the same query returns the same subset, but the result is still incomplete. The Limits page shows which custom metrics report the most unique tag combinations per minute. When tag values change over time, a query over a longer range can match more series than the page shows. Custom metrics work best with tags that have a small, fixed set of values, such as region, plan, or queue. If an existing metric has high-cardinality tags, exact tag filters can reduce the number of matching series. However, the response cannot confirm that it contains every series. See Metric tags for guidance on choosing tag values.

Reference

Fields

The field selects which measurement to retrieve from a metric: For more type references, read the AppSignal V2 API Documentation.

Aggregations

The aggregation combines multiple values within a time bucket: SUM, AVERAGE, MIN, MAX, FIRST, or LAST.

Resolutions

resolution accepts MINUTELY, FIVE_MINUTELY, TEN_MINUTELY, FIFTEEN_MINUTELY, HOURLY, or DAILY.