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.
++ adding one point.
I need api for this
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.
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,
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.