> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read File - GET /v1/workspaces/:workspace_id/code-repos/:repo_id/files

> Read a file's source from a repo via GET /v1/workspaces/:workspace_id/code-repos/:repo_id/files. Minimum role viewer.

Read the source content of a file inside a code repository.

## Endpoint

```http theme={null}
GET /v1/workspaces/:workspace_id/code-repos/:repo_id/files
```

## Authentication

`Authorization: Bearer <jwt>` or `X-API-Key <sk_...>`. Minimum role: **viewer**.

## Path parameters

**workspace\_id** `string` *required*

Workspace id.

**repo\_id** `string` *required*

Repo id.

## Query parameters

**path** `string` *required*

Relative file path inside the repo.

## Response

**content** `string`

File source content.

## Example

```bash cURL theme={null}
curl "https://memo.ariacompute.com/v1/workspaces/ws_01a2b3c4d5e6/code-repos/repo_01a2b3c4d5e6/files?path=internal/api/api.go" \
  -H "Authorization: Bearer <jwt>"
```

```json 200 theme={null}
{
  "content": "package api\n\nimport (\n\t\"github.com/gin-gonic/gin\"\n)\n\n// RegisterRoutes ...\n"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.