Search results

API reference tutorial overview

In this API reference tutorial 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. 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
"Resources" refers to the information returned by an API.
2. Endpoints and methods
The endpoints indicate how you access the resource, and the method used with the endpoint indicates the allowed interactions (such as GET, POST, or DELETE) with the resource.
3. Parameters
Parameters are options you can pass with the endpoint (such as specifying the response format or the amount returned) to influence the response.
4. Request example
The request example includes a sample request using the endpoint, showing some parameters configured.
5. Response example and schema
The response example shows a sample response from the request example; the response schema defines all possible elements in the response.

Tutorial workflow map

The tutorial 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 this. You’ll then have an opportunity to 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 Publishing your API documentation section, we’ll jump into publishing tools and methods.

Next steps

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

24% Complete

24/107 pages complete. Only 83 more pages to go...


Want to buy me lunch? Click the Donate button below to donate $10 through Paypal.

Get new posts delivered straight to your inbox.

Subscriber count: 4,285