---
title: "Get the Security Compass integration"
method: POST
path: "/api/v2/securityCompass/getIntegration"
tags: ["Security Compass"]
---

# Get the Security Compass integration

`POST /api/v2/securityCompass/getIntegration`

## Request

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

Requires INSTALLATION_VIEW. Read the Security Compass (SD Elements) integration configured for the organization, including every project-to-repository mapping with its rule-sync state. Returns null when no integration is configured yet — the integration is created in the ZeroPath dashboard under Settings → Integrations → Security Compass, where the SD Elements base URL and API token are entered. Credentials are managed only in the dashboard and are never accepted or returned by this API.

## Request body

- SecurityCompassGetIntegrationRequest
  - `organizationId` string, required: Organization whose Security Compass integration to read.

## Response `200`

The integration with its mappings, or null when none is configured

- SecurityCompassIntegrationResponse, nullable: The configured integration with all project mappings, or null when no integration exists yet (it is created in the ZeroPath dashboard). The SD Elements API token is never returned.
  - `id` string, required
  - `organizationId` string, required
  - `sdeBaseUrl` string, required
  - `enabled` boolean, required
  - `taskStatusMapping` SecurityCompassTaskStatusMapping, required: Which SD Elements task status each ZeroPath verification outcome sets, keyed by outcome. Values are task-status slugs (e.g. DONE, TODO, or a custom status such as ZeroPath-Verified) from securityCompass.listTaskStatuses; a slug whose meaning is NA is never accepted. A missing key leaves the task status unchanged, so {} means "verification note only". Countermeasures a human marked Not Applicable are never changed regardless of this mapping.
    - `pass` string: Status slug to set when ZeroPath finds no violation of the countermeasure.
    - `partial` string: Status slug to set when ZeroPath could not fully verify the countermeasure (some candidate findings failed analysis, or only secondary matches exist).
    - `fail` string: Status slug to set when ZeroPath found at least one violation.
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `projectMappings` SecurityCompassProjectMapping[], required
    - `id` string, required: cuid of the mapping.
    - `sdeProjectId` string, required
    - `repositoryId` string, required
    - `repository` object, required
      - `name` string, required
    - `supportedTaskIds` string[], required: SD Elements task ids ZeroPath covers for this mapping, as of the last sync.
    - `taskMappingAudit` SecurityCompassTaskAuditEntry[], nullable, required: Raw per-countermeasure coverage records from the last sync; null before the first successful sync. Prefer securityCompass.getMappingAudit, which enriches unsupported entries with reject reasons.
      - union: How ZeroPath covers one SD Elements countermeasure, as a discriminated union on `coverage`. `ruleName` exists exactly when coverage is nl_rule — the name of the generated natural-language rule.
        - object
          - `taskId` string, required: SD Elements task (countermeasure) id.
          - `taskTitle` string, required: Countermeasure title from SD Elements.
          - `coverage` 'sast', required: Covered by ZeroPath's built-in analysis.
        - object
          - `taskId` string, required: SD Elements task (countermeasure) id.
          - `taskTitle` string, required: Countermeasure title from SD Elements.
          - `coverage` 'nl_rule', required: Covered by an auto-generated natural-language rule.
          - `ruleName` string, required: Name of the generated natural-language rule.
          - `ruleId` string: cuid of the covering natural-language rule. Absent on audits written before mid-2026; present after the mapping next syncs.
        - object
          - `taskId` string, required: SD Elements task (countermeasure) id.
          - `taskTitle` string, required: Countermeasure title from SD Elements.
          - `coverage` 'unsupported', required: Not verifiable through code scanning.
    - `ruleSync` union, required: Sync lifecycle for one project mapping, as a discriminated union on `state` (and `status` within `completed`). Poll securityCompass.getIntegration until `state` leaves `running`, then read the audit.
      - object
        - `state` 'never_run', required
      - object
        - `state` 'running', required
        - `startedAt` string, date-time, required
      - object
        - `state` 'completed', required
        - `status` 'success', required
        - `startedAt` string, date-time, required
        - `completedAt` string, date-time, required
      - object
        - `state` 'completed', required
        - `status` 'failed', required
        - `startedAt` string, date-time, required
        - `completedAt` string, date-time, required
        - `error` string, required
    - `taskStatusMapping` SecurityCompassTaskStatusMapping, required: Which SD Elements task status each ZeroPath verification outcome sets, keyed by outcome. Values are task-status slugs (e.g. DONE, TODO, or a custom status such as ZeroPath-Verified) from securityCompass.listTaskStatuses; a slug whose meaning is NA is never accepted. A missing key leaves the task status unchanged, so {} means "verification note only". Countermeasures a human marked Not Applicable are never changed regardless of this mapping.
      - `pass` string: Status slug to set when ZeroPath finds no violation of the countermeasure.
      - `partial` string: Status slug to set when ZeroPath could not fully verify the countermeasure (some candidate findings failed analysis, or only secondary matches exist).
      - `fail` string: Status slug to set when ZeroPath found at least one violation.
    - `effectiveTaskStatusMapping` SecurityCompassTaskStatusMapping, required: Which SD Elements task status each ZeroPath verification outcome sets, keyed by outcome. Values are task-status slugs (e.g. DONE, TODO, or a custom status such as ZeroPath-Verified) from securityCompass.listTaskStatuses; a slug whose meaning is NA is never accepted. A missing key leaves the task status unchanged, so {} means "verification note only". Countermeasures a human marked Not Applicable are never changed regardless of this mapping.
      - `pass` string: Status slug to set when ZeroPath finds no violation of the countermeasure.
      - `partial` string: Status slug to set when ZeroPath could not fully verify the countermeasure (some candidate findings failed analysis, or only secondary matches exist).
      - `fail` string: Status slug to set when ZeroPath found at least one violation.
    - `lastPushAt` string, date-time, nullable
    - `lastPushScanId` string, nullable
    - `lastPushStatus` string, nullable
    - `lastPushError` string, nullable
    - `lastPushStats` object, nullable: Stats payload from the last findings push, when one has run.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## 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)
