---
title: "Get Anti-patterns Results"
method: POST
path: "/api/analysis/results/antipatterns"
tags: ["Analysis"]
---

# Get Anti-patterns Results

`POST /api/analysis/results/antipatterns`

Retrieves the code anti-patterns and code smell detection results for a specific repository and commit

## Request body

- AntiPatternsRequest
  - `repo` string, required — Repository identifier (format varies by service)
  - `commit_id` string — Git commit SHA or identifier. Either commit_id or branch is required. If both are provided, commit_id takes precedence.
  - `branch` string — Git branch name. When provided without commit_id, the service resolves the latest commit from scan history for this branch. Either commit_id or branch is required.
  - `access_token` string, required — Authentication token for the service
  - `service` 'github' | 'azuredevops' | 'gitlab' | 'bitbucket', required — Version control service provider
  - `gitlab_base_url` string — Base URL for the service (optional for GitHub, required for GitLab)

## Response `200`

Anti-patterns results retrieved successfully

- AntiPatternsResponse — Anti-patterns response containing detected code smells and anti-patterns
  - `results` object — Anti-patterns analysis results organized by file path

## Other responses

- `401` — Invalid access token
- `500` — Internal server error

---

[API](https://skmtc.dev/codeant/apis/codeant-ai-api.md) · [All operations](https://skmtc.dev/codeant/apis/codeant-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/codeant/codeant-ai-api/revisions/d1eb7c083a39/schema)
