# antMan REST API

{% hint style="warning" %}
The antMan REST API may change at any time.&#x20;
{% endhint %}

You can view the swagger-ui using the following url

```
http://myantsle.local/swagger-ui
```

If you have renamed your Antsle, replace 'myantsle' in the URL with the name of your antsle - or the antsles private IP address.\
\&#xNAN;*The URL (localhost:4444) in the following images is unique to our lab setup. AntMan is actually listening on port 3000.*

![](/files/-M-BdxRZ6CTmN31CiMQQ)

First you need to authenticate and receive an access token

Open the 'auth' section

![](/files/-M-Be-9B4HPftfGnBqLe)

And open the /api/login section\
&#x20;Click in the 'Example Value' box to populate the 'Bodyxxx' field.\
Edit the values of the json object with your antlse's username and password.\
Click 'Try it out!'

![](/files/-M-Be254zmEkmgeOheC3)

This will give you an example cURL command to authenticate and retrieve an access token.\
The 'Response Body' field contains your access token

![](/files/-M-Be4VxjDcjuu_U76DY)

In subsequent calls you would add an 'Authorization' header to the cURL command with your access token.

```
--header 'Authorization: Token eyJhbGciO...'
```

```
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/octet-stream' --header 'Authorization: Token eyJhbGciO...' 
```


---

# 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.antsle.com/system/antman-rest-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.
