AEM Asset API not updating jcr:lastModified and jcr:lastModifiedBy of content fragment | Community
Skip to main content
Naga_Seran
Level 2
July 20, 2023
Question

AEM Asset API not updating jcr:lastModified and jcr:lastModifiedBy of content fragment

  • July 20, 2023
  • 2 replies
  • 1319 views
Hi All, We have an internal tool to update content fragment using Asset API. We found that jcr:lastModified and jcr:lastModifiedBy information is not updating while making updates to content fragment using AEM asset api. We tried to add modifiedBy & modified properties in request body but no luck. Could you please advise on this method: 'put', url: '/api/assets/', data: '{"properties":{"modifiedBy":"admin","modified":"","contentFragment":true,"elementsOrder":["state","plan"],"elements":{"state":{":type":"string","title":"State","multiValue":true,"dataType":"string","value":["NY"]},"plan":{":type":"string","title":"Plan","multiValue":true,"dataType":"string","value":["1234"]}}}}', Thanks, Seran
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

DPrakashRaj
Community Advisor
Community Advisor
July 21, 2023

Modified and modified by property are protected property in aem. These properties values are maintained by aem and can’t be modified by any script or even via crx/de

July 21, 2023

Thank You for your reply PraksahRaj. Do we have a way to get these values updated when an update happened to content fragment from AEM asset api

kautuk_sahni
Community Manager
Community Manager
October 18, 2024

@naga_seran If you have successfully found a solution on your own, we kindly ask that you share it with the community for future reference and mark it as the correct answer.

Kautuk Sahni