cancel
Showing results for 
Search instead for 
Did you mean: 

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

k_belfort
Champ in-the-making
Champ in-the-making

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 1

openpj
Elite Collaborator
Elite Collaborator

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