Update a single group element

Specify the updated information for the group element as a JSON object. The server updates the instance in the request path; the 'id' attribute of the JSON object is ignored.

Request

PUT http://{hostname}:{port}
  /groups/{id}?{parameters}
Accept: application/json
Content-Type: application/json
Table 1. Request parameters
Parameter Type Required Description
format string false One of the format options; this parameter determines what information is included in the JSON response. If not specified, or if an unrecognized value is specified, the default format of "detail" will be used.
Table 2. URL parameters
Parameter Type Required Description
id string true The ID of the group element.
Table 3. Header parameters
Parameter Type Required Description
Content-Type application/json true
Accept application/json true
For the format parameter, use one of the following format options:
list
Name, ID and users
detail
Identical to 'list' format
name
Name and ID only
For details about the full JSON that the server returns when you select one of these formats, see the related resource: groups resource.

Example

curl -k -u jsmith:passwd  
  "http://myserver.example.com:8080/groups/" 
  -X PUT
  -H "Accept: application/json"
  -H "Content-Type: application/json"
  -d @groupUpdate.json

Example JSON request

{
  "id": "97447ea3-a95f-4d29-ba6e-d65fc2e84e85",
  "name": "New group name",
  "users": [
    "00000000-0000-0000-0000-000000000002",
    "00000000-0000-0000-0000-000000000003",
    "6f988de5-275a-49b5-936f-6253455420fb"
  ]
}

Example JSON response

[
  {
    "id": "97447ea3-a95f-4d29-ba6e-d65fc2e84e85",
    "name": "New group name",
    "enabled": true,
    "users": [
      {
        "id": "6f988de5-275a-49b5-936f-6253455420fb",
        "name": "jsmith",
        "actualName": "Jane Smith",
        "displayName": "Jane Smith (jsmith)"
      },
      {
        "id": "00000000-0000-0000-0000-000000000003",
        "name": "releaser",
        "displayName": "releaser"
      },
      {
        "id": "00000000-0000-0000-0000-000000000002",
        "name": "admin",
        "displayName": "admin"
      }
    ],
    "version": 1,
    "authorizationRealm": {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Internal Authorization",
      "description": "Internal Authorization",
      "ghostedDate": 0,
      "authorizationModuleClassName": 
      "com.urbancode.security.authorization.internal.InternalAuthorizationModule",
      "version": 0
    }
  }
]