forked from docs/doc-exports
Reviewed-by: Daniel Kováč <a86700324@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com> Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
11 KiB
11 KiB
Querying Tags of a Topic
URI
- URI format
- Parameter description
Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID
resource_type
Yes
String
Resource type
Only smn_topic (topic) is supported.
resource_id
Yes
String
Resource ID
Obtain a resource ID:
- Add X-SMN-RESOURCEID-TYPE=name in the request header and set the resource ID to the topic name.
- Call the API for querying topics by tag to obtain the resource ID.
Request
- Example request
GET https://{SMN_Endpoint}/v2/{project_id}/{resource_type}/{resource_id}/tags
Response
- Parameter description
Parameter
Type
Description
tags
Resource_tag structure array
Tag list. For details, see Table 1.
- Example response
{ "tags": [ { "key": "key1", "value": "value1" }, { "key": "key2", "value": "value3" } ] }
Returned Value
See Returned Value.
Error Codes
See Error Codes.
Parent topic: Resource Tag Operations