# Get Root

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

Get artifact version root content

**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"
}
```

## 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;
  /** Array of content items. Contains one element when requesting a specific file, multiple elements when requesting a directory. */
  contents?: ArtifactVersionContentItem[];
}
```

## Type Definitions

```typescript
interface ArtifactVersionContentItem {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** Type of the content item */
  type?: "FILE" | "DIR";
  /** File or directory name */
  name?: string;
  /** Full path to the file or directory */
  path?: string;
  /** Size in bytes. Only present when type=FILE. */
  size?: number;
}

```

## Response Example

**Status:** `200 OK`

```json
{
  "url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2/versions/a9f84k2L/content",
  "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/content",
  "contents": [
    {
      "url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2/versions/a9f84k2L/content?path=README.md",
      "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/content/README.md",
      "type": "FILE",
      "name": "README.md",
      "path": "/dir/README.md",
      "size": 2048
    },
    {
      "url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2/versions/a9f84k2L/content?path=src",
      "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/content/src",
      "type": "DIR",
      "name": "src",
      "path": "/dir/src"
    }
  ]
}
```

---
Original source: https://buddy.works/docs/api/artifacts/versions/content/get-root