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

---

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