---
title: "Get violation"
method: GET
path: "/violations/{id}"
tags: ["Violations"]
---

# Get violation

`GET /violations/{id}`

## Request

- Base URL: `https://app.codethreat.com/api/v1`
- URL: `https://app.codethreat.com/api/v1/violations/{id}`
- Auth: API key in header `X-API-Key`

Get details of a specific violation

## Path parameters

- `id` string, required

## Response `200`

Successful response

- ViolationResponse
  - `success` boolean
  - `data` object
    - `id` string
    - `scanId` string
    - `repositoryId` string
    - `ruleId` string
    - `severity` 'critical' | 'high' | 'medium' | 'low' | 'info'
    - `status` 'open' | 'fixed' | 'ignored' | 'false_positive'
    - `title` string
    - `description` string
    - `file` string
    - `line` integer
    - `column` integer
    - `codeSnippet` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
  - `pagination` Pagination
    - `page` integer
    - `limit` integer
    - `total` integer
    - `totalPages` integer
    - `hasNext` boolean
    - `hasPrev` boolean
  - `meta` ResponseMeta
    - `timestamp` string, date-time
    - `version` string
    - `requestId` string
    - `organizationId` string

---

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