Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Retrieve Asset Publish/ updated date via API

Avatar

Level 1

I could really use some help here. In looking at the API documentation it does not appear that AEM is providing the dates for initial upload and dates updated via API. 

We need to integrate AEM to another system and flag documents in AEM. That flag we have a way to do based on the type of document. However if that document gets updated the API protocol should allow for us to grab only new or updated documents since the last API pull from AEM. I do not see this in the API. Am I missing something? Can anyone provide insight or guidance on this? 

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hey @CurtBrink ,

You can first create a property in the document node and maintain it. To do it we can create a workflow with launcher will need a path of the folder where your Document will reside. In the backend, you can add a property of asset or doc with custom date modified property(which needs to maintain AEM/API).

 

So next time when you add a document in a folder then automatically you will get the property created with the date which will work for AEM.

 

Now For API also, whenever the call to API happens just pull the doc reference and adapt it and update the modified date property which we have created in the above step. 

Let us know the rest.

 

Happy Coding

~BK

View solution in original post

4 Replies

Avatar

Community Advisor

@CurtBrink ,

You can try to create your own Servlet to expose this details using the "AssetVersionManager", however, data cannot be found when versions have been purged. 

Avatar

Level 5

@CurtBrink You can use the jcr;created property to know the initial upload date of the asset and jcr:content/jcr:lastModified property to know the last modified date of the asset.

You can read these properties from the valueMap

 

 

https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/javadoc/co...

Avatar

Level 1
To clarify some of these answers refer to the Adobe software package library which uses Java. I am looking to leverage this with an API protocol that will require C#.

Avatar

Correct answer by
Level 4

Hey @CurtBrink ,

You can first create a property in the document node and maintain it. To do it we can create a workflow with launcher will need a path of the folder where your Document will reside. In the backend, you can add a property of asset or doc with custom date modified property(which needs to maintain AEM/API).

 

So next time when you add a document in a folder then automatically you will get the property created with the date which will work for AEM.

 

Now For API also, whenever the call to API happens just pull the doc reference and adapt it and update the modified date property which we have created in the above step. 

Let us know the rest.

 

Happy Coding

~BK