Hack your way trough the API « Back to your Donebox

Donebox API uses XML following REST charabia (and almost 2.0). But if you don't give a damn about this you might prefer the tools page.

The following examples use curl but could be used with any HTTP client. It's just XML over HTTP with Basic authentication.

Creating a task

curl -H 'Accept: application/xml' -H 'Content-Type: text/xml' -u login:password -X POST http://donebox.com/tasks -d '<new_task><name>from curl</name></new_task>'

Getting tasks

curl -H 'Accept: application/xml' -H 'Content-Type: text/xml' -u login:password -X GET http://donebox.com/tasks

Will return something like this:


<?xml version="1.0" encoding="UTF-8"?>
<tasks>
  <task>
    <category>donebox</category>
    <completed-at type="datetime">2007-07-30T18:20:07-07:00</completed-at>
    <created-at type="datetime">2007-07-29T18:32:56-07:00</created-at>
    <due-at type="datetime">2007-07-30T00:00:00-07:00</due-at>
    <id type="integer">1</id>
    <name>Fix HTTP-AUTH header not transfered</name>
    <position type="integer">2</position>
    <user-id type="integer">1</user-id>
  </task>
  ...
<tasks>

To get completed tasks, try

curl -H 'Accept: application/xml' -H 'Content-Type: text/xml' -u login:password -X GET http://donebox.com/tasks/completed

Marking a task as complete

curl -H 'Accept: application/xml' -H 'Content-Type: text/xml' -u login:password -X POST http://donebox.com/tasks/1/complete