# Understanding API Parameterisation

**API Parameterization** is the process of dynamically inputting values into API requests during test execution. It allows you to test APIs with various input combinations, ensuring comprehensive coverage and identifying potential issues that might not be detected with static values.

Dynamically data drive your API by parameterising the API request. To parameterise type '{{' to get the list of parameters.&#x20;

You can add a **local parameter** to data drive the API request and provide the test data manually

**Global parameter** would be used when you have stored the value globally for easy management and reuse across multiple test cases.

**For Example**: Endpoint URI would be a constant which would be used globally across multiple test cases in a project.&#x20;

```
https://reqres.in/api/users?page=2
```

In the above Endpoint URI, it can be parameterised with a global parameter as

```
{{Endpoint_URI}}?page=2
```

In this case, 'Endpoint\_URI' would be a global parameter with a constant value '<https://reqres.in/api/users>'.

**Runtime Parameters** would be used to extract values from previous API responses or generate dynamic data and use them as parameters in subsequent calls.

**Example 1 :** In case of Login API, you would be receiving a authentication token in the API response. You can [extract](/introduction-to-test-management-in-simplifyqa/learn-api-testing/achieve-data-flow-for-e2e-testing.md) the token from the API response and store it in a runtime parameter. Now you can use this runtime parameter in subsequent API call or any other test case.

**Example 2 :** If a data has to be dynamically generated such as, userID or orderID to get a realistic data - generated data would be stored in a runtime parameter. Now you can use this runtime parameter in subsequent API call or ay other test case.

{% hint style="success" %}
**Additional Tips**

* **Clear Naming Conventions:** Use meaningful names for parameters to improve readability.
* **Data-Driven Testing Best Practices:** Follow best practices for designing and managing data-driven test cases.
* **Environment Variable Management:** Securely manage sensitive parameter values in environment variables.
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.simplifyqa.ai/introduction-to-test-management-in-simplifyqa/learn-api-testing/understanding-api-parameterisation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
