Querying Project Tags

Function

This API is used to query all resource tags of instances in a specified project.

URI

GET /v2/{project_id}/{resource_type}/tags

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

resource_type

Yes

String

Resource type.

  • ief-edge_node
  • ief-deployment
  • ief-application
  • ief-device

Request

None

Response

Table 2 Body parameter

Parameter

Type

Description

count

Integer

Number of tags.

tags

Array of tag objects

A list of tags.

Table 3 tag

Parameter

Type

Description

key

String

Tag key.

values

Array of strings

A list of tag values.

Response example

{
    "count": 5,
    "tags": [
        {
            "values": [
                "hwg"
            ],
            "key": "deployer"
        },
        {
            "values": [
                "batchjob"
            ],
            "key": "batchjob"
        },
        {
            "values": [
                "2"
            ],
            "key": "2"
        },
        {
            "values": [
                "bbb"
            ],
            "key": "aaa"
        },
        {
            "values": [
                "autotest"
            ],
            "key": "autotest"
        }
    ]
}

Error Codes

For details, see Error Codes.