Skip to content

List metrics

List the metrics on a DataSet, with their groups

GET/v1/signals/{signal_id}/datasources/{datasource_id}/datasets/{dataset_id}/metrics

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 · required

  • datasource_idstring · required

  • dataset_idstring · required

Example request#

Shell
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 · nullable

    The data environment the answer was read in, prod or test: the one Odyssey set on the Signal, or the one an Odyssey person picked for this call.

  • dataset_idstring · required

  • datasource_idstring · required

  • countinteger · required

  • groupsarray of objects · required

    Editorial 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 fields
    • idstring · required

    • namestring · required

    • descriptionstring · nullable

    • metric_idsarray of string · required

  • metricsarray of objects · required

    Show 24 fields
    • idstring · required

      Stable metric key. Unique within this DataSet.

    • qualified_idstring · required

      Dataset-qualified id, e.g. visibility.mentions. Used in logs, cache keys and metering; the same key can exist in more than one dataset.

    • namestring · required

    • descriptionstring · nullable

    • business_questionstring · nullable

      What this metric answers, in plain language.

    • group_idstring · nullable

    • familystring · nullable

      Parent metric this one is a variant of, when applicable.

    • unitstring · required

      percent | count | score | index | currency | rank. The value is already in this unit — never rescale it.

    • value_typestring · required

      scalar | point

    • kindstring · required

      scalar | verbatim. Verbatim metrics are not served by /query.

    • rangemap of number · nullable

      The span the value can take, {min, max}, in unit and 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 objects

      Values each row carries beside value, under fields.

      Show 3 fields
      • namestring · required

      • unitstring · nullable

        The unit the field is published in — never rescale it.

      • descriptionstring · nullable

    • referenceobject · nullable

      Present only when context.reference on 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 fields
      • descriptionstring · required

        What the reference figure is, in plain language. It is not the competitor average: name it as said here.

      • unitstring · required

        The unit context.reference is published in, which may differ from the metric's own: never rescale it.

      • rangemap of number · nullable

        The span the reference can take, {min, max}, in its own unit, when known.

      • methodstring · nullable

        Internal. How the reference is computed.

      • question_idsarray of string · nullable

        Internal. The survey questions behind the reference.

    • decimalsinteger · required

      Suggested precision for display.

    • directionstring · nullable

      higher_is_better | lower_is_better | neutral, where it is not obvious from the metric itself.

    • entityboolean · required

      Whether the metric is measured per brand. A property of the metric — not something the caller determines.

    • base_scopestring · required

      What base counts for this metric: respondent | question | episode | mention | response.

    • base_descriptionstring · nullable

      What the value is a proportion of.

    • supported_dimensionsarray of string · required

      Dimension ids this metric may be filtered on or grouped by.

    • methodstring · nullable

      Internal. How the value is computed. The server applies it — a query names the metric, not the method.

    • parametersobject · nullable

      Internal. 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 · nullable

      Internal. The survey questions behind the value.

    • setting_sourcesmap of string · nullable

      Internal. Where each of parameters, and direction, was set: metric (the metric itself), data_project (the DataSource's catalogue) or signal (this Signal's override). The nearest wins, per setting.

    • statusstring · required

      stable | 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>.

StatusCodeWhen
400invalid-requestThe request is not valid for this DataSet; detail says why.
401unauthorizedNo credential, or one that is not accepted.
403forbiddenThe credential is valid but does not cover what was asked.
404not-foundNothing there, or nothing this credential may read.
422validation-failedThe request does not match the contract; errors lists each field.
429rate_limitedToo many requests, or the monthly quota is used up.
503unavailableA service behind the API did not answer; try again.