Hi,
I'm using rest API and I'm able to work with nodes as soon as I have his ID ..
but in that new case I would like to retrieve, with the REST API, the doc id of the last document that has been created
Could someone help achieve this result ?
thnaks !
The request for Search API is:
curl -X POST "http://localhost/alfresco/api/-default-/public/search/versions/1/search" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"query\": { \"language\": \"afts\", \"query\": \"TYPE:'cm:content'\" }, \"paging\": { \"maxItems\": 1, \"skipCount\": 0 }, \"sort\": [ { \"type\": \"FIELD\", \"field\": \"cm:created\", \"ascending\": false } ]}"
The query from this request is:
{ "query": { "language": "afts", "query": "TYPE:'cm:content'" }, "paging": { "maxItems": 1, "skipCount": 0 }, "sort": [ { "type": "FIELD", "field": "cm:created", "ascending": false } ] }
It's just a draft for the direction to moving on. Check the properties and make a closer query string.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.