More samples of REST implementation

Where can we find more sample of REST services implemantion than the Axelor documentation.

For example, on advanced search what is the correct syntax to search for 1 criteria ? what is the correct syntax to have all fields ? and so on …
The REST documentation is very very basic (Example is the so-famous auth/login problem with X-Request-With missing information).

Currently i try to make a project advanced search (in TestComplete as well as in Postman) but i have always an “java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.util.List” in response.

So i need to see more sample to understand if problem comes from me or not.

Now i’m able successfully creating addresses, creating project, editing project, listing project, …

But still unable to make advanced search. The documentation sample not even work

Type : POST
Url : https://XXXX.axelor.com/ws/rest/com.axelor.apps.project.db.Project/search
Body : { “offset”: 0, “limit”: 10, “fields”: [“code”, “name”], “sortBy”: [“code”, “name”], “data”: { “criteria”: {“operator”: “and”, “criteria”: [{ “fieldName”: “code”, “operator”: “=”, “value”: “CREA007” }, { “fieldName”: “name”, “operator”: “=”, “value”: “TEST TEST” }] } } }

java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.util.Lis

So pity that no answer here, a good community is all …

Correct sample is:

Type : POST
Url : https://XXXXX.axelor.com/ws/rest/com.axelor.apps.project.db.Project/search
Body :
{
“offset”: 0,
“limit”: 10,
“fields”: [“code”, “name”],
“sortBy”: [“code”, “name”],
“data”: {
“criteria”: [ {“fieldName”: “code”, “operator”: “like”, “value”: “CREA”}, {“fieldName”: “name”, “operator”: “like”, “value”: “TEST”} ] }
}
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.