# Api "try it out" error

**URL:** https://community.tempest.earth/t/api-try-it-out-error/11397
**Category:** Tempest Owners
**Created:** [December 29, 2020, 11:00am UTC](https://community.tempest.earth/t/api-try-it-out-error/11397 "2020-12-29T11:00:24Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![sunny](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/sunny/32/16368_2.png) [@sunny](https://community.tempest.earth/u/sunny)
#### Post date: [December 29, 2020, 11:00am UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/1 "2020-12-29T11:00:24Z")

</div>

When I use [https://weatherflow.github.io/Tempest/api/swagger/#!/forecast/getBetterForecast](https://weatherflow.github.io/Tempest/api/swagger/#!/forecast/getBetterForecast), the response is: “REQUEST\_INPUT\_ERROR lat and lon are required”, but the page doesn’t have a field to enter longitude and latitude.

While you’re at it, I know [https://weatherflow.github.io/Tempest/api/swagger/#!/observations/getObservationsByDeviceId](https://weatherflow.github.io/Tempest/api/swagger/#!/observations/getObservationsByDeviceId) expects unix time, but it would be nice if on this same page there was a human way to enter starting/ending date and time.

---

<div class="post-metadata">

### Author: ![peter](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/peter/32/1365_2.png) [@peter](https://community.tempest.earth/u/peter)
#### Post date: [December 29, 2020, 12:05pm UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/2 "2020-12-29T12:05:30Z")

</div>

Good spot @sunny. I’ve been in the beta group for this new forecast endpoint, and WeatherFlow are aware that the docs released just before the Christmas break don’t quite match the current functionality of the endpoint. I assume they will fix it first thing after their break ready for the public launch.

---

<div class="post-metadata">

### Author: ![sunny](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/sunny/32/16368_2.png) [@sunny](https://community.tempest.earth/u/sunny)
#### Post date: [December 29, 2020, 1:00pm UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/3 "2020-12-29T13:00:57Z")

</div>

I didn’t know I was accessing beta functionality

---

<div class="post-metadata">

### Author: ![dsj](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/dsj/32/3_2.png) [@dsj](https://community.tempest.earth/u/dsj)
#### Post date: [December 29, 2020, 3:32pm UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/4 "2020-12-29T15:32:21Z")

</div>

Sorry, @sunny. As Peter notes, the docs are slightly ahead of the production implementation. We had hoped to release both at the same time, but that didn’t happen. The update will go out next week.

---

<div class="post-metadata">

### Author: ![sunny](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/sunny/32/16368_2.png) [@sunny](https://community.tempest.earth/u/sunny)
#### Post date: [December 29, 2020, 3:53pm UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/5 "2020-12-29T15:53:26Z")

</div>

no problem, I just stumbled across it. I have no plans of accessing it (for now)

---

<div class="post-metadata">

### Author: ![dsj](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/dsj/32/3_2.png) [@dsj](https://community.tempest.earth/u/dsj)
#### Post date: [December 29, 2020, 4:06pm UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/6 "2020-12-29T16:06:10Z")

</div>

Yes, after realizing we were not going to be able to push the production changes before the New Year we decided to quietly update the docs so that the developers beta testing the forecast endpoint could comment. Not the smoothest release ever, but a step forward!

---

<div class="post-metadata">

### Author: ![1234fisart](https://avatars.discourse-cdn.com/v4/letter/1/a183cd/32.png) [@1234fisart](https://community.tempest.earth/u/1234fisart)
#### Post date: [January 3, 2021, 8:07am UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/7 "2021-01-03T08:07:47Z")

</div>

Can someone post the correct syntax for the Longitude/Latitude information in the URL ? Cannot find any documentation about this

---

<div class="post-metadata">

### Author: ![sunny](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/sunny/32/16368_2.png) [@sunny](https://community.tempest.earth/u/sunny)
#### Post date: [January 3, 2021, 8:50am UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/8 "2021-01-03T08:50:48Z")

</div>

which url are you talking about?

---

<div class="post-metadata">

### Author: ![1234fisart](https://avatars.discourse-cdn.com/v4/letter/1/a183cd/32.png) [@1234fisart](https://community.tempest.earth/u/1234fisart)
#### Post date: [January 3, 2021, 9:43am UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/9 "2021-01-03T09:43:54Z")

</div>

The API Explorer generates the following URL : [https://swd.weatherflow.com/swd/rest/better\_forecast?station\_id=32315&units\_temp=c&units\_wind=kph&units\_pressure=hpa&units\_precip=cm&units\_distance=km&token=xxxxxxx](https://swd.weatherflow.com/swd/rest/better_forecast?station_id=32315&units_temp=c&units_wind=kph&units_pressure=hpa&units_precip=cm&units_distance=km&token=xxxxxxx)

(Token replaced with XXXX)

This call results in the following error : “status\_message”: “REQUEST\_INPUT\_ERROR lat and lon are required”

I assume that I have to provide the Longitude Latitude information in the URL (see above) What is the syntax for that ?

---

<div class="post-metadata">

### Author: ![sunny](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tempest.earth/sunny/32/16368_2.png) [@sunny](https://community.tempest.earth/u/sunny)
#### Post date: [January 3, 2021, 9:58am UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/10 "2021-01-03T09:58:12Z")

</div>

aha, as mentioned in the answer above, this is a mismatch between documentation and implementation. As the documentation is ahead of the implementation I assume, that lat/lon is no longer needed, just the station id. But you will have to wait until the implementation catches up.

---

<div class="post-metadata">

### Author: ![1234fisart](https://avatars.discourse-cdn.com/v4/letter/1/a183cd/32.png) [@1234fisart](https://community.tempest.earth/u/1234fisart)
#### Post date: [January 3, 2021, 10:13am UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/11 "2021-01-03T10:13:58Z")

</div>

OK Thanks that clarifies this

---

<div class="post-metadata">

### Author: ![dmeglio](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dmeglio](https://community.tempest.earth/u/dmeglio)
#### Post date: [January 3, 2021, 4:49pm UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/12 "2021-01-03T16:49:56Z")

</div>

Could you clarify on the response object (I guess I’m not in the beta program so I can’t test it out myself). It says it returns a daily and hourly forecast, but the docs don’t indicate these objects are arrays, so it does it just return the current day/hour?

---

<div class="post-metadata">

### Author: ![1234fisart](https://avatars.discourse-cdn.com/v4/letter/1/a183cd/32.png) [@1234fisart](https://community.tempest.earth/u/1234fisart)
#### Post date: [January 5, 2021, 6:14am UTC](https://community.tempest.earth/t/api-try-it-out-error/11397/13 "2021-01-05T06:14:28Z")

</div>

You receive a json string which you then convert into an array

Array  
(  
[latitude] =\> 26,16869  
[longitude] =\> -80,09912  
[timezone] =\> Europe/Berlin  
[timezone\_offset\_minutes] =\> 60  
[current\_conditions] =\> Array  
(  
[time] =\> 1609826981  
[conditions] =\> Clear  
[icon] =\> cc-clear-night  
[air\_temperature] =\> 1  
[sea\_level\_pressure] =\> 1022,8  
[station\_pressure] =\> 1016  
[pressure\_trend] =\> steady  
[relative\_humidity] =\> 98  
[wind\_avg] =\> 2  
[wind\_direction] =\> 108  
[wind\_direction\_cardinal] =\> ESE  
[wind\_direction\_icon] =\> wind-rose-ese  
[wind\_gust] =\> 4  
[solar\_radiation] =\> 0  
[uv] =\> 0  
[brightness] =\> 6  
[feels\_like] =\> 1  
[dew\_point] =\> 1  
[wet\_bulb\_temperature] =\> 1  
[delta\_t] =\> 0  
[air\_density] =\> 1,29  
[lightning\_strike\_count\_last\_1hr] =\> 0  
[lightning\_strike\_count\_last\_3hr] =\> 0  
[precip\_accum\_local\_day] =\> 0,01  
[precip\_accum\_local\_yesterday] =\> 0  
[precip\_minutes\_local\_day] =\> 14  
[precip\_minutes\_local\_yesterday] =\> 0  
[is\_precip\_local\_day\_rain\_check] =\>  
[is\_precip\_local\_yesterday\_rain\_check] =\>  
[includes\_station\_data] =\> 1  
)

```
[forecast] => Array
    (
        [daily] => Array
            (
                [0] => Array
                    (
                        [day_start_local] => 1609801200
                        [day_num] => 5
                        [month_num] => 1
                        [conditions] => Clear
                        [icon] => clear-day
                        [sunrise] => 1609762116
                        [sunset] => 1609800141
                        [air_temp_high] => 22
                        [air_temp_low] => 14
                        [air_temp_high_color] => ffc900
                        [air_temp_low_color] => 4fe25b
                        [precip_probability] => 0
                    )

```

…

```
       [hourly] => Array
            (
                [0] => Array
                    (
                        [time] => 1609830000
                        [conditions] => Clear
                        [icon] => clear-night
                        [air_temperature] => 16
                        [sea_level_pressure] => 1016,6
                        [relative_humidity] => 68
                        [precip] => 0
                        [precip_probability] => 0
                        [wind_avg] => 7
                        [wind_avg_color] => b2e6e4
                        [wind_direction] => 328
                        [wind_direction_cardinal] => NNW
                        [wind_direction_icon] => wind-arrow-nnw
                        [wind_gust] => 8
                        [wind_gust_color] => b2e6e4
                        [uv] => 0
                        [feels_like] => 16
                        [local_hour] => 8
                        [local_day] => 5
                    )

```

…

You get 10 Days and 241 hours
