# How to test Frends API

In order to test your created APIs, Frends includes an API Specification UI that allows authenticating and executing calls to your API endpoints.

## Step by Step Tutorial Available

If you prefer more visual or interactive guidance on how to deploy your API with Frends, you can find a step-by-step walkthrough from your own environment's home page, under Onboarding by selecting "Tutorial 5, Step 5: Testing & Monitoring APIs" tutorial.

## Accessing the API Specification UI

You can find the button for accessing API Specification UI for  your API on its page in API Management. In order to test the specific Environment and Agent Group, the API must be deployed to that Agent Group and then changing the shown Agent Group allows you to test the API in that Agent Group.&#x20;

<figure><img src="/files/8jjm4N0XgEGZJ8vh2oxe" alt=""><figcaption><p>Select the Agent Group and API to test, and click on API Specification UI.</p></figcaption></figure>

If the API Specification UI button is not active, it means the linked Processes for this API have not been activated in your chosen Agent Group. You need to go and activate the Processes before you can continue.

## Using API Specification UI

The API Specification UI in Frends is essentially the Swagger UI for your API, targeting the chosen Agent Group.

<figure><img src="/files/75MKz5AfhhWa6Qqp37gk" alt=""><figcaption><p>Swagger UI for your API.</p></figcaption></figure>

If you set an authentication method in API Policies for your API, click on **Authorize** button first to authenticate against the authentication provider.&#x20;

Once authenticated, or if public access was enabled, click on **Try it out** on any endpoint for your API to create an API call to it. You will be given a form to fill in any input parameters specified for the API, if there were any.&#x20;

<figure><img src="/files/TMPZRSfFP0rQy0QPOjOx" alt=""><figcaption><p>Executing the API will make a call and return the response to the UI.</p></figcaption></figure>

Click on **Execute** to make the call to your API endpoint. This will trigger the Process linked to the endpoint, and return its response message and status to you.

In case the authentication is not provided or you are not authorized to connect to the API, the Process will not be executed. Authentication and authorization are checked before the Process is triggered, to avoid extra logging and incorrect executions for unauthorized clients.


---

# 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.frends.com/guides/api-management/how-to-test-frends-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.
