How Can Document Users Modify the Base URL in Shared Docs ?
In the published docs or quickly shared docs of Apidog, if you want the document users to be able to set and modify the Base URL, it can be easily achieved by setting variables. The specific operation steps are as follows:
1.
Create and reference variables In the Apidog project, go to a certain "Environment" page, click "Add Variable", and enter the variable name (for example, "baseUrl"). In the URL input box corresponding to the "Preceding URL" of the environment, use the variable reference (for example, {{baseUrl}}) to replace the specific URL address. In this way, the Base URL is associated with the created variable.
2.
Access the document After the document is published and shared with users, the users can see the place where the variable is referenced on the endpoint. When the mouse hovers over the variable reference, it will prompt the user to set the variable value.
3.
Modify the variable value Click on the variable, and the variable setting window will pop up automatically. The user just needs to fill in the required actual value.
After saving, the paths displayed on the document and the actual requests will automatically apply the updated variable value.
Through this way of setting variables, it can effectively solve the problem that different users need to customize the Base URL to access their respective actual data.