#1: Date Formats
I can't seem to update any of the attribute fields that are defined with the "Date" type. I've tried a bunch of different formats without luck, but each results in a 500 Intneral Server Error.
Code: Select all
curl -v -u admin:password -X PUT
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"id":5445646,"folderId":5539667,"title":"Termination2","templateId":5603328,"attributes":[{"name":"carNo","value":"CAR-newer"},{"name":"modDate","value":"1974-07-27 13:12:07 +0100"}] }' \
"http://localhost:8080/services/rest/document/update"
Code: Select all
07/27/1974
07271974
19740727
1974/07/27
1974-07-27
1974-07-27 13:12:07 +0100
1974-07-27 13:12:07
1974-07-27T13:12:07 +0100
1974-07-27 13:12:07
1489088532
#2: Updating standard properties
I am using the REST API (in part) to migrate documents from our old document management system. I'd like to preserve the created/published date and user. Is there any way to update those fields via the REST API? The following has no effect:
Code: Select all
curl -v -u admin:password -X PUT \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"id":5445646,"folderId":5539667,"title":"Termination2","create}' \
"http://localhost:8080/services/rest/document/update"
Code: Select all
"date": "2017-03-09 11:06:41 -0500"
"creation": "2017-03-09 11:06:41 -0500"
"lastModified": "2017-03-09 14:52:33 -0500"
"publisher": "User"
"publisherId": 5341184
"creator": "User"
"creatorId": 5341184