This method returns a JSON array representation of the elements of the group type. You can specify how the response JSON is formatted with the "format" parameter.
Request
GET http://{hostname}:{port}
/groups/?{parameters}
Accept: 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 "list" will be used. |
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.
Content types
This command returns the following content types. Specify the content type that you are accepting in the header of the request.
Example
curl -k -u jsmith:passwd
"http://myserver.example.com:8080/groups/"
-X GET
-H "Accept: application/json"
Example JSON response
[
{
"id": "97447ea3-a95f-4d29-ba6e-d65fc2e84e85",
"name": "Example Group",
"enabled": true,
"users": [
{
"id": "00000000-0000-0000-0000-000000000003",
"name": "releaser",
"displayName": "releaser"
},
{
"id": "00000000-0000-0000-0000-000000000002",
"name": "admin",
"displayName": "admin"
}
],
"version": 0,
"authorizationRealm": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "Internal Authorization",
"description": "Internal Authorization",
"ghostedDate": 0,
"authorizationModuleClassName":
"com.urbancode.security.authorization.internal.InternalAuthorizationModule",
"version": 0
}
}
]