09-09-2016 07:12 AM
Hi,
I would like to write date entry to a multi-valued complex field in an automation
Unfortunately my POST request leads to errors when I use @{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)} as suggested in the API playground:
POST /nuxeo/site/automation/Document.Update HTTP/1.1
HOST: localhost:8080
x-authentication-token: xxx
x-nxrepository: default
x-nxproperties: *
x-nxvoidoperation: false
content-type: application/json+nxrequest
cookie: X-Authentication-Token=xxx
content-length: 265
{"params":{"properties":"approval:approval/approval_a_typ=2\napproval:approval/approval_date=@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)}","save":"true"},"input":"/default-domain/workspaces/Sample Content/Test","context":{}}
{
"entity-type": "exception"
"code": "org.nuxeo.ecm.automation.TraceException"
"status": 500
}
In case I add the date manually it works:
{"params":{"properties":"approval:approval/approval_a_typ=1\napproval:approval/approval_date=2016-09-09T11:14:42Z\napproval:approval/approval_approver=Administrator","save":"true"},"input":"/default-domain/workspaces/Sample Content/Test","context":{}}
How can I add the current date? Any help highly appreciated.
Thanks
Stefan
09-09-2016 08:21 AM
2016-09-09 14
09-09-2016 09:41 AM
I don t think you can use EL (@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)} ) along with the REST API
09-12-2016 04:57 AM
then the info on the nuxeo API playground (/nuxeo/playground/#/commands/Document.Update) should be updated accordingly as it says
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.