Points de terminaison API
We also recognize that not all companies provide standardized APIs, so we built an in-house widget to let you describe to your team or customers what your API looks like.
Additionally, it's super useful when working together with external teams, where you need to communicate an API specification, and instead of providing a JSON file, you provide a document with this widget, and let it describe anything from URL, Parameters, Cookies, Request structure, Response structure, etc.
You can add one by typing (api) in the editor or clicking the API icon in a new row.
- idstringrequiredDescription
- recipestringrequiredDescription
- glutenbooleanrequiredDescription
- X-Auth-TokenstringrequiredDescription
fetch("https://api.cakes.com/v1/cakes/:id", {
"method": "POST",
"headers": {
"Accept": "application/json"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});const fetch = require('node-fetch');
let url = 'https://api.cakes.com/v1/cakes/:id';
let options = {
method: 'POST',
headers: {
Accept: 'application/json',
}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));curl --request POST
--url https://api.cakes.com/v1/cakes/:id
--header 'Accept: application/json'import requests
url = "https://api.cakes.com/v1/cakes/:id"
headers = {"Accept": "application/json"}
response = requests.request("GET", url, headers=headers)
print(response.text)const fetch = require('node-fetch');
let url = 'https://api.cakes.com/v1/cakes/:id';
let options = {method: 'POST', headers: {Accept: 'application/json'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));{
"name": "Cake's name",
"recipe": "Cake's recipe name",
"cake": "Binary cake"
}{
"message": "Ain't no cake like that."
}- idstringrequiredDescription
fetch("https://api.cakes.com", {
"method": "GET",
"headers": {
"Accept": "application/json"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});A simple text.{
"name": "Cake's name",
}{
"message": "Ain't no cake like that."
}It's VERY flexible letting your team describe in detail any type of HTTP endpoint.
We're also working on making it interactive, so your customers can actually make the request from here.

Trouver d'autres blocs
Discover new ways and blocks to create stunning and functional documentation pages.

Besoin d'aide ? ⬇️
Use the bleu bulle de discussionfrom bottom right corner.
Or try Chat IA (from search box) for quick answers.

Votre avis compte
Use the below feedback form, anonymously.
Or ask a question in section Questions-Réponses and our team or AI will give you a solution.