Time Entries API
Get Time Entries
GET /v2/time_entries/[entry_id]
Optional Parameters
- user_id - Filter by user
- client_id - Filter by client
- project_id - Filter by project
- task_id - Filter by task
- subtask_id - Filter by subtask
- hide_billed - Hide billed entries?
- created_from - From (yyyymmdd)
- created_to - To (yyyymmdd)
- limit - Limit number of records returned. Maximum 1000 records
- offset - Start position for fetching records
Sample Response - Single Entry
{
"data": {
"entry_id": "1",
"date": "2015-01-11",
"date_started": "2015-01-01 09:05:04",
"date_stopped": "2015-01-01 10:05:04",
"project_id": "1",
"task_id": "1",
"subtask_id": "0",
"project_name": "Project 1",
"task_name": "Check log files",
"subtask_name": "",
"hours": 1,
"minutes": 60,
"seconds": "3600",
"description": "Log files checked",
"billed": 0,
"user_id": "1234",
"user_name": "John Doe"
}
}
"data": {
"entry_id": "1",
"date": "2015-01-11",
"date_started": "2015-01-01 09:05:04",
"date_stopped": "2015-01-01 10:05:04",
"project_id": "1",
"task_id": "1",
"subtask_id": "0",
"project_name": "Project 1",
"task_name": "Check log files",
"subtask_name": "",
"hours": 1,
"minutes": 60,
"seconds": "3600",
"description": "Log files checked",
"billed": 0,
"user_id": "1234",
"user_name": "John Doe"
}
}
Sample Response - Multiple Entries
{
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 2
},
"data": [
{
"entry_id": "1",
"date": "2015-01-01",
"date_started": "2015-01-01 09:05:04",
"date_stopped": "2015-01-01 10:05:04",
"project_id": "1",
"task_id": "1",
"subtask_id": "0",
"project_name": "Project 1",
"task_name": "Check log files",
"subtask_name": "",
"hours": 1,
"minutes": 60,
"seconds": "3600",
"description": "Morning log files checked",
"billed": 0,
"user_id": "1234",
"user_name": "John Doe"
},
{
"entry_id": "2",
"date": "2015-01-01",
"date_started": "2015-01-01 13:05:04",
"date_stopped": "2015-01-01 13:35:04",
"project_id": "1",
"task_id": "1",
"subtask_id": "0",
"project_name": "Project 1",
"task_name": "Check log files",
"subtask_name": "",
"hours": 0.5,
"minutes": 30,
"seconds": "1800",
"description": "Afternoon log files checked",
"billed": 0,
"user_id": "1234",
"user_name": "John Doe"
}
]
}
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 2
},
"data": [
{
"entry_id": "1",
"date": "2015-01-01",
"date_started": "2015-01-01 09:05:04",
"date_stopped": "2015-01-01 10:05:04",
"project_id": "1",
"task_id": "1",
"subtask_id": "0",
"project_name": "Project 1",
"task_name": "Check log files",
"subtask_name": "",
"hours": 1,
"minutes": 60,
"seconds": "3600",
"description": "Morning log files checked",
"billed": 0,
"user_id": "1234",
"user_name": "John Doe"
},
{
"entry_id": "2",
"date": "2015-01-01",
"date_started": "2015-01-01 13:05:04",
"date_stopped": "2015-01-01 13:35:04",
"project_id": "1",
"task_id": "1",
"subtask_id": "0",
"project_name": "Project 1",
"task_name": "Check log files",
"subtask_name": "",
"hours": 0.5,
"minutes": 30,
"seconds": "1800",
"description": "Afternoon log files checked",
"billed": 0,
"user_id": "1234",
"user_name": "John Doe"
}
]
}
Example Calls
Single entry
curl -X GET "https://api.projectbubble.com/v2/time_entries/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Simple list
curl -X GET "https://api.projectbubble.com/v2/time_entries" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Filter entries by project
curl -X GET "https://api.projectbubble.com/v2/time_entries?project_id=1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Response Codes
200 - OK or "No records found"
401 - Permission error. Your user account (API Key) does not have permission to access time entries.
401 - Permission error. Your user account (API Key) does not have permission to access time entries.
Create Time Entry
POST /v2/time_entries/[task_id]
[task_id] is required
Required Parameters
- seconds - Seconds tracked - required
Optional Parameters
- date - Date of entry (yyyymmdd)
- subtask_id - Sub-task ID
- description - Description
- user_id - Creator user ID
Sample Response
{
"data": {
"entry_id": "1",
"date": "2015-01-11",
"date_started": "2015-01-01 09:05:04",
"date_stopped": "2015-01-01 10:05:04",
"project_id": "1",
"task_id": "1",
"subtask_id": "0",
"project_name": "Project 1",
"task_name": "Check log files",
"subtask_name": "",
"hours": 1,
"minutes": 60,
"seconds": "3600",
"description": "Log files checked",
"billed": 0,
"user_id": "1234",
"user_name": "John Doe"
}
}
"data": {
"entry_id": "1",
"date": "2015-01-11",
"date_started": "2015-01-01 09:05:04",
"date_stopped": "2015-01-01 10:05:04",
"project_id": "1",
"task_id": "1",
"subtask_id": "0",
"project_name": "Project 1",
"task_name": "Check log files",
"subtask_name": "",
"hours": 1,
"minutes": 60,
"seconds": "3600",
"description": "Log files checked",
"billed": 0,
"user_id": "1234",
"user_name": "John Doe"
}
}
Example Calls
Simple Entry
curl -X POST "https://api.projectbubble.com/v2/time_entries/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"seconds": 600}'
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"seconds": 600}'
With Description
curl -X POST "https://api.projectbubble.com/v2/time_entries?project_id=1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"seconds": 600, "description": "Log files checked"}'
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"seconds": 600, "description": "Log files checked"}'
Response Codes
201 - Created OK
401 - Permission error. Your user account (API Key) does not have permission to access time entries.
404 - Entry not found
401 - Permission error. Your user account (API Key) does not have permission to access time entries.
404 - Entry not found
Update Time Entry
PUT /v2/time_entry/[entry_id]
[entry_id] is required
Required Parameters
- seconds - Seconds tracked. This is total seconds, this number is not added to existing time.
Optional Parameters
- date_started - Local date of entry (yyyymmdd)
- task_id - Task ID
- subtask_id - Sub-task ID
- seconds - Seconds tracked
- description - Description
- user_id - Creator user ID
Sample Response
{
"data": {
"entry_id": "1",
"date": "2015-01-11",
"date_started": "2015-01-01 09:05:04",
"date_stopped": "2015-01-01 10:05:04",
"project_id": "1",
"task_id": "1",
"subtask_id": "0",
"project_name": "Project 1",
"task_name": "Check log files",
"subtask_name": "",
"hours": 1,
"minutes": 60,
"seconds": "3600",
"description": "Log files checked",
"billed": 0,
"user_id": "1234",
"user_name": "John Doe"
}
}
"data": {
"entry_id": "1",
"date": "2015-01-11",
"date_started": "2015-01-01 09:05:04",
"date_stopped": "2015-01-01 10:05:04",
"project_id": "1",
"task_id": "1",
"subtask_id": "0",
"project_name": "Project 1",
"task_name": "Check log files",
"subtask_name": "",
"hours": 1,
"minutes": 60,
"seconds": "3600",
"description": "Log files checked",
"billed": 0,
"user_id": "1234",
"user_name": "John Doe"
}
}
Example Calls
Simple Entry
curl -X PUT "https://api.projectbubble.com/v2/time_entries/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"seconds": 600}'
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"seconds": 600}'
With Description
curl -X PUT "https://api.projectbubble.com/v2/time_entries?project_id=1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"seconds": 600, "description": "Log files checked again"}'
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"seconds": 600, "description": "Log files checked again"}'
Response Codes
200 - OK
401 - Permission error. Your user account (API Key) does not have permission to access time entries.
404 - Entry not found
401 - Permission error. Your user account (API Key) does not have permission to access time entries.
404 - Entry not found
Delete Time Entry
DELETE /v2/time_entries/[entry_id]
Sample Response
[]
Example Call
curl -X DELETE "https://api.projectbubble.com/v2/time_entries/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Response Codes
200 - Entry deleted
400/401 - Permission error. Validation error, see returned text.
404 - Tiem entry not found.
400/401 - Permission error. Validation error, see returned text.
404 - Tiem entry not found.
© 2005 - 2024 ProProfs