API filter with localization

Hi,
I have schema with localized content like this

    "items": [
        {
            "data": {
                "id": {
                    "en": "title",
                    "cs-CZ": "nadpis"
                }

and I want to filter by id via REST API. When I try query ?$filter=data/id/en eq 'title', it is correct, but when I try ?$filter=data/id/cs-CZ eq 'nadpis' it returns error Syntax error at position 11 in 'data/id/cs-CZ eq 'nadpis''..

Can I escape dash for cs-CZ language?

Best Regards
Adam

Just read this: https://docs.squidex.io/02-documentation/developer-guides/api-overview/api#odata-restrictions

Just try ?$filter=data/id/cs_CZ eq 'nadpis'

Yes, it works.

Many thanks
Adam

1 Like