Font Size Body Font Header Font Export  
TXT HTML PDF Print

Helipad XML API documentation

Overview

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.

Client implementor tips

  • Use CDATA to escape all text fields, like tags, title and source. Users may include non-valid XML in these fields.
  • Please read our blog about updates and changes to the API.
  • Please make it clear that customers should contact you for support and not us. We may ignore third-party client support requests.

Methods

Authenticate

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"

Get all 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

Get all document IDs

This is a relatively fast method that can be called when syncing with Helipad. Call a get request on /document/all_ids.

Documents changed since date

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

Get a list of document 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/documents/titles

Get one document

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

Get the document’s html

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

Search for a document

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

Show documents tagged with

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’.

Defining tags in XML

Tags can be specified as a space separated list:

<tags>test helipad</tags>

Update document

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

Create document

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

Destroy document

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