# Running via API

BugBug allows you to connect to your CI/CD pipeline. You can run tests and suites in the cloud using BugBug's [Command Line Interface](https://docs.bugbug.io/integrations/api) or public API.

### BugBug API documentation&#x20;

You can check out all helpful API commands in our online documentation in two formats.&#x20;

### 1. Swagger doc

Easy way to check your project data outside of the BugBug Web App. Just find your [API Token ](https://docs.bugbug.io/integrations/api#get-your-api-token)and play with the data.&#x20;

{% hint style="info" %}
[BugBug public API](https://app.bugbug.io/docs/swagger/) Swagger &#x20;
{% endhint %}

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FqgEnORJVeGTM2nb2LNAS%2Fswagger-banner.webp?alt=media&#x26;token=d34b2348-18ae-4efa-a5e1-5e05c074ef70" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

#### Swagger authorization: &#x20;

Enter the [API Key](https://docs.bugbug.io/integrations/api#get-your-api-token) with the <mark style="color:orange;">**`Token`**</mark> prefix, e.g. "Token abcde12345". You will find that key in the BugBug web app in the Integration tab.
{% endhint %}

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FEdG4eoBvF5N9qQwZgZyB%2FSwagger.png?alt=media&#x26;token=f7b03cb9-30f6-4e0e-9f6b-755c111704fc" alt=""><figcaption><p>Open authorization modal </p></figcaption></figure>

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FiSUbswKk5KNpWrLV9aIp%2FSwagger2.png?alt=media&#x26;token=3f465148-3b64-4e5f-8427-586667d2dea2" alt=""><figcaption><p>Add "Token" prefix and paste the API token</p></figcaption></figure>

### 2. Redoc API documentation

If you prefer the Redoc style you can find it with this link below:&#x20;

{% hint style="info" %}
[BugBug Public API Redoc ](https://app.bugbug.io/docs/redoc/)
{% endhint %}

<figure><img src="https://3168433179-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MKixgeBPbLvnD0l1eiV%2Fuploads%2FesVbHNtlfgrLjyRL2Y64%2Fredoc.png?alt=media&#x26;token=82612eb3-2c40-45df-9b25-3848a6d86058" alt=""><figcaption></figcaption></figure>


---

# 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.bugbug.io/running-tests/running-via-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.
