HTTP Verb: PUT

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

Object: Group

Location: n/a

Formats: XML, JSON

Update a group.

Params

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

XML

<?xml version="1.0" encoding="UTF-8"?>
<group>
  <name>New Group Name</name>
  <items type="array">
    <item>dCDf9QDNyr4PMj5bfBjDYC</item>
    <item>deug5QDNyr4PMj5bfBjDYC</item>
  </items>
</group>

JSON

{"group":{"name":"New Group Name","items":["dCDf9QDNyr4PMj5bfBjDYC","deug5QDNyr4PMj5bfBjDYC"]}}

Query string

group[name]=New Group Name&group[items]=...

Check the full list of available params on Group object fields reference

Examples

For example purposes we use a JSON body

{"group":{"name":"New Group Name","items":["dCDf9QDNyr4PMj5bfBjDYC","deug5QDNyr4PMj5bfBjDYC"]}}

Request XML, using cURL utility:

curl -i -X PUT -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"group":{"name":"New Group Name","items":["dCDf9QDNyr4PMj5bfBjDYC","deug5QDNyr4PMj5bfBjDYC"]}}' https://_portfolio_subdomain.api.assembla.com/v1/groups/_id.xml

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Fri, 07 Sep 2012 13:08:42 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

Request JSON, using cURL utility:

curl -i -X PUT -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"group":{"name":"New Group Name","items":["dCDf9QDNyr4PMj5bfBjDYC","deug5QDNyr4PMj5bfBjDYC"]}}' https://_portfolio_subdomain.api.assembla.com/v1/groups/_id.json

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Fri, 07 Sep 2012 13:12:30 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

{}

JSON is formatted here for readability, in a real response JSON body is inline with no indentation.

Description for each field: Group object fields reference