• Bare Metal Server

bms
  1. Help Center
  2. Bare Metal Server
  3. API Reference
  4. API
  5. BMS IP Address Query (Native OpenStack APIs)
  6. Querying the IP Address of a BMS (Native OpenStack API)

Querying the IP Address of a BMS (Native OpenStack API)

Function

This interface is used to query the IP address of a BMS.

URI

GET /v2.1/{project_id}/servers/{server_id}/ips/{networkName}

Table 1 lists the parameters.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

server_id

Yes

Specifies the BMS ID.

networkName

Yes

Specifies the name of the network used by the BMS.

Request Message

N/A

Response Message

  • Response parameters

    Parameter

    Type

    Description

    BMS network name

    List <Dict>

    Specifies the network used by the BMS. For details about the network information, see [1] Network parameter structure description.

    [1] Network parameter structure description

    Parameter

    Type

    Description

    version

    Int

    Specifies the IP address version. The value can be IPv4 or IPv6.

    addr

    String

    Specifies the IP address.

  • Example response
    {
        "5849fdf1-9d79-4589-80c2-fe557990c417": [
            {
                "version": 4,
                "addr": "192.168.1.159"
            }
        ]
    }

Returned Values

See section Common Returned Values.