Updated on 2023-07-14 GMT+08:00

Querying Tags of a BMS

Function

  • This API is used to query tags of a specified BMS.
  • TMS uses this API to query all tags of a specified BMS.

URI

GET /v1/{project_id}/baremetalservers/{server_id}/tags

Table 1 lists the parameters.

Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies the project ID.

server_id

String

Yes

Specifies the BMS ID.

Example Request

None

Response Parameters

Parameter

Type

Description

tags

List<resource_tag>

Specifies the tag list. For details, see Table 2.

Table 2 tags field data structure description

Parameter

Type

Description

key

String

Specifies the tag key.

value

String

Specifies the tag value.

Example Response

{
    "tags": [
        {
            "key": "key1",
            "value": "value1"
        },
        {
            "key": "key2",
            "value": "value3"
        }
    ]
}

Returned Values

  • Normal

    Returned Values

    Description

    200

    OK

  • Abnormal

    Returned Values

    Description

    400

    Invalid tag.

    401

    Authentication failed.

    403

    Insufficient permission.

    404

    The requested resource was not found.

    500

    A system exception occurred.