Open kryvel opened 10 months ago
Hey! I think there may be a weird programming language idiosyncrasy here: Python likes the straight variant, whereas PHP and Ruby seem to parse the square bracket syntax more easily. Since I'm not super keen on breaking the API, perhaps we could look into defining x[]
as an alias for the x
variant?
Hi, Friedrich I believe an alias would be more than enough in this case. However, it would be great to mention such behaviours in the documentation within the parameter description, so users won't be confused by the query syntax.
Hello,
I would like to discuss the handling of GET query parameters in the OpenSanctions API.
After a thorough debugging, I have identified the reason why my query is not functioning as expected. It is a simple matching request with excluded datasets, as shown below:
Original Query:
However, the API expects the following syntax for array parameters:
Expected Query Syntax:
In my opinion, this approach seems a bit unconventional. Typically, arrays in GET queries are passed in one of the following common ways:
Using square brackets for each parameter value:
Comma-separated values for a single parameter:
Is this behavior the intended and expected behavior for the OpenSanctions API?
Thank you for your clarification.