Adding an SSH Key
Description
This API is used to add an SSH key.
URI
POST /v1/users/sshkey
Request 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. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
key |
Yes |
String |
Key Minimum length: 0 Maximum length: 2,048 |
|
title |
Yes |
String |
Key name |
Response Parameters
Status code: 200
Request Examples
POST https://{endpoint}/v1/users/sshkey
{
"title" : "repo@test.com",
"key" : "ssh-rsa AAAAB3NzaC1yc2EA*********************************************************U7xcma6HU8nj1E0i46VObWyOONl3gh142BV repo@test.com"
}
Response Examples
Status code: 200
Request succeeded
{
"result" : {
"id" : "1034531",
"title" : "repo@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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot