# Discourse API Documentation Using RAML

**URL:** https://meta.discourse.org/t/discourse-api-documentation-using-raml/53816
**Category:** Development
**Created:** [December 5, 2016, 10:47pm UTC](https://meta.discourse.org/t/discourse-api-documentation-using-raml/53816 "2016-12-05T22:47:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ibnesayeed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibnesayeed/32/120427_2.png) [@ibnesayeed](https://meta.discourse.org/u/ibnesayeed)
#### Post date: [December 5, 2016, 10:47pm UTC](https://meta.discourse.org/t/discourse-api-documentation-using-raml/53816/1 "2016-12-05T22:47:03Z")

</div>

I am proposing the Discourse API documentation using [RESTful API Modeling Language (RAML)](http://raml.org/). This would enable us to:

- programmatically interact with the API
- perform testing on various endpoints
- automatically generated interactive interfaces to read the documentation
- maintain the API docs along with the code

There are various tools including [API Console](https://github.com/mulesoft/api-console) to make the RAML documentation available online and allow user to interact with a live endpoint.

Recently I wrote a tool called [MemGator](https://github.com/oduwsdl/memgator) to aggregate archived versions of any URI from various archives in a single place. The tool can be used from the command line or as a web service. To document the web service API endpoints I used RAML which can be seen in action at [MemGator Server API](http://memgator.cs.odu.edu/api.html). It includes live `Try it` fuctionality as well.

RAML has the familiar YAML syntax and is quite modular and composable, so it should be very easy to organize each endpoint in separate files and have shared logic and examples in appropriate directory structure.

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [December 6, 2016, 12:09am UTC](https://meta.discourse.org/t/discourse-api-documentation-using-raml/53816/2 "2016-12-06T00:09:39Z")

</div>

Great idea 😉

The API Docs are currently being re-written in YAML which ReDoc uses to display the results.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [May 16, 2017, 6:24pm UTC](https://meta.discourse.org/t/discourse-api-documentation-using-raml/53816/3 "2017-05-16T18:24:59Z")

</div>

See [https://docs.discourse.org](https://docs.discourse.org) and:

> [@Discourse REST API Documentation](https://meta.discourse.org/t/discourse-api-documentation/22706):
>
> Discourse API Please view the Discourse API Documentation site for detailed info: [https://docs.discourse.org](https://docs.discourse.org)information_source Authentication API requests must use HTTP header based authentication. Pass your Api-Key and Api-Username as HTTP headers. Authentication via query parameters or request body is not supported (this was removed in April 2020). Please see the example cURL request below. The only API endpoints that continue to support credentials in query parameters are requests to…
