API reference
Insights
6 endpoints. Click one to see its parameters, fields and an example. Code samples use the region you pick.
GET/v1/insightsUnusual patterns in the sites I look after, most important first
Unusual patterns in the sites I look after, most important first
Query parameters
| Name | Type | Description |
|---|---|---|
status | "open" | "dismissed" | "looks_fine" | "resolved" | "all" | |
kind | string (9 values) | |
severity | "low" | "medium" | "high" | |
location_id | string | |
user_id | string | |
from | string | Weeks starting on or after this date (default: the last 4 weeks) |
to | string | |
weeks | integer | This week and the ones before it, in the workspace's own weeks (instead of from) |
limit | integer | |
cursor | string |
Example
curl "https://ca-api.clocklap.com/v1/insights" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/insights/{id}One insight with the facts behind it
One insight with the facts behind it
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Example
curl "https://ca-api.clocklap.com/v1/insights/{id}" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/insights/{id}/feedbackDismiss (this week), mark as looks fine (quiet for 8 weeks), or reopen
Dismiss (this week), mark as looks fine (quiet for 8 weeks), or reopen
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string |
Body (JSON)
| Name | Type | Description |
|---|---|---|
verdictrequired | "dismiss" | "looks_fine" | "reopen" | |
note | string |
Example
curl -X POST "https://ca-api.clocklap.com/v1/insights/{id}/feedback" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"verdict":"dismiss","note":"string"}'Responses
200
GET/v1/insights/digest/previewThe Monday digest I would get today
The Monday digest I would get today
Example
curl "https://ca-api.clocklap.com/v1/insights/digest/preview" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
POST/v1/insights/runCheck for insights now (the whole workspace; at most once a minute)
Check for insights now (the whole workspace; at most once a minute)
Example
curl -X POST "https://ca-api.clocklap.com/v1/insights/run" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200
GET/v1/insights/runs/latestWhen insights were last checked
When insights were last checked
Example
curl "https://ca-api.clocklap.com/v1/insights/runs/latest" \
-H "Authorization: Bearer $CLOCKLAP_API_KEY"Responses
200