Need a special offer?Find out if your project fits.
+
API reference
  • API Reference for older versions
  • Table of contents

    /select request for the drill-through view

    [starting from version: 2.8]

    A request for data.

    Request

    {
      "type": string,
      "index": string,
      "query": {
        "fields": FieldObject[],
        "filter": FilterObject[] | FilterGroupObject,
        "limit": number
      },
      "page": number
    }
    Parameter/Type Description
    type
    String
    The type of the request. In this case, it is "select".
    index
    String
    The dataset identifier.
    query
    Object
    A query object.
    query.fields
    FieldObject[]
    An array of fields (columns) to include in the response.
    query.filter
    FilterObject[] | FilterGroupObject
    optional Query filters. The part of a query that specifies which filters should be applied to the data.
    If the server does not support multilevel hierarchies (i.e., the filters.advanced property is set to false), the filter's structure is an array of FilterObjects.
    If multilevel hierarchies are supported, the filter can be:
    query.limit
    Number
    The maximum number of records that should be included in the response. Can be configured in Flexmonster.
    Default value: 1000.
    page
    Number
    The page number. It can be used to load data by parts. If the response contains the pageTotal parameter, additional requests will be performed to load the remaining pages. Starts from 0.

    Response

    {
      "fields": FieldObject[],
      "hits": [][],
      "page": number,
      "pageTotal": number
    }
    Parameter/Type Description
    fields
    FieldObject[]
    Fields (columns) included in the response. Only the uniqueName property of the FieldObject should be specified in the response.
    hits
    Array of arrays
    A two-dimensional array with data. Each subarray should contain ordered values.
    page
    Number
    optional The current page number. Should start from 0.
    pageTotal
    Number
    optional The total number of pages. It can be used to load members by parts.

    Example

    Request:

    {
      "index": "dataset-123",
      "type": "select",
      "query": {
        "fields": [
          {
            "uniqueName": "Country"
          },
          {
            "uniqueName": "City"
          },
          {
            "uniqueName": "Price"
          },
          {
            "uniqueName": "Quantity"
          }
        ],
        "filter"[]: {
          "field": {
            "uniqueName": "Country"
          }, 
          "include": [
            {
              "member": "Canada"
            }
          ]
        },
        "limit": 1000
      },
      "page": 0
    }

    Response:

    {
      "fields": [
        { "uniqueName": "Country" },
        { "uniqueName": "City" },
        { "uniqueName": "Price" },
        { "uniqueName": "Quantity" }
      ],
      "hits": [
        ["Canada", "Toronto", 53, 2],
        ["Canada", "Montreal", 100, 1]
      ]
    }

    See also

    /handshake request
    /fields request
    /members request
    /select request for pivot table
    /select request for flat table