You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: userguide/analytics/userguide_analytics.adoc
+33-5Lines changed: 33 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,10 +159,16 @@ The analytics plugin supports three types of reports as explained below:
159
159
[[installing_canned_reports]]
160
160
=== Installing Canned Reports
161
161
162
-
As explained earlier, we provide a set of canned reports that can be useful as a starting point. On non-Windows machines, these can be installed by running the https://github.com/killbill/killbill-analytics-plugin/blob/59c282f97960dc59b944ca33e17353bc19d7c842/src/main/resources/seed_reports.sh[seed_reports.sh] script. On Windows machines, you can install a report by opening the desired report sub-directory from the https://github.com/killbill/killbill-analytics-plugin/tree/master/src/main/resources/reports[reports] directory and creating the _view_, _stored procedure_ and _report_ as explained in the next section.
162
+
As explained earlier, we provide a set of canned reports that can be useful as a starting point. These reports are present in the https://github.com/killbill/killbill-analytics-plugin/tree/master/reports[reports] directory. The https://github.com/killbill/killbill-analytics-plugin/tree/master/reports/README.md#report_creation[README] provides further details and instructions on creating the reports.
163
163
164
-
[NOTE]
165
-
*Note:* The default views will use the converted amount columns when applicable, which require the `analytics_currency_conversion` table to be populated with currency conversion rates as explained in the <<currency_conversion, "Currency Conversion">> section. If you are only using one currency, use the non-converted columns instead (`next_mrr` instead of `converted_next_mrr` for example).
164
+
In addition, we also provide a https://github.com/killbill/killbill-analytics-plugin/tree/master/reports/reports_setup.sh[reports_setup.sh] script that installs all these reports. This script can be installed as follows:
165
+
166
+
[source, bash]
167
+
----
168
+
./setup_reports.sh
169
+
----
170
+
171
+
The https://github.com/killbill/killbill-analytics-plugin/blob/master/reports/README.md#report-script[README] provides further details about this script.
166
172
167
173
[[create_custom_reports]]
168
174
=== Creating Custom Reports
@@ -347,9 +353,9 @@ The following table lists all the report creation options. A subset of these opt
347
353
|refreshHourOfDayGmt |Hour of the day when the procedure will be executed.
348
354
|===
349
355
350
-
=== Other Report Operations
356
+
=== Report APIs
351
357
352
-
Once a report is created, you can perform several operations on it as explained below.
358
+
The Analytics plugin provides some APIs that can be used to perform report CRUD operations.
353
359
354
360
==== Retrieve Report Configuration
355
361
@@ -365,6 +371,28 @@ curl -u admin:password \
365
371
366
372
This returns the report configuration (`reportName`, `reportPrettyName`, etc. fields) for the `new_accounts_per_day` report.
367
373
374
+
==== Create a Report
375
+
376
+
You can create a report as follows:
377
+
378
+
[source,bash]
379
+
----
380
+
curl -v \
381
+
-X POST \
382
+
-u admin:password \
383
+
-H "X-Killbill-ApiKey:bob" \
384
+
-H "X-Killbill-ApiSecret:lazar" \
385
+
-H 'Content-Type: application/json' \
386
+
-d '{"reportName": "new_accounts_per_day",
387
+
"reportPrettyName": "New accounts created (per day)",
0 commit comments