# VM IP addresses

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

IP addresses of the virtual machine.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/service/@id/vms/@vmid/ips` |
| 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 |
| `Name` | undefined | Type | no | Description |
| `---` | undefined | --- | no | --- |
| `type` | query | string | no | ipv4 or ipv6 |
| `iface` | query | integer | no | Interface number [optional] |
| `bridge` | query | string | no | Bridge name [optional, ignored if interface provided] |

## Example request

```bash
curl "https://api.tino.vn/v1/service/100001/vms/600001/ips" \
  -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_ips(id, vmid)`, Node.js `await client.vms.listIps(id, vmid);`, PHP `$client->vms->listIps($id, $vmid);`.

## Example response

```json
[
 {
  "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"
 }
]
```

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