# Step 2: Test the API

To test the API, proceed as follows.

* To test the API, click on the \[Test] button.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_4/ch4nocalctestapi.png" alt=""><figcaption></figcaption></figure>

* In the Query strings section, the Query strings “Number1” and “Number2” display initialized values. \
  To define the operator for addition, enter the value for the and the “operation” as “Add.” \
  Click the \[Test API] button.

{% embed url="<https://media.langstack.com/documentation/media/images/code/training_manual/chapter_4/ch4nocalctestapi2.png>" %}

* The result of the addition will be visible in the “Body.”

{% embed url="<https://media.langstack.com/documentation/media/images/code/training_manual/chapter_4/ch4nocalctestresult.png>" %}

* To test the API in the browser, add the URL in the browser and enter the values in Query strings as per the link below. The result will be displayed in the browser.

<figure><img src="https://media.langstack.com/documentation/media/images/code/training_manual/chapter_4/ch4nocalcapiinbrows.png" alt=""><figcaption></figcaption></figure>


---

# 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.langstack.com/welcome/get-started/learn-langstack/introduction-to-rest-api/exercise-1-get-rest-api-and-return-response-object/step-2-test-the-api.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.
