Admin/Lookup/api_get_groups
api_get_groupstoken required
Returns groups visible to the user; supports v1 (flat) and v2 (paged with object_id and action filter).
POST
/api— body field action.name = "api_get_groups"Parameters
| Name | Type | Required | Description |
|---|---|---|---|
group_id | number | optional | Optional positive group id filter.e.g. 10 |
version | number | optional | API version: 1 (default, flat) or 2 (paginated with object_id).e.g. 2 |
action | number | optional | Only valid with version=2. Must be 1, 2, or 3. Forbidden with version=1.e.g. 1 |
last_object_id | number | optional | Pagination cursor (v2 only) — send the `object_id` of the last row you received to fetch the next page. Omit it for the first page (200 rows); later pages return 50.e.g. 200 |
client_id | number | optional | Narrow the result to one client within the session's own scope. Cannot widen it.e.g. 14952 |
Notes
First page is 200 rows; later pages 50. The response's `pagination.has_more` tells you whether another page exists — iterate on that rather than on the row count, because a full page is not by itself proof that more rows follow. This action does not read `page_number` or `page_size` — the cursor is its only paging control. v1 omits `object_id`. Bad version returns action_value '996'; supplying `action` with v1 returns '998'; under v2 `action` is optional, but if supplied it must be 1, 2, or 3 (otherwise '997').
Request
curl
curl -X POST 'https://private.stage.questar.io/v2/private-questar-units/api' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
--data '{"action":{"name":"api_get_groups","parameters":[{"group_id":10,"version":2,"action":1,"last_object_id":200,"client_id":14952}]}}'Body
{
"action": {
"name": "api_get_groups",
"parameters": [
{
"group_id": 10,
"version": 2,
"action": 1,
"last_object_id": 200,
"client_id": 14952
}
]
}
}Response
Successful responses always wrap the action's payload in response.properties. The action_value field reports the handler outcome: "0" for success, "1" for invalid params, "2" for not allowed, "3" for limit-exceeded /pagination-session-expired, "999" for general error.
200 OK
{
"response": {
"properties": {
"action_name": "api_get_groups",
"action_value": "0",
"description": "success",
"data": [
{
"object_id": "1",
"group_id": "10",
"group_name": "Tel%20Aviv%20Fleet",
"client_name": "Acme%20Logistics",
"parent_group_id": "",
"parent_group_name": "",
"group_hierarchy_level": "1"
}
]
}
}
}