在Clockify API中过滤摘要报告以仅显示可计费时间

时间:2019-04-06 20:21:41

标签: clockify

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

如果将“可结算”设置为除“ 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"
}

如果我将“ billable”设置为“ true”(或对此设置为“ false”,我收到的错误消息是)

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

1 个答案:

答案 0 :(得分:0)

official docs中,属性“可结算”的可用值为:

"BOTH", "BILLABLE", "NOT_BILLABLE"