> For the complete documentation index, see [llms.txt](https://kuadron.gitbook.io/reportql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kuadron.gitbook.io/reportql/api.md).

# API

Reportql has an API for programmatic operations. You can access it using the following address:

{ReportqlUrl}/swagger\
(e.g., <http://localhost:4500/swagger>)

The API includes Authentication and Report operations.

<figure><img src="/files/9MNG0f9VcnrdDRhJdLza" alt=""><figcaption></figcaption></figure>

## Authentication

In general, the "ApiKey" parameter must be included in the header for all API calls. You can find the ApiKey parameter in the `config.json` file located in the folder where Reportql is installed, and you can replace it with any value you prefer.

Default API Key:

```
254cef86-ef42-419a-b240-e2e1d9282936
```

Example request:

```
curl --location 'https://localhost:5101/api/Auth/getAuthenticationToken' \
--header 'ApiKey: 254cef86-ef42-419a-b240-e2e1d9282936' \
--header 'Content-Type: application/json' \
--data-raw '{
  "username": "destek@kuadron.com",
  "password": "123",
  "refreshToken": false
}'
```

## API List

## getAuthenticationToken

You can use it to obtain tokens for embedding operations.

Usage:

```
curl --location 'https://localhost:5101/api/Auth/getAuthenticationToken' \
--header 'ApiKey: 254cef86-ef42-419a-b240-e2e1d9282936' \
--header 'Content-Type: application/json' \
--data-raw '{
  "username": "destek@kuadron.com",
  "password": "123",
  "refreshToken": false
}'
```

The validity period of tokens can be configured using the "AuthTokenExpireMinute" option in the `config.json` file. The default value is 1 day.
