API and BeerXML

Tore

New Member
Trial Member
Joined
Aug 31, 2012
Messages
17
Reaction score
0
Points
0
Hi,

im a developer and i would like to access my data for my own brewing tools.
If you could supply user with a nice (hopefully REST) API and beerXML export support we could build tools that either you haven't thought about or are too narrow to be on your roadmap in the near future.

Simply exposing read-only brewsession and recipe access should be simple.
 
How would you see the authentication working? Maybe an API token that is your account, but not your password.
 
LarryBrewer said:
How would you see the authentication working? Maybe an API token that is your account, but not your password.
I've worked with a few APIs that use session tokens - I think most (if not all) of them require you to provide your password in order to verify your account identity and obtain a session token, which is added to the request header on the client side for subsequent requests.
 
The most secure stateless solution i know of is http://en.wikipedia.org/wiki/OAuth
But using session keys are easier and have more examples of code and people with experience with it. Personally i have only worked on systems with session keys, but i know OAuth is on most roadmaps for those that want to integrate secure services across several devices and sites.
 
Yeah I've worked with OAuth in the past. It is a beast to be sure, but it would be the best approach if you want to have another service out there that individual users can allow to talk to our services.

We'll start with the BeerXML output, and then go from there. Public recipes would be available as BeerXML through a simple GET request such as /beerXML/{id}.
 
BeerXML for public/shared recipes is now available as:
http://www.brewersfriend.com/homebrew/recipe/beerxml1.0/{recipe_id}

We don't have a search recipe service, but you could parse the sitemap:
http://www.brewersfriend.com/homebrew/sitemap.xml

Look for links like:
/homebrew/recipe/view/{recipe_id}/{recipe_name}

For your own recipes and data, as we create mobile apps, we will have to expose web services for those. We can leverage those into an API down the road.
 
BeerXML for public/shared recipes is now available as:


We don't have a search recipe service, but you could parse the sitemap:
http://www.brewersfriend.com/homebrew/sitemap.xml

Look for links like:


For your own recipes and data, as we create mobile apps, we will have to expose web services for those. We can leverage those into an API down the road.

I'm also a developer. Any update on an API docs? I would like to build a few tools to better support wine.

Thanks!
Jason
 
I'd also love a REST API feature!!
Its a bit hard to tell from sitemap.xml which recipes are actually yours. Even after fetching the recipe itself, there isn't much to distinguish it besides the author, which might also not be unique.
 
its for apps and developers to use for connection to your account, if you have a brewing app or program that asks for an api key this is it
 
im developing an app myself.. do you know how i can use this key to access my recipes and brew sessions?
 
I'm afraid thats up you you, Ill send a request to the developers
 
its up to you to know how to program the app to use an api key, it should be somewhat universal for most apps and we will not post that information to the world, you will have to talk to someone private
 
Another dev here.. I'm just playing with brewers friend at the moment as I'm sick of beersmith (don't get me started) and looking for a web-based replacement. I dissected the beersmith "cloud" protocol to allow my brewery controller to read recipes from the cloud, though that part isn't actually running yet. I'd really like that same functionality with this.

I'm happy to reverse the protocols manually until there's official documentation, I don't really need much info from my account.
 
I just had a quick look at the front end, there is an authenticated REST-ish "API" (not really a true API) that is used to populate the data on the recipe edit page. Here is an example curl request to get a recipe in JSON format:
curl 'https://www.brewersfriend.com/homebrew/recipe/json/<recipe_id>' -H 'cookie: PHPSESSID=<SESSIONID>'

It's authenticated only, but it's trivial to authenticate with your username and password to get your PHPSESSID, then supply this as your cookie for this request. The data is returned in JSON format.
It appears this only works to get data for your own recipes, not public recipes you don't own.
Personally all I need from here is a method to get recipes from my own account, and thus their ID, so I can pull the information I need automatically.

I'll have a closer look at the mobile app protocol once I buy the app.
 
Is there any documentation about this API? I would like to programmatically access my recipes from my Brewersfriend account
 

Back
Top