Use TimeTrack Rest API to integrate TimeTrack with other systems. Happy Coding!
With tasks endpoint you can:
Task object has following params:
curl “https://testaccount.timetrackenterprise.com/api/v2/ext/tasks/” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{}’
You can use following params:
In this example we search for tasks that contain test in task name.
curl “https://testkonto.timetrackenterprise.com/api/v2/ext/tasks?name=est” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{}’
Required params: ID.
curl “https://testkonto.timetrackenterprise.com/api/v2/ext/tasks/1” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{}’
For create method you can use all params of task object.
Required params: name
curl -X “POST” “https://testaccount.timetrackenterprise.com/api/v2/ext/tasks” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{ “name”: “Development”, “hourRate”: 30.0 }’
For update method you can use all params of task object except: name.
curl -X “PUT” “https://testaccount.timetrackenterprise.com/api/v2/ext/tasks/1” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{ “hourRate”: 35.5, “notes”: “Test task for API” }’
curl -X “DELETE” “https://testaccount.timetrackenterprise.com/api/v2/ext/tasks/1” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{}’