What is the advantage of using QueryV3 while creating Database API?

Explain with an example.

1 Like

QueryV3 is an extended or enhanced version of QUERY and QUERYV2 which ensures that queries return a proper JSON object instead of a stringified JSON format.
The API with the Query_V3 execution type returns the response in comprehensive and structured JSON format, while the QUERY and QUERYV2 options return responses in complex string format that the front-end applications find it difficult to manage. QUERYV3 return the response without the nested structure.

For example:-
Below is the output of QUERYV3 API response:-

{
“status”: true,
“data”: {
“status”: “SUCCESS”,
“message”: null,
“response”: {
“QUERYV3_TEST”: {
“records”: [
{
“primary_key”: “”,
“data”: [
{
“group_id”: null
},
{
“group_id”: “RMU_TEST”
},
{
“group_id”: “RMU_TEST”
},
{
“group_id”: “RMU_TEST”
}
]
}
],
“responseHandledBy”: “MOBILE APP”,
“isSuccessRuleValidated”: true
}
},
“customData”: null
}
}

Below is the output of QUERYV2 API response:-

{
“status”: true,
“data”: {
“status”: “SUCCESS”,
“message”: null,
“response”: {
“TRAINING_API_SECOND”: {
“records”: [
{
“primary_key”: “”,
“data”: [
{
“status”: “SUCCESS”,
“response”: [
{
“group_id”: null
},
{
“group_id”: “RMU_TEST”
},
{
“group_id”: “RMU_TEST”
},
{
“group_id”: “RMU_TEST”
}
]
}
]
}
],
“responseHandledBy”: “MOBILE APP”,
“isSuccessRuleValidated”: true
}
},
“customData”: null
}
}

1 Like

Not clear both the response is same, can you please provide more clarity on it?