HTTP Verb: PUT

Available statuses: 200 OK, 404 Not Found, 422 Unprocessable Entity

Object: SpaceTool

Location: n/a

Formats: XML, JSON

Update a space tool, the only available update fields are permission fields.

Params

To update a space tool, 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_tool namespace, e.g.:

XML

<space_tool>
  <watcher_permissions>1</watcher_permissions>
  ...
</space>

JSON

{"space_tool":{"watcher_permissions":1,...}}

Query string

space_tool[watcher_permissions]=1&...

Check the full list of available params on space tool object fields reference

Examples

Request XML, using cURL utility:

curl -i -H "Authorization: Bearer _token" -X PUT -d "space_tool[watcher_permissions]=1" https://api.assembla.com/v1/spaces/_space_id/space_tools/_id_or_name.xml

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Tue, 11 Sep 2012 09:17:51 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

Request JSON, using cURL utility:

curl -i -H "Authorization: Bearer _token" -X PUT -d "space_tool[watcher_permissions]=1" https://api.assembla.com/v1/spaces/_space_id/space_tools/_id_or_name.json

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Tue, 11 Sep 2012 09:17:51 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

{}

Description for each field: space tool object fields reference