我一直在尝试使用 Clockify api 生成报告,并且一直在关注官方文档。首先我尝试使用自己的数据,但经过反复试验,我什至开始尝试默认数据。也没有运气。根据文档,这应该有效:
curl -X POST -H 'X-Api-Key: {apikey}' -H 'content-type: application/json' -d '{
"startDate": "2018-06-18T00:00:00.000Z",
"endDate": "2018-06-24T23:59:59.999Z",
"me": "false",
"userGroupIds": "[]",
"userIds": "[]",
"projectIds": "[]",
"clientIds": "[]",
"taskIds": "[]",
"tagIds": "[]",
"billable": "BOTH",
"includeTimeEntries": "true",
"zoomLevel": "week",
"description": "",
"archived": "Active",
"roundingOn": "false"
}' -v -i
'https://api.clockify.me/api/workspaces/{workspace}/reports/summary/'
但事实并非如此。响应将是:
{
"message": "Could not read document: Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token\n at [Source: java.io.PushbackInputStream@4a679880; line: 5, column: 19] (through reference chain: com.clockify.adapter.http.summaryReport.GetSummaryReportRequest[\"userGroupIds\"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token\n at [Source: java.io.PushbackInputStream@4a679880; line: 5, column: 19] (through reference chain: com.clockify.adapter.http.summaryReport.GetSummaryReportRequest[\"userGroupIds\"])",
"code": 3002
}
我不知道我做错了什么,所以任何帮助将不胜感激。