PUT /v1/spaces/:space_id/ssh/servers/:id
HTTP Verb: PUT
Available statuses: 200 OK, 404 Not Found, 422 Unprocessable Entity
Object: SSHServer
Location: n/a
Formats: XML, JSON
Update a SSH server.
Params
To update a SSH server, a data body must be provided. Data can be provided in three formats: XML, JSON and query string. To specify data type of XML or JSON add the Content-type: application/(json|xml) header to request headers, if you want to provide query string simply skip the Content-type header.
All params should be sent in the ssh_server namespace, e.g.:
XML
<ssh_server>
<name>name</name>
...
</ssh_server>
JSON
{"ssh_server":{"name":name,...}}
Query string
ssh_server[name]=name&...
Check the full list of available params on SSH Server object fields reference
Examples
Request XML, using cURL utility:
curl -i -H "Authorization: Bearer _token" -X PUT -d "ssh_server[name]=newname" https://api.assembla.com/v1/spaces/_space_id/ssh/servers/_id.xml
Response:
HTTP/1.1 200 OK
Date: Tue, 21 May 2013 15:01:05 GMT
Server: Apache
Status: 200
Vary: Accept-Encoding
Content-Length: 1
Content-Type: application/xml; charset=utf-8
Request JSON, using cURL utility:
curl -i -H "Authorization: Bearer _token" -X PUT -d "ssh_server[name]=newname" https://api.assembla.com/v1/spaces/_space_id/ssh/servers/_id.json
Response:
HTTP/1.1 200 OK
Date: Tue, 21 May 2013 15:01:37 GMT
Server: Apache
Status: 200
Content-Length: 2
Content-Type: application/json; charset=utf-8
{}
Description for each field: SSH Server object fields reference