get_module_state_apitoken required
Returns per-module health/state for a single vehicle (capability, active, ok flags, last update, error info) with SP-compatible colour hints.
/api— body field action.name = "get_module_state_api"Parameters
| Name | Type | Required | Description |
|---|---|---|---|
vehicle_id | number | required | Positive vehicle id to query. Missing or non-positive values return errorcode '1'.e.g. 591723 |
application_token | string | optional | Accepted on the wire for legacy SP shape compatibility. Value is ignored — session auth is the real surface.e.g. |
with_debug | string | optional | Legacy debug flag accepted on the wire and ignored. A non-empty / non-'0' value is logged as a warning.e.g. 0 |
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":"get_module_state_api","parameters":[{"vehicle_id":591723,"with_debug":"0"}]}}'{
"action": {
"name": "get_module_state_api",
"parameters": [
{
"vehicle_id": 591723,
"with_debug": "0"
}
]
}
}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": "get_module_state_api",
"action_value": "0",
"description": "success",
"data": [
{
"template_name": "module_state",
"module_id": "1",
"module_descr": "Engine",
"sub_module_id": "2",
"sub_module_descr": "Coolant",
"color": "#008000",
"last_update_date": "2025-09-10T12:00:00",
"can_be_active": "1",
"can_be_active_color": "#008000",
"active": "1",
"active_color": "#008000",
"was_ok": "1",
"was_ok_color": "#008000",
"ok": "1",
"ok_color": "#008000",
"error": "0",
"error_descr": ""
}
]
}
}
}