cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching files list from folder

aishu
Champ on-the-rise
Champ on-the-rise

Dear Team,

I need to get list of files information of one folder by using folder name from site.

Could you please help on this!

Kind & Regards,

Aishwarya Jadhav.

3 REPLIES 3

aishu
Champ on-the-rise
Champ on-the-rise

++ adding one point.

I need api for this

EddieMay
World-Class Innovator
World-Class Innovator

Hi @aishu 

@sanjaybandhniya beat me to it! You can also use Lucene search query in a very similar way.

http://localhost/alfresco/api/-default-/public/search/versions/1/search

The query body is as follows:

{
"query": {
"query": "PATH:\"/app:company_home/st:sites/cm:publicSiteAPI/cm:documentLibrary/cm:Uploads//*\" AND (TYPE:\"cm:content\" OR TYPE:\"cm:folder\")",
"language": "lucene"
},
"include": ["properties"]
}

This limits the query to all files or folders under the Uploads folder of the publicSiteAPI site.

Kudos to @gtarafder for posting this solution here.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

sanjaybandhaniya
Elite Collaborator
Elite Collaborator

You can use REST API for search.

https://api-explorer.alfresco.com/api-explorer/#/search

URL : http://localhost:8080/alfresco/api/-default-/public/search/versions/1/search (post method)

Body : 

{
"query": {
"query": "PATH:\"/app:company_home/st:sites/cm:swsdp/cm:documentLibrary/cm:test//*\"",
"language": "afts"
}
}

Here swsdp is site-name and test  is folder name.