# Get

> For AI agents: the complete documentation index is at https://buddy.works/llms.txt

`GET /workspaces/:workspace/projects/:project_name/repository/commits/:revision`

Returns details of a single commit

**Required Scopes:** `REPOSITORY_READ`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The human-readable ID of the project */
  project_name: string; // Example: "my-project"
  /** The git revision (commit SHA, branch name, or tag name) */
  revision: string; // Example: "abc123def456"
}
```

## Response Body

```typescript
interface ResponseBody {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The full SHA hash of the commit */
  revision?: string;
  /** The date when the commit was authored */
  author_date?: string;
  /** The date when the commit was committed */
  commit_date?: string;
  /** The short SHA hash of the commit (first 7 characters) */
  short_revision?: string;
  /** The commit message */
  message?: string;
  /** User/member reference */
  committer?: MemberView;
  /** User/member reference */
  author?: MemberView;
  /** Statistics about the changes in this commit */
  stats?: CommitStatsView;
  /** The list of files changed in this commit */
  files?: FileEntryView[];
  /** API endpoint to GET the repository contents at this commit */
  content_url?: string;
  /** The parent commits of this commit */
  parents?: CommitIdView[];
}
```

## Type Definitions

```typescript
interface MemberView {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The ID of the user */
  id?: number;
  /** The name of the user */
  name?: string;
  /** The unique username of the user */
  username?: string;
  /** The avatar URL of the user */
  avatar_url?: string;
  /** The email address of the user */
  email?: string;
  /** Whether the user has admin privileges */
  admin?: boolean;
  /** Whether the user is workspace owner */
  workspace_owner?: boolean;
}

interface CommitStatsView {
  /** The number of lines added in the commit */
  additions?: number;
  /** The number of lines deleted in the commit */
  deletions?: number;
  /** The total number of lines changed (additions + deletions) */
  total?: number;
}

interface FileEntryView {
  /** The name of the file that was changed */
  file_name?: string;
  /** The status of the file change */
  status?: "ADDED" | "DELETED" | "MODIFIED";
  /** The number of lines added in this file */
  additions?: number;
  /** The number of lines deleted in this file */
  deletions?: number;
  /** The total number of lines changed in this file (additions + deletions) */
  total?: number;
  /** The git patch/diff for this file */
  patch?: string;
}

interface CommitIdView {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The full SHA hash of the commit */
  revision?: string;
}

```

## Request Example

```bash
curl -X GET "https://api.buddy.works/workspaces/:workspace/projects/:project_name/repository/commits/:revision" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json"
```

## Response Example

**Status:** `200 OK`

```json
{
  "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/commits/a089d82fe56335c8abd8790859bba925ad10f9d1",
  "html_url": "https://app.buddy.works/my-workspace/my-project/repository/commit/a089d82fe56335c8abd8790859bba925ad10f9d1",
  "revision": "a089d82fe56335c8abd8790859bba925ad10f9d1",
  "author_date": "2025-10-10T04:23:04Z",
  "commit_date": "2025-10-10T04:23:04Z",
  "message": "Added vitest-output.xml",
  "committer": {
    "url": "https://api.buddy.works/workspaces/my-workspace/members/1",
    "html_url": "https://app.buddy.works/my-workspace/-/profile/1",
    "id": 1,
    "name": "John Doe",
    "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png?ts=1760014081477",
    "email": "john.doe@company.com",
    "admin": true,
    "workspace_owner": true
  },
  "author": {
    "url": "https://api.buddy.works/workspaces/my-workspace/members/1",
    "html_url": "https://app.buddy.works/my-workspace/-/profile/1",
    "id": 1,
    "name": "John Doe",
    "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png?ts=1760014081477",
    "email": "john.doe@company.com",
    "admin": true,
    "workspace_owner": true
  },
  "stats": {
    "additions": 255,
    "deletions": 0,
    "total": 255
  },
  "files": [
    {
      "file_name": "/vitest-output.xml",
      "status": "ADDED",
      "additions": 255,
      "deletions": 0,
      "total": 255,
      "patch": "@@ -0,0 +1,255 @@\n+<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n+<testsuites name=\"vitest tests\" tests=\"109\" failures=\"0\" errors=\"0\" time=\"10.911\">\n+    <testsuite name=\"src/utils/array/asArray.test.ts\" timestamp=\"2025-02-18T14:13:09.038Z\" hostname=\"b22f94e69270\" tests=\"6\" failures=\"0\" errors=\"0\" skipped=\"0\" time=\"0.005\">\n+        <testcase classname=\"src/utils/array/asArray.test.ts\" name=\"asArray &gt; input is converted into an array (%p =&gt; %p) null []\">\n..."
    }
  ],
  "content_url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/contents?revision=a089d82fe56335c8abd8790859bba925ad10f9d1",
  "parents": [
    {
      "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/repository/commits/ced6de63ca555fad8d2290c1c158f87232ffd9e1",
      "html_url": "https://app.buddy.works/my-workspace/my-project/repository/commit/ced6de63ca555fad8d2290c1c158f87232ffd9e1",
      "revision": "ced6de63ca555fad8d2290c1c158f87232ffd9e1"
    }
  ]
}
```

---
Original source: https://buddy.works/docs/api/version-control/commits/get