git.commits.list

List commits on a ref

GET /git/api/repositories/{repoId}/commitsIAM git:GetRepositoryRead

Metadata only, which is why this needs GetRepository rather than PullRepository.

Request syntax

GET /git/api/repositories/{repoId}/commits

Path parameters

  • repoIdRequired

    string

    Constraints: uuid

Query parameters

  • refOptional

    string

    Branch, tag or commit id whose history to list; the default branch when absent

    Constraints: 1-255 chars

  • pathOptional

    string

    Only commits that changed this file or directory

    Constraints: max 1000 chars

  • limitOptional

    number

    How many commits to return, newest first; 50 when absent

    Constraints: integer, 1-200

  • skipOptional

    number

    How many of the newest commits to skip, for paging; 0 when absent

    Constraints: integer, min 0

Response

200 with the commits, newest first: oid, shortOid, subject, body, authorName, authorEmail, authoredAt and parents.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Fields of data

  • [].​oidAlways

    string

    The full 40-character commit id
  • [].​shortOidAlways

    string

    The abbreviated commit id
  • [].​subjectAlways

    string

    The first line of the commit message
  • [].​bodyAlways

    string

    The rest of the commit message; empty when there is none
  • [].​authorNameAlways

    string

    Who wrote the commit
  • [].​authorEmailAlways

    string

    The author's email address
  • [].​authoredAtAlways

    string

    When the commit was authored (ISO 8601)
  • [].​parentsAlways

    array of string

    Ids of the parent commits: none for the first commit, two or more for a merge

Checked against the handlers: every route test validates their answers against this schema.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow git:GetRepository on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud git commits list repoId

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_git_commits_list.