API Documentation

Below is information on how to interact with halfbite.com via our simple API.

There are currently just two endpoints, 'track' and 'clicks'. You should use the 'track' endpoint to log data into the halfbite system and you use the 'clicks' endpoint to get data back out of the halfbite system.

Track

Used for logging clicks into the halfbite system.

Endpoint

http://halfbite.com/track

Parameters

d (required) - the 'domain' value you want associated to this click (should be the ).

f (required) - the 'from' value you want associated to this click (usually the page the click was initiated from).

t (required) - the 'to' value you want associated to this click (usually the page the click directs you to).

u - the 'user' value you want associated to this click (usually a specific id you associate to a user within your system).

Example

To log a click from http://halfbite.com to http://halfbite.com/settings for a user called 'falicon' on the domain halfbite.com ->

http://halfbite.com/track?f=http%3A%2F%2Fhalfbite.com&t=http%3A%2F%2Fhalfbite.com%2Fsettings&u=falicon&d=halfbite.com

Example Response

'OK'

Clicks

Used for getting details on clicks logged in the halfbite.com system back out.

Endpoint

http://halfbite.com/clicks

Parameters

auth (required) - your unique halfbite.com authorization key for accessing click details associated to the domains tied to your account.

d - the 'domain' value you want associated to this click (should be the domain associated to your account).

f - the 'from' value you want associated to this click (usually the page the click was initiated from).

i (true or false) - if true, include links 'to' the 'domain'. If false, do not include links 'to' the 'domain'

l (defaults to 100) - the number of click details you want returned.

t - the 'to' value you want associated to this click (usually the page the click directs you to).

u - the 'user' value you want associated to this click (usually a specific id you associate to a user within your system).

Example

Show the last 5 clicks logged for the halfbite.com domain ->

http://halfbite.com/clicks?auth=YOUR_AUTH_KEY&l=5

Example Response

{
  "loggedfor":"knowabout.it",
  "clicks":[
    {
      "from":"http:\/\/halfbite.com\/",
      "to":"http:\/\/knowabout.it\/",
      "user":"",
      "logged":1292526203
    },{
      "from":"http:\/\/halfbite.com\/",
      "to":"http:\/\/halfbite.com\/settings",
      "user":"falicon",
      "logged":1292522141
    },{
      "from":"http:\/\/halfbite.com\/",
      "to":"http:\/\/knowabout.it",
      "user":"willcole",
      "logged":1292522138
    },{
      "from":"http:\/\/halfbite.com\/",
      "to":"http:\/\/halfbite.com\/settings",
      "user":"",
      "logged":1292522092
    },{
      "from":"http:\/\/halfbite.com\/",
      "to":"http:\/\/halfbite.com\/settings",
      "user":"falicon",
      "logged":1292518775
    }
  ]
}

Questions, Comments, or Concerns?

If you have questions, comments, or concerns about anything related to the halfbite service or the api, please feel free to email info at falicon.com or @falicon on Twitter.