Spinner logo QXQA

Did You Know?


API Parameters in Depth

Parameters define how data is passed into an API request. Each parameter represents a single input and specifies where the value belongs, how it behaves, and whether it is required for execution.


Why it matters

  • Precision: Parameters ensure values are injected into the correct part of the request.
  • Flexibility: The same API Definition can be reused with different inputs across tests.
  • Reliability: Clear parameter rules prevent malformed requests and false test failures.

When to use it

  • You need to pass dynamic values into an API request.
  • The endpoint includes path placeholders or optional query values.
  • Headers, cookies, or request bodies vary between executions.

Core concepts

  • Parameter Name – the identifier used across the definition and test execution.
  • Location (In) – where the parameter is placed in the request.
  • Required Flag – indicates whether the request can run without this parameter.
  • Type – the expected data shape of the value.
  • Default Value – an optional fallback, used mainly for body parameters.

How it works

  1. Parameters are defined as part of an API Definition.
  2. Each parameter is mapped to a specific request location.
  3. During execution, AXQA injects parameter values into the request.
  4. If a value is not provided, defaults (when defined) may be used.

How to use it

Step 1: Define a parameter name

  • Use clear, meaningful names that match the API contract.
  • Parameter names are case-insensitive within the same API Definition.

Step 2: Choose the parameter location

  • Query: Appended to the URL as query string values.
  • Path: Replaces placeholders in the endpoint (e.g. /users/{id}).
  • Header: Sent as HTTP headers with the request.
  • Cookie: Included as cookies when the request is executed.
  • Body: Included in the request payload (Parameters mode only).

Step 4: Select the parameter type

Choose the type that best represents the expected value:

  • String – text-based values
  • Integer – numeric values
  • Boolean – true / false
  • Array – multiple values
  • Object – structured data
Note
The type helps with validation and consistent handling.

Step 5: Use default values (Body only)

  • Default values apply only to Body parameters.
  • If no value is provided during execution, the default is used.
  • Defaults are ignored when Raw JSON body mode is active.

Step 6: Understand multi-value (Array) parameters

  • When a parameter is defined as an Array, AXQA may execute the request multiple times, once per value, depending on how the API is used in testing.
  • This is useful for batch validation or testing multiple inputs against the same endpoint.

Best practices

  • Keep parameter names aligned with the backend API specification.
  • Use Path parameters explicitly for all endpoint placeholders.
  • Avoid mixing Raw JSON body mode with Body parameters.
  • Use Array parameters intentionally and document their purpose.

Common mistakes

Mistake 1: Defining a Path parameter that does not exist in the endpoint
Fix: Ensure every Path parameter matches a placeholder in the URL.

Mistake 2: Expecting Body defaults to apply in Raw JSON mode
Fix: Switch back to Parameters mode if defaults are required.


Security & permissions

  • Parameters follow project-level access rules.
  • Sensitive values passed as parameters are handled securely during execution.
  • Parameter definitions control structure, not exposure of underlying data.

Related documentation

Last update: Feb. 11, 2026

Tools

A+ A-

Version

1