Skip to content

List periods

List when this DataSource has data, in total and per DataSet

GET/v1/signals/{signal_id}/datasources/{datasource_id}/periods

The total is what the DataSource covers; the per-DataSet lists are what each can actually answer for, and they differ. Periods outside this Signal's wave window are absent from both.

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

Example request#

Shell
curl "https://api.odysseysignal.app/v1/signals/{signal_id}/datasources/{datasource_id}/periods" \
  -H "X-Api-Key: $ODYSSEY_API_KEY"

Response 200#

application/json.

When this DataSource has data — in total, and per DataSet.

Both, because they answer different questions. The total is what the DataSource covers and is what a consumer picking a date range wants; the per-DataSet lists are what each DataSet can actually answer for, and they can differ a great deal. A period id means the same thing in every DataSet, so the total is their union.

Periods outside this Signal's wave window are absent from both, since a query could never reach them.

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

  • datasource_idstring · required

  • granularitystring · required

    The bucket period ids are stated in. Months — the smallest a wave is stored at, so every coarser granularity a DataSet offers is a grouping of these.

  • totalobject · required

    The union across every readable DataSet.

    Show 4 fields
    • countinteger · required

    • firststring · nullable

      Id of the earliest period, or null when there are none.

    • laststring · nullable

      Id of the latest period. What an unanchored query ends on.

    • periodsarray of objects · required

      Show 6 fields
      • idstring or integer · required

      • labelstring · required

      • groupstring · nullable

      • typestring · nullable

      • descriptionstring · nullable

      • demand_spaceobject · nullable

        For an attribute: the demand space the survey assigns it to. Absent where there is none.

        Show 2 fields
        • idinteger · required

        • labelstring · required

  • datasetsarray of objects · required

    Show 6 fields
    • countinteger · required

    • firststring · nullable

      Id of the earliest period, or null when there are none.

    • laststring · nullable

      Id of the latest period. What an unanchored query ends on.

    • periodsarray of objects · required

      Show 6 fields
      • idstring or integer · required

      • labelstring · required

      • groupstring · nullable

      • typestring · nullable

      • descriptionstring · nullable

      • demand_spaceobject · nullable

        For an attribute: the demand space the survey assigns it to. Absent where there is none.

        Show 2 fields
        • idinteger · required

        • labelstring · required

    • dataset_idstring · required

    • urlstring · required

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.