Docs
api
Object-based Storage(US3)
DescribeUFileToken

Obtain Token Information - DescribeUFileToken

Overview

Obtain Token Information

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeUFileToken.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
RegionstringRegion. See List of Regions and Availability ZonesNo
ProjectIdstringProject ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface.No
TokenIdstringToken ID, only return specified ID information, otherwise pull all tokens.No
TokenNamestringToken name, only return the specified token name information, otherwise pull all tokens.No
Displayint0 indicates displaying partial token information; not passing or other situations indicate displaying all token information.No

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
DataSetarray[UFileTokenSet]Token Description InformationYes

Data Model

UFileTokenSet

Field NameTypeDescription InformationRequired
RegionstringRegionYes
TokenIdstringToken IDYes
TokenNamestringToken NameYes
PublicKeystringToken Public KeyYes
PrivateKeystringToken Private KeyYes
AllowedOpsarray[string]The actions that the token allows to perform, [TOKEN_ALLOW_NONE No permissions, TOKEN_ALLOW_READ Download permissions, TOKEN_ALLOW_WRITE Upload permissions, TOKEN_ALLOW_DELETE Delete permissions, TOKEN_ALLOW_LIST List permissions, TOKEN_ALLOW_IOP Image processing permissions]Yes
AllowedPrefixesarray[string]The key prefix that the token allows to operateYes
AllowedBucketsarray[string]The token allows operation of the bucketYes
ExpireTimeintExpiration time of the tokenYes
CreateTimeintCreation TimeYes
ModifyTimeintModification TimeYes
BlackIPListarray[string]Token BlacklistNo
WhiteIPListarray[string]Token WhitelistNo

Example

Request Example

https://api.dezai.com/?Action=DescribeUFileToken
&ProjectId=org-xxx
&TokenId=679c7e5e-74b8-4048-b622-33dd4e8634de
&Region=cn-bj
&Display=2
&TokenName=BFCOSzvM

Response Example

{
  "Action": "DescribeUFileTokenResponse",
  "DataSet": [
    {
      "AllowedBuckets": [
        "bucket1",
        "bucket2"
      ],
      "AllowedOps": [
        "TOKEN_ALLOW_READ",
        "TOKEN_ALLOW_WRITE"
      ],
      "AllowedPrefixes": [
        "test/test",
        "test1/test1"
      ],
      "ExpireTime": 4102416000,
      "PrivateKey": "7b01a354-adb2-49a1-9f68-af814e884c29",
      "PublicKey": "TOKEN_679c7e5e-74b8-4048-b622-33dd4e8634de",
      "TokenId": "679c7e5e-74b8-4048-b622-33dd4e8634de",
      "TolenName": "testname"
    },
    {
      "AllowedBuckets": [
        "bucket1",
        "bucket2"
      ],
      "AllowedOps": [
        "TOKEN_ALLOW_READ",
        "TOKEN_ALLOW_WRITE"
      ],
      "AllowedPrefixes": [
        "test/test",
        "test1/test1"
      ],
      "ExpireTime": 4102416000,
      "PrivateKey": "7b01a354-adb2-49a1-9f68-af814e884c27",
      "PublicKey": "TOKEN_679c7e5e-74b8-4048-b622-33dd4e8634dc",
      "TokenId": "679c7e5e-74b8-4048-b622-33dd4e8634dc",
      "TokenName": "test1name"
    }
  ],
  "RetCode": 0
}