| Body font | Header font | ||
|---|---|---|---|
![]() |
The Helipad API is XML over HTTP. Simply set the following headers to inform Helipad you want to use XML:
Accept: application/xml
Content-Type: application/xml
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
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