Hi All,
I want to check and see if there is a way within either the Query Builder or any of the API's where we can get all the assets under a given path grouped by folder structure
Here is a sample query that just gets the assets based on type
I want to see if we can get the JSON including the folder name and all the assets under the folder name grouped via folders.
I can use the Query Builder API to get the folders alone and then construct a custom JSON to get all child nodes under each folder of the Type Assets and their metadata but want to check and see if there is a better way to do this.
Any suggestions are helpful
Thanks,
Ravi
Solved! Go to Solution.
Views
Replies
Total Likes
You could use any type of query in source code - QB, SQL2, xpath. Make sure to make it more specific and fetch relevant data to optimize it.
sample SQL2 query to just fetch asset/folder names with url1. Based on your requirements, you could add metadata or other nodes..
SELECT * FROM [dam:Asset] as s WHERE (NAME() LIKE '%.jp%' or NAME() LIKE '%.png') and ISDESCENDANTNODE(s,'/content/dam/we-retail')
Views
Replies
Total Likes
Looks like your way of using QB API and then constructing JSON is the solution here.
Views
Replies
Total Likes
You could use any type of query in source code - QB, SQL2, xpath. Make sure to make it more specific and fetch relevant data to optimize it.
sample SQL2 query to just fetch asset/folder names with url1. Based on your requirements, you could add metadata or other nodes..
SELECT * FROM [dam:Asset] as s WHERE (NAME() LIKE '%.jp%' or NAME() LIKE '%.png') and ISDESCENDANTNODE(s,'/content/dam/we-retail')
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies