attaskworkfront-api

how to log time against a task in AtTask/workfront REST api


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


Solution

  • 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.