Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOS stations REST API bbox filter doesn't work/gives status 400 #1

Open
Ventis opened this issue Feb 19, 2021 · 5 comments
Open

SOS stations REST API bbox filter doesn't work/gives status 400 #1

Ventis opened this issue Feb 19, 2021 · 5 comments

Comments

@Ventis
Copy link

Ventis commented Feb 19, 2021

Hi,

I'm trying to use bounding boxes to filter the stations retrieved by doing a GET request to https://geo.irceline.be/sos/api/v1/stations

The docs mention you can use a BBOX to filter the retrieved stations:
image

However, no matter how I structure the request I only get 400 statusses with a description "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."

The request I'm trying pertains to a BBOX around Bruges:

{
   "ll":{
      "type":"Point",
      "coordinates":[
         3.044164,
         51.169179
      ]
   },
   "ur":{
      "type":"Point",
      "coordinates":[
         3.285440,
         51.324772
      ]
   }
}

No docs also mention all parameters need to be URI encoded and of course for a query param that requires a JSON object I did that too.
The request failing: https://geo.irceline.be/sos/api/v1/stations?bbox=%7B%0A%20%20%20%22ll%22%3A%7B%0A%20%20%20%20%20%20%22type%22%3A%22Point%22%2C%0A%20%20%20%20%20%20%22coordinates%22%3A%5B%0A%20%20%20%20%20%20%20%20%203.044164%2C%0A%20%20%20%20%20%20%20%20%2051.169179%0A%20%20%20%20%20%20%5D%0A%20%20%20%7D%2C%0A%20%20%20%22ur%22%3A%7B%0A%20%20%20%20%20%20%22type%22%3A%22Point%22%2C%0A%20%20%20%20%20%20%22coordinates%22%3A%5B%0A%20%20%20%20%20%20%20%20%203.285440%2C%0A%20%20%20%20%20%20%20%20%2051.324772%0A%20%20%20%20%20%20%5D%0A%20%20%20%7D%0A%7D

Can anybody help me out, or is this functionality just broken on the irceline SOS REST API?

@opeeters
Copy link
Member

Hi David,
thanks for the feedback!
The structure of your example request is correct and should resolve. We will take an updated service into production soon (hopefully beginning of next week). I'm pretty sure this will resolve the issue. I'll get back to you asap.
Cheers,
Olav

@Ventis
Copy link
Author

Ventis commented Mar 2, 2021

Hey @opeeters ,

Any updates on this issue?

Kind regards,
David

@opeeters
Copy link
Member

opeeters commented Mar 2, 2021

Sorry @Ventis,
not quite there yet. The update is more complicated than initially assessed in terms of DB-changes and some other urgent matter came in between. But I'm currently working on it..

@Ventis
Copy link
Author

Ventis commented Mar 4, 2021

That seems to work idd, although the CRS param doesn't seem to work (not needed by me, just pointing it out). There's another issue I found with the data itself but I'll create a separate issue for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants