Docs
api
Label
ListResourcesByLabels

Get resource list by tag - ListResourcesByLabels

Overview

Get resource list by tag

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is ListResourcesByLabels.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
Labels.N.KeystringTag KeyYes
Labels.N.ValuestringTag ValueYes
ResourceTypes.NstringResource Type ArrayYes
ProjectIds.NstringProject ID ArrayYes
OffsetintList start position offset, default is 0No
LimitintReturn data length, default is 0, maximum 100No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
TotalCountintTotal ResourcesNo
Resourcesarray[ListResourcesByLabelsResource]Resource ListNo

Data Model

ListResourcesByLabelsResource

Field NameTypeDescription InformationRequired
ProjectIdstringProject IDYes
ResourceIdstringResource IDYes
ResourceNamestringResource NameYes
ProjectNamestringProject NameYes
ResourceTypestringResource TypeYes
Labelsarray[ListResourcesByLabelsLabel]Tag ArrayYes

ListResourcesByLabelsLabel

Field NameTypeDescription InformationRequired
KeystringTag KeyNo
ValuestringTag ValueNo
CategorystringTag type, system: System tag; custom: Custom tagNo

Example

Request Example

https://api.dezai.com/?Action=ListResourcesByLabels
&Labels=ntCdGAyy
&Offset=2
&Limit=3
&Labels.N.Value=YXDLevRF
&ResourceTypes.N=UuUvHKWO
&ProjectIds.N=XgLtzEFf

Response Example

{
  "Action": "ListResourcesByLabelsResponse",
  "Resources": [
    {
      "Labels": [
        {
          "Category": "lKEsvGZE",
          "Key": "ZIUFsoXl",
          "Value": "JWILJdgN"
        }
      ],
      "ProjectId": "ndAdjmsF",
      "ProjectName": "aNXZWXmR",
      "Region": "fsAJwsSj",
      "ResourceId": "NAVCNQVl",
      "ResourceName": "zQRrbpKU",
      "ResourceType": "iWNdsqXo",
      "Zone": "NcjklQqz"
    }
  ],
  "RetCode": 0,
  "TotalCount": 8
}