API call failing with day_offset, time_start, or time_end

@dsj, @WFmarketing, @anon84912554 It appears that any API call that has a day_offset, time_start, or time_end argument is currently failing, with obs returning as null.

https://swd.weatherflow.com/swd/rest/observations/device/16391?day_offset=0&api_key=20c70eae-e62f-4d3b-b3a4-8586e90f3ac8 gives:

{"status":{"status_code":0,"status_message":"SUCCESS"},
"device_id":16391,"type":null,"bucket_step_minutes":1,"source":"db","obs":null}

https://swd.weatherflow.com/swd/rest/observations/device/16392?time_start=1547270088&time_end=1547291748&api_key=146e4f2c-adec-4244-b711-1aeca8f46a48 gives:

{"status":{"status_code":0,"status_message":"SUCCESS"},
"device_id":16392,"type":null,"bucket_step_minutes":1,"source":"db","obs":null}

A requests without any optional arguments seems to work.

https://swd.weatherflow.com/swd/rest/observations/device/16392?&api_key=146e4f2c-adec-4244-b711-1aeca8f46a48 gives:

{"status":{"status_code":0,"status_message":"SUCCESS"},
"device_id":16392,"type":"obs_sky","source":"cache","summary":
{"precip_total_1h":0.0,"precip_total_24h":0.0,"precip_high_24h":0.0,"precip_accum_local_yesterday":0.202},
"obs":[[1547292460,10185,0.35,0,0,0.94,2.15,192,3.31,1,84,0]]}

EDIT:

If the format of the API call is changed though to write the device ID as part of the query string, then all seems to work fine. For example: https://swd.weatherflow.com/swd/rest/observations/?device_id=16392&time_start=1547270088&time_end=1547291748&api_key=146e4f2c-adec-4244-b711-1aeca8f46a48

1 Like

This works,

https://swd.weatherflow.com/swd/rest/observations/device/10470?day_offset=0&api_key=20c70eae-e62f-4d3b-b3a4-8586e90f3ac8

This API issue has been fixed. Please let us know if you still see a problem. The example requests above are now working. Thank you for the detail in your message.

5 Likes

Dear friends, I am new to this forum and I am starting with some activities in my new WeatherFlow (device ID 15357), at this moment I have the same problem with my data ““obs”: null”, please could you tell me how to solve this problem, thanks

Welcome to the community Geovany.
This might not be the answer on your question, but As you are new I would like to mention, the difference on device ID and Station ID: Your station ID is used for the complete system containing a Hub, all connected Sensor modules (aka Air and Sky), normally at least one Air and one Sky :wink: .
Each of these components are a device, which has a device ID (a number not fixed in the hardware, given by the WF backend to a hardware (to be 100% exact: the deviceID of a Hub is called the Station ID)) and third, the devices have a serial number (starting with a letter code i.e SK- for Skys, HB- for Hubs and AR- for Airs).
It might be correct, the given number (15357) is your Station ID, if it is located in Ecuador.:thinking:
Please be aware of that difference in calling the numbers.

For help to your issue, I think, it would be helpful, to get a little more info on what you like to do and how to.