---
title: "List commit snippets"
method: GET
path: "/repositories/{id}/commits/{commit_sha}/snippets"
tags: ["repositories"]
---

# List commit snippets

`GET /repositories/{id}/commits/{commit_sha}/snippets`

List code snippets for a commit (backed by enrichments)

## Path parameters

- `id` integer, required
- `commit_sha` string, required

## Query parameters

- `page` integer
- `page_size` integer

## Response `200`

OK

- DtoSnippetListResponse
  - `data` DtoSnippetData[]
    - `attributes` DtoSnippetAttributes
      - `content` DtoSnippetContentSchema
        - `end_line` integer
        - `language` string
        - `page` integer
        - `start_line` integer
        - `value` string
      - `created_at` string
      - `enrichments` DtoEnrichmentSchema[]
        - `content` string
        - `type` string
      - `original_scores` number[]
      - `updated_at` string
    - `id` string
    - `links` DtoSnippetLinks
      - `commit` string
      - `file` string
      - `repository` string
    - `type` string
  - `links` JsonapiLinks
    - `first` string
    - `last` string
    - `next` string
    - `prev` string
    - `self` string
  - `meta` JsonapiMeta

## Other responses

- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-04-06** `de2135f74990` — 1 info
  - added the optional property `data/items/attributes/content/page` to the response with the `200` status
- **2026-03-02** `e258f9541233` — 1 warning
  - removed the optional property `data/items/attributes/derives_from` from the response with the `200` status
- **2026-02-27** `f32956e4ed89` — 2 info
  - added the optional property `data/items/attributes/content/end_line` to the response with the `200` status
  - added the optional property `data/items/attributes/content/start_line` to the response with the `200` status
- **2026-02-19** `41466db231c5` — 3 warning, 1 info
  - removed the optional property `data/items/attributes/content/end_line` from the response with the `200` status
  - removed the optional property `data/items/attributes/content/page` from the response with the `200` status
  - removed the optional property `data/items/attributes/content/start_line` from the response with the `200` status
  - added the optional property `data/items/attributes/derives_from` to the response with the `200` status

[Change history](https://skmtc.dev/helixml/apis/kodit-api/changes/repositories/:id/commits/:commit_sha/snippets/get.md)

---

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