diff --git a/docs/appbase/app.md b/docs/appbase/app.md index fb73a60885256e6f0b17eb65fdc75b3f157328d5..2275124d98c2476346df205a4e935df9dc158013 100644 --- a/docs/appbase/app.md +++ b/docs/appbase/app.md @@ -19,7 +19,7 @@ The above commands will only give basic details of the app such as its name, ID, If you want more details such as credentials and metrics, you can pass in defined switches. The full version of `app` command looks like- ```sh -abc app [-c|--creds] [-m|--metrics] [ID|Appname] +abc app [-c|--creds] [-m|--metrics] [-a| --analytics] [ID|Appname] ``` #### Example @@ -48,3 +48,62 @@ Records: 42 ``` ⭐️ It shows API calls and number of records created on a per day basis (just like the graph you see on dashboard.appbase.io). + + +### Accessing app analytics (only for paid users) + +Paid users can access analytics data for a particular app. Currently the following analytics endpoints are supported: +- overview +- noresultsearches +- popularresults +- popularsearches +- popularfilters +- geoip +- latency + +#### Example + +By default the command will ping the overview endpoint + +```sh +> abc app -a MyCoolApp + +Analytics(Overview) Results: +No Result Searches ++-------+------+ +| COUNT | KEY | ++-------+------+ +| 1 | blah | +| 1 | gurr | ++-------+------+ +No Result Searches ++-------+--------------+ +| COUNT | KEY | ++-------+--------------+ +| 1 | gru | +| ... | ... | +| 1 | wonder woman | +| 1 | wonderland | ++-------+--------------+ +Search Volume Results ++-------+---------------+---------------------+ +| COUNT | KEY | DATE-AS-STR | ++-------+---------------+---------------------+ +| 7 | 1540512000000 | 2018/10/26 00:00:00 | ++-------+---------------+---------------------+ +``` + +To ping other analytics endpoints the `endpoint` flag can be used. For example + +```sh +> abc app -a --endpoint=latency MyCoolApp + +Analytics(Latency) Results: ++-------+-----+ +| COUNT | KEY | ++-------+-----+ +| 2 | 0 | +| .. | .. | +| 0 | 10 | ++-------+-----+ +``` \ No newline at end of file