Skip to content

IN operator not working for assets #256

Open
@LeanderFS

Description

@LeanderFS

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions