Updated on 2026-01-08 GMT+08:00

Obtaining an SSH Key List

Description

This API is used to obtain an SSH key list.

URI

GET /v1/users/sshkey

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

error

Error object

Response error

result

PublicKeyList object

Response result

status

String

Response status

Table 3 Error

Parameter

Type

Description

code

String

Error codes

message

String

Error message

Table 4 PublicKeyList

Parameter

Type

Description

sshkey

Array of PublicKey objects

Key list

total

Integer

Total number of keys

Table 5 PublicKey

Parameter

Type

Description

id

String

Key ID

Minimum length: 1

Maximum length: 40

key

String

Key

Minimum length: 0

Maximum length: 2,048

title

String

Key name

Request Examples

GET https://{endpoint}/v1/users/sshkey

Response Examples

Status code: 200

Request succeeded

{
  "result" : {
    "total" : 2,
    "sshkey" : [ {
      "id" : "1015292",
      "title" : "reop1@test.com",
      "key" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQA*********************************************************Bqa/pE8buOrxri6AWqAky0bmtjSuVf reop1@test.com"
    }, {
      "id" : "1031709",
      "title" : "reop@test.com",
      "key" : "ssh-rsa AAAAB3NzaC1yc2EA*********************************************************U7xcma6HU8nj1E0i46VObWyOONl3gh142BV repo@test.com"
    } ]
  },
  "status" : "success"
}

Status Codes

Status Codes

Description

200

Request succeeded

Error Codes

See Error Codes.