如何为clockify API指定date/time?哪些字段是可选的?

How to specify date/time for the clockify API? Which fields are optional?

这似乎工作正常:

curl -H 'content-type':'application/json' -H 'X-Api-Key':'<my-key>' -X POST --data '{"start": "2018-06-12T13:48:14.000Z", "tagIds": ["<my-tag-id>"] }' https://api.clockify.me/api/workspaces/<my-workspace-id>/timeEntries/

它创建一个没有结束日期的新条目(时钟仍然 运行),从给定的时间戳开始。 "start" 似乎是必填字段。如果我省略 "start" 字段,我会得到一个错误:

{"message":"text","code":3002}%                                                                                                       

我想知道是否可以在没有绝对时间戳的情况下立即启动时钟,即通过执行以下操作:

curl -H 'content-type':'application/json' -H 'X-Api-Key':'<my-key>' -X POST --data '{"start": "now", "tagIds": ["<my-tag-id>"] }' https://api.clockify.me/api/workspaces/<my-workspace-id>/timeEntries/

很遗憾 "now" 不起作用:

{"message":"Could not read document: Can not construct instance of com.clockify.adapter.http.timeentry.CreateTimeEntryRequest, problem: Text '' could not be parsed at index 0\n at [Source: java.io.PushbackInputStream@1817b774; line: 1, column: 54]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.clockify.adapter.http.timeentry.CreateTimeEntryRequest, problem: Text '' could not be parsed at index 0\n at [Source: java.io.PushbackInputStream@1817b774; line: 1, column: 54]","code":3002}%  

现在 'start' 是该端点上唯一的必填字段,并且没有自动从当前时间开始的解决方法。我们一定会考虑这些反馈,以便将来改进 API。