Skip to main content
GET
Get CloudWatch metric data

Query Parameters

awsAccountId
string
required

AWS account database ID used to resolve credentials.

region
string
required

AWS region the metric lives in.

metricNamespace
string
required

CloudWatch namespace (e.g. AWS/ECS)

metricName
string
required

CloudWatch metric name (e.g. CPUUtilization)

statistic
string
required

CloudWatch statistic to apply (Average, Sum, Maximum, ...)

period
integer<int32>
required

Aggregation period in seconds (e.g. 300). Must obey CloudWatch's per-window granularity floor (60s ≤ 15d, 300s ≤ 63d, 3600s ≤ 455d).

startTime
string
required

Inclusive start of the query window (ISO 8601). Must be earlier than endTime and within CloudWatch's 455-day retention.

endTime
string
required

Inclusive end of the query window (ISO 8601). Must be after startTime and not in the future.

dimensions
string[] | null

Repeated dimensionName=dimensionValue pairs scoping the metric. At least one is required unless groupBy is set.

groupBy
string | null

Name of one dimension to split the metric by. The answer then holds one series per value of that dimension, among the metrics named metricName in metricNamespace whose dimensions are exactly dimensions plus this one. Must not also appear in dimensions. A namespace or dimension name containing ", ', \, { or } cannot be searched and answers 400.

groupValues
string[] | null

Values of groupBy to answer for, in place of the 10 largest: the answer then holds a series for each of these values that has datapoints in the window, and for no other. Repeat the parameter for each value; at most 500 distinct values. Requires groupBy.

Response

The request has succeeded.

Response payload for a CloudWatch metric query

datapoints
object[]
required

Time-series datapoints, ordered by timestamp ascending. Empty when the request set groupBy: a grouped metric answers in series instead.

unit
string
required

Display unit suffix for the metric, inferred server-side from the namespace + metric name (e.g. %, ``, B). Empty when unknown.

omittedSeries
integer<int32>

Present only when the request set groupBy: how many more values of the dimension had datapoints in the window but are not in series. A CloudWatch search sees at most 500 values, so for a dimension with more than that the count falls short. Always 0 with groupValues.

series
object[]

Present only when the request set groupBy: one series per value of that dimension, labelled {<groupBy>: <value>} — the same shape a PromQL answer uses, so one chart component draws both. Holds the 10 series with the largest totals over the window, largest first, or with groupValues every one of those values' series, largest first. A value with no datapoints in the window is left out.