> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/application-security/application-security/onboard-data-sources/ingest-third-party-data-sources/sonarqube/manage-sonarqube-through-api.md).

# Manage SonarQube through API

The Cortex Cloud public REST API creates and manages the SonarQube integration through the integrations endpoint family. The API accepts the same integration body as the UI flow, including the optional `transporter` association for the on-premises path.

For detailed API information such as base URL, authentication header conventions, requests, responses, schemas and so on, refer to [ASPM, CICD and Application Security](/cortex-cloud-api/aspm-cicd-and-application-security/application-security-overview.md).

## Prerequisites

An API key with the **AppSec Admin** role. Complete every item in Prerequisites that applies to your chosen path. For the transporter path, confirm the `APP_SEC_TRANSPORTER` applet is active on the Broker VM.

## Transporter API  workflow&#x20;

Perform the API workflow in three steps: (for the transporter path) retrieve a valid broker and connection, create the integration, then confirm the integration state.

```mermaid
flowchart LR
    A[Retrieve transporter data - transporter path only] --> B[Create integration]
    B --> C[Confirm integration state]
```

## Supported operations

| Operation                 | Method | Endpoint                                          | Description                                                                                                                                                                                                                         |
| ------------------------- | ------ | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Retrieve transporter data | GET    | `/api/cas/v1/integrations/transporter`            | Returns a map of Broker VM device ID to the list of AppSec Transporter connection names defined on that device. Use a returned `brokerDeviceId` and one of its `connectionName` values in the create request. Transporter path only |
| Validate the domain       | POST   | `/api/cas/v1/integrations/validate-domain/{type}` | Validates the SonarQube domain (and transporter association, if present) before creating the integration. Accepts the `domain` and `transporter` fields                                                                             |
| Create the integration    | POST   | `/public_api/appsec/v1/integrations`              | Creates the SonarQube integration                                                                                                                                                                                                   |
| Retrieve the integration  | GET    | `/public_api/appsec/v1/integrations/{id}`         | Returns the created integration, including its connection state                                                                                                                                                                     |
| Update the integration    | PUT    | `/public_api/appsec/v1/integrations/{id}`         | Updates the integration                                                                                                                                                                                                             |
| Delete the integration    | DELETE | `/public_api/appsec/v1/integrations/{id}`         | Deletes the integration                                                                                                                                                                                                             |

> **Note:** The transporter data endpoint and the domain-validation endpoint are served under the tenant API root `/api/cas/v1/integrations`. The integration lifecycle operations (create, retrieve, update, delete) are available under the public API root `/public_api/appsec/v1/integrations`.


---

# 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://cortex-docs.paloaltonetworks.com/application-security/application-security/onboard-data-sources/ingest-third-party-data-sources/sonarqube/manage-sonarqube-through-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.
