GitScrum / Docs

Time Tracking

Start, stop, and manage time tracking on tasks. Access analytics, team reports, and productivity insights.

REST API — All endpoints require authentication via Bearer token. Include Authorization: Bearer {token} in every request. Tokens are managed in GitScrum Settings → API. Base URL: https://services.gitscrum.com — All request paths in this documentation are relative to this base URL.

Track time spent on tasks with start/stop timers or manual entries. Access analytics, team reports, and productivity insights.


List time entries

GET /time-trackings?company_slug={slug}&project_slug={slug}

Returns time entries for a project. Supports filtering by date, user, and billable status.

Query parameters

ParameterTypeDescription
company_slugstringWorkspace identifier
project_slugstringProject identifier

Get active timer

GET /time-trackings/active?company_slug={slug}&project_slug={slug}

Returns the currently running timer, if any. Returns null when no timer is active.

Response

{
  "data": {
    "id": 1234,
    "task_uuid": "abc-def-123",
    "user": {
      "username": "johndoe",
      "name": "John Doe"
    },
    "started_at": "2026-02-07T09:00:00Z",
    "ended_at": null,
    "duration_minutes": null,
    "description": "Working on auth module",
    "is_manual": false,
    "created_at": "2026-02-07T09:00:00Z"
  }
}

Start timer

POST /time-trackings

Starts a timer on the specified task. Only one timer can be active at a time.

Request body

FieldTypeRequiredDescription
company_slugstringYesWorkspace identifier
project_slugstringYesProject identifier
task_uuidstringYesTask to track time on

Example

curl -X POST https://services.gitscrum.com/time-trackings \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "company_slug": "acme",
    "project_slug": "web-app",
    "task_uuid": "abc-def-123"
  }'

Response

{
  "data": {
    "id": 1234,
    "task_uuid": "abc-def-123",
    "started_at": "2026-02-07T09:00:00Z",
    "ended_at": null,
    "duration_minutes": null,
    "is_manual": false,
    "created_at": "2026-02-07T09:00:00Z"
  }
}

Stop timer

PUT /time-trackings/{id}

Stops the running timer and records the time entry.

Path parameters

ParameterTypeDescription
idintegerTime tracking entry ID

Request body

FieldTypeRequiredDescription
company_slugstringYesWorkspace identifier
project_slugstringYesProject identifier

Example

curl -X PUT https://services.gitscrum.com/time-trackings/1234 \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "company_slug": "acme",
    "project_slug": "web-app"
  }'

Response

{
  "data": {
    "id": 1234,
    "task_uuid": "abc-def-123",
    "started_at": "2026-02-07T09:00:00Z",
    "ended_at": "2026-02-07T10:30:00Z",
    "duration_minutes": 90,
    "is_manual": false,
    "created_at": "2026-02-07T09:00:00Z"
  }
}

Create manual entry

POST /time-trackings

Creates a manual time entry with explicit start and end times.

Request body

FieldTypeRequiredDescription
company_slugstringYesWorkspace identifier
project_slugstringYesProject identifier
task_uuidstringYesTask UUID
started_atdatetimeYesStart time (ISO 8601)
ended_atdatetimeYesEnd time (ISO 8601)
descriptionstringNoWhat was worked on

Response

{
  "data": {
    "id": 1235,
    "task_uuid": "abc-def-123",
    "started_at": "2026-02-06T14:00:00Z",
    "ended_at": "2026-02-06T16:30:00Z",
    "duration_minutes": 150,
    "description": "Code review for PR #42",
    "is_manual": true,
    "created_at": "2026-02-07T09:15:00Z"
  }
}

Delete time entry

DELETE /time-trackings/{id}?company_slug={slug}&project_slug={slug}

Permanently deletes a time tracking entry.

Path parameters

ParameterTypeDescription
idintegerTime entry ID

Time tracking analytics

GET /time-trackings/analytics?company_slug={slug}&project_slug={slug}

Returns time tracking analytics data including total hours, averages, and trends.

Example

curl https://services.gitscrum.com/time-trackings/analytics?company_slug=acme&project_slug=web-app \
  -H "Authorization: Bearer {token}"

Response

{
  "data": {
    "total_hours": 245.5,
    "average_daily_hours": 6.2,
    "top_contributors": [],
    "by_task_type": [],
    "trend": []
  }
}

Team time report

GET /time-trackings/team?company_slug={slug}&project_slug={slug}

Returns team-level time tracking data with per-member breakdowns.

Response

{
  "data": {
    "team_members": [
      {
        "username": "johndoe",
        "total_hours": 38.5,
        "tasks_tracked": 12
      }
    ]
  }
}

Time reports

GET /time-trackings/reports?company_slug={slug}&project_slug={slug}

Returns comprehensive time reports with filtering and grouping options.


Productivity report

GET /time-trackings/productivity?company_slug={slug}&project_slug={slug}

Returns productivity metrics including focus time, context switches, and efficiency scores.


Timeline

GET /time-trackings/timeline?company_slug={slug}&project_slug={slug}

Returns time entries in a timeline view, ordered chronologically.


Field reference

FieldTypeDescription
idintegerTime entry ID
task_uuidstringAssociated task UUID
userobjectUser who tracked time
started_atdatetimeTimer start time
ended_atdatetimeTimer end time (null if running)
duration_minutesintegerTotal duration in minutes
descriptionstringWork description
is_manualbooleanWhether entry was created manually
created_atdatetimeRecord creation timestamp