Time tracking API reference
Updated
These tables cover the OnRamp API endpoints for time entries, allotted time and the allotted vs worked report, with their limits and error responses.
Time tracking must be turned on for your organization. If it isn't, every endpoint here answers 409. To have it turned on, contact your OnRamp team.
Paths are relative to your base URL, https://api.onramp.us or https://eu.api.onramp.us. For base URLs, API keys and the full endpoint documentation, see OnRamp API reference.
Endpoints
Method and path | What it does | The API key must be able to |
|---|---|---|
| Lists time entries, newest first. | View time reports |
| Returns one time entry. | View the entry's project |
| Logs a time entry for a user. | Update tasks in the project |
| Changes the fields you send. | Update tasks in the entry's project |
| Removes a time entry. | Update tasks in the entry's project |
| Returns a task's allotted, worked and variance minutes. | View the task's project or playbook |
| Sets or clears a task's allotted time. | Update tasks in the project, or edit the playbook |
| Returns a project's totals and a row for each task. | View the project |
| Returns allotted against worked time for each project, by module and task. | View time reports |
Set or clear a task's allotted time
PUT /v1/tasks/{task_uuid}/time-allotted works on project tasks and playbook tasks.
Body field | Type | Rules |
|---|---|---|
| Whole number or | Required. From |
The response returns task_uuid and allotted_minutes.
A project's allotted time is the sum of its tasks' allotted minutes. There's no separate project budget to set.
For a playbook task, the request answers 409 in these cases:
Case | Message |
|---|---|
The playbook has an open draft that the task isn't part of |
|
The task belongs to an older version of the playbook |
|
Someone else is editing the playbook |
|
Time entry fields
Field | Type | Notes |
|---|---|---|
| String | The time entry's UUID. |
| String | The user the time belongs to. |
| String or | The user's full name. |
| String | The project the time was logged against. |
| String or | The task, or |
| String | The day worked, as |
| Whole number | Minutes worked, from |
| String or | The note on the entry. |
| String | How the entry was created. |
| Boolean |
|
| String | ISO 8601 timestamps in UTC. |
Create and update a time entry
Body field |
|
| Rules |
|---|---|---|---|
| Required | Not accepted | The user must have their time tracked. An entry can't be moved to another user. |
| Optional | Optional | Send it to log time on a task. On |
| Required when | Optional | Send it alone to log general project time. |
| Required | Optional |
|
| Required | Optional | A whole number from |
| Optional | Optional | Up to 5,000 characters. Required when your organization requires notes. On |
POST answers 201 when it creates the entry. If the same API key sends an identical create again within 10 minutes, it answers 200 with the existing entry and writes nothing new. Updates and deletes aren't matched this way.
Query parameters
Endpoint | Parameters |
|---|---|
|
|
|
|
|
|
| None. Any query parameter is rejected. |
start and end are YYYY-MM-DD and inclusive. end can't be before start, and the two can span at most 366 days. With neither set, the time entry list and the report cover the 90 days ending today in your organization's time zone, and the project time summary covers all time.
Limits and errors
Status | When |
|---|---|
| A time tracking rule rejected the request. For example: a future date, a date before the user's tracking start, more than 1440 minutes on one person's day, a missing required note, a user whose time isn't tracked, or a task outside the project. |
| The API key doesn't have the permission the endpoint needs. |
| The entry, user, project or task wasn't found in your organization. |
| Time tracking is off for your organization, the entry's week has been submitted and is locked, or a playbook task can't take a new allotted time right now. |
| Too many writes. Creating, updating and deleting entries, and setting allotted time, are limited to 600 requests a minute and 6,000 an hour. |
A submitted week stays locked until it's unlocked in OnRamp. To learn how, see Submit, lock and reopen a week.