Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

API Documentation with IODocs

DZone's Guide to

API Documentation with IODocs

· Integration Zone ·
Free Resource

SnapLogic is the leading self-service enterprise-grade integration platform. Download the 2018 GartnerMagic Quadrant for Enterprise iPaaS or play around on the platform, risk free, for 30 days.

I write a lot of APIs, and I also preach that your API isn't finished until it has excellent documentation. Which is great, but that means I therefore have to lead by example and document my APIs. Enter iodocs from the talented folks at Mashery.

Iodocs is a node.js application (which is fun for a PHP developer. Most developers write a bit of JS, but this one hasn't). You describe your API and all its methods in JSON, and then iodocs presents an interface for you to enter API keys, add parameters to each request and press the "try it!" button. This makes your API call and shows you the results on screen, which seems like a great way to demonstrate what all the various parameters do!

iodocs screenshot

The setup and installation was pretty straightforward - node.js apps all have a packages.json file which states their dependencies and the npm package manager knows what to do. So you just grab the app from github and npm install and it pretty much worked. I had a problem with an older version of node.js (I had 0.8.2, when I upgraded to 0.8.9 it was all fine) but I figured it out.

I like the iodocs as a way of showing to the user what you can do with the API before they have to settle down and write some code. For example, on joind.in, you can request lists of events using various criteria, and iodocs presents form fields for that:

iodocs screenshot

If you want to have a play, I deployed this to heroku (blog post coming on that too, if you like) so you're welcome to click around: http://lornajane-iodocs.herokuapp.com/joindinv2. There are descriptions of other APIs too, and I've seen a few sites using this (which is where I came across it). The big stumbling block at the moment is the lack of OAuth2 support (as both joind.in and github use this, I'd quite like it!) but the mashery devs have promised to get back to me on that so watch this space ...

With SnapLogic’s integration platform you can save millions of dollars, increase integrator productivity by 5X, and reduce integration time to value by 90%. Sign up for our risk-free 30-day trial!

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}