Open REST API

Authentication

Http Basic Authentication

see: http://en.wikipedia.org/wiki/Basic_access_authentication

Response code

request response status code
success OK 200
non Http Basic Auth UNAUTHORIZED 401
user email or password is wrong Forbidden 403
could not find resource NotFound 404

Resource URI

request Content-Type should include: application/json, when creating task

request http request request body response body response head
get resource list GET https://doit.im/resources/tasks empty task list json none
create resource POST https://doit.im/resources/tasks task json empty "Location" = task resource url string

date format

format: yyyy-MM-dd HH:mm:ss Z
example: 2000-02-01 00:00:00 +0000
see javadoc: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html

All time and date is stored as UTC timezone. Client should parse the date string as local timezone.

Opened API

  1. tasks
    1. GET https://doit.im/resources/tasks
      1. get today tasks
    2. POST https://doit.im/resources/tasks
      1. create a task
    3. Task resource properties:
      1. id: task id, uniq, integer
      2. title: task title
      3. completed: boolean, whether task is completed
      4. completedAt: if task is completed, then it would have a completed time
      5. deleted: boolean, whether task is deleted
      6. deletedAt: if task is deleted, then it would have a deleted time
      7. isNew: boolean, whether task is in Inbox
      8. active: boolean, whether task is in someday/next actions
      9. destroyed: boolean, whether task is been cleanup, after emptied trash, tasks would be marked as destroyed
      10. ownerId: who owns this task
      11. execAt: occur date
      12. reminderTime: reminder time
      13. dueDate: due date
      14. createdAt: time to create the task
      15. updatedAt: time to update the task
      16. rank: custom order of the task, use rank to list the task in order, only next actions, project tasks and someday tasks have rank
      17. comment: task note
      18. forwardToUserId: task is forwarded to someone, you can get user info from contacts api
      19. forwardFromUserId: task is forwarded from someone, you can get user info from contacts api
      20. projectId: the project id task is marked
      21. tags: tag names that this task is tagged.
  2. contacts
    1. GET https://doit.im/resources/contacts
      1. get all user's contacts
    2. Contact resource properties:
      1. id: contact id, uniq, integer
      2. ownerId: contact owner id, uniq, integer
      3. name: contact (nick) name
      4. userId: if contact is a Doit.im user, this property is the user id, which maybe useful for task resource to know who is forward by/to user
      5. email: email of the contact
      6. isFriend: true for this contact is a Doit.im user and confirmed the contact owner as friend
      7. createdAt: time contact created, string type, for example: "2009-10-30 06:45:23 +0000"
      8. updatedAt: last time contact updated, string type, for example: "2009-10-30 06:45:56 +0000"
  3. projects
    1. GET https://doit.im/resources/projects
      1. get all user's projects
    2. Project resource properties:
      1. id: project id, uniq, integer
      2. ownerId: project owner id, uniq, integer
      3. name: project name
      4. createdAt: time contact created, string type, for example: "2009-10-30 06:45:23 +0000"
      5. updatedAt: last time contact updated, string type, for example: "2009-10-30 06:45:56 +0000"