Ir al contenido

Time entries

Esta página aún no está disponible en tu idioma.

Time tracking is self-report per member: these endpoints read YOUR OWN entries and running timer only — there is no all-members read.

List YOUR OWN time entries in a workspace (time tracking is self-report per member — there is no all-members read). Optional issueId narrows to one issue; from/to (ms epoch, on the entry start) bound the range. Newest first; returns { entries: [{ id, activityType, startedAt, stoppedAt, running, trackedMs, note, issues }], count, capped }. capped: true means more than limit matched — raise limit (default 25, max 100) or tighten the range. Answers “how much time did I log this month?”.

GET /v1/workspaces/{workspaceId}/time-entries

Terminal window
curl -H "Authorization: Bearer $DOTBY_TOKEN" \
"https://api.dotby.app/v1/workspaces/acme/time-entries?limit=25"

Response: a list envelope { data, has_more, next_cursor }. While has_more is true, pass next_cursor back as cursor to get the next page.

Get YOUR current running timer in a workspace (the single active block), or null when nothing is running. Returns the activity tag, start time, segments, live rate, and the issues it’s tracking.

GET /v1/workspaces/{workspaceId}/time-entries/running

Terminal window
curl -H "Authorization: Bearer $DOTBY_TOKEN" \
"https://api.dotby.app/v1/workspaces/acme/time-entries/running"

Response: the resulting object as JSON.

Every error is an RFC 9457 application/problem+json body with a machine-stable code. Branch on the code, not the message:

  • 401unauthenticated / invalid_token: the bearer token is missing, expired, or revoked. Re-authenticate; do not retry as-is.
  • 403insufficient_scope / forbidden / upgrade_required: the token works but may not do this. upgrade_required means the workspace is not on Pro.
  • 404not_found_or_forbidden: the resource does not exist for this token. Never probe for existence.
  • 409idempotency_conflict: same Idempotency-Key, different body. Mint a new key.
  • 429rate_limited: back off for the number of seconds in Retry-After, then retry.
  • 400validation_failed: the request shape is wrong. Fix the request; retrying unchanged will fail again.