cancel
Showing results for 
Search instead for 
Did you mean: 

get list of files in documentLibrary through REST API

erik2
Champ in-the-making
Champ in-the-making
I'm looking to do a very simple thing: get a list of files in the document-library of a certain site.
I've found this post https://forums.alfresco.com/forum/developer-discussions/content-modeling/get-all-child-elements-unde..., but like there i get a 404 when i GET the /children-url.

I am able to get the site information, and the site uuid. Also the CMIS-url described there gives me a 404.

How do i get a list of files in the document-library??

We're using the community-edition, 5.0:
"edition": "Community",
"version": "5.0.0 (d r99759-b2)",
"schema": "8022"
2 REPLIES 2

ilopez
Champ in-the-making
Champ in-the-making
I'm not an expert but if I'm not mistaken the url given in that post is a cmis 1.0(which doesn't work for me either), you could try with the 1.1 one:
/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/sites/SITENAME/PATH/TO/YOUR/FOLDER?cmisselector=children

E.G: /alfresco/api/-default-/public/cmis/versions/1.1/browser/root/sites/testSite/documentLibrary/myFolder?cmisselector=children

I hope it works!

erik2
Champ in-the-making
Champ in-the-making
Thanks for the reply, i finally found it through:

/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/sites/SITENAME/documentLibrary/FOLDERNAME

This works either with FOLDERNAME or without.

What also really helps is this page: /alfresco/s/index (log in with an (admin)-account), which lists all possible API-endpoints.