APIs and usage guidelines


echobro

CORS friendly HTTP API for echoing the HTTP request sent.

API Endpoint: api/echobro

Send any HTTP request that you would like. The server will respond with a dissected version of the request.

While this is designed to be an echo, the following query string key:value pairs will affect the output.


imgbro

CORS friendly HTTP API for getting some images to work with.

API Endpoint: api/imgbro

A JSON object is returned with a "urls" key pointing to an array of image URLs.


lorembro

CORS friendly HTTP GET API for retrieving dummy data.

API Endpoint: api/lorembro

Accepted query string key:value pairs.


messagebro

CORS friendly HTTP API for storing and retrieving messages.

API Endpoint: api/messagebro

Storing a new message in the memory cache can be done with the following key:value pairs.

Only the last 100 messages are kept. No parsing is done on the messages, you have been warned.

Accessing the messages currently stored in the cache (retrieves as a JSON message with a "messages" key pointing to an array of message objects). Messages are returned in descending chronological order.

To clear the cache:


proxybro

CORS friendly HTTP API for proxying requests.

API Endpoint: api/proxybro

Accepted webform key:value pairs.


templatebro

CORS friendly HTTP GET API for retrieving templates.

API Endpoint: api/templatebro

Accepted query string key:value pairs:

# The default is the HTML template...
wget -O index.html http://bro.somedomain.com/api/templatebro
# or
curl -O index.html http://bro.somedomain.com/api/templatebro

# The readme file
curl -O README.md http://bro.somedomain.com/api/templatebro?type=readme

timebro

CORS friendly HTTP API for getting some images to work with.

API Endpoint: api/timebro

A JSON object is returned with a "time" key pointing to thet server time as a number of milliseconds since the epoch.


whereamibro

CORS friendly HTTP API for guesstimating a latitude and longitude into a human understandable address. Works well with the Geolocation API in browsers.

API Endpoint: api/whereamibro

Accepted key:value pairs that can be provided via webform or query string.