get list of files in documentLibrary through REST API

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2015 08:24 AM
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"
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"
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2015 07:54 AM
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!
/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!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2015 11:00 AM
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.
/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.
