List¶
GET /api/v1/workspace/accesskey/list
Overview¶
Get Key list
Query Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| search | string | Search by name Example: supper_workspace Allow empty: False |
|
| orderBy | string | Sorting field, supports createAt / callCount / lastCallAt Example: callCount Allow empty: False Optional values: ['createAt', 'callCount', 'lastCallAt'] |
|
| order | string | Sorting direction, supports asc / desc, default desc Example: desc Allow empty: False Optional values: ['asc', 'desc'] |
Additional Parameter Description¶
The creation interface still returns the plaintext ak/sk of the new API Key. When the OpenAPI API Key calling this interface has the owner role, the read interface returns the plaintext ak/sk of the workspace API Key; when called by a non-owner role, only the workspace API Key record corresponding to the current calling credential itself returns plaintext ak/sk, other records return desensitized ak/sk, retaining only the last four digits. This rule does not apply to personal API Keys.
Request Example¶
curl 'https://openapi.guance.com/api/v1/workspace/accesskey/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--compressed
Response¶
{
"code": 200,
"content": [
{
"callCount": 12,
"createAt": 1677808718,
"creator": "acnt_xxxx32",
"creatorInfo": {
"email": "xxx@guance.com",
"iconUrl": "",
"name": "88Test",
"username": "Test"
},
"deleteAt": -1,
"id": 4,
"lastCallAt": 1677809718,
"name": "test",
"sk": "xxx",
"status": 0,
"updateAt": 1677808718,
"updator": "acnt_xxxx32",
"uuid": "xxx",
"workspaceUUID": "wksp_xxxx32"
}
],
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-B73F5F23-046C-4A84-8B33-D028C92994C4"
}