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

IN operator not working for assets #256

Open
LeanderFS opened this issue Nov 14, 2022 · 0 comments
Open

IN operator not working for assets #256

LeanderFS opened this issue Nov 14, 2022 · 0 comments

Comments

@LeanderFS
Copy link

While developing an importer for the assets I've bumped into a rather strange issue. The docs (GET THE LIST OF THE ASSETS OF A GIVEN ASSET FAMILY ) state that the endpoint supports filtering based on an asset code. But for some reason the stated syntax doesn't work with the API client.

For instance, the following url will always return an exception.
https://[instance-name].cloud.akeneo.com/api/rest/v1/asset-families/[asset-family-code]/assets?search=%7B%22code%22%3A%5B%7B%22operator%22%3A%22IN%22%2C%22value%22%3A%5B%221200x1200%22%2C%22vooraanzicht_2%22%5D%7D%5D%7D

{"code":422,"message":"The search filters have an invalid format.","errors":[{"property":"","message":"The property code is not defined and the definition does not allow additional properties"}]}

If I urldecode this uri it has the exact same syntax as the docs (here) show:
https://[instance-name].cloud.akeneo.com/api/rest/v1/asset-families/[asset-family-code]/assets?search={"code":[{"operator":"IN","value":["1200x1200","vooraanzicht_2"]}]}

Seems like something is not quite working, or I'm not understanding the docs.

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

1 participant