# Step 2: Test the API

In Step 2, test the created API by providing the values of the variables startcount, count, and startjoindate.

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

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

* The Test API box will display the “Entity actions” toggle button disabled.&#x20;
* To allow the Entity to be updated or created with entity actions, click the “Entity actions” toggle button.

{% hint style="info" %}
Note: If “Entity actions” is not enabled, testing an API using entity actions will result in the status of “failed” in the response.&#x20;
{% endhint %}

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

* Add values for the Query Strings as per the data available for querying in the target entity. For example:&#x20;
  * startcount=10&#x20;
  * count=5&#x20;
  * startjoindate=2015-01-01

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

* Click the \[Test API] button.

![](/files/PdhmxckEauCKfl5KNfvB)

* The records are displayed in the Body.

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


---

# 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-entities/exercise-2-customer-records/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.
