api_get_groupstoken required
Returns groups visible to the user; supports v1 (flat) and v2 (paged with object_id and action filter).
/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
Request
curl -X POST 'https://private.develop-1.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}]}}'{
"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.
Authentication is checked before the action runs and fails the same way for every action. A token that is not valid returns HTTP 200 with action_value "2" and description invalid_session; an empty bearer returns "2" with session_token_required. Read the description to tell these apart from an action's own "2". With no Authorization header the gateway answers HTTP 401 {"message":"Unauthorized"}, and with a bearer that is not a token HTTP 403 {"message":"Forbidden"}.
{
"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"
}
]
}
}
}