In an Apidog project, you can use Modules to organize your endpoints. A module is similar to a "service" in technical architecture, designed to help you manage and present endpoints more efficiently β especially in microservice-based systems. Each module includes its own set of related endpoints, components(such as schemas, responses, and security schemes), base URLs (one for each environment)Each module corresponds to a complete and independent Swagger/OpenAPI specification file.Use modules to better organize your endpoints when:Tightly related services. For example, in an AI project: one module for text generation endpoints, another for image generation endpoints, and one for speech endpoints.
Microservices. For example, in an e-commerce project, you may have authentication, order, and product services.
Multiple API versions. For example, your project exposes different API versions to external users, such as Legacy, LTS, and Latest.
Creating a Module#
1
In project, hover over the top of the folder tree and click the
+
button. In the dropdown menu, select
New Module
.
2
Enter the
module name and click
Save
. The new module will appear in the folder tree. Click on the module to view its details, including:
Data statistics of resources in the module
Coverage of endpoint case and test scenario
Export options for endpoints in the module
Module variables β similar to environment variables, but only accessible within this module's endpoint requests. Setting the Base URL for Each Module#
Once a module is created, it will automatically appear in the Environment Management page. You can assign a Base URL for each environment within the newly added module.Using the Correct Base URL When Making Requests#
By default, each module's endpoint requests will automatically use the Base URL defined for that module in the current environment, combined with the endpoint path. Endpoints from one module cannot use the Base URL of another module to send requests.If a single module contains multiple services(multiple Base URLs), you can manually specify which Base URL to use at the folder or endpoint level within the module.However, this approach was part of an older usage pattern in Apidog and is not recommended since version2.7.16
. Instead, we suggest splitting services into separate modules, each with its own Base URL. Modified atΒ 2025-08-07 03:49:59