> For the complete documentation index, see [llms.txt](https://docs.bugbug.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bugbug.io/~/changes/458/running-tests/running-via-api.md).

# Running via API

Discover how to run tests via API with BugBug's comprehensive documentation. Connect BugBug to your CI/CD pipeline. Streamline your automation testing process.

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&amp;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&amp;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&amp;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&amp;token=82612eb3-2c40-45df-9b25-3848a6d86058" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.bugbug.io/~/changes/458/running-tests/running-via-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
