An Endpoint represents a specific API endpoint or route. It's the core building block for defining, testing, and documenting an API in Apidog.Apidog provides an intuitive UI for API designers to specify their APIs. Let's walk through an example:Creating an Endpoint#
This example demonstrates how to create an endpoint for querying user information by ID.1
Create a New API: Open a new tab and click
New API
.
2
Define the Request Path:In the API path field, enter
/category/{id}
. This sets up the base for the
Request section.
If your interface does not match the image above, please switch to Design-first Mode
. 3
Define the Response Structure:Scroll to the Responses
section.
In the 'OK(200)' response, hover over the '+' icon and click to create a child node named "data".
4
Use a Schema Reference:Hover over the 'data' node.
Click the type String
to change it to 'Schema Reference'.
Choose "Category" (or your relevant schema) from the list.
5
Add a Response Example:Scroll to the Response Examples
section.
6
Generate Example Data:Name the example 'Success'.
Click Auto-generate
to populate the response data based on your defined structure.
Click OK
to add the example.
7
Save Your Endpoint: Click
Save
to finalize your API specification.
Importing Existing APIs#
You can import an existing OAS file instead of creating a new endpoint from scratch.Using Schemas#
For commonly used data structures, define them as Schemas. You can then reference these Schemas in your endpoint requests or responses.Next Step
Make a request to the endpoint Modified atΒ 2025-03-14 10:44:34