PUT /v1/spaces/:id
HTTP Verb: PUT
Available statuses: 204 No Content, 404 Not Found, 422 Unprocessable Entity
Object: Space
Location: n/a
Formats: XML, JSON
Update a space
Params
To update a space, 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 space namespace, e.g.:
XML
<space>
<summary>New name</summary>
...
</space>
JSON
{"space":{"name":"New name",...}}
Query string
space[name]=New name&...
Check the full list of available params on space object fields reference
Examples
Request XML, using cURL utility:
curl -i -H "Authorization: Bearer _token" -X PUT -d "space[name]=New name" https://api.assembla.com/v1/spaces/_id.xml
Response:
HTTP/1.1 204 No Content
Server: nginx/0.8.55
Date: Fri, 07 Sep 2012 13:40:10 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 204
Request JSON, using cURL utility:
curl -i -H "Authorization: Bearer _token" -X PUT -d "space[name]=New name" https://api.assembla.com/v1/spaces/_id.json
Response:
HTTP/1.1 204 No Content
Server: nginx/0.8.55
Date: Fri, 07 Sep 2012 13:36:36 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 204
JSON is formatted here for readability, in a real response JSON body is inline with no indentation.
Description for each field: space object fields reference