---
title: "List files matching a glob pattern"
method: GET
path: "/search/ls"
tags: ["search"]
---

# List files matching a glob pattern

`GET /search/ls`

Returns files from a repository working copy matching a glob pattern, with file:// URIs

## Query parameters

- `repository_id` integer, required
- `pattern` string, required
- `page` integer
- `page_size` integer

## Response `200`

OK

- DtoLsResponse
  - `data` DtoLsFileData[]
    - `attributes` DtoLsFileAttributes
      - `path` string
      - `size` integer
    - `id` string
    - `links` DtoLsFileLinks
      - `self` string
    - `type` string
  - `links` JsonapiLinks
    - `first` string
    - `last` string
    - `next` string
    - `prev` string
    - `self` string
  - `meta` JsonapiMeta

## Other responses

- `400` — Bad Request
- `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/revisions/3f72fa58f3fb/schema)
