Updated on 2025-11-14 GMT+08:00

Querying Tags in a Project

Function

This API is used to query tags of all resources owned by a tenant in a specified project.

Authorization

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned. For the specific permissions required, see Permissions Policies and Supported Actions.

URI

  • GET /v3/sfs/tms/{project_id}/file-systems/tags
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    The project ID. For details, see Obtaining a Project ID.

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

Content-type

Yes

String

The MIME type of the request body.

Example: application/json

X-Auth-Token

No

String

The user token.

Response Parameters

Table 2 Response body parameter

Parameter

Mandatory

Type

Description

tags

Yes

List<tag>

The tag list. For details, see Table 3.

Example Request

Querying tags using project ID **c80a2157ba1d46c0825265947342077c**:

GET https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/tags

Example Response

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

Status Codes

  • Normal

Status Code

Description

200

Resource tags queried by project.

  • Abnormal

Status Code

Description

400

Invalid tag parameter.

401

Certification failed.

403

Authentication failed.

404

Resource not found.

500

System error.