doc-exports/docs/ecs/api-ref/en-us_topic_0000001207623588.html
Zaoxu, Li 4edaa4a4cc ECS API 20231016 version
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com>
Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
2024-04-29 11:04:13 +00:00

9.2 KiB

Querying Project Tags (Discarded)

Function

Projects are used to group and isolate OpenStack resources, which include computing, storage, and network resources. A project can be a department or a team. Multiple projects can be created for the same account.

This API is used to query all tags used by a user in a specified project.

This API has been discarded. Use the API described in Querying Project Tags.

URI

GET /v1/{project_id}/servers/tags

Table 1 lists the parameter.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

Request

None

Response

Table 2 describes the response parameter.

Table 2 Response parameter

Parameter

Type

Description

tags

Array of objects

Specifies tags.

Table 3 tag field description

Parameter

Type

Description

key

String

Specifies the tag key.

  • The key can contain a maximum of 36 Unicode characters.
  • Contains only digits, letters, hyphens (-), and underscores (_).

values

Array of strings

Specifies the tag value.

  • Each value contains a maximum of 43 Unicode characters.
  • This field can be left blank.
  • Contains only digits, letters, hyphens (-), and underscores (_).

Examples

  • Example Request
    GET https://{endpoint}/v1/{project_id}/servers/tags
  • Example Response
    {
          "tags": [
            {
                "key": "key1",
                "values": [
                    "value1",
                    "value2"
                ]
            },
            {
                "key": "key2",
                "values": [
                    "value1",
                    "value2"
                ]
            }
        ]
    }

Error Codes

See Error Codes.