Welcome!

Agile Computing Authors: LeanTaaS Blog, Yeshim Deniz, Elizabeth White, Larry Alton, Pat Romanski

Related Topics: @CloudExpo, Agile Computing, @DevOpsSummit

@CloudExpo: Blog Feed Post

The Utopia of API Documentation By @JKRiggins | @CloudExpo #API #Cloud

It's proven time and again how much API documentation matters to your developer experience

The Utopia of API Documentation
by Jennifer Riggins

It's proven time and again how much API documentation matters to your developer experience - in fact, it kind of matters more than anything else as to whether your API is adopted or not. And certainly developer experience matters to your overall bottom line. After all, in the world of the application programming interface or the API, developers are your users and therefore their user experience matters most.

There's no doubt your API documentation has to be sexy, but, as sexiness is in the eye of the beholder, there's a lot of debate about just what that means. Today, SmartBear sits down with Arnaud Lauret of AXA Banque (a.k.a. the API Handyman) to talk about this idea of documentation utopia and his vision of an ideal world where APIs and documentation live in perfect harmony.

The API economy will collapse on poor documentation
Before we can talk about what great documentation is, we should probably talk about what bad documentation is. The worst documentation is the one that doesn't exist. But second worst is API documentation that's never used. "Poor documentation leads to poor APIs and poor APIs lead to poor documentation-to the dark side where no one uses them," Star Wars fan Lauret said. And if your documentation isn't used, soon enough, neither will your API.

Why was your documentation overlooked? Some frequent culprits include:

  • It shouldn't have been written in the first place.
  • It's too long.
  • It's too hard to understand.
  • It's outdated.
  • It's not adapted to your audience.
  • It's not on concept.
  • It couldn't even be found.

"Without good documentation, you can't have an API and without a good API you can't have documentation," Lauret said, referring to the symbiotic relationship intrinsically linking the two.

What does documentation look like in a utopia?
According to Lauret, "API documentation should include all instructions, comments and information needed to build, maintain and use an API and [its] subsystems."

For some more or less agreed-upon qualities of good API documentation. It must be:

  • adapted for audience - like all good marketing and customer support, perhaps multiple documentation depending on the audience's needs
  • DX-first - made for humans, by humans
  • machine-readable
  • Google-readable - search engine optimization matters when most people are typing "X API" into Google
  • well-organized like a reference guide or table of contents
  • intwined with the API itself - dual-screens or opening in new window, allowing users to try something out right away
  • not a burden to create
  • with pricing and usage policies
  • with contact information
  • adapted to the learner or user
  • riddled with use cases and code examples
  • made up of everything you could need to use the API
  • paired with a story - why you are doing this to achieve that
  • easy to produce, publish and maintain
  • adapted to what kind of software is being documented, like SaaS versus platform
  • adapted to audience to the people that will use it - end user versus inside your company
  • adapted to context - when in the discovery process and how people will use it
  • equipped with some sort of way to collect user feedback on how you can further improve it
  • easily found, whether within the developer portal or prominently placed on your website

We could go on and on but instead of just making a wish list, let's get into how your documentation can make your API shine and vice versa.

"Microservices is widely adopted and the concept has been applied to documentation for usable, maintainable, reusable, replaceable micro-documentation."

Lauret says to avoid the doom of unread documentation, everything should be micronized. "Microservices is widely adopted and the concept has been applied to documentation for usable, maintainable, reusable, replaceable micro-documentation." It all falls into the domain-driven, context-driven world we're re-approaching.

And the movement toward microservices also makes documenting seem more achievable in bite-sized increments. This falls right in line with a greater sense of ownership for each service-and who better than the one who wrote the code to then explain its purpose?

Going full circle, microservices fit nicely with continuous delivery.

For continuous documentation delivery, there must be automation
While it seems like automation drives much of continuous delivery, continuous delivery has us going so fast that API documentation gets neglected. But automation can actually be the key to continually delivering great documentation.

"When you code, you don't reinvent the wheel, you reuse existing libraries and modules," Lauret said. While you still need human touch in your docs, it stands to serve that you can ease the burden of creating them by automating them and reuse-recycling them.

In Lauret's perfect APIverse-that we think we are getting nearer to every day-there will be continuous update, delivery and improvement of documentation, right along with coding and testing. This means that at least part of the documentation can and should be automated.

This automation has to come with standardization, which means that companies should prioritize creating standards for API documentation.

To offer Lauret's example: "If all your APIs are true REST APIs and you always them design them the same way, you lessen the need for documentation. If you write documentation using command and shared structures, templates, and common and shared vocabulary and concepts, they become easier to write, read, understand."

Doc automation could even have version control to pair doc versions accurately with different releases.

"And don't forget that documentation should tell stories and should get all API documentation to use them," Lauret said.

Lauret offers up probably the most popular way to automate: our very own Swagger.

"Documentation and its subjects are analyzed to check that they are consistent with each other. For example, if you have an API descriptor, the system checks that the API is conforming to that descriptor. This already exists with ReadyAPI from SmartBear. You can take an API descriptor in Swagger, and ReadyAPI will create the basic testing to check that the implementation for the API is correct compared to the API descriptor," he went onto explain.

But remember that Swagger isn't the final piece of the puzzle. It'll get down your specs and build the perimeter of your API, but Swagger alone does not make complete API documentation. Your API's story is a big part of it too. Stormpath offers a strong example of documentation enriched with a strong introduction to its concepts and terminology.

While formats like Swagger and RAML can automate the raw specification, you can also try a tool like LucyBot, to make Swagger more human-readable.

In his idyllic APIverse, Lauret sees everyone working with a documentation package manager or DPM for both people who write code and for those who write API descriptors that allow you to automate based on certain dependencies. A DPM helps you write the documentation, search for requests for comments (RFCs), templates, and vocabulary. The DPM creates a descriptor that describes the dependencies of your documentations. NodeJS is already doing something similar with its Node Package Manager (NPM), but it works for people who code, but not yet for people who write documentation. Every level of documentation is linked together via the DPM, allowing users to switch among them.

Finally, "Every single documentation is written as code-human and machine-readable. This structured document can be copied and transformed by any other format." From there, you can really start to make your API documentation-and by extension, your API- more accessible.

Approaching the world of documentation for everyone
Lauret offers the example that "If you have an API descriptor and the data are fairly simple, you can generate an API. All that without coding anything." From there you can automate even more writer-friendly documentation or even allow both your users and internal developers to make mock-ups to test if a design is good or not. From there you can build user-friendly design tools including automatic mock-ups to test if a design is good or not.

By treating documentation as code, it becomes structured and machine readable. This data then can build documentation APIs, "and, with this data, you can build outrageously beautiful visualizations," Lauret gushed.

With everything you do, you need to think about how developers are accessing your API. For first-timers, they need an intro to put it all into perspectives. There are others that will play around with your API first and use the documentation as a reference tool, wanting to easily find examples and a step-by-step of how to do something specific.

Lauret reminds you that "When your API is your product, these people need to create really cool documentation."

Like how we are teaching kids coding visually with tools like SNAP, both of these API customers would benefit from a more visual map of the API documentation, like a mind map or a flow chart, including links and ways to expand and visualize the functionalities and how they interrelate. FoxyCart's API comes with a great visualization of their API documentation. Similarly Lauret created a tree-like 3D-JS visualization of this Swagger spec to create a flow-chart view of the lengthy documentation. He's also thinking about pairing Mermaid sequence diagrams with Swagger.

All users would also both benefit from search functionality built into the docs.

Once you establish the system, structure, framework and responsibility for creating and updating API documentation, you can use that machine-readability to increase human-readability. You can create a venerable "Document Factory," a module you could integrate into a continuous delivery system, automatically generating different types of renderings from the raw source documentation, like PDFs, static websites, or even whole books.

Lauret even suggests that if your API documentation is good enough and machine-readable enough, it becomes something that could easily be converted into an API itself or as a source for partial or complete software generation. This part of utopia is already available with RESTlet and Nuclear-Powered Mushroom.

Imagine how you could better reach your developers if you can appeal to all their different learning techniques, from the person who still likes to read the code up to an auditory learner who could listen to an API-narrated walk-through, from someone who wants a stagnant image to someone who wants a Prezi-like interactive experience. You could even mimic what Absolut Vodka did with APIs, automatically piecing together audio and shots to make hundreds of recipe videos. Or maybe one day there will be a way to automate the creation of a video game that walks devs through your docs!

And it's not just user experience but languages too. Lauret shares the dream of what he class "Hyper-Documentation" where the hypermedia API meets content negotiation, where the server sends back content in a certain language or format to create truly contextual documentation.

Of course, nothing is more valuable than when documentation is integrated with its API, sort of a split-screen or hyperlinked reality where your users or potential users can jump to the part they need in the documentation and then easily toggle back to that part within the API, immediately putting to practice what they learned.

Who's in charge of writing API documentation?
The real problem with API documentation is that while we increasingly acknowledge the value of it, it's the first casualty of the "There's Never Any Time Syndrome." And when it's unclear who's in charge, you're short of volunteers too.

Lauret argues that in order to guarantee quality and audience, "only the right people write the documentation for the right audience in the right context." He contends that creating documentation is a real job for qualified people with real skills that should depend on context.

It doesn't seem to be debated that this should be a job, it more comes down to who is responsible for it. And until we decide that, I'm afraid we may find ourselves in cycle of blame game.

A trend which grows along with the importance of documentation is to treat your documentation and client libraries as products themselves. Companies like Sendgrid pair it with a product manager who has a keen understanding of the key stakeholders that has her own team of people dedicated to the task.

Some would say marketing should get involved because it's a huge tool for selling your API, as well as the aforementioned fact that SEO does matter as people are still Googling to find you first. Plus, if you're putting all this work into well-maintained documentation, you'll also need to enlist marketing or your website team to make sure you're tracking all of the doc's user behavior, time on page, and other important analytics. Only then will you know if your documentation is any good, which is to say actually used.

Like in the not-for-profit grant writing world, others would argue to outsource it to a technical writer, but I worry that an external writer won't fully understand the needs of your API user and, really, they may err on the side of too technical, not enough human. And from this technical perspective, the engineers should be involved anyway. As well as the testers for that matter. Oh and the UX folks.

I for one argue on behalf of the developer evangelist at least being in charge of coordinating this ongoing project. They're the ones who should be best aware of what the clients need and the different use cases needed to explain how to do that. And I'd argue, while they don't need to write the whole thing, they should find the right people to do it and they probably should draft the Get Started. And then the whole team should occasionally dogfood their own start docs to make sure it still makes sense and is easy to get right into.

Or why not outsource it to a brand advocate or early adopter? That customer that's working with it every day, has a stake in your API and its documentation usability, and who could use some extra cash. Her motivation may be greater than most.

Of course, it could and probably should be different roles within each company, the size of that company and perhaps even each audience using it. Add to that, is your API an ancillary product or your bread and butter? If it's the latter, then this responsibility increases dramatically. What's clear is that every company has to define the person or persons who is in charge of this essential part of the developer experience.

But it's just the beginning
We don't doubt there's a need and a demand for better API documentation and doc automation. But we're still at the very early stages of creating something that's both machine-readable and for the different audiences that could be looking to consume your API. That's where you come in.

Read the original blog entry...

More Stories By SmartBear Blog

As the leader in software quality tools for the connected world, SmartBear supports more than two million software professionals and over 25,000 organizations in 90 countries that use its products to build and deliver the world’s greatest applications. With today’s applications deploying on mobile, Web, desktop, Internet of Things (IoT) or even embedded computing platforms, the connected nature of these applications through public and private APIs presents a unique set of challenges for developers, testers and operations teams. SmartBear's software quality tools assist with code review, functional and load testing, API readiness as well as performance monitoring of these modern applications.

@ThingsExpo Stories
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...
In his session at 21st Cloud Expo, Raju Shreewastava, founder of Big Data Trunk, provided a fun and simple way to introduce Machine Leaning to anyone and everyone. He solved a machine learning problem and demonstrated an easy way to be able to do machine learning without even coding. Raju Shreewastava is the founder of Big Data Trunk (www.BigDataTrunk.com), a Big Data Training and consulting firm with offices in the United States. He previously led the data warehouse/business intelligence and B...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
"Digital transformation - what we knew about it in the past has been redefined. Automation is going to play such a huge role in that because the culture, the technology, and the business operations are being shifted now," stated Brian Boeggeman, VP of Alliances & Partnerships at Ayehu, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that Synametrics Technologies will exhibit at SYS-CON's 22nd International Cloud Expo®, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Synametrics Technologies is a privately held company based in Plainsboro, New Jersey that has been providing solutions for the developer community since 1997. Based on the success of its initial product offerings such as WinSQL, Xeams, SynaMan and Syncrify, Synametrics continues to create and hone inn...
"Evatronix provides design services to companies that need to integrate the IoT technology in their products but they don't necessarily have the expertise, knowledge and design team to do so," explained Adam Morawiec, VP of Business Development at Evatronix, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
The 22nd International Cloud Expo | 1st DXWorld Expo has announced that its Call for Papers is open. Cloud Expo | DXWorld Expo, to be held June 5-7, 2018, at the Javits Center in New York, NY, brings together Cloud Computing, Digital Transformation, Big Data, Internet of Things, DevOps, Machine Learning and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding busin...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
Nordstrom is transforming the way that they do business and the cloud is the key to enabling speed and hyper personalized customer experiences. In his session at 21st Cloud Expo, Ken Schow, VP of Engineering at Nordstrom, discussed some of the key learnings and common pitfalls of large enterprises moving to the cloud. This includes strategies around choosing a cloud provider(s), architecture, and lessons learned. In addition, he covered some of the best practices for structured team migration an...
Recently, REAN Cloud built a digital concierge for a North Carolina hospital that had observed that most patient call button questions were repetitive. In addition, the paper-based process used to measure patient health metrics was laborious, not in real-time and sometimes error-prone. In their session at 21st Cloud Expo, Sean Finnerty, Executive Director, Practice Lead, Health Care & Life Science at REAN Cloud, and Dr. S.P.T. Krishnan, Principal Architect at REAN Cloud, discussed how they built...
No hype cycles or predictions of a gazillion things here. IoT is here. You get it. You know your business and have great ideas for a business transformation strategy. What comes next? Time to make it happen. In his session at @ThingsExpo, Jay Mason, an Associate Partner of Analytics, IoT & Cybersecurity at M&S Consulting, presented a step-by-step plan to develop your technology implementation strategy. He also discussed the evaluation of communication standards and IoT messaging protocols, data...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, examined the regulations and provided insight on how it affects technology, challenges the established rules and will usher in new levels of diligence arou...
Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
DevOps at Cloud Expo – being held June 5-7, 2018, at the Javits Center in New York, NY – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real results. Among the proven benefits,...
@DevOpsSummit at Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, is co-located with 22nd Cloud Expo | 1st DXWorld Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait...
SYS-CON Events announced today that T-Mobile exhibited at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. As America's Un-carrier, T-Mobile US, Inc., is redefining the way consumers and businesses buy wireless services through leading product and service innovation. The Company's advanced nationwide 4G LTE network delivers outstanding wireless experiences to 67.4 million customers who are unwilling to compromise on qua...