Adding a Deployment Key
Function
Adding a Deployment Key
URI
POST /v2/repositories/{repository_id}/deploy-keys
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repository_id |
Yes |
Integer |
Warehouse Primary Key ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
application |
Yes |
String |
Source of the SSH Key Used for Deployment |
can_push |
Yes |
Boolean |
Can the SSH Key Used for Deployment Push Code? |
key |
Yes |
String |
SSH key used for deployment |
key_title |
Yes |
String |
Name of the SSH key used for deployment |
Response Parameters
Status code: 200
Example Requests
POST https://{endpoint}/v2/repositories/{repository_id}/deploy-keys { "key_title" : "z00464114@SZXG4Z004641141", "key" : "ssh-rsa AAAAB3NzaC1yXXXXXXXX", "can_push" : true, "application" : "" }
Example Responses
Status code: 200
OK
{ "result" : { "key_id" : "1034546", "key_title" : "z00464114@SZXG4Z004641141", "key" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAxxxxxxxxxxxxx" }, "status" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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