Write notes with Helipad. Register →
| Font Size | Body Font | Header Font | Export | ||||
|---|---|---|---|---|---|---|---|
| TXT | HTML | ![]() |
|||||
The Helipad API is XML over HTTP. Set the following headers to inform Helipad you want to use XML:
Accept: application/xml Content-Type: application/xml
It’s safe to use both http://helipadapp.com and http://pad.helicoid.net.
Your application could use this to check the authentication details are correct:
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \ "http://pad.helicoid.net/authenticate?email=alex@example.com&password=test"
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d '
<request>
<authentication>
<email>alex@example.com</email>
<password>test</password>
</authentication>
</request>' \
http://pad.helicoid.net/documents
This is a relatively fast method that can be called when syncing with Helipad. Call a get request on /document/all_ids.
You can send changed_since with an integer date (number of seconds since 1970) to limit the list of documents to ones that have changed. This is used by our iPhone app to reduce the amount of traffic for syncing. Example:
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d '
<request>
<authentication>
<email>alex@example.com</email>
<password>test</password>
</authentication>
<changed_since>123456789</changed_since>
</request>' \
http://pad.helicoid.net/documents
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d '
<request>
<authentication>
<email>alex@example.com</email>
<password>test</password>
</authentication>
</request>' \
http://pad.helicoid.net/documents/titles
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d '
<request>
<authentication>
<email>alex@example.com</email>
<password>test</password>
</authentication>
</request>' \
http://pad.helicoid.net/document/1/get
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d '
<request>
<authentication>
<email>alex@example.com</email>
<password>test</password>
</authentication>
</request>' \
http://pad.helicoid.net/document/1/format/html
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d '
<request>
<authentication>
<email>alex@example.com</email>
<password>test</password>
</authentication>
<search>test</search>
</request>' \
http://pad.helicoid.net/document/search
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d '
<request>
<authentication>
<email>alex@example.com</email>
<password>test</password>
</authentication>
</request>' \
http://pad.helicoid.net/document/tag/test
Response: A set of documents with the root tag of ‘documents’.
Tags can be specified as a space separated list:
<tags>test helipad</tags>
You can omit fields if you want to keep them the same.
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d '
<request>
<authentication>
<email>alex@example.com</email>
<password>test</password>
</authentication>
<document>
<title>Test document</title>
<source>This is a test</source>
<tags>
testtag testtag2
</tags>
</document>
</request>' \
http://pad.helicoid.net/document/1/update
Response:
true
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d '
<request>
<authentication>
<email>alex@example.com</email>
<password>test</password>
</authentication>
<document>
<title>New document</title>
<source>This is a test</source>
<tags>
testtag testtag2
</tags>
</document>
</request>' \
http://pad.helicoid.net/document/create
Response:
true
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' -d '
<request>
<authentication>
<email>alex@example.com</email>
<password>test</password>
</authentication>
</request>' \
http://pad.helicoid.net/document/2/destroy
Response:
true