RESTful API

The Blobbr API is a RESTful API. Each call requires a specific request type (GET, POST, PUT or DELETE). The documentation states which request type is required but the general rule is GET to request data, POST to add or edit a record, PUT to flag a record, and DELETE to delete a record.

Each request includes a meaningful HTTP status code in the response.

XML, JSON, or JSONP*

The API can return results as XML, JSON, or JSONP. Simply change the extension to the format that you need.

The JSONP format requires the name of a callback function which is used to wrap the data. This is to allow Javascript widgets to request data across different domains. The callback function name should be passed as "callback", and can only contain alphanumeric characters, underscores, and periods. For example: http://api.blobbr.com/api/blobbs/featured.jsonp?callback=blobbr

*Currently all JSONP responses are cached for 2 minutes.

Pagination

Each GET request can include a page parameter (?p=1) and a number of results per page parameter (?num=10). The page numbering starts at 1, the default number of results per page is 10, and the maximum number of results per page is 50.

Authorization

Some API requests require authorization using your Blobbr username and password. All POST, PUT and DELETE requests require authorization, and user-specific GET requests do as well. The documentation states which requests require authorization.

Command Line & cURL

You can access the Blobbr API using the command line and cURL.

Get the featured dropps in JSON format: curl http://api.blobbr.com/api/blobbs/featured.json

Get your favorite blobbs in XML format: curl -u username:password http://api.blobbr.com/api/blobbs/favorite.xml

Add a tag to a blobb: curl -u username:password -X POST http://api.blobbr.com/api/tags/for=blobb/add/[blobb id].json -d tag="[your tag]"