title: API Reference
language_tabs:
includes:
search: true
toc_footers:
Welcome to the generated API reference. Get Postman Collection
#general
This will be the long description. It can also be multiple lines long.
Example request:
curl -X GET -G "http://localhost/api/withDescription" \
-H "Accept: application/json" \
-H "Authorization: customAuthToken" \
-H "Custom-Header: NotSoCustom"
const url = new URL("http://localhost/api/users");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
GET api/withDescription
Example request:
curl -X GET -G "http://localhost/api/withResponseTag" \
-H "Accept: application/json" \
-H "Authorization: customAuthToken" \
-H "Custom-Header: NotSoCustom"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost/api/withResponseTag",
"method": "GET",
"headers": {
"accept": "application/json",
"Authorization": "customAuthToken",
"Custom-Header": "NotSoCustom",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"id": 4,
"name": "banana",
"color": "red",
"weight": "1 kg",
"delicious": true
}
GET api/withResponseTag
Example request:
curl -X GET -G "http://localhost/api/withBodyParameters" \
-H "Accept: application/json" \
-H "Authorization: customAuthToken" \
-H "Custom-Header: NotSoCustom" \
-d "user_id"=20 \
-d "room_id"=6DZyNcBgezdjdAIs \
-d "forever"= \
-d "another_one"=2153.4 \
-d "yet_another_param"={} \
-d "even_more_param"=[]
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost/api/withBodyParameters",
"method": "GET",
"data": {
"user_id": 20,
"room_id": "6DZyNcBgezdjdAIs",
"forever": false,
"another_one": 2153.4,
"yet_another_param": "{}",
"even_more_param": "[]"
},
"headers": {
"accept": "application/json",
"Authorization": "customAuthToken",
"Custom-Header": "NotSoCustom",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
null
GET api/withBodyParameters
Parameter | Type | Status | Description --------- | ------- | ------- | ------- | -----------
user_id | integer | required | The id of the user.
room_id | string | optional | The id of the room.
forever | boolean | optional | Whether to ban the user forever.
another_one | number | optional | Just need something here.
yet_another_param | object | required |
even_more_param | array | optional |
Requires authentication
Example request:
curl -X GET -G "http://localhost/api/withAuthTag" \
-H "Accept: application/json" \
-H "Authorization: customAuthToken" \
-H "Custom-Header: NotSoCustom"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://localhost/api/withAuthTag",
"method": "GET",
"headers": {
"accept": "application/json",
"Authorization": "customAuthToken",
"Custom-Header": "NotSoCustom",
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
null
GET api/withAuthTag