Obtain Token Information - DescribeUFileToken
Overview
Obtain Token Information
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is DescribeUFileToken . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | No |
ProjectId | string | Project 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 |
TokenId | string | Token ID, only return specified ID information, otherwise pull all tokens. | No |
TokenName | string | Token name, only return the specified token name information, otherwise pull all tokens. | No |
Display | int | 0 indicates displaying partial token information; not passing or other situations indicate displaying all token information. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
DataSet | array[UFileTokenSet] | Token Description Information | Yes |
Data Model
UFileTokenSet
Field Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region | Yes |
TokenId | string | Token ID | Yes |
TokenName | string | Token Name | Yes |
PublicKey | string | Token Public Key | Yes |
PrivateKey | string | Token Private Key | Yes |
AllowedOps | array[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 |
AllowedPrefixes | array[string] | The key prefix that the token allows to operate | Yes |
AllowedBuckets | array[string] | The token allows operation of the bucket | Yes |
ExpireTime | int | Expiration time of the token | Yes |
CreateTime | int | Creation Time | Yes |
ModifyTime | int | Modification Time | Yes |
BlackIPList | array[string] | Token Blacklist | No |
WhiteIPList | array[string] | Token Whitelist | No |
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
}