Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can perform the above search in the Analytics REST API using the following request. It will return the records which match the drill down search. For more information, see Drilling Down Through Categories Retrieving Specific Records through a Drill Down Search via REST API.

Code Block
languagetext
POST https://localhost:9443/analytics/drillDown
 
{
           "tableName": "BOOK_STORE",
            "categories": [
                {
                          "fieldName": "PUBLISHED_DATE",
                            "path" : ["1866", "05", "03"]
                }
            ],
            "query" : "timestamp : [1243214324532 TO 4654365223]",
            "recordStart" : 0,
            "recordCount" : 100
}
 
Note

In the above example, PUBLISHED_DATE is a facet of which values are defined in a three element JSON array. In this example, "05" is a sub-category of “1866”, and “03” is a sub-category of “05”. This information is useful to perform drill down search operations. If you want to retrieve records of which the PUBLISHED_DATE starts with “1866”, provide only “1866” in a JSON array as the value of the facet in the REST API request. Similarly, if you want to retrieve records of which the PUBLISHED_DATE is “1866/05/ANY_DAY”, provide [“1866”, “05”] as the value of the facet in the REST API request.

Searching data within a value range

This  denotes using facets to filter data based on a value range Also you can perform the above search in the Analytics REST API using the following request. It will return the number of records which match the drill down search. For more information, see Retrieving the Number of Records Matching the Drill Down Criteria via REST API

Code Block
languagetext
POST https://localhost:9443/analytics/drillDownCount
 
{
           "tableName": "BOOK_STORE",
            "categories": [
                {
                          "fieldName": "PUBLISHED_DATE",
                            "path" : ["1866", "05", "03"]
                }
            ],
            "query" : "timestamp : [1243214324532 TO 4654365223]
 			"recordStart" : 0,
            "recordCount" : 100
}
Searching data within a value range

This  denotes using facets to filter data based on a value range of an attribute which is defined as a facet.

...

You can perform the above search in the Analytics REST API using the following request. For more information, see  Drilling Down Through Categories via REST APIRetrieving the Event Count of Range Facets.

Code Block
languagetext
POST https://localhost:9443/analytics/rangecount

{
        "tableName": "BOOK_STORE",
        "rangeField" : "PRICE",
        "ranges" : [
                {
                        "label" : "20USD - 30USD",
                        "from" : 20,
                        "to" : 30
                },
                {
                        "label" : "30USD - 40USD",
                        "from" : 30,
                        "to" : 40
                }
        ],
        "query" : "*:*"
}

...