Search results

API reference tutorial overview

Last updated: Jun 27, 2020

Download PDF

In this API reference tutorial, we’ll work on creating five common sections in REST API reference documentation: resource description, endpoints and methods, parameters, request example, and response example and schema. To provide some context (and to continue with our sample documentation scenario), we’ll structure the information from the new endpoint to document into these five sections.

Five common sections in REST API docs

Almost all API reference topics include these five sections:

1. Resource description
2. Endpoints and methods
3. Parameters
Options that can be passed with an endpoint to influence the response, such as specifying the response format or number of results returned.
4. Request example
A sample API request showcasing how the endpoint should be accessed, including any required headers, parameters, or body content.
5. Response example and schema

Tutorial workflow map

The tutorial here includes a workflow map to help guide and orient you each step of the way.

After the tutorial

When we’re finished, the end result will look like a real API help topic (see the finished result in Putting it all together). In the associated activities, you’ll have an opportunity to edit or create an API reference topic with your own open-source API project.

Although there are automated ways to publish API docs, we’re focusing on content rather than tools in this section. In the next section, OpenAPI spec and generated reference docs, we’ll look at how to describe these same reference components using the OpenAPI specification. In the Publishing your API documentation section, we’ll look at ways to publish the information.

Next steps

Now that you have an idea of the tutorial, let’s get started with the first section: Step 1: Resource description.

About Tom Johnson

Tom Johnson

I'm an API technical writer based in the Seattle area. On this blog, I write about topics related to technical writing and communication — such as software documentation, API documentation, AI, information architecture, content strategy, writing processes, plain language, tech comm careers, and more. Check out my API documentation course if you're looking for more info about documenting APIs. Or see my posts on AI and AI course section for more on the latest in AI and tech comm.

If you're a technical writer and want to keep on top of the latest trends in the tech comm, be sure to subscribe to email updates below. You can also learn more about me or contact me. Finally, note that the opinions I express on my blog are my own points of view, not that of my employer.

27% Complete

27/165 pages complete. Only 138 more pages to go.