---
title: "List Repositories"
method: GET
path: "/api/v4/{workspace-slug}/repositories"
---

# List Repositories

`GET /api/v4/{workspace-slug}/repositories`

## Request

- Base URL: `https://api.app.shortcut.com`
- URL: `https://api.app.shortcut.com/api/v4/{workspace-slug}/repositories`
- Auth: HTTP bearer

List Repositories returns a paginated list of all connected Repositories in the Workspace.

## Path parameters

- `workspace-slug` string, required

## Query parameters

- `limit` integer
- `cursor` string
- `order_by` 'name' | 'updated_at'
- `order_dir` 'desc' | 'asc'
- `filter` 'all'
- `fields` string

## Response `200`

Resource

- RepositoryEntityListWrapper
  - `$schema` string, required: The URI for the json-schema for this response.
  - `current_items` integer, required: The number of items on the current page.
  - `current_page` integer, required: The number of the current page.
  - `entities` Repository[], required: The entities for this page.
    - `branches` NestedBranchSlimList: A list of Git branches attached to the Story.
      - `current_items` integer, required
      - `entities` BranchSlim[], required
        - `entity_type` 'branch:slim', required: The type of this entity.
        - `id` integer, required: The unique ID of the Branch.
        - `name` string, required: The name of the Branch.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `list_url` string, required
      - `total_items` integer, required
    - `commits` NestedCommitSlimList: A list of commits attached to the Story.
      - `current_items` integer, required
      - `entities` CommitSlim[], required
        - `entity_type` 'commit:slim', required: The type of this entity.
        - `id` integer, required: The unique ID of the Commit.
        - `message` string, required: The message of the Commit.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `list_url` string, required
      - `total_items` integer, required
    - `created_at` string, date-time: The time/date the Repository was created.
    - `entity_type` 'repository': The type of this entity.
    - `external_url` string: The URL of the Repository in the VCS provider.
    - `full_name` string: The full name of the Repository (e.g. owner/repo-name).
    - `id` integer: The unique ID of the Repository.
    - `name` string: The name of the Repository.
    - `pull_requests` NestedPullRequestSlimList: A list of Pull/Merge Requests attached to the Story.
      - `current_items` integer, required
      - `entities` PullRequestSlim[], required
        - `entity_type` 'pull-request:slim', required: The type of this entity.
        - `id` integer, required: The unique ID of the Pull Request.
        - `name` string, required: The name of the Pull Request.
        - `uri` string, required: A resolvable URI for the entity that will return the full representation.
      - `list_url` string, required
      - `total_items` integer, required
    - `updated_at` string, date-time: The time/date the Repository was last updated.
    - `uri` string: A resolvable URI for the entity that will return the full representation.
  - `total_items` integer, required: The number of total items across all pages.
  - `total_pages` integer, required: The total number of pages.
  - `next_page_url` string: A URL to get the next page. Will be absent on the last page.

## Other responses

- `400`: Schema mismatch
- `404`: Resource does not exist
- `422`: Unprocessable

---

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