# 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.


---

# 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://kuadron.gitbook.io/reportql/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.
