# Welcome to KlearStack's API Documentation

In this documentation you can find the following,

* Authentication
* Supported API methods
* Request types and URLs
* Input parameters for each method
* Responses for each method

API Endpoints Security: All API endpoints are protected and require an access token for access. To obtain an access token, perform a POST request to get\_access\_token, which returns an access\_token and a refresh\_token. The access token is valid for a short duration (15 minutes) and expires after this period. The refresh token, however, is valid for at least a day. To obtain a new access token, perform a POST request to getaccesstokenfromrefreshtoken, which will return a new access token with a reset expiration time.

POST Request Parameters: All API POST request parameters should be sent as "Form Data".

Request Through Postman: To access a secured endpoint through Postman, copy and paste the access token into the Authorization tab of the request as a Bearer Token.

Request in Python: Below is an example request format in Python:\
`token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYW"`

`token = "Bearer " + str(token) # mind the space`

`headers = {"Authorization": token}`

`requests.post(url, data=data, headers=headers)`

#### **Please note that the SSL verification must be turned off. For example,** <a href="#please-note-that-the-ssl-verification-must-be-turned-off.-for-example" id="please-note-that-the-ssl-verification-must-be-turned-off.-for-example"></a>

* In Python, disable SSL verification by passing the verify=False parameter.
* In Postman, turn off SSL Certificate Verification.


---

# 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://klearstack.gitbook.io/klearstack-api-documentation/welcome-to-klearstacks-api-documentation.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.
