Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Curl command to set date property value

Avatar

Level 4

Hi,

How can I set date as a property value on a node using CURL command?

Currently I am trying to execute below curl command but it is setting as String property.

curl -u "user:pwd" --data "displayDate=2016-10-19T09:16:43.215-04:00" http://localhost:4502/content/my-site/my-page/jcr:content

Thanks,

Radha Krishna N

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Could you please try to add typeHint as well in your command e.g.

curl -u "user:pwd" --data "displayDate=2016-10-19T09:16:43.215-04:00" -F "displayDate@TypeHint=Date" http://localhost:4502/content/my-site/my-page/jcr:content 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi,

Could you please try to add typeHint as well in your command e.g.

curl -u "user:pwd" --data "displayDate=2016-10-19T09:16:43.215-04:00" -F "displayDate@TypeHint=Date" http://localhost:4502/content/my-site/my-page/jcr:content 

Avatar

Level 4

Hi All,

After surfing over net for couple of hours, found the solution!!

We need to pass TypeHint as Date [1]

So the curl command will be

curl -u "user:pwd" --data "displayDate=2016-10-19T09:16:43.215-04:00" --data "displayDate@TypeHint=Date" http://localhost:4502/content/my-site/my-page/jcr:content

[1] Sling over HTTP | Jukka Zitting

Thanks,

Radha Krishna N