# List

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

`GET /workspaces/:workspace/artifacts/:artifact_id/versions/:version_id/commits`

Get commits of a GIT artifact version

**Required Scopes:** `ARTIFACT_READ`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The Artifact ID */
  artifact_id: string; // Example: "x5169jL2"
  /** The Version ID */
  version_id: string; // Example: "a9f84k2L"
}
```

## Query Parameters

```typescript
interface QueryParameters {
  /** Page number for pagination */
  page?: number; // Example: 1
  /** Number of items per page */
  per_page?: number; // Example: 20
}
```

## 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;
  /** List of commits */
  commits?: ArtifactVersionCommitView[];
}
```

## Type Definitions

```typescript
interface ArtifactVersionCommitView {
  /** 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;
  /** The parent commits of this commit */
  parents?: CommitIdView[];
  /** The names of the branches containing the commit */
  branches?: string[];
}

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 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/artifacts/:artifact_id/versions/:version_id/commits" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json"
```

## Response Example

**Status:** `200 OK`

```json
{
  "url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2/versions/a9f84k2L/commits",
  "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/commits",
  "commits": [
    {
      "revision": "9a1c3f2e8b7d6c5a4f3e2d1c0b9a8f7e6d5c4b3a",
      "short_revision": "9a1c3f2",
      "message": "Add build artifacts",
      "author_date": "2024-01-20T10:30:00Z",
      "commit_date": "2024-01-20T10:30:00Z",
      "author": {
        "url": "https://api.buddy.works/workspaces/ttests/members/1",
        "html_url": "https://app.buddy.works/ttests/-/profile/1",
        "id": 1,
        "name": "Jane Doe",
        "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png",
        "email": "jane@example.com",
        "admin": true,
        "workspace_owner": true
      },
      "committer": {
        "url": "https://api.buddy.works/workspaces/ttests/members/1",
        "html_url": "https://app.buddy.works/ttests/-/profile/1",
        "id": 1,
        "name": "Jane Doe",
        "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png",
        "email": "jane@example.com",
        "admin": true,
        "workspace_owner": true
      },
      "parents": [
        {
          "revision": "8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b1a0f9e"
        }
      ],
      "branches": [
        "main"
      ]
    }
  ]
}
```

---
Original source: https://buddy.works/docs/api/artifacts/versions/commits/list