REST API to fetch all the documents in a workspace
I need to fetch all folders/documents inside a workspace. I was going through the REST APIs mentioned here and tried the following REST call:
http://localhost:8080/nuxeo/site/api/v1/path/default-domain/workspaces/templatesamples
But this returns only the workspace document and not its children.
Is there any REST API to get all folders/contents in a workspace or in a folder?
Just do a query with /api/v1/query
(see the Nuxeo API Playground) and pass a query like SELECT * FROM Document WHERE ecm:path STARTSWITH '/default-domain/workspaces/templatesamples'
Use this: http://localhost:8080/nuxeo/site/api/v1/path/@children
This will return you the json of all documents under root “/“. hope this will solve your problem.