---
title: "List commits with include/exclude"
method: POST
path: "/repositories/{workspace}/{repo_slug}/commits"
tags: ["Commits"]
---

# List commits with include/exclude

`POST /repositories/{workspace}/{repo_slug}/commits`

Identical to `GET /repositories/{workspace}/{repo_slug}/commits`,
except that POST allows clients to place the include and exclude
parameters in the request body to avoid URL length issues.

**Note that this resource does NOT support new commit creation.**

## Response `200`

A paginated list of commits

- PaginatedChangeset — A paginated list of commits.
  - `size` integer — Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
  - `page` integer — Page number of the current results. This is an optional element that is not provided in all responses.
  - `pagelen` integer — Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
  - `next` string, uri — Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
  - `previous` string, uri — Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.
  - `values` BaseCommit[]
    - `type` string, required
    - `hash` string
    - `date` string, date-time
    - `author` Author — The author of a change in a repository
      - `type` string, required
      - `raw` string — The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.
      - `user` Account — An account object.
        - `type` string, required
        - `links` AccountLinks — Links related to an Account.
          - `avatar` Link — A link to a resource related to this object.
            - `href` string, uri
            - `name` string
        - `created_on` string, date-time
        - `display_name` string
        - `uuid` string
    - `committer` Committer — The committer of a change in a repository
      - `type` string, required
      - `raw` string — The raw committer value from the repository. This may be the only value available if the committer does not match a user in Bitbucket.
      - `user` Account — An account object.
        - `type` string, required
        - `links` AccountLinks — Links related to an Account.
          - `avatar` Link — A link to a resource related to this object.
            - `href` string, uri
            - `name` string
        - `created_on` string, date-time
        - `display_name` string
        - `uuid` string
    - `message` string
    - `summary` object
      - `raw` string — The text as it was typed by a user.
      - `markup` 'markdown' | 'creole' | 'plaintext' — The type of markup language the raw content is to be interpreted in.
      - `html` string — The user's content rendered as HTML.
    - `parents` BaseCommit[]

## Other responses

- `404` — If the specified repository does not exist.

---

[API](https://skmtc.net/bitbucket/apis/bitbucket-api.md) · [All operations](https://skmtc.net/bitbucket/apis/bitbucket-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bitbucket/bitbucket-api/revisions/7e9be973015d/schema)
