Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Please take a look at this quick Query primer before continuing reading.


When dealing with station queries the datetime parameter will be treated differently than with observation.
In the context of observations we are dealing with points on a timeline, and the datetime parameter defines a range/scope.
This scope/range dictates the points to be included in the response.

In the context of stations, the operation lifetime of the specific station is a timeline or a continues row of date ranges (with no gaps).
A station is either Active or Inactive (indicated using the status parameter), and that date range can either be a close-ended or half-open on the "future" side.

As such, when using a datetime parameter in a station query, one is actually looking for the overlap between the operation timeline and the provide date range.

Please observe that the datetime parameter only pertains to the operation lifetime of the station.
With other words it answers the question of whether the station "existed" or not in the provided date range, while the status parameter dictates if it was operational (Active) or not (Inactive).
Therefor, one needs to quantify both the datetime and status parameters to satisfy the following search phrase: "Give me a list of all stations that were active in December 2019".
In this specific context, the datetime parameter will ensure that the station did exist while the status parameter will ensure that it was operational.

Let us work with the above search phrase and translate it to a concrete query:
http://receiving-server-url?status=Active&datetime=2019-12-01T00:00:00Z/2019-12-31T23:59:59Z

Let us take another example and try to translate the following search: "Give me a list of all active stations".
Observe the absence of time in the wording. A naive translation would be:

http://receiving-server-url?status=Active
The above query would actually return a list of stations that have been Active in "some time", as from now to the beginning of time.
A more correct query would look like this:

http://receiving-server-url?status=Active&datetime=NOW
The NOW value is a representation of a time chosen to match the specific context.

To make the example more concrete, let us say that the time of the query is the second of November 2025 at midnight. That will generate the following query:

http://receiving-server-url?status=Active&datetime=2025-11-02T00:00:00Z/..
Please observe that the datetime parameter is provided as a half-open date range.
This somehow modifies the above phrase to the following (more concrete but not naturally uttered) search phrase: "Give me a list of all stations that are active right now (and going forward)"