> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qa.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# API regression testing

> Run an API application's tests from a test plan against a base URL, with configs for credentials.

An API test plan uses the same parameters as a web plan. The environment URL is the API base URL, such as `https://api.staging.example.com`. Tests in the plan that belong to the API application run against that host. They do not open a browser.

## Base URL

Set the environment on the test plan **Parameters** card for the API application. To point one run at a different host, pass `environment.url` on that application's override in [Start Run](/api-reference/runs/start-test-run).

```json theme={null}
{
  "testPlanShortId": "pln_abc123",
  "applications": [
    {
      "applicationShortId": "app_api123",
      "environment": { "url": "https://api.staging.example.com" }
    }
  ]
}
```

## Configs

Assign [Configs](/core-concepts/configs) on each test under **Settings → Configs**. Use an **API Key** config for a secret and a **Custom Fields** config for non-secret IDs. The sandbox receives scalar values as environment variables. Refer to them by purpose in the test instructions. See [API testing](/core-concepts/api-testing#authentication-and-test-data).

[Config environment overrides](/core-concepts/config-environment-overrides) supply a different value when the same test runs against another environment.

## Run it from CI

<CardGroup cols={2}>
  <Card title="GitHub" icon="github" href="/regression-testing/github">
    Test Run Action with a base URL override for the API application.
  </Card>

  <Card title="GitLab" icon="gitlab" href="/regression-testing/gitlab">
    `POST /v1/run` with the API base URL for that deploy.
  </Card>

  <Card title="Bitrise" icon="mobile" href="/regression-testing/bitrise#web-applications">
    One HTTP request with the test plan short ID.
  </Card>

  <Card title="API" icon="code" href="/regression-testing/api">
    Start the plan from any CI that can send an HTTPS request.
  </Card>
</CardGroup>
