title: API Reference
language_tabs:
includes:
search: true
toc_footers:
Welcome to the generated API reference. Get Postman Collection
#Group A
This will be the long description. It can also be multiple lines long.
Example request:
curl -X GET -G "http://localhost/api/withDescription" \
-H "Authorization: customAuthToken" \
-H "Custom-Header: NotSoCustom"
const url = new URL("http://localhost/api/withDescription");
let headers = {
"Authorization": "customAuthToken",
"Custom-Header": "NotSoCustom",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
GET api/withDescription
Example request:
curl -X GET -G "http://localhost/api/withResponseTag" \
-H "Authorization: customAuthToken" \
-H "Custom-Header: NotSoCustom"
const url = new URL("http://localhost/api/withResponseTag");
let headers = {
"Authorization": "customAuthToken",
"Custom-Header": "NotSoCustom",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"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 "Authorization: customAuthToken" \
-H "Custom-Header: NotSoCustom" \
-H "Content-Type: application/json" \
-d '{"user_id":9,"room_id":"consequatur","forever":false,"another_one":11613.31890586,"yet_another_param":{},"even_more_param":[],"book":{"name":"consequatur","author_id":17,"pages_count":17},"ids":[17],"users":[{"first_name":"John","last_name":"Doe"}]}'
const url = new URL("http://localhost/api/withBodyParameters");
let headers = {
"Authorization": "customAuthToken",
"Custom-Header": "NotSoCustom",
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"user_id": 9,
"room_id": "consequatur",
"forever": false,
"another_one": 11613.31890586,
"yet_another_param": {},
"even_more_param": [],
"book": {
"name": "consequatur",
"author_id": 17,
"pages_count": 17
},
"ids": [
17
],
"users": [
{
"first_name": "John",
"last_name": "Doe"
}
]
}
fetch(url, {
method: "GET",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
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 |
book.name | string | optional |
book.author_id | integer | optional |
book[pages_count] | integer | optional |
ids.* | integer | optional |
users.*.first_name | string | optional | The first name of the user.
users.*.last_name | string | optional | The last name of the user.
Requires authentication
Example request:
curl -X GET -G "http://localhost/api/withAuthTag" \
-H "Authorization: customAuthToken" \
-H "Custom-Header: NotSoCustom"
const url = new URL("http://localhost/api/withAuthTag");
let headers = {
"Authorization": "customAuthToken",
"Custom-Header": "NotSoCustom",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
GET api/withAuthTag