Skip to content

List device groups
Stable

Request

Returns a paginated list of all device groups in the enterprise. Device groups organize devices into logical collections by location, use case, or deployment stage, and serve as the primary unit for policy assignment, app deployment, and bulk commands.

Common Use Cases

Discovering group IDs for downstream operations; auditing group structure; populating group selectors in custom tools; confirming a group exists before assigning devices or Blueprints.

Best Practices

Use the name query parameter to filter instead of fetching all groups; cache group IDs for use in commands and policy calls; paginate with limit and offset for large enterprises.

Security
esper_cloud_api_apiKey
Path
enterprise_idstringrequired

A UUID string identifying enterprise.

Query
namestring

Filter by group name

limitinteger

Number of results to return per page.

Default:20
offsetinteger

The initial index from which to return the results.

Default:0
cURL
curl -i -X GET \
  'https://api.esper.io/_mock/openapi/enterprise/{enterprise_id}/devicegroup/?name=string&limit=20&offset=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

successful operation

Bodyapplication/json
countintegerrequired
nextstring or null, (url)
previousstring or null, (url)
resultsArray of objects(esper_cloud_api_DeviceGroup)required
Response
{ "count": 0, "next": "string", "previous": "string", "results": [ {} ] }