---
title: "Test the SD Elements connection against a project"
method: POST
path: "/api/v2/securityCompass/testConnection"
tags: ["Security Compass"]
---

# Test the SD Elements connection against a project

`POST /api/v2/securityCompass/testConnection`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/securityCompass/testConnection`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Validate the dashboard-saved SD Elements credentials by probing one project, returning the number of risk-relevant countermeasures visible on it. Fails with 400 when the saved token cannot reach the project. This endpoint never accepts an SD Elements API token — enter or rotate credentials in the ZeroPath dashboard instead.

## Request body

- SecurityCompassTestConnectionRequest
  - `organizationId` string, required: Organization that owns the integration.
  - `sdeBaseUrl` string, uri, required: Base URL of the SD Elements tenant to probe, e.g. https://acme.sdelements.com. Authentication uses the API token saved in the dashboard — this endpoint never accepts credentials.
  - `sdeProjectId` string, required: SD Elements project id to probe (the numeric id from the project URL).

## Response `200`

Probe result with the countermeasure count

- SecurityCompassTestConnectionResponse
  - `success` boolean, required
  - `countermeasureCount` integer: Number of risk-relevant countermeasures visible on the probed project.

## Other responses

- `400`: Error Response
- `401`: Error Response
- `404`: Error Response
- `409`: Error Response

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
