Get User Groups

Get a list of the user groups that match the search keyword.

HTTP Request

GET /api/sonar/user-groups
Request using cURL
curl -H "Authorization: Bearer <API_KEY>" \
     https://HOSTNAME/api/sonar/user-groups
Request Parameters
KeyRequiredTypeDescriptionNote
offsetX32-bit integerNumber of records to skipDefault: 0
limitX32-bit integerMaximum number of records to loadIf not specified, load all records
keywordsXStringKeywordSearch available by name, description
company_guidXStringCompany GUIDOption only available for a cluster administrator
guidsXList (of strings)User group GUID listComma-separated list

Success Response

{
  "total_count": 1,
  "user_groups": [
    {
      "company_guid": "6fbe27b7-f1ae-4d7a-a1a5-76d8fa9aa311",
      "company_name": "Logpresso",
      "guid": "28c1251b-2f7c-4c58-95a1-fc4a1ead877e",
      "name": "Cyber Security",
      "description": "",
      "owner_guid": "ffaf431b-653a-4329-8f83-913cbb00342d",
      "owner_name": "Yang",
      "created": "2022-09-01 01:08:00+0900",
      "updated": "2022-09-01 01:08:00+0900"
    }
  ]
}
  • total_count (32-bit integer): Total number of the user groups that match the search keyword
  • groups (Array): User group list
    • company_guid (String): Company (tenant) GUID
    • company_name (String): Company (tenant) name
    • guid (String): User group GUID
    • name (String): User group name
    • description (String): Description
    • owner_guid (String): GUID of the user who creates the user group
    • owner_name (String): Name of the user who creates the user group
    • created (String): Date and time of creation (yyyy-MM-dd HH:mm:ssZ)
    • updated (String): Date and time of last modification (yyyy-MM-dd HH:mm:ssZ)

Error Responses

offset or limit value is not an integer

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'offset' parameter should be int type"
}
offset or limit value is negative

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'offset' must be greater than or equal to 0."
}