Query: To get instant sights by widget-id as a parameter
curl -i -X GET -H "Authorization: Bearer e0Z3DIqtdurha2gzeqMKXg2Kvf4ipY5Sl13JrolDoOrwie" 'http://localhost:9090/api/1.0/widgets/<widget-id>/insights'
Parameter | Comments |
---|---|
widget-id |
widget-id to view the widget
|
Response:
[
{
"insight":{
"id":"com.knowi.anomalyGrowthByDate",
"name":"Anomaly Growth By Date",
"description":"Calculate and return any anomaly detected for the growth by date",
"category":"Anomaly"
},
"output":[
"<b>-0.92%</b> change for <b>Close</b> that occurred on <b>14 Mar 23</b> is <b>below</b> than the normal ranges.",
"<b>2.62%</b> change for <b>Close</b> that occurred on <b>13 Mar 23</b> is <b>above</b> than the normal ranges."
]
},
{
"insight":{
"id":"com.knowi.growthLatestByDate",
"name":"Latest Growth By Date",
"description":"Show latest growth summary information",
"category":"Growth"
},
"output":[
"The <b></b>growth rate for <b>Close</b> during the latest period is <b>-0.92%</b> occurred on <b>14 Mar 23</b>"
]
},
{
"insight":{
"id":"com.knowi.growthLatestByGroup",
"name":"Latest Growth By Group",
"description":"Show latest growth summary information",
"category":"Growth"
},
"output":[
"The <b></b>growth rate for <b>Close</b> during the latest period is <b>-1.29%</b> occurred for <b>Apple</b> on <b>14 Mar 23</b>"
]
},
{
"insight":{
"id":"com.knowi.growthTopByDate",
"name":"Top Growth By Date",
"description":"Show where growth of numeric value is highest by date",
"category":"Growth"
},
"output":[
"The top growth rate for <b>Close</b> is <b>11.06%</b> occurred on <b>09 Nov 22</b>"
]
},
{
"insight":{
"id":"com.knowi.growthTopByGroup",
"name":"Top Growth By Group",
"description":"Show where growth of numeric value is highest by group",
"category":"Growth"
},
"output":[
"The top growth rate for <b>Close</b> is <b>19.64%</b> occurred for <b>Tesla</b> on <b>08 Mar 21</b>"
]
}
]
AI Summary
Generates AI Summary based on the Instant Insights for a widget.
Query: To get instant insights
GET /insights/aiSummary
Parameter | Comments |
---|---|
Context | Context is an optional parameter allowing users to add instructions in plain text to filter/enhance the response. |
Response
HTTP Status | Response |
---|---|
200 OK |
[ |
Example:
curl -i -X GET -H "Authorization: Bearer nKQW1W9aNE34TgBpJ0cXIgHlhD6Ble6Insjvip6h68iisie" 'http://knowi.com/api/1.0/widgets/26275/insights/aiSummary'
AI Set Suggestions
Sets suggestions automatically using the AI engine.
Query: Sets suggestions based on the widget ID
POST /insights/aiSetSuggestions
Response
HTTP Status | Response |
---|---|
200 OK |
Successful |
Example:
curl -i -X PUT -H "Authorization: Bearer nKQW1W9aNE34TgBpJ0cXIgHlhD6Ble6Insjvip6h68iisie" 'http://knowi.com/api/1.0/widgets/26275/insights/aiSuggestions'