Hi,
Could anyone advise if it is possible to custom define/override the system-audit attributes while inserting a new document/content into Alfresco using REST-API POST request end-point - e.g.: cm:created, cm:modified ??
Thanks,
As far as i know, you can not override the default auditable properties such as creator, created, modifier, modified etc by any means. These properties are protected and mandatory by design.
See the auditable aspect which is defined in default content model:
<aspect name="cm:auditable"> <title>Auditable</title> <properties> <property name="cm:created"> <title>Created</title> <type>d:datetime</type> <protected>true</protected> <mandatory enforced="true">true</mandatory> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>both</tokenised> <facetable>true</facetable> </index> </property> <property name="cm:creator"> <title>Creator</title> <type>d:text</type> <protected>true</protected> <mandatory enforced="true">true</mandatory> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>true</tokenised> <facetable>true</facetable> </index> </property> <property name="cm:modified"> <title>Modified</title> <type>d:datetime</type> <protected>true</protected> <mandatory enforced="true">true</mandatory> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>both</tokenised> <facetable>true</facetable> </index> </property> <property name="cm:modifier"> <title>Modifier</title> <type>d:text</type> <protected>true</protected> <mandatory enforced="true">true</mandatory> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>true</tokenised> <facetable>true</facetable> </index> </property> <property name="cm:accessed"> <title>Accessed</title> <type>d:datetime</type> <protected>true</protected> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>both</tokenised> </index> </property> </properties> </aspect>
However, if you have a very specific requirement then, you can create custom properties (to map created, modified info) in your custom content model and set the values as needed.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.