# Get file

`GET /workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/files/contents/:path`

Returns details and content of a file from the pipeline filesystem

**Required Scopes:** `EXECUTION_MANAGE`

## 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 ID of the pipeline */
  pipeline_id: number; // Example: 123
  /** The path of the file in the pipeline filesystem */
  path: string; // Example: "app/docs/report.pdf"
}
```

## 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 type of the filesystem entry */
  content_type?: "FILE" | "DIR" | "SYMLINK" | "SUB_MODULE";
  /** The encoding of the returned content: base64, or none when the file is too large */
  encoding?: string;
  /** The size of the file in bytes */
  size?: number;
  /** The name of the file */
  name?: string;
  /** The path of the file in the pipeline filesystem */
  path?: string;
  /** The Base64-encoded content of the file */
  content?: string;
  /** The target path of the symlink */
  target?: string;
}
```

## Response Example

**Status:** `200 OK`

```json
{
  "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/pipelines/123/files/contents/app/docs/report.txt",
  "html_url": "https://app.buddy.works/my-workspace/my-project/pipelines/pipeline/123/browse/content/app%2Fdocs%2Freport.txt",
  "content_type": "FILE",
  "encoding": "base64",
  "size": 40,
  "name": "report.txt",
  "path": "app/docs/report.txt",
  "content": "Zmlyc3QgbGluZQpsaW5lIHdpdGggcGF0dGVybiBZCmxhc3QgbGluZQ=="
}
```

---
Original source: https://buddy.works/docs/api/pipelines/files/get