[DOCU-1855] Tip for commands endpoint usage: parameters of type Date must be supplied in "millis/long" format Created: 14/Feb/19 Updated: 10/Sep/20 Resolved: 30/Jul/19 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Richard Gange |
| Resolution: | Done | Votes: | 0 |
| Labels: | quickwin | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Description |
|
It is not obvious or intuitive how to properly supply the value for a command parameter that expects a Date type. Include a tip on this page (and 5.7, 6.1) on how to do it: https://documentation.magnolia-cms.com/display/DOCS60/Commands+endpoint+API Suggestion, in the "body" parameter description, include the following:
|
| Comments |
| Comment by Richard Gange [ 30/Jul/19 ] |
|
czimmermann and cc awarinner I was working on this ticket. I wanted to do a publication example and a scheduled publication example. curl http://localhost:8080/magnoliaAuthor/.rest/commands/v2/website/activate \ -H "Content-Type: application/json" \ -X POST --user superuser:superuser \ --data \ '{ "comment": "Published via REST (scheduled)", "publicationDate": "2020-01-01T11:10:00.000+01:00", "repository": "website", "path": "/travel/hello", "recursive": false }' Sending the date as a string in the proper format also created a date property in the JCR. Do either of you know in what scenario I need to use milliseconds since 1/1/1970? Maybe I need to add another example to the page. |
| Comment by Richard Gange [ 30/Jul/19 ] |
|
Done 5.7, 6.0, 6.1. Added an example for scheduled publication which shows how to send a date. |