-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Research drill-down analytics endpoint #2090
Comments
Tried to send request https://nightly.apinf.io:3002/api-umbrella/v1/analytics/drilldown?api_key= |
Please avoid publishing your administrative credentials openly, e.g. on Github. API Umbrella needs two credentials when calling the Admin API:
|
@brylie I sent my credentials via headers and the response was the same |
OK, I will try too. |
What values did you use for the URL parameters:
|
@brylie I used REST client in my IDE. ParametersHTTP method: GET
Request Parameters:
|
And for |
It's not required field. Anyway I added |
Were you getting a 406 error before adding the |
Nope.
|
In other words, we are probably getting closer now, since you have gone from a 500 error to a 406 error. Try tweaking the parameter values now, changing their formatting. If needed, open an upstream support request, so @GUI can help us figure this out. |
Parametersprefix is Result{
"results":[
],
"hits_over_time":{
"cols":[
{
"id":"date",
"label":"Date",
"type":"datetime"
}
],
"rows":[
{
"c":[
{
"v":1482710400000,
"f":"Dec 26, 2016 - Jan 1, 2017"
}
]
},
{
"c":[
{
"v":1483315200000,
"f":"Jan 2, 2017 - Jan 8, 2017"
}
]
},
{
"c":[
{
"v":1483920000000,
"f":"Jan 9, 2017 - Jan 15, 2017"
}
]
},
{
"c":[
{
"v":1484524800000,
"f":"Jan 16, 2017 - Jan 22, 2017"
}
]
},
{
"c":[
{
"v":1485129600000,
"f":"Jan 23, 2017 - Jan 29, 2017"
}
]
},
{
"c":[
{
"v":1485734400000,
"f":"Jan 30, 2017 - Jan 31, 2017"
}
]
}
]
},
"breadcrumbs":[
{
"crumb":"All Hosts",
"prefix":"0/"
},
{
"crumb":"users",
"prefix":"1/users/"
}
]
} |
ParameterSprecify prefix that doesn't exist. I used Result{
"results":[
],
"hits_over_time":{
"cols":[
{
"id":"date",
"label":"Date",
"type":"datetime"
}
],
"rows":[
{
"c":[
{
"v":1482710400000,
"f":"Dec 26, 2016 - Jan 1, 2017"
}
]
},
{
"c":[
{
"v":1483315200000,
"f":"Jan 2, 2017 - Jan 8, 2017"
}
]
},
{
"c":[
{
"v":1483920000000,
"f":"Jan 9, 2017 - Jan 15, 2017"
}
]
},
{
"c":[
{
"v":1484524800000,
"f":"Jan 16, 2017 - Jan 22, 2017"
}
]
},
{
"c":[
{
"v":1485129600000,
"f":"Jan 23, 2017 - Jan 29, 2017"
}
]
},
{
"c":[
{
"v":1485734400000,
"f":"Jan 30, 2017 - Jan 31, 2017"
}
]
}
]
},
"breadcrumbs":[
{
"crumb":"All Hosts",
"prefix":"0/"
}
]
} |
Although, this leaves us scratching our heads and asking "Where are the counts?". "c":[
{
"v":1485734400000, // <-- unix timestamp?
"f":"Jan 30, 2017 - Jan 31, 2017"// <-- date range
}
] My guess is the above example has no hits in that date range. |
Lets see how these queries work on frontend prefixes with existing data. |
Look at first report. Now I'm going to test params as |
I found issue NREL/api-umbrella#275 |
Parameters
Result{
"results":[
{
"depth":0,
"path":"nightly.apinf.io:3002/",
"terminal":false,
"descendent_prefix":"1/nightly.apinf.io:3002/",
"hits":534
},
{
"depth":0,
"path":"nightly.apinf.io:3002",
"terminal":true,
"descendent_prefix":"1/nightly.apinf.io:3002",
"hits":7
}
],
"hits_over_time":{
"cols":[
{
"id":"date",
"label":"Date",
"type":"datetime"
},
{
"id":"0/nightly.apinf.io:3002/",
"label":"nightly.apinf.io:3002/",
"type":"number"
},
{
"id":"0/nightly.apinf.io:3002",
"label":"nightly.apinf.io:3002",
"type":"number"
}
],
"rows":[
{
"c":[
{
"v":1485907200000,
"f":"Wed, Feb 1, 2017"
},
{
"v":6,
"f":"6"
},
{
"v":0,
"f":"0"
}
]
},
{
"c":[
{
"v":1485993600000,
"f":"Thu, Feb 2, 2017"
},
{
"v":30,
"f":"30"
},
{
"v":1,
"f":"1"
}
]
},
{
"c":[
{
"v":1486080000000,
"f":"Fri, Feb 3, 2017"
},
{
"v":13,
"f":"13"
},
{
"v":0,
"f":"0"
}
]
},
{
"c":[
{
"v":1486166400000,
"f":"Sat, Feb 4, 2017"
},
{
"v":0,
"f":"0"
},
{
"v":0,
"f":"0"
}
]
},
{
"c":[
{
"v":1486252800000,
"f":"Sun, Feb 5, 2017"
},
{
"v":0,
"f":"0"
},
{
"v":0,
"f":"0"
}
]
},
{
"c":[
{
"v":1486339200000,
"f":"Mon, Feb 6, 2017"
},
{
"v":25,
"f":"25"
},
{
"v":1,
"f":"1"
}
]
},
{
"c":[
{
"v":1486425600000,
"f":"Tue, Feb 7, 2017"
},
{
"v":214,
"f":"214"
},
{
"v":2,
"f":"2"
}
]
},
{
"c":[
{
"v":1486512000000,
"f":"Wed, Feb 8, 2017"
},
{
"v":53,
"f":"53"
},
{
"v":1,
"f":"1"
}
]
},
{
"c":[
{
"v":1486598400000,
"f":"Thu, Feb 9, 2017"
},
{
"v":193,
"f":"193"
},
{
"v":2,
"f":"2"
}
]
}
]
},
"breadcrumbs":[
{
"crumb":"All Hosts",
"prefix":"0/"
}
]
} |
Cool, thanks. Strange looking structure! |
I researched another thing. Not so useful but I'd like to notice "results":[
{
"depth":0,
"path":"nightly.apinf.io:3002/",
"terminal":false,
"descendent_prefix":"1/nightly.apinf.io:3002/",
"hits":534
},
{
"depth":0,
"path":"nightly.apinf.io:3002",
"terminal":true,
"descendent_prefix":"1/nightly.apinf.io:3002",
"hits":7
}
] When the "results":[
{
"depth":1,
"path":"nightly.apinf.io:3002/api-umbrella/",
"terminal":false,
"descendent_prefix":"2/nightly.apinf.io:3002/api-umbrella/",
"hits":305
},
{
"depth":1,
"path":"nightly.apinf.io:3002/admin",
"terminal":true,
"descendent_prefix":"2/nightly.apinf.io:3002/admin",
"hits":43
},
{
"depth":1,
"path":"nightly.apinf.io:3002/assets/",
"terminal":false,
"descendent_prefix":"2/nightly.apinf.io:3002/assets/",
"hits":37
},
{
"depth":1,
"path":"nightly.apinf.io:3002/web-assets/",
"terminal":false,
"descendent_prefix":"2/nightly.apinf.io:3002/web-assets/",
"hits":34
},
{
"depth":1,
"path":"nightly.apinf.io:3002/admins/",
"terminal":false,
"descendent_prefix":"2/nightly.apinf.io:3002/admins/",
"hits":26
},
{
"depth":1,
"path":"nightly.apinf.io:3002/admin/",
"terminal":false,
"descendent_prefix":"2/nightly.apinf.io:3002/admin/",
"hits":16
},
{
"depth":1,
"path":"nightly.apinf.io:3002/favicon.ico",
"terminal":true,
"descendent_prefix":"2/nightly.apinf.io:3002/favicon.ico",
"hits":14
},
{
"depth":1,
"path":"nightly.apinf.io:3002/index.ru.js",
"terminal":true,
"descendent_prefix":"2/nightly.apinf.io:3002/index.ru.js",
"hits":10
},
{
"depth":1,
"path":"nightly.apinf.io:3002/api/",
"terminal":false,
"descendent_prefix":"2/nightly.apinf.io:3002/api/",
"hits":8
},
{
"depth":1,
"path":"nightly.apinf.io:3002/index.css",
"terminal":true,
"descendent_prefix":"2/nightly.apinf.io:3002/index.css",
"hits":8
},
{
"depth":1,
"path":"nightly.apinf.io:3002/index0.css",
"terminal":true,
"descendent_prefix":"2/nightly.apinf.io:3002/index0.css",
"hits":8
},
{
"depth":1,
"path":"nightly.apinf.io:3002/proxy_base_path/",
"terminal":false,
"descendent_prefix":"2/nightly.apinf.io:3002/proxy_base_path/",
"hits":8
},
{
"depth":1,
"path":"nightly.apinf.io:3002/proxy_baset_path/",
"terminal":false,
"descendent_prefix":"2/nightly.apinf.io:3002/proxy_baset_path/",
"hits":4
},
{
"depth":1,
"path":"nightly.apinf.io:3002/docs",
"terminal":true,
"descendent_prefix":"2/nightly.apinf.io:3002/docs",
"hits":3
},
{
"depth":1,
"path":"nightly.apinf.io:3002/signup",
"terminal":true,
"descendent_prefix":"2/nightly.apinf.io:3002/signup",
"hits":3
},
{
"depth":1,
"path":"nightly.apinf.io:3002/ftu5iurutrf1jzoyga7ty961yx3qbrbsjrucnrvy",
"terminal":true,
"descendent_prefix":"2/nightly.apinf.io:3002/ftu5iurutrf1jzoyga7ty961yx3qbrbsjrucnrvy",
"hits":2
},
{
"depth":1,
"path":"nightly.apinf.io:3002/newfieldstest",
"terminal":true,
"descendent_prefix":"2/nightly.apinf.io:3002/newfieldstest",
"hits":2
},
{
"depth":1,
"path":"nightly.apinf.io:3002/proxy_base_path",
"terminal":true,
"descendent_prefix":"2/nightly.apinf.io:3002/proxy_base_path",
"hits":2
},
{
"depth":1,
"path":"nightly.apinf.io:3002/docs/",
"terminal":false,
"descendent_prefix":"2/nightly.apinf.io:3002/docs/",
"hits":1
}
] And yes, the |
Tested some of ElasticSearch fields:
For using a few
Couldn't make to correct work this parameter so I wrote in the issue: NREL/api-umbrella#275 (comment) |
@marla-singer Thanks for the research. Closing the issue. |
@bajiat I'd like to add couple moments which I found during research for 2115 Using drill-down request
{ "condition":"AND",
"rules":[{
"id":"request_path",
"field":"request_path",
"type":"string",
"input":"text",
"operator":"begins_with",
"value":"/foo/bar"
}]
} (or couser, body must has encoded format) Using response
{
"c":[
{
"v":1483228800000,
"f":"Jan 1, 2017 - Jan 31, 2017"
},
{
"v":35,
"f":"35"
}
]
}, |
Related to #2036
Test the data available from the API Umbrella 0.13 Admin API analytics endpoint. Select one of the testing deployments (nightly, staging) and apis to which there have been calls.
See documentation from about the Admin API from http://api-umbrella.readthedocs.io/en/latest/admin/api.html. Go to Analytics.
Definition of done
You can document your findings as part of this issue.
Add also the response objects as part of documentation.
Research
Parameters
If you have 500 error
Make sure you send all required fields and all headers are correct
If you have 406 error
Make sure your request path as
.json
in the endThe text was updated successfully, but these errors were encountered: