good API documentation • What is a content model and why do you need one • What are some key components of a good API doc suite What we won’t: • What tools to use (Swagger vs. traditional authoring tools) • How to take shortcuts with API documentation
it is to create great API docs. Your documentation will highlight every antipattern and bad decision you’ve built into your API. IsNotVisible=0 When pages look different visually, your developers will have a harder time building the connections they need to learn. Inconsistent references slow the learning curve • Operations vs. Methods • URL vs URI • Parameters vs. Arguments
each piece fits Documentation patterns for: • Structure • Presentation • Language • Add a user to a group • Configuring group members • How to add users to a group • Group member definition • POST /groups/users
document specific to each platform, you’ll quickly become overwhelmed • Every time an API entity changes, you’ll have to change the documentation for each platform • Think about translation and i18n
line numbers) copy over • Syntax highlighting (Google code prettify) • Keep samples up to date - changing the doc samples should be part of changing the code • Single-click copying • Think about maintaining an external code sample library
themselves • Use standard HTTP status codes • Assign error codes, return them in the response, and refer the users to the documentation for the message • A good error message should: ◦ Not blame the user (FAILURE!) ◦ Explain which field in the request caused the error ◦ Demonstrate how to fix it • If they don’t make sense in English, they won’t make sense after translation
than just having a developer portal, API documentation is more than just having an API Reference. If people can’t adopt your API in the first place, they’ll never use your API reference. If you need a “How to use this documentation,” your documentation is too complicated. • Getting started guides • Tutorials • Community demos • API reference • SDK guides • Helper libraries