Skip to content

List measurement metric rows

Projects module

GET/measurement-metricsmeasurementMetrics.list

A figure a project measures against its gate 1 objectives (Section 4.10): sustainability, audience, earned media or sentiment. Canon's metric table holds reference values, so each metric names the canon metric that benchmarks it where canon states one. Returns a cursor page of measurement metric rows the caller may see. The default order is `ordinal` ascending. Supports sparse fieldsets and the filter grammar.

  • Requires the capability projects.gate.read.
  • OAuth scopes: projects.
  • Cursor-paginated: limit, cursor, fields, sort and filter apply.
  • Error statuses: 400, 401, 429. Errors are RFC 9457 problem details.

Path and query parameters

measurementMetrics.list: Path and query parameters
FieldTypeRequiredDescription
limitLimitNoPage size. Default 50, maximum 200.Constraints: range 1 to 200
cursorCursorNoOpaque cursor from `next_cursor` of the previous page.Constraints: length 1 to any
fieldsFieldsNoSparse fieldset: a comma-separated list of top-level fields to return. `id` is always returned.Constraints: pattern ^[a-z_][a-z0-9_]*(,[a-z_][a-z0-9_]*)*$
sortSortNoSort keys, comma-separated; a leading `-` sorts descending. Without `sort`, the documented default order applies (coded lists sort in numeric code order).Constraints: pattern ^-?[a-z_][a-z0-9_]*(,-?[a-z_][a-z0-9_]*)*$
filterFilterNoFilter grammar `filter[field][op]=value`. Operators: eq, ne, lt, lte, gt, gte, in (comma-separated values), is_null (true or false) and contains. Conditions combine with AND.

Response 200: a page of MeasurementMetric

measurementMetrics.list: MeasurementMetric
FieldTypeRequiredDescription
metric_codestringYesMetric (app.measurement_metrics).Constraints: pattern ^[a-z][a-z0-9_]*$
family"Sustainability" | "Audience" | "Earned Media" | "Sentiment"YesFamily of the figure.
dimension"Mass" | "Volume" | "Energy" | "Emissions" | "Count" | "Percent"YesDimension of the figure.
base_unit_codestringYesUnit totals and comparisons are computed in.Constraints: pattern ^[a-z][a-z0-9_]*$
aggregation"Sum" | "Latest"YesHow a project's figures combine: each adds to the total (Sum) or the latest measured one stands (Latest).
is_derivedbooleanYesTrue when the figure is computed from the coverage records rather than entered.
lower_boundnumber | nullYesLowest figure accepted, in the base unit.
upper_boundnumber | nullYesHighest figure accepted, in the base unit.
canon_domainstring | nullYesDomain of the benchmarking canon metric.Constraints: length 1 to 200
canon_itemstring | nullYesItem of the benchmarking canon metric.Constraints: length 1 to 300
canon_value_numericnumber | nullYesThe canon benchmark as a number.
canon_value_textstring | nullYesThe canon benchmark in words.Constraints: length 1 to 300
canon_qualifierstring | nullYesQualifier of the canon benchmark.Constraints: length 1 to 300
ordinalintegerYesDisplay order.Constraints: range 1 to any
{
  "data": [
    {
      "metric_code": "waste_generated",
      "family": "Sustainability",
      "dimension": "Mass",
      "base_unit_code": "kg",
      "aggregation": "Sum",
      "is_derived": false,
      "lower_bound": 0,
      "upper_bound": 100,
      "canon_domain": "site_services",
      "canon_item": "Waste lbs per guest per day",
      "canon_value_numeric": 2.4,
      "canon_value_text": "1.9 kW continuous",
      "canon_qualifier": "MODELED event avg",
      "ordinal": 1
    }
  ],
  "next_cursor": null
}

Code samples

curl -X GET "$XOS_BASE_URL/measurement-metrics" \
  -H "Authorization: Bearer $XOS_API_KEY"
for await (const row of xos.measurementMetrics.listAll()) {
  console.log(row);
}
for row in xos.measurement_metrics.list_all():
    print(row)
xos measurement-metrics list --all