• Simple Message Notification

smn
  1. Help Center
  2. Simple Message Notification
  3. API Reference
  4. APIs
  5. Resource Tag Operations
  6. Querying Tags in a Specified Project

Querying Tags in a Specified Project

Description

  • API name

    GetProjectTags

  • Function

    Query all tags of a resource type in a specified project.

    TMS uses this API to list tags created by a tenant to facilitate tag creation and resource filtering on the console.

URI

  • URI format

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

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID

    resource_type

    Yes

    String

    Resource type

    The value can be smn_topic.

Request

  • Parameter description

    None

  • Request example
    GET /v2/{project_id}/{resource_type}/tags

Response

  • Parameter description

    Parameter

    Type

    Description

    tags

    Tags structure array

    Tag list. For details, see section Tags Structure.

  • Response example
    {
          "tags": [
            {
                "key": "key1",
                "values": ["value1""value2"]
            },
            {
                "key": "key2",
                "values": ["value1","value2"]
            }
        ]
    }

Returned Value

See section Returned Value.

Error Code

See section Error Code.