By Z (zdne, z@apiary.io) on 12 Jan 2016
Last June, API Blueprint became recognized as a language on GitHub. This brought the syntax highlighting and repository statistics for API Blueprint. More importantly, it has also enabled the search for API design patterns.
Let’s take a quick look at how we can search and perhaps learn from the API designs done by others.
To search for API Blueprint on GitHub simply go to,
Enter the language:"API Blueprint"
as the query. Hitting the search will
list all of the GitHub repositories that contain at least one API Blueprint
(.apib) file.
Seeing every blueprint on GitHub could be fun, but what is more fun is to search for a particular keyword in blueprints. Here are all the blueprints that contain the infamous “Hello World”:
Note: When you are searching for a query like Hello World
, make sure to switch to
the “Code” results in the left hand pane.
Ok, it is the time to look how others are solving some popular API design patterns.
Doing authentication properly is no easy task. Let’s see how OAuth2
is used in
APIs:
OAuth2 in APIs on GitHub:
oauth2 language:"API Blueprint"
Need to throttle the number of requests clients do to your API? So do many fellow developers:
API rate limiting on GitHub:
rate limit language:"API Blueprint"
If you are building a true REST API or just curious what has been built so far,
you can search for blueprints using one of the many hypermedia types.
Fore example, HAL+JSON
:
HAL+JSON APIs on GitHub:
"hal+json" language:"API Blueprint"
These were just a few examples of queries you use while looking for API design patterns.
Let us know if you find (or create) something interesting. Let’s learn from each other how to build better APIs for tomorrow!