Skip to main content

Documenting REST APIs

  • Chapter
  • First Online:
  • 1267 Accesses

Abstract

For a REST API we can produce an executable version of the documentation and allow users to interact with a system through its own documentation. In this sense, the documentation wouldn’t be a passive dust collector artifact (if stored in a printed form), but a handy UI to communicate with software.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    There are even IDEs (for example, the Restlet Studio) to help you produce the REST API specification in a generic fashion (without a need to prematurely stick to the concrete documentation system, like, Swagger, RAML, etc.). However, such tools hit their limits quite early, as we will showcase in this chapter.

  2. 2.

    As this is a static file, without a chance to negotiate content, then it is okay to have a file extension inside the URL.

  3. 3.

    Apiary is an excellent API specification framework with good support for testing.

  4. 4.

    Something that is nicely illustrated at http://xkcd.com/1481/ .

  5. 5.

    You might want to refactor the problem report entity and rename reportNumber to reportId. You might also want to add a timestamp when the error has ensued. Don’t forget to update the API documentation after these changes.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Ervin Varga

About this chapter

Cite this chapter

Varga, E. (2016). Documenting REST APIs. In: Creating Maintainable APIs. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2196-9_9

Download citation

Publish with us

Policies and ethics