REST API, POST File: Need help with setting 'Creation Date', 'Modified Date', 'Modified By'

cancel
Showing results for 
Search instead for 
Did you mean: 
k_belfort
Member II

REST API, POST File: Need help with setting 'Creation Date', 'Modified Date', 'Modified By'

Dear reader,

 

I am using REST API to upload files/folder to Alfresco versions 5.2 and higher.

I've managed to upload many files/folder and set most of the properties.

But when I try to modify the following system fields: 'Creation Date', 'Modified Date', 'Created By', 'Modified By' my requests fail, without any specific message. (ECONNRESET)

I've done some research and I believe it's because these fields are protected, meaning I can't set them, or pass in them in the request body. 

 

Can anyone help me to solve this issue?

 

Kind regards,

Kamil

1 Reply
openpj
Moderator
Moderator

Re: REST API, POST File: Need help with setting 'Creation Date', 'Modified Date', 'Modified By'

Protected fields are only managed by the repository using the Java API.

If you need to set custom date fields, you have to define your own date fields in your content model definition.

Hope this helps Smiley Wink