# VM network interfaces

`GET /v1/service/@id/vms/@vmid/interfaces` · scope `services:read`

Network interfaces attached to the virtual machine, with their IPs.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/service/@id/vms/@vmid/interfaces` |
| Method | `GET` |
| Scope | `services:read` |
| Header | `Authorization: Bearer <token>` |
| Content-Type | — (no body) |
| Tokens that can call it | app tokens (`tinoat_`), personal API tokens (`tinopat_`) |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Service ID |
| `vmid` | path | string | yes | Virtual machine ID |

## Example request

```bash
curl "https://api.tino.vn/v1/service/100001/vms/600001/interfaces" \
  -H "Authorization: Bearer $TINO_TOKEN"
```

`$TINO_TOKEN` is a token with the scope `services:read`. Path parameters in the example are sample values.

SDK ([SDK & examples](/en/docs/sdk)): Python `client.vms.list_interfaces(id, vmid)`, Node.js `await client.vms.listInterfaces(id, vmid);`, PHP `$client->vms->listInterfaces($id, $vmid);`.

## Example response

```json
[
 {
  "id": 0,
  "name": "net0",
  "model": "virtio",
  "mac": "02:00:00:00:00:01",
  "firewall": "1",
  "ip": [
   {
    "id": 930001,
    "interface": 0,
    "mac": "02:00:00:00:00:01",
    "ip": "203.0.113.10",
    "wanip": "",
    "mask": "/24",
    "network": "203.0.113.10",
    "gateway": "203.0.113.10",
    "main": 1,
    "type": "ipv4"
   },
   {
    "id": 27930,
    "interface": 0,
    "mac": "02:00:00:00:00:01",
    "ip": "203.0.113.10",
    "wanip": "",
    "mask": "/64",
    "network": "2001:db8::1",
    "gateway": "2001:db8::1",
    "main": 1,
    "type": "ipv6"
   }
  ],
  "bridge": "vmbr0",
  "vlan": "136",
  "link_down": null,
  "can_edit": true,
  "can_remove": false
 }
]
```

Live sample from a test account with personal data masked; long arrays and strings are trimmed (`… N more item(s)`, `… N more line(s)`).
