---
title: "Forward request to VM"
url: https://hexelstudio.com/docs/api/compute/vms/forward-request-to-vm-get
---

# Forward request to VM

**GET** `/compute/v1/vms/{id}/r/{path}`

Forwards any request to the runtime inside the VM. Token is injected automatically.

## Path parameters

- `id: string`

  VM ID (UUID)

- `path: string`

  path e.g. v1/agents/execute

## Headers

- `Authorization: string`

  `Bearer <token>`. STS access token. Obtain via POST https://sts.hexelstudio.com/token with X-API-Key header.

## Returns

`200` OK

## Errors

- `404` Not Found
- `502` Bad Gateway

## Example

```bash
curl --request GET \
  --url 'https://compute.hexelstudio.com/compute/v1/vms/{id}/r/{path}' \
  --header "Authorization: Bearer $ACCESS_TOKEN"
```

### Response (404)

```json
{
  "code": 0,
  "error_code": "string",
  "message": "string"
}
```

### Response (502)

```json
{
  "code": 0,
  "error_code": "string",
  "message": "string"
}
```
