{{getMsg('Help_YouAreHere')}}:
/
{{page.title}}
{{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}}
{{helpModel.downloadHelpPdfDataStatus}}
List Groups
Request a list of groups from the Users and Groups application. The request has to use the POST
method and send a query using JSON.
POST /api/usersandgroups/groups
Request a list of groups using the following data:
Request Field | Value Type | Description |
---|---|---|
query | string | The query to use to search for groups. |
Note: the query is locale dependent. The locale is derived from the current client.
Response Field | Value Type | Description |
---|---|---|
id | string | The globally unique ID of the group |
type | string | The groups type |
displayName | string | The display name of the group |
Example Request
# Request POST /api/usersandgroups/groups HTTP/1.1 Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u { "query":"groupname:designer" } # Response HTTP/1.1 200 OK Content-Type: application/json [ { "id": "bpb7446l6cns3tzyg9995w2zf", "type": "resource", "displayName": "Designer" } ]
Application Example
# Browser access http://127.0.0.1:9000/api/usersandgroups/groups # Shell access using curl curl -Ls "http://127.0.0.1:9000/api/usersandgroups/groups" \ --header 'Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u' \ --header "Content-Type: application/json" \ --request POST \ --data '{"query":"groupname:designer"}' # Shell access using curl with username and password curl -Lsu username:password "http://127.0.0.1:9000/api/usersandgroups/groups" \ --header "Content-Type: application/json" \ --request POST \ --data '{"query":"groupname:designer"}'