oTasks API

oTasks is the oDesk task managment system. oTasks enable users with the ability to set specific tasks to be assigned to a provider duriong an assignment. These methods require authentication and that the user is a member of the company or team being called.

 

List all Tasks within a Company, Team or User

 

The oTask API calls can be used to pull all tasks assigned within a company, team or to a specific user. The user authenticated must have been granted the appropriate hiring manager permissions to the company or team being queried.

 

The oTasks returned will be specific to the domain from which the API call is made. For instance if the call is made from the user domain only tasks assigned to that user will be returned. Calls made from the team or company will return a flat list (with no team/user description) of tasks, if you want to know the level that the task is assigned to (company, team or user) then append the full_list parameter (see below)https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/tasks/full_list.{format} This will return every task that the user has access to along with the appropriate domain.

 

URL

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/tasks.{format}

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/tasks.{format}

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/users/:userid/tasks.{format}

Method GET
{format} xml, json
Parameters None
Returns

200 OK
  <response>

   <server_time />
   <auth_user />
   <tasks>
      <task>
         <record_id />
         <company_id />
         <team_id />
         <user_id />
         <code />
         <description />
         <url />

      </task>
      ...
   <tasks>
</response>
On error 403 Forbidden

 

Details on GET Parameters

 

  • :companyid is the company id
  • :teamid is the team id
  • :userid is the user id

 

Details on Return Data

 

  • record_id
    • This is the tasks record ID, each task has a unique ID (currently the user has no control over this number and should only be used as a reference)
  • company_id
    • This is the company ID
  • user_id
    • User's oDesk ID
  • code
    • Specified by the user, could be used to mirror a bug ID on a third party system
  • description
    • The text description contained within the task
  • URL
    • Specified by the user, can be used to link to a third party bug tracking system or any related URL

 

List all oTask records within a Company, Team or User

 

This API returns all task records under the company. This includes all tasks assigned to the company, to its teams, and the team users. Also returned is the domain (company, team or user ID) that relates to the task.

 

URL

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/tasks/full_list.{format}

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/tasks/full_list.{format}

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/users/:userid/tasks/full_list.{format}

Method GET
{format} xml, json
Parameters None
Returns 200 OK
<response>
   <server_time />
   <auth_user />
   <tasks>
      <task>
         <record_id />
         <company_id />
         <team_id />
         <user_id />
         <code />
         <description />
         <url />
         <level />
      </task>
      ...
   <tasks>
</response>
On error 403 Forbidden

 

Details on GET Parameters

 

  • :companyid is the company id
  • :teamid is the team id
  • :userid is the user id

 

Details on Return Data

  • record_id
    • This is the tasks record ID, each task has a unique ID (currently the user has no control over this number and should only be used as a reference)
  • company_id
    • This is the company ID
  • user_id
    • User's oDesk ID
  • Code
    • Specified by the user, could be used to mirror a bug ID on a third party system
  • description
    • The text description contained within the task
  • URL
    • Specified by the user, can be used to link to a third party bug tracking system or any related URL
  • Level
    • If the full_list is used then the domain this maps the task to a specific company, team or user. If full_list is NOT used then a flat list of all tasks is returned

 

Return a specific task record within a company, team or user

 

The oTask API can be used to return details on a specific oTask or set of oTasks, this format can be used within a company (:companyid), team (:teamid) or user (:userid).

 

URL

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/tasks/:code1;:code2;...;:codeN.{format} 

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/tasks/:code1;:code2;...;:codeN.{format}

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/users/:userid/tasks/:code1;:code2;...;:codeN.{format}

Method GET
{format} xml, json
Parameters None
Returns

200 OK

<response>
   <server_time />
   <auth_user />
   <tasks>
      <task>
         <record_id />
         <company_id />
         <team_id />
         <code />
         <description />
         <url />
      </task>
      ...
   <tasks>
</response>

On error 403 Forbidden

 

Details on GET Parameters

 

  • code1-codeN should be specific task codes

 

Details on Return Data

  • record_id
    • This is the tasks record ID, each task has a unique ID
  • company_id
    • This is the company ID
  • code
    • Task code specified by user
  • description
    • The text description contained within the task
  • URL
    • The URL that links directly to the tasks within oDesk

 

Create an oTask record within a company, team or user

 

New oTasks can be created using the API, when you create a new oTask you need to define a code, description and URL. The task will be created for the company, team or user depending on the domain.

 

URL https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/tasks/

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/tasks/

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/users/:userid/tasks/

Method POST
{format} xml, json
Parameters

code = A task tracking code

description = The code's description

url = The location where more info on the code can be found.

Returns 200 OK
On error 403 Forbidden

 

Details on POST Parameters

 

  • code
    • This defines the task tracking code.
  • description
    • This should be a description about the code being added
  • url
    • The URL can be used to direct the user to more info about the code being entered

 

Details on Return Data

 

If the POST is successful the server will return a 200 message and if the post fails a 403 message is returned.

 

Update an oTask record within a company, team or user

 

oTasks can be updated using the API, the code, description and URL can be updated. 

 

URL https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/tasks/:code

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/tasks/:code

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/users/:userid/tasks/:code

Method PUT
{format} xml, json
Parameters code = A task tracking code

description = The code's description

url = The location where more info on the code can be found.

Returns 200 OK
On error 403 Forbidden

 

Details on PUT Parameters

 

  • :code
    • The oTask code being updated
  • description
    • This should be a description about the code being added
  • url
    • The URL can be used to direct the user to more info about the code being entered

 

Details on Return Data

 

If the PUT is successful the server will return a 200 message and if the post fails a 403 message is returned.

 

Delete an oTask record within a company, team or user

 

oTasks can be deleted using the API.

 

URL

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/tasks/:code

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/tasks/:code

https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/teams/:teamid/users/:userid/tasks/:code

Method DELETE
{format} xml, json
Parameters :code = A task tracking code (seperated by ;)
Return Data Returns 200 OK On error 403 Forbidden

 

Details on DELETE Parameters

 

  • :code
    • A list of codes to be deleted separated by ';'

 

Details on Return Data

 

If the DELETE is successful the server will return a 200 message and if the post fails a 403 message is returned.

 

Update a group of oTask records within a company, team or user

 

oTasks can be updated using a CSV file via the API. This process actually deletes the corresponding tasks and replaces them with the newly specified details.

 

URL https://www.odesk.com/api/otask/v1/tasks/companies/:companyid/tasks/batch:data
Method PUT
{format} xml, json
Parameters data = CSV file (see example below)
Return Data Returns 200 OK On error 403 Forbidden

 

Details on GET Parameters

 

  • :company
    • Company's rollup ID
  • :data
    • Task records in csv format but with "<br>" as line separator - "teamid","userid","is_global","taskid","description","url"example - "acmeinc","","","ABC","Project ABC","https://www.acmeinc.com/project/abc"<br>"acmeinc","acmeinc:dev","b42","123","Task 123","https://www.acmeinc.com/task/123"

 

Note: The given data replaces the existing "acmeinc" company level records with the new "ABC" record and "acmeinc:dev":"b42" user level records with the new "123" record.

 

Details on Return Data

 

If the PUT is successful the server will return a 200 message and if the post fails a 403 message is returned.