Hello,
Cuba is a really great framework! Now I follow Cuba cookbook to learn how new rest-api v2 works.
I have tested it on couple apps, including Bicycle Workshop and successfully applied non-preset requests like listing entities, updating, creating - they work just great.
except “search”.
Having URL:
http://localhost:8080/app/rest/v2/entities/workshop$SparePart/search
On POST search I pass JSON inside the request body:
{ "filter": { "conditions": { "property": "price", "operator": "=", "value": 10 } } }
And get HTTP 500 error
On GET search I pass JSON after URL :
{ "conditions": { "property": "price", "operator": "=", "value": 10 } }
And get HTTP 400 error:
{"error":"Invalid entity ID","details":"Cannot convert search{ \"conditions\": { \"property\": \"price\", \"operator\": \"=\", \"value\": 10 } } into valid entity ID"}
I have tried to separate JSON from search keyword using /, , ?, =. But the response is nearly the same
It looks like server expects to receive id number after workshop$SparePart/, and reads “search” keyword as a part of entity ID.
project’s platform version 6.8 (search exist since 6.7)
Could you please test it on your environment? Or point eventual mistakes in my requests?
Thank you very much!!!
Best regards,
Igor