Retrieve network interface card information for an instance
Updated at:2025-10-20
Use this API to retrieve information about instance network interface cards, including both primary and elastic network interfaces.
Request structure
Plain Text
1GET /v{version}/eni/{instanceId}?clientToken={clientToken} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number. |
| clientToken | String | Yes | Query | Idempotence Token, which is an ASCII string with a length not exceeding 64 bits. For details, see the [Idempotence ](BCC/API Reference/General Description.md#Idempotence). |
| instanceId | String | Yes | Query | Virtual machine ID where the network interface card is mounted |
Response headers
There are no special headers required beyond the common headers.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| enis | List<[EniInfo](BCC/API Reference/Appendix.md#EniInfo)> | Network interface card information list. For specific parameters, see [EniInfo](BCC/API Reference/Appendix.md#EniInfo) |
Request example
Plain Text
1GET http://bcc.bj.baidubce.com/v2/eni/i-ofsX9WtN?clientToken=3A8d84403d-a94b-40ce-9d6a-f6225dd26676
2Host: bcc.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Response example
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3Date: Wed, 08 Jul 2015 03:28:11 GMT
4x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
5Server: BWS
6{
7 "enis": [
8 {
9 "eniId": "eni-531s8c7f45rs",
10 "name": "test",
11 "vpcId": "vpc-vv3xw6d9970b",
12 "subnetId": "sbn-2escuever5fi",
13 "zoneName": "cn-bj-a",
14 "description": "",
15 "createdTime": "2022-10-20T06:31:42Z",
16 "macAddress": "fa:f6:00:14:05:1e",
17 "status": "inuse",
18 "securityGroupIds": [
19 "g-6uwn49bxhbvj"
20 ],
21 "privateIpSet": [
22 {
23 "primary": true,
24 "privateIpAddress": "192.168.48.8"
25 }
26 ]
27 },
28 {
29 "eniId": "eni-wwi3mdqp6f5j",
30 "name": "eth0",
31 "vpcId": "vpc-vv3xw6d9970b",
32 "subnetId": "sbn-2escuever5fi",
33 "zoneName": "cn-bj-a",
34 "description": "",
35 "createdTime": "2023-03-21T02:09:03Z",
36 "macAddress": "fa:f6:00:01:83:03",
37 "status": "inuse",
38 "securityGroupIds": [
39 "g-6uwn49bxhbvj"
40 ],
41 "privateIpSet": [
42 {
43 "primary": true,
44 "privateIpAddress": "192.168.48.5"
45 },
46 {
47 "primary": false,
48 "privateIpAddress": "192.168.48.3"
49 }
50 ]
51 }
52 ]
53}
