Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Retrieve version from Adobe DAM asset

koshyg63253593
Level 1
Level 1

Hi,

I have an image asset in my DAM. I want to retrieve the versions of the asset from the DAM using a querybuilder.json request call?

Is there some parameter or property that I can pass in which will return the versions of the asset?

 

Thank you

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10

I have been digging into this.

Typically - when searching - you specify a node property on which to search. One popular why to seach for DAM assets is by path.  ie - /content/dam/car

However - with versions, its different. I created some versions of an asset: 

[img]assetsVersion.png[/img]

Now when you look at the JCR structure - there is no single version property. Look here:

[img]assetsVersion2.png[/img]

Its a reference - using a GUID value -  to another part of the AEM JCR.

Therefore - it looks like you cannot simply specify version in a Restful call like:

http://localhost:4502/bin/querybuilder.json?type=nt:file&nodename=*.jar&orderby=@jcr:content/jcr:las...

as described in this topic:

https://docs.adobe.com/docs/en/cq/5-6-1/dam/customizing_and_extendingcq5dam/query_builder.html (there is no version information in this topic)

To seach for DAM assets by version - looks like you will have to build a custom service using the JCR API. You can get the reference value and then search the JCR using that reference. It will take you somewhere like:

[img]assetsVersion3.png[/img]

Now you can get all the information you want about a versioned DAM asset. 

See this topic for more information about searching for DAM assets using out of the box ways: 

https://docs.adobe.com/docs/en/cq/5-6-1/dam/how_to_use_the_damfinder.html

View solution in original post

2 Replies
smacdonald2008
Correct answer by
Level 10
Level 10

I have been digging into this.

Typically - when searching - you specify a node property on which to search. One popular why to seach for DAM assets is by path.  ie - /content/dam/car

However - with versions, its different. I created some versions of an asset: 

[img]assetsVersion.png[/img]

Now when you look at the JCR structure - there is no single version property. Look here:

[img]assetsVersion2.png[/img]

Its a reference - using a GUID value -  to another part of the AEM JCR.

Therefore - it looks like you cannot simply specify version in a Restful call like:

http://localhost:4502/bin/querybuilder.json?type=nt:file&nodename=*.jar&orderby=@jcr:content/jcr:las...

as described in this topic:

https://docs.adobe.com/docs/en/cq/5-6-1/dam/customizing_and_extendingcq5dam/query_builder.html (there is no version information in this topic)

To seach for DAM assets by version - looks like you will have to build a custom service using the JCR API. You can get the reference value and then search the JCR using that reference. It will take you somewhere like:

[img]assetsVersion3.png[/img]

Now you can get all the information you want about a versioned DAM asset. 

See this topic for more information about searching for DAM assets using out of the box ways: 

https://docs.adobe.com/docs/en/cq/5-6-1/dam/how_to_use_the_damfinder.html