Skip to content

API endpoint

Gus edited this page Dec 27, 2017 · 13 revisions

Here are the following steps to document a new API endpoint:

  1. Create a new folder in content/api with your API name
  2. Create a code_snippets folder inside the previously created api sub-folder to store all your code examples
  3. Create a _index.md file that contains just the following parameter:
---
title: TITLE OF YOUR API
external_redirect: /api/
---
  1. Create an API.md file that describes your API:
---
title: TITLE OF YOUR API
type: apicontent
order: XX
---

## TITLE OF YOUR API

This is my api description

Note: The order parameter defines where your API entry is displayed in the main API navigation bar

  1. Create your ENDPOINT.md file that describes your endpoint:
---
title: MY API ENDPOINT
type: apicontent
order: XX.1
---

## ENDPOINT TITLE
This is my endpoint description
##### ARGUMENTS

* `arg_1` [*required*]:  
    My arg_1 description
* `arg_2` [*optional*, *default*=**None**]:  
    My arg_2 description

Note: Increment your order parameter to control the position of your endpoint in your API sub-navigation menu.