PUT /v1/user/ssh_keys/:id
HTTP Verb: PUT
Available statuses: 200 OK, 404 Not Found, 422 Unprocessable Entity
Object: SSHKey
Location: n/a
Formats: XML, JSON
Update a SSH key.
Params
To create a SSH key, a data body must be provided. Data can be provided with request body in application/x-www-form-urlencoded or query string format
title=work-desktop&read_only=true
JSON
{
"title": "work-desktop",
"read_only": true
}
XML
<ssh-key>
<title>Deploy key for Zeus server</title>
<read-only type="boolean">true</read-only>
</ssh-key>
Examples
For example purposes, we use a JSON body
{"read_only":true, "title":"work-desktop"}
Request XML, using cURL utility:
curl -i -X PUT -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"read_only":true, "title":"work-desktop"}' https://api.assembla.com/v1/user/ssh_keys/9.xml
Response:
HTTP/1.1 200 OK
Content-Type: application/xml; charset=utf-8
Status: 200
...
Request JSON, using cURL utility:
curl -i -X PUT -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"read_only":true, "title":"work-desktop"}' https://api.assembla.com/v1/user/ssh_keys/9.json
Response:
Content-Type: application/json; charset=utf-8
Status: 200
...
{}
Description for each field: SSHKey object fields reference