# Read a VM.

> https://koi.dog/docs/api/cloud/get-vm/

`GET /api/v1/vms/{id}` · Scope: `read`

No query parameters.

## Path parameters.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | The VM's id. |

## Response.

200 OK: a `Vm`. The example has placeholder values.

## Request.

```sh
curl "https://app.koi.dog/api/v1/vms/$ID" \
    -H "Authorization: Bearer $KOIDOG_API_KEY"
```

```js
const res = await fetch(`https://app.koi.dog/api/v1/vms/${process.env.ID}`, {
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
  },
});
console.log(await res.json());
```

```python
import os

import requests

r = requests.get(
    f"https://app.koi.dog/api/v1/vms/{os.environ['ID']}",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "id": "string",
  "provider": "boat",
  "providerId": "string",
  "state": "intended",
  "type": "small",
  "baseTemplate": "string",
  "hourlyUsd": 0,
  "accruedUsd": 0,
  "costSource": "estimate",
  "stateReason": "string",
  "createdAt": "string",
  …
}
```
