3

ive figured out the basics of AtTask api's, login, grabbing session id, etc, but haven't figured out how to log time against a task or project yet.

sniffing the actual website i see we hit https://my_site.attask-ondemand.com/update/logTime with an ID of my task and objCode=TASK which makes sense.

but then there is dataList with some kind of hashed object and the date and hours ive entered.

I can't find anything about these methods/how to do it from REST api on the developer site, so was hoping someone somewhere could help me

Liam
  • 27,717
  • 28
  • 128
  • 190
trippedout
  • 1,561
  • 13
  • 20

1 Answers1

4

I believe what you are looking for is Hour.

Check out the document for hour at https://support.workfront.com/hc/en-us/articles/220633507-API-Explorer

and to specify what you want to log time to you specify the Issue ID (opTaskID), Project ID (projectID) or Task ID (taskID) from there you have the option o update time against the project, task or even the Issue. You will need to specify where you want the time to be associated with, use field "noteObjCode" = "OPTASK" or TASK or PROJ.

An example url would look like this

https://yourdomain.attask-ondemand.com/attask/api/v4.0/hour/?updates={"opTaskID":"XXXXXXXXXXXXXX","noteObjCode":"OPTASK","hours":"0.25","description":"update%20time","status":"SUB"}&sessionID=XXXXXXXXXXXXXXXX&method=post.
Liam
  • 27,717
  • 28
  • 128
  • 190
Jim Young
  • 169
  • 2
  • thanks for your response, but would this not associate with a date? in the `dataList` object above, the post was of 'mm-dd-yyyy:hours' so that the site could update the specific day you were entering hours for. not just a total amount to increment by? – trippedout Jul 16 '14 at 17:33
  • To associate this entry with a date you need to specify "entryDate":"2014-01-01" in the updates array. If not specified it will default to today. An entry to hours creates an actual entry in the hours section. Posts that are on the same day will be grouped together. You are able to specify the description and then the description will appends to that date, it does not override it. – Jim Young Jul 16 '14 at 21:09
  • Just a note that the workfront (previously atTask) api is not on version 7. So the url in this answer isn't 100% valid anymore. Check the [up to date docs](https://support.workfront.com/hc/en-us/articles/115003574147-API-Basics) to modify this to work with newer version – Liam Jan 18 '18 at 10:47