Skip to main content
The Time Entries API lets you interact with Redmine’s time tracking data. You can log time against projects or specific issues, and filter entries by user, project, or date range.
Requests must be authenticated. See REST API authentication for details.

Endpoints

MethodPathDescription
GET/time_entries.jsonList time entries.
GET/time_entries/:id.jsonGet a single time entry.
POST/time_entries.jsonCreate a time entry.
PUT/time_entries/:id.jsonUpdate a time entry.
DELETE/time_entries/:id.jsonDelete a time entry.
You can also scope time entries to a project:
MethodPathDescription
GET/projects/:project_id/time_entries.jsonList time entries for a project.
POST/projects/:project_id/time_entries.jsonCreate a time entry in a project.

List time entries

GET /time_entries.json Returns a paginated list of time entries visible to the authenticated user.

Query parameters

project_id
string
Filter by project numeric ID or identifier string.
user_id
number
Filter by user ID. Use me for the authenticated user.
issue_id
number
Filter by issue ID.
activity_id
number
Filter by time entry activity ID.
from
string
Return entries with spent_on on or after this date (YYYY-MM-DD).
to
string
Return entries with spent_on on or before this date (YYYY-MM-DD).
offset
number
default:"0"
Number of records to skip.
limit
number
default:"25"
Number of records per page (max 100).

Example

# All time entries for a project in March 2024
curl -H "X-Redmine-API-Key: YOUR_API_KEY" \
  "https://redmine.example.com/time_entries.json?project_id=myproject&from=2024-03-01&to=2024-03-31"

Response

{
  "time_entries": [
    {
      "id": 101,
      "project": { "id": 1, "name": "My Project" },
      "issue": { "id": 42 },
      "user": { "id": 3, "name": "Jane Smith" },
      "activity": { "id": 9, "name": "Development" },
      "hours": 3.5,
      "comments": "Implemented login feature",
      "spent_on": "2024-03-05",
      "created_on": "2024-03-05T17:00:00Z",
      "updated_on": "2024-03-05T17:00:00Z"
    }
  ],
  "total_count": 1,
  "offset": 0,
  "limit": 25
}

Get time entry

GET /time_entries/:id.json Returns a single time entry by ID.

Path parameters

id
number
required
The numeric ID of the time entry.

Example

curl -H "X-Redmine-API-Key: YOUR_API_KEY" \
  https://redmine.example.com/time_entries/101.json

Response fields

time_entry
object
required

Create time entry

POST /time_entries.json Logs time against a project or issue. The authenticated user must have the Log time permission in the target project.

Request body

Wrap all fields inside a time_entry object.
time_entry.project_id
string
Project numeric ID or identifier. Required if issue_id is not provided.
time_entry.issue_id
number
Issue ID to log time against. The project is inferred from the issue if project_id is omitted.
time_entry.spent_on
string
Date the time was spent (YYYY-MM-DD). Defaults to today.
time_entry.hours
number
required
Number of hours logged. Must be greater than 0.
time_entry.activity_id
number
required
ID of the time entry activity (e.g., Design, Development, Testing).
time_entry.comments
string
Description of the work done. Maximum 1024 characters.
time_entry.user_id
number
User ID to log time on behalf of. Requires the Log time for other users permission.
time_entry.custom_fields
object[]
Array of custom field values: [{"id": 1, "value": "value"}].

Example

curl -X POST \
  -H "X-Redmine-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "time_entry": {
      "issue_id": 42,
      "spent_on": "2024-03-05",
      "hours": 3.5,
      "activity_id": 9,
      "comments": "Implemented login feature"
    }
  }' \
  https://redmine.example.com/time_entries.json
A successful response returns 201 Created with the new time entry in the body.
If the Redmine setting Issue required when logging time is enabled, issue_id becomes required.

Update time entry

PUT /time_entries/:id.json Updates an existing time entry. The authenticated user must have the Edit time entries permission, or own the entry and have Edit own time entries.

Path parameters

id
number
required
The numeric ID of the time entry to update.

Example

curl -X PUT \
  -H "X-Redmine-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "time_entry": {
      "hours": 4.0,
      "comments": "Implemented login feature and unit tests"
    }
  }' \
  https://redmine.example.com/time_entries/101.json
A successful response returns 200 OK.

Delete time entry

DELETE /time_entries/:id.json Deletes a time entry. The authenticated user must have the Edit time entries permission or own the entry.

Path parameters

id
number
required
The numeric ID of the time entry to delete.

Example

curl -X DELETE \
  -H "X-Redmine-API-Key: YOUR_API_KEY" \
  https://redmine.example.com/time_entries/101.json
A successful response returns 200 OK.