HTTP API

HTTP API

This library lets you record analytics data from any website or application. You can then route that data to any destination supported by our platform.

Getting Started with HTTP API

Authentication

You’ll need to supply your app_ID with each request using HTTP Basic Auth.

Basic Auth base64 encodes a ‘username:password’ and prepends it with the string ‘Basic’. The native libraries should handle this for you, but if they do not you’ll need to base64 encode a string in which the username is the Source ID and the password is empty. You can base64 encode your Source ID here

For example, if your Source ID is ILoveData123, that will be encoded to SUxvdmVEYXRhMTIz. Then, your encoded authentication line in your header will look like this:

Authorization: Basic SUxvdmVEYXRhMTIz

Content-Type

Make sure to set the content-type header to application/json.

Calls in HTTP API

Check out our ‘Calls’ section for information on when you should use each call. Below are some examples of how you’d call specific objects in HTTP API.