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.

查找其他区块
Discover new ways and blocks to create stunning and functional documentation pages.
查看所有区块

需要帮助吗?⬇️
Use the 蓝色 聊天气泡from bottom right corner.
Or try AI 聊天 (from search box) for quick answers.

您的意见很重要
Use the below feedback form, anonymously.
Or ask a question in 问答部分 and our team or AI will give you a solution.