ListUserKeys - 查询SSH密钥列表

更新时间:
复制 MD 格式

查询当前用户的SSH密钥列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

GET /api/v3/user/keys HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

organizationId

string

是

企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】

5ebbc0228123212b59xxxxx

accessToken

string

否

个人访问令牌。 使用阿里云 AK+SK 或使用 STS 临时授权方式不需要传该字段

f0b1e61db5961df5975a93f9129d2513

page

integer

否

页码,默认值为 1

1

pageSize

integer

否

每页大小,默认值为 20,取值范围【1,100】

10

sort

string

否

排序方式,默认值为 desc

  • asc:按排序字段升序排序

  • desc:按排序字段降序排序

desc

orderBy

string

否

排序字段,默认值为 created_at

  • created_at:创建时间

  • updated_at:更新时间

created_at

返回参数

名称

类型

描述

示例值

object

Schema of Response

requestId

string

请求 ID

F7B85D1B-D1C2-140F-A039-341859F130B9

errorCode

string

错误码

Openapi.RequestError

errorMessage

string

错误信息

Openapi.RequestError

success

boolean

调用是否成功

true

result

array<object>

返回结果列表

object

返回结果

id

integer

SSH 密钥的主键 ID

5240

title

string

SSH 密钥的标题

My Title

publicKey

string

SSH-Key 的公钥串

xxx

fingerPrint

string

指纹信息

xxx

keyScope

string

作用范围,可选值:ALL、READ

  • ALL:全部(读/写操作包括 clone/pull/push 等)

  • READ:只读(仅支持 clone/pull )

ALL

createdAt

string

创建时间,格式为 YYYY-MM-DD HH:mm:ss。

2022-03-18 14:24:54

expireTime

string

过期时间,格式为 YYYY-MM-DD HH:mm:ss。

2022-03-18 14:24:54

lastUsedTime

string

上次使用时间,格式为 YYYY-MM-DD HH:mm:ss。

2022-03-18 14:24:54

示例

正常返回示例

JSON格式

{
  "requestId": "F7B85D1B-D1C2-140F-A039-341859F130B9",
  "errorCode": "Openapi.RequestError",
  "errorMessage": "Openapi.RequestError",
  "success": true,
  "result": [
    {
      "id": 5240,
      "title": "My Title",
      "publicKey": "xxx",
      "fingerPrint": "xxx",
      "keyScope": "ALL",
      "createdAt": "2022-03-18 14:24:54",
      "expireTime": "2022-03-18 14:24:54",
      "lastUsedTime": "2022-03-18 14:24:54"
    }
  ]
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情。