Developers
Mesonet API
  • Getting Started
  • Reference
  • Explorer
  • Examples
  • Pricing
  • Latency Service

    Mesonet API Services

    Returns transmission latency for a station or set of stations based on a start and end date/time.

    Request Format

    A Latency request is an HTTP URL with the following form:

    https://api.synopticdata.com/v2/stations/latency
    

    This service reports the delay time (in minutes) of an observation received at our ingest servers relative to the observation’s timestamp. Due to the nature of computer clock drift and time synchronization, some observations can be received “before they occur”. This results in a negative latency value. This can occur from in incorrect time stamp as provided by the station, or (more often than not) natural clock drift.

    Acquiring data from this web service requires certain parameters. When encoding URLs, all parameters are separated using the ampersand (&) character and their value is indicated by an equal sign (=). Below is a list of accepted parameters.

    Optional Parameters

    The following example returns the latency and statistics for stid=wbb in for January 1, 2018:

    https://api.synopticdata.com/v2/stations/latency?stid=wbb&start=201801010000&end=201801012359&stats=all&token=YOUR_TOKEN_HERE
    

    Response Format Parameters

    Request Response

    JSON Format

    The Latency service will return its results in a single organized and self describing JSON object. At a minimum, every request will return a JSON object with a "SUMMARY" field.

    An example JSON response would be:

    {
      "STATION": [
        {
          "STATUS": "ACTIVE",
          "MNET_ID": "153",
          "PERIOD_OF_RECORD": {
            "start": "1997-01-01T00:00:00Z",
            "end": "2018-01-09T00:45:00Z"
          },
          "ELEVATION": "4806",
          "NAME": "U of U William Browning Building",
          "LATITUDE": "40.76623",
          "TIMEZONE": "America/Denver",
          "ID": "1",
          "STID": "WBB",
          "LONGITUDE": "-111.84755",
          "STATE": "UT",
          "LATENCY": {
            "date_time": [
              "2018-01-01T00:00:00Z", "2018-01-01T00:01:00Z",
              "2018-01-01T00:02:00Z", ...
            ],
            "values": [-3, 5, 4, ...]
          },
          "STATISTICS": {
            "count": 1440,
            "start": "201801010000",
            "minimum": -3,
            "end": "201801012359",
            "mintime": "2018-01-01T00:00:00Z",
            "standard_deviation": 2.766415596,
            "maxtime": "2018-01-01T00:01:00Z",
            "median": 3,
            "average": 2.2166666985,
            "maximum": 5
          }
        }
      ],
        "SUMMARY": {
          "RESPONSE_CODE": 1,
          "RESPONSE_MESSAGE": "OK",
          "TOTAL_DATA_TIME": "45.5708503723 ms",
          "NUMBER_OF_OBJECTS": 1
      }
    }