Help Center/ Scalable File Service/ API Reference/ SFS Capacity-Oriented APIs/ Tag Management/ Querying Tags of All File Systems of a Tenant
Updated on 2024-03-05 GMT+08:00

Querying Tags of All File Systems of a Tenant

Function

This API is used to query the tags of all file systems of a tenant.

URI

  • GET /v2/{project_id}/sfs/tags
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Specifies the project ID of the operator. For details about how to obtain the project ID, see Obtaining a Project ID.

Request Header

The operation message header is the same as that of a common request. For details, see Table 3.

Request

  • Parameter description

    None

  • Example request

    None

Response

  • Parameter description

    Parameter

    Type

    Description

    tags

    Array of tags

    Specifies the list of tags.

  • Description of the tag field

    Parameter

    Type

    Description

    key

    String

    Specifies the key of the tag.

    values

    Array of strings

    Lists the values of the tag. The value is a list of tag values of all shared file systems of a tenant. Only one of the same tag values is displayed.

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

Status Codes

  • Normal

    200

  • Abnormal

    Status Code

    Description

    400 Bad Request

    Invalid value.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    Access to the requested page is forbidden.

    404 Not Found

    The requested resource was not found.

    500 Internal Server Error

    The request is not completed because of a service error.