Updated on 2023-11-23 GMT+08:00

Querying Resource Tags

Function

This API is used to query tag information of a specified instance.

URI

GET /v2/{project_id}/{resource_type}/{resource_id}/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

resource_id

Yes

String

Resource ID.

Request

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format).

The default value application/json is recommended.

X-Auth-Token

Yes

String

User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response

Response parameters

Table 3 Parameters in the response body

Parameter

Type

Description

tags

Array of resource_tag objects

A list of tags.

count

Integer

Number of tags.

Table 4 resource_tag

Parameter

Type

Description

key

String

Tag key.

value

String

Tag value.

Example response
{
    "tags": [
        {
            "value": "",
            "key": "testtest"
        },
        {
            "value": "",
            "key": "test"
        }
    ],
    "count": 0
}

Error Codes

For details, see Error Codes.