Apidog includes a powerful JavaScript-based scripting engine that allows you to add dynamic behavior to your API requests and tests. This engine is fully compatible with Postman scripts.Capabilities#
With custom scripts, you can:1.
Validate Responses: Write assertions to verify status codes, headers, and body content (Post-processor).
2.
Modify Requests: Dynamically set URL parameters, headers, or body data (Pre-processor).
3.
Manage Variables: Pass data between requests by setting and retrieving variables.
4.
External Integration: Call programs written in other languages (Java, Python, PHP, Go, etc.).
Usage#
Scripts can be executed at two stages of the request lifecycle:Pre Processors: Executed before the request is sent.
Post Processors: Executed after the response is received.
Debugging#
You can print messages to the Console using pm.console.log() or console.log() for debugging purposes.Examples#
FAQ#
Q: Does Apidog support pm.nextRequest()?A: No. Apidog uses Test Scenarios for workflow orchestration instead of the "Run Collection" feature found in Postman. In a Test Scenario, you can use Condition steps (If-Else) to control the flow of execution based on logic, removing the need for pm.nextRequest(). Modified atΒ 2026-01-14 09:10:00