Introducing Snapi! Snapi-In API Generator

Post created 2014-03-24 19:31 by Gabe Koss.

One of the challenges I have been working on at work surrounds rapid creation
of liteweight web APIs. We develop functionality for a variety of different
network security sensors and have to be able to quickly disclose to a variety
of clients the capabilities of the individual systems.

In light of this I have started developing a Ruby Gem called Snapi which we
have released under GPLv3.

Ruby API

This just got a bit more interesting! We have defined the ruby class
methods as Snapi functions and our API is all built.

Note that the methods have an arity of one and expect to take a single hash
argument. This makes them extremely flexible and adaptable so that additional
functionality can be introduced without disrupting the external facing API.