Apollo API Documentation

Introduction

This is the API for Apollo. Apollo's API are JSON only.
Use HTTP verbs (GET/POST/PUT/DELETE) to manipulate resources.

14/06/2012: PLEASE NOTE:

All Apollo's API methods are almost final, but for the time being you will need to access them from the URL
Ex.: https://api.apollohq.com/beta/projects.
This is because we could change the behaviour of some calls in response to user's feedback.

When we feel that all methods are stable and they are ready to settle, you'll be able to call them at
Ex.: https://api.apollohq.com/v1/projects.

Also there could be the occasional kink -- sorry about that! Please let us know if you are experiencing any problems.


Authentication

Authentication is managed using HTTP Basic authentication. Every request must include the Authorization HTTP header. Use your API token as the username, and "X" (or some otherwise bogus text) as the password (only the API token is used for authenticating API requests). Example with Curl:

curl 'Content-Type: application/json' \
-u 1kdye8r743kdjks9302848582ks00wjabgcvgs22:X -d '...' https://url

HTTPS / Secure Connections

Apollo API's are accessible only under HTTPS. So HTTPS is 100% supported with valid certificate for all API methods.

Attaching files via the API

Some operations, like creating messages or comments, or updating existing messages or comments, allow you to attach a file to the record. To do this via the API, you need to send a POST request to the "/upload" URI, with the HTTP Accept header set to 'application/xml'. The body of the request should be the content of the file you want to attach:

POST /upload HTTP/1.0
Content-Type: application/octet-stream
Content-Length: 23123

... (file contents go here)

If the upload succeeds, you'll get a JSON response back, telling you the ID of your upload. (Your upload is not yet associated with any record, and if you do not do anything with it, it will be deleted sometime within the next 30 minutes.)

{
	"attachment-id":"1948745"
}

Armed with the ID, your next step is to attach the file to a record. Using the "create message" action, for instance, you pass an array of attachment data in. Assuming you had two files you wanted to attach (which you had previously uploaded, as described), your attachment data would look something like this (formatted as JSON):

{
	"message":{
		"title":"Updated message",
		"attachments":["1948745", "1948746"]
	}
}