Specify a new endpoint
Creating an Endpoint
Create a New API: Open a new tab and click 
New API
.
Define the Request Path:
In the API path field, enterName: Get category by id Path params: Name: id Type: integer Example: 1 
If your interface does not match the image above, please switch to 
In the API path field, enter
/category/{id}
. This sets up the base for the Request section.Design-first Mode
.Define the Response Structure:Scroll to the In the 'OK(200)' response, hover over the '+' icon and click to create a child node named "data". 
Responses
section.
Use a Schema Reference:Hover over the 'data' node. Click the type Choose "Category" (or your relevant schema) from the list. 
String
to change it to 'Schema Reference'.Add a Response Example:Scroll to the Click 
Response Examples
section.Add Example
.Generate Example Data:Name the example 'Success'. Click Click 
Auto-generate
to populate the response data based on your defined structure.OK
to add the example.Save Your Endpoint: Click 
Save
to finalize your API specification.Related
Importing Existing APIs
Using Schemas
Modified atΒ 2025-03-14 10:44:34