Geovisualization Developer's Guide

Query Result

The query result response body is a JSON object returned by the Geovisualization REST API in response to a request for the result of the query on the dataset.

Table 1. Query Result Response Elements
Element Data Type Description
columns Array A list of strings representing the metrics or facets defined in the query
dataset String Unique ID of the dataset associated with the query
kind String Type of response: the value is datalens#query_result when the request is successful
row Array A list of rows populated with results from the query
query String Unique ID of the query

The code example below illustrates a typical response to a successful request.

{
    "kind": "datalens#query_result",
    "query": "{QUERY_ID}",
    "dataset": "{DATASET_ID}",
    "columns": [
      "lang",
      "num"
    ],
    "row": [
      ["de", 546],
      ["en", 12312],
      ["ru", 100500]
    ]
}