[SOLVED] JSON Query doesn't match on ID with operator 'eq'

Hi again,

I am trying to query based on id’s and this is my results;

"filter": {
		"path": "id",
		"op": "eq",
		"value": "B327B6E6-531F-48CD-98E5-D9F798831F49"
	}

This return 0 results even though a published item exists with given ID

 "filter": {
        "path": "id",
        "op": "eq",
        "value": [
            "B327B6E6-531F-48CD-98E5-D9F798831F49",
            "E811102A-8E60-4C44-89AF-496985149458"
        }
    }

Results in Failed to parse json query - Array value is not allowed for ‘Equals’ operator and path ‘id’

I also get no results when trying to use inside an ‘or’ clause

"filter": {
		"or": [{
				"path": "id",
				"op": "eq",
				"value": "B327B6E6-531F-48CD-98E5-D9F798831F49"
			}
		]
	}

Is this an issue with the API?

Thanks in advance

Perhaps it is stupid idea, but can you try lowercase Guid strings?

Not a stupid idea, but I have tried both lowercase and uppercase with no luck

Do you know if it works with OData?

Yes it does seem to work with OData, the ID must be lowercase in order for it to work.

Tried also with ‘ne’ operator and it doesn’t filter out the content with the ID passed either

Which version do you use? It doesnt work with Odata either

Currently using tagged version squidex/squidex:dev-3626 from Docker.

It was my fault, I have forgotten to publish my test content. But I have pushed the fix.

1 Like

Will give it a test in the morning and let you know. Thanks for the help

1 Like

Thanks again, this all seems okay now.

1 Like