List metrics
List the metrics on a DataSet, with their groups
GET/v1
Separate from the DataSet description because the list is long and a caller browsing DataSets does not need it yet. Each metric carries everything a query must send for it.
Authenticate with an API key in X-Api-Key, or a bearer token in Authorization: Bearer <token>.
Parameters#
Path parameters#
signal_idstring · requireddatasource_idstring · requireddataset_idstring · required
Example request#
curl "https://api.odysseysignal.app/v1/signals/{signal_id}/datasources/{datasource_id}/datasets/{dataset_id}/metrics" \
-H "X-Api-Key: $ODYSSEY_API_KEY"Response 200#
application/json.
Every metric on one DataSet, with the groups they belong to.
A group is a heading over a subset of this list, so the two come together.
environmentstring · nullableThe data environment the answer was read in,
prodortest: the one Odyssey set on the Signal, or the one an Odyssey person picked for this call.dataset_idstring · requireddatasource_idstring · requiredcountinteger · requiredgroupsarray of objects · requiredEditorial groupings from the metric catalogue — the shared one, not the data project — in the order it defines. Only groups with at least one visible metric.
Show 4 fieldsHide fields
idstring · requirednamestring · requireddescriptionstring · nullablemetric_idsarray of string · required
metricsarray of objects · requiredShow 24 fieldsHide fields
idstring · requiredStable metric key. Unique within this DataSet.
qualified_idstring · requiredDataset-qualified id, e.g.
visibility.mentions. Used in logs, cache keys and metering; the same key can exist in more than one dataset.namestring · requireddescriptionstring · nullablebusiness_questionstring · nullableWhat this metric answers, in plain language.
group_idstring · nullablefamilystring · nullableParent metric this one is a variant of, when applicable.
unitstring · requiredpercent | count | score | index | currency | rank. The value is already in this unit — never rescale it.
value_typestring · requiredscalar | point
kindstring · requiredscalar | verbatim. Verbatim metrics are not served by /query.
rangemap of number · nullableThe span the value can take,
{min, max}, inunitand after any display multiplier — a 0-10 score shown ×10 is{min: 0, max: 100}. A bound is null where the method has none; the whole field is null when neither is known.fieldsarray of objectsValues each row carries beside
value, underfields.Show 3 fieldsHide fields
namestring · requiredunitstring · nullableThe unit the field is published in — never rescale it.
descriptionstring · nullable
referenceobject · nullablePresent only when
context.referenceon this metric is its own reference figure, in its own unit, and not the competitor average; says what it is. Absent: the reference is the competitor average in the metric's unit.Show 5 fieldsHide fields
descriptionstring · requiredWhat the reference figure is, in plain language. It is not the competitor average: name it as said here.
unitstring · requiredThe unit
context.referenceis published in, which may differ from the metric's own: never rescale it.rangemap of number · nullableThe span the reference can take,
{min, max}, in its ownunit, when known.methodstring · nullableInternal. How the reference is computed.
question_idsarray of string · nullableInternal. The survey questions behind the reference.
decimalsinteger · requiredSuggested precision for display.
directionstring · nullablehigher_is_better | lower_is_better | neutral, where it is not obvious from the metric itself.
entityboolean · requiredWhether the metric is measured per brand. A property of the metric — not something the caller determines.
base_scopestring · requiredWhat
basecounts for this metric: respondent | question | episode | mention | response.base_descriptionstring · nullableWhat the value is a proportion of.
supported_dimensionsarray of string · requiredDimension ids this metric may be filtered on or grouped by.
methodstring · nullableInternal. How the value is computed. The server applies it — a query names the metric, not the method.
parametersobject · nullableInternal. Parameters the method is applied with, such as a factor-based index. Part of what makes this metric the metric it is, and supplied by the server on its behalf.
question_idsarray of string · nullableInternal. The survey questions behind the value.
setting_sourcesmap of string · nullableInternal. Where each of
parameters, anddirection, was set:metric(the metric itself),data_project(the DataSource's catalogue) orsignal(this Signal's override). The nearest wins, per setting.statusstring · requiredstable | beta | deprecated
Errors#
Errors are application/problem+json (RFC 9457): type, title, status, detail and, for some, more fields that say how to fix the call. The type is https://api.odysseysignal.app/problems/<code>.
| Status | Code | When |
|---|---|---|
| 400 | invalid-request | The request is not valid for this DataSet; detail says why. |
| 401 | unauthorized | No credential, or one that is not accepted. |
| 403 | forbidden | The credential is valid but does not cover what was asked. |
| 404 | not-found | Nothing there, or nothing this credential may read. |
| 422 | validation-failed | The request does not match the contract; errors lists each field. |
| 429 | rate_limited | Too many requests, or the monthly quota is used up. |
| 503 | unavailable | A service behind the API did not answer; try again. |