# Control API Documentation

## **Control API Documentation**

***

### **Introduction**

Welcome to the QubeGuard Control API Documentation!

The Control API provides an additional layer of security by acting as middleware that scans incoming API requests for potential threats. It ensures only safe traffic reaches your application. If no threats are detected, the API responds with a `200 OK` status, allowing the request to proceed. In case of a detected threat, it blocks the request with an appropriate error response.

#### **Key Features**

* **Request Interception:** Sits between client requests and your application server.
* **Threat Detection:** Scans incoming data for SQL injection, XSS, CSRF, and other common vulnerabilities.
* **Ease of Integration:** Requires minimal changes to your existing codebase.
* **Scalability:** Handles high-traffic SaaS applications effortlessly.

***

### **Getting Started**

#### **1. Installation & Configuration**

1. Obtain your **API Key** from the Control API Dashboard.
2. Set up the API in your preferred programming language.
3. Securely store your API Key using environment variables.

#### **2. Testing the Control API**

You can test the Control API by sending sample requests using:

* **Postman**
* **curl**

Example test request using curl:

```bash
curl -X POST https://app.qubeguard.com/control \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"username":"test", "password":"1234"}'
```


---

# 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://qubeguard.gitbook.io/qubeguard-docs/getting-started/quickstart.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.
