Skip to content
Richard Thombs edited this page Feb 10, 2014 · 83 revisions

The Web API is a new REST based interface to key parts of the TeamHaven Server business layer. It is available under the /api URL of a TeamHaven server, and it is available via HTTPS at https://www.teamhaven.com/api.

Authorisation

Authorisation is done using the standard HTTP Authorization header. There are two authorisation schemes, both of which use the same basic format for a set of TeamHaven credentials:

username/account:password

Typically, authorisation should be performed with HTTP Basic authorisation, using Base64 encoded TeamHaven credentials.

Authorization: Basic c3RvbnkvdGVzdDp0ZXJyaWVy

However, for debugging purposes, it is also possible to provide unencoded credentials using "TeamHaven" as the authentication scheme name rather than "Basic".

Authorization: TeamHaven username/account:password

In addition, a standard TeamHaven authentication cookie can also be used, so that if web pages on the TeamHaven website wish to use the WebAPI, they may do so without having to provide any authorisation information, as their requests will already contain the required cookie. This means it is possible to log into the TeamHaven website and review the output of any GET requests via a web browser, provided it can request and display XML or JSON output.

Content-Type

Request content must be UTF-8 encoded and presented as text/json or application/json.

Content-Type: application/json; charset=UTF-8

Status codes

2xx
Success
4xx
Something was wrong with your request. Check the Message property of the response for more information about what was wrong.
5xx
An exception prevented the server from processing your request, contact support@teamhaven.com for assistance.

HTTP Redirects

The API HTTP redirection where appropriate. Clients should assume that any request may result in a redirection. Receiving an HTTP redirection is not an error and clients should follow that redirect. Redirect responses will have a Location header field which contains the URI of the resource to which the client should repeat the requests.

API index

  1. Collector API
  2. Logging API
  3. Auditing API
  4. Checkin API
  5. Search API
  6. Localisation API
  7. Stats API
  8. Android API

Clone this wiki locally