Mock sample for your project: Discourse API Documentation

Integrate with "Discourse API Documentation" from discourse.local in no time with Mockoon's ready to use mock sample

Discourse API Documentation

discourse.local

Version: latest


Use this API in your project

Integrate third-party APIs faster by using "Discourse API Documentation" ready-to-use mock sample. Mocking this API will help you accelerate your development lifecycles and improves your integration tests' quality and reliability by accounting for random failures, slow response time, etc.
It also helps reduce your dependency on third-party APIs: no more accounts to create, API keys to provision, accesses to configure, unplanned downtime, etc.

Description

This page contains the documentation on how to use Discourse through API calls.
> Note: For any endpoints not listed you can follow the
reverse engineer the Discourse API
guide to figure out how to use an API endpoint.
Request Content-Type
The Content-Type for POST and PUT requests can be set to application/x-www-form-urlencoded,
multipart/form-data, or application/json.
Endpoint Names and Response Content-Type
Most API endpoints provide the same content as their HTML counterparts. For example
the URL /categories serves a list of categories, the /categories.json API provides the
same information in JSON format.
Instead of sending API requests to /categories.json you may also send them to /categories
and add an Accept: application/json header to the request to get the JSON response.
Sending requests with the Accept header is necessary if you want to use URLs
for related endpoints returned by the API, such as pagination URLs.
These URLs are returned without the .json prefix so you need to add the header in
order to get the correct response format.
Authentication
Some endpoints do not require any authentication, pretty much anything else will
require you to be authenticated.
To become authenticated you will need to create an API Key from the admin panel.
Once you have your API Key you can pass it in along with your API Username
as an HTTP header like this:
Boolean values
If an endpoint accepts a boolean be sure to specify it as a lowercase
true or false value unless noted otherwise.