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
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¶
- tasks
- GET https://doit.im/resources/tasks
- get today tasks
- POST https://doit.im/resources/tasks
- create a task
- Task resource properties:
- id: task id, uniq, integer
- title: task title
- completed: boolean, whether task is completed
- completedAt: if task is completed, then it would have a completed time
- deleted: boolean, whether task is deleted
- deletedAt: if task is deleted, then it would have a deleted time
- isNew: boolean, whether task is in Inbox
- active: boolean, whether task is in someday/next actions
- destroyed: boolean, whether task is been cleanup, after emptied trash, tasks would be marked as destroyed
- ownerId: who owns this task
- execAt: occur date
- reminderTime: reminder time
- dueDate: due date
- createdAt: time to create the task
- updatedAt: time to update the task
- rank: custom order of the task, use rank to list the task in order, only next actions, project tasks and someday tasks have rank
- comment: task note
- forwardToUserId: task is forwarded to someone, you can get user info from contacts api
- forwardFromUserId: task is forwarded from someone, you can get user info from contacts api
- projectId: the project id task is marked
- tags: tag names that this task is tagged.
- contacts
- GET https://doit.im/resources/contacts
- get all user's contacts
- Contact resource properties:
- id: contact id, uniq, integer
- ownerId: contact owner id, uniq, integer
- name: contact (nick) name
- 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
- email: email of the contact
- isFriend: true for this contact is a Doit.im user and confirmed the contact owner as friend
- createdAt: time contact created, string type, for example: "2009-10-30 06:45:23 +0000"
- updatedAt: last time contact updated, string type, for example: "2009-10-30 06:45:56 +0000"
- projects
- GET https://doit.im/resources/projects
- get all user's projects
- Project resource properties:
- id: project id, uniq, integer
- ownerId: project owner id, uniq, integer
- name: project name
- createdAt: time contact created, string type, for example: "2009-10-30 06:45:23 +0000"
- updatedAt: last time contact updated, string type, for example: "2009-10-30 06:45:56 +0000"