Environments & Variables in Apidog
Getting Started with Variables
Open the default PetStore project, which is pre-installed in your Team space for every user.
Locate and click the environment icon
β‘
at the top right in your interface.Find the 
Global Variables
section. Create a new variable called my_variable
with "123" as its initial value.Click the
Save
button.Open the "Find pet by ID" endpoint, and switch to the
Run
tab.locate the path parameter "PetId", and add
{{my_variable}}
as the value.Move your cursor over the variable name to view its current value and scope.
Click the Environments dropdown besides the
β‘
icon, and switch to Local Mock
environment.Click
Send
to execute the request.You will find the response displayed in the lower half of the interface. By switching to the "Actual Request" tab, you can view the request that was actually sent, with variables replaced by their respective actual values.
Create and switch environments
Modified atΒ 2025-02-20 02:36:18