The latest version for DAS is WSO2 Data Analytics Server 3.2.0. View documentation for the latest release.
WSO2 Data Analytics Server is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.
||
Skip to end of metadata
Go to start of metadata

 

Overview

DescriptionDrilling down through hierarchical categories
Resource Path

/analytics/facets

HTTP MethodPOST
Request/Response Formatapplication/json
AuthenticationBasic

Sample cURL command

curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -v https://localhost:9443/analytics/facets -d '{"tableName" : "sampleTableName","fieldName" : "sampleFieldName","categoryPath" : ["parent", "child", "grandChild"],"query" : "timestamp : [1213343534535 TO 465464564644]","scoreFunction" : "weight*popularity"}' -k

 

Example

POST https://localhost:9443/analytics/facets
{
        "tableName" : "sampleTableName",
        "fieldName" : "sampleFieldName",
        "categoryPath" : ["parent", "child", "grandChild"],
        "query" : "timestamp : [1213343534535 TO 465464564644]",
        "scoreFunction" : "weight*popularity"
}

Sample output

{
	"categoryPath" : ["parent", "child", "grandChild"],
	"categories : {grandGrandChild1 : 15, grandGrandChild2 : 25, grandGrandChild3 : 42}
}

REST API response

 

HTTP status code

200

For descriptions of the HTTP status codes, see HTTP Status Codes.

  • No labels
  • Download PDF icon Download PDF
  • Download a PDF file of the documentation