Skip to content
ClockLap Developers
API reference clocklap.com Get an API key

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

NameTypeDescription
status"open" | "dismissed" | "looks_fine" | "resolved" | "all"
kindstring (9 values)
severity"low" | "medium" | "high"
location_idstring
user_idstring
fromstringWeeks starting on or after this date (default: the last 4 weeks)
tostring
weeksintegerThis week and the ones before it, in the workspace's own weeks (instead of from)
limitinteger
cursorstring

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

NameTypeDescription
idrequiredstring

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

NameTypeDescription
idrequiredstring

Body (JSON)

NameTypeDescription
verdictrequired"dismiss" | "looks_fine" | "reopen"
notestring

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