Overview
AutoMFlows provides powerful API testing capabilities with two dedicated node types:- API Request: Configure HTTP requests with full control over method, headers, body, and authentication
- API cURL: Import and execute cURL commands directly
API Request Node
The API Request node makes HTTP requests with configurable parameters.Basic Request
HTTP Methods
AutoMFlows supports all standard HTTP methods:- GET
- POST
- PUT/PATCH
- DELETE
Retrieve data from the server:
Headers
Configure request headers for authentication and content types:Request Body
The API Request node supports multiple body types:JSON Body
JSON bodies are automatically validated and formatted. Invalid JSON throws an error before execution.
Form Data
Send multipart form data with fields and files:URL-Encoded Form
Raw Body
API cURL Node
Import cURL commands directly into AutoMFlows:The cURL parser automatically extracts method, URL, headers, body, and form data from the command string.
cURL Examples
Response Handling
API responses are stored in the execution context with the following structure:Accessing Response Data
Use variables to access response data in subsequent nodes:API Verification
Verify API responses using the Verify node:- Status Code
- JSON Path
- Response Body
- Headers
Retry Strategies for APIs
Configure retry behavior for transient API failures:Retry by Count
Exponential backoff increases delay between retries: 1s, 2s, 4s, 8s, 10s (capped at maxDelay).
Retry Until Condition
Variable Interpolation
Use context variables in API requests:${variableName} syntax.
Trace Logging
Enable trace logs to see detailed request and response information:- Request method, URL, headers, body
- Response status, headers, body
- Request duration
- Timestamps
Complete API Test Example
Here’s a complete workflow that tests a REST API:Executing via API
Run API tests using the AutoMFlows REST API:Use
workers: 1 for API tests to avoid wait node pauses in parallel execution.Best Practices
Use Environment Variables
Store sensitive data like API keys and tokens in config files, not hardcoded in workflows.
Verify Status Codes
Always verify HTTP status codes after API calls to catch errors early.
Enable Retry for Transient Errors
Use exponential backoff retry strategy for network failures and rate limits.
Store Response in Context
Use unique
contextKey values to store multiple API responses for later access.Next Steps
Reports
Generate execution reports with API response data and performance metrics.
Browser Automation
Combine API testing with browser automation for end-to-end workflows.
