11-25-2020 04:02 AM
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.
11-25-2020 04:03 AM
++ adding one point.
I need api for this
11-25-2020 09:59 AM
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,
11-25-2020 06:06 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.