ListUserKeys

Updated at:

Queries the SSH keys of the current user.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

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

Request parameters

Parameter

Type

Required

Description

Example

organizationId

string

Yes

The enterprise identifier, also known as the enterprise ID. This parameter is a string and can be obtained from the Yunxiao URL, such as https://devops.aliyun.com/organization/[OrganizationId].

5ebbc0228123212b59xxxxx

accessToken

string

No

The personal access token. This parameter is not required if you use an Alibaba Cloud AccessKey pair or Security Token Service (STS) temporary authorization.

f0b1e61db5961df5975a93f9129d2513

page

integer

No

The page number. Default value: 1.

1

pageSize

integer

No

The number of entries per page. Default value: 20. Valid values: 1 to 100.

10

sort

string

No

The sort order. Default value: desc. Valid values:

  • asc: Sorts the results in ascending order based on the sort field.

  • desc: Sorts the results in descending order based on the sort field.

desc

orderBy

string

No

The sort field. Default value: created_at. Valid values:

  • created_at: creation time

  • updated_at: update time

created_at

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

F7B85D1B-D1C2-140F-A039-341859F130B9

errorCode

string

The error code.

Openapi.RequestError

errorMessage

string

The error message.

Openapi.RequestError

success

boolean

Indicates whether the call was successful.

true

result

array<object>

The list of returned results.

object

The returned result.

id

integer

The primary key ID of the SSH key.

5240

title

string

The title of the SSH key.

My Title

publicKey

string

The public key string of the SSH key.

xxx

fingerPrint

string

The fingerprint information.

xxx

keyScope

string

The scope of the key. Valid values:

  • ALL: all permissions, including read and write operations such as clone, pull, and push.

  • READ: read-only permissions, which support only clone and pull operations.

ALL

createdAt

string

The creation time. Format: YYYY-MM-DD HH:mm:ss.

2022-03-18 14:24:54

expireTime

string

The expiration time. Format: YYYY-MM-DD HH:mm:ss.

2022-03-18 14:24:54

lastUsedTime

string

The last used time. Format: YYYY-MM-DD HH:mm:ss.

2022-03-18 14:24:54

Examples

Success response

JSON format

{
  "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"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.