Resources User Add Ssh Key
Add Ssh Key
Http Method
POST
End Point
/api/users/{userId}/ssh-keys
Placeholder Description Example
{userId} User Id 1
Request Body
Content Type
application/json
Example
"string"
Response
Operation Successful
Status Code
200
Response Body
Content Type
application/json
Example
1
Operation Failed
Status code
Status code other than 200 indicating the error type
Response Body
Error detail of content type "text/plain"
cURL Example
$ curl -u <login name>:<password or access token> -d@request-body.json -H "Content-Type: application/json" https://code.onedev.io/api/users/1/ssh-keys
Please wait...
Page is in error, reload to recover