REST API Blocks
API and Endpoint blocks provide a structured way to document API requests and responses within a Docvora page. They can be inserted from the editor toolbar or through the slash command menu. Creating API documentation content An API block can be configured with the HTTP method and endpoint being documented. Supported request methods include: GET POST PUT PATCH DELETE Request details can include information such as: Path parameters Query parameters Request body Headers Multiple responses can also be documented within the same block. This allows successful responses and different failure responses to be shown together. Code examples API blocks can display generated examples in multiple programming languages. On pages using the wide layout, the API documentation is split into columns, with the endpoint information displayed alongside the code examples. Readers can select the preferred example language. The selected language is stored in local browser storage so the same preference can be retained when viewing other API documentation. Example In wide page views, a code example is placed on the right side. See our API documentation to see it in action.
API and Endpoint blocks provide a structured way to document API requests and responses within a Docvora page.
They can be inserted from the editor toolbar or through the slash command menu.
Creating API documentation content
An API block can be configured with the HTTP method and endpoint being documented.
Supported request methods include:
GET
POST
PUT
PATCH
DELETE
Request details can include information such as:
Path parameters
Query parameters
Request body
Headers
Multiple responses can also be documented within the same block. This allows successful responses and different failure responses to be shown together.
Code examples
API blocks can display generated examples in multiple programming languages.
On pages using the wide layout, the API documentation is split into columns, with the endpoint information displayed alongside the code examples.
Readers can select the preferred example language. The selected language is stored in local browser storage so the same preference can be retained when viewing other API documentation.
Example
Example API Endpoint
| Name | Type | Required | Description |
|---|---|---|---|
| authorization | String | required |
| Name | Type | Required | Description |
|---|---|---|---|
| id | String | optional |
View response body
Hello world!In wide page views, a code example is placed on the right side. See our API documentation to see it in action.