Skip to main content

Get Group Details

Enterprise

This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.

Endpoint​

/o/groups/group-details

Overview​

Returns one group by ID.

Authentication​

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions​

  • Required access: global admin

Request Parameters​

ParameterTypeRequiredDescription
api_keyStringYes (or auth_token)API key authentication
auth_tokenStringYes (or api_key)Auth token authentication
argsObject (JSON string)YesStringified object containing _id

args Object Fields​

FieldTypeRequiredDescription
_idStringYesGroup ID

Examples​

Example: Get one group​

Endpoint form:

https://your-server.com/o/groups/group-details?api_key=YOUR_API_KEY&args={"_id":"507f1f77bcf86cd799439011"}

Decoded args object:

{
"_id": "507f1f77bcf86cd799439011"
}

Response​

Success Response​

{
"result": {
"_id": "507f1f77bcf86cd799439011",
"name": "Marketing Team",
"groupID": "marketing-team",
"global_admin": false,
"users": ["507f191e810c19729de860ea"],
"permission": {
"_": { "u": [], "a": [] },
"c": {},
"r": {},
"u": {},
"d": {}
}
}
}

Response Fields​

FieldTypeDescription
resultObject or nullMatching group document
result.usersArrayMember IDs in the group
result.permissionObjectStored group permission object

Error Responses​

HTTP StatusResponse
200{ "result": "Not enough args" }
400{ "result": "Missing parameter \"api_key\" or \"auth_token\"" }
400Error object from details lookup path

Behavior​

  1. Parses args and validates _id.
  2. Reads group from countly.groups.
  3. Returns { "result": group }.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.groupsEndpoint data source** - Group document source