0

我正在尝试使用 API 来仅检索计费时间。

如果“billable”设置为“BOTH”以外的任何值,API 会以错误响应。

我正在使用以下端点:

https://api.clockify.me/api/workspaces/[workspace id]/reports/summary/

这是我的请求正文:

{
    "archived": "Active",
    "billable": "true",
    "clientIds": [],
    "description": "",
    "endDate": "2019-05-31T23:59:59.999Z",
    "firstTime": "true",
    "includeTimeEntries": "true",
    "me": "true",
    "name": "",
    "projectIds": [],
    "startDate": "2019-01-01T00:00:00.000Z",
    "tagIds": [],
    "taskIds": [],
    "userGroupIds": [],
    "userIds": [],
    "zoomLevel": "week"
}

如果我将“可计费”设置为“真”(或“假”),我收到的错误消息是:

{
    "message": "No enum constant com.clockify.domain.model.Billable.true",
    "code": 501
}
4

1 回答 1

0

官方文档中,“可计费”属性的可用值是:

"BOTH", "BILLABLE", "NOT_BILLABLE"
于 2019-04-07T00:35:46.220 回答