diff --git a/source/account.html.md b/source/account.html.md
index 15bd0a9..c89e35f 100644
--- a/source/account.html.md
+++ b/source/account.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/admin.html.md b/source/admin.html.md
index 4ea6f84..3c14597 100644
--- a/source/admin.html.md
+++ b/source/admin.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/aviate-catalog-apis.html.md b/source/aviate-catalog-apis.html.md
index 1fc5412..386d6ae 100644
--- a/source/aviate-catalog-apis.html.md
+++ b/source/aviate-catalog-apis.html.md
@@ -26,7 +26,8 @@ menu_items:
- admin
- security
- aviate-catalog-apis
-
+ - aviate-health-apis
+
title: Kill Bill
language_tabs:
diff --git a/source/aviate-health-apis.html.md b/source/aviate-health-apis.html.md
new file mode 100644
index 0000000..d67152e
--- /dev/null
+++ b/source/aviate-health-apis.html.md
@@ -0,0 +1,48 @@
+---
+includes:
+ - aviate-health-apis
+
+current_page: aviate-health-apis
+
+menu_items:
+ - index
+ - tenant
+ - catalog
+ - account
+ - payment-method
+ - subscription
+ - bundle
+ - invoice
+ - invoice-item
+ - credit
+ - payment
+ - payment-transaction
+ - invoice-payment
+ - usage
+ - custom-field
+ - tag
+ - tag-definition
+ - export
+ - admin
+ - security
+ - aviate-catalog-apis
+ - aviate-health-apis
+
+title: Kill Bill
+
+language_tabs:
+ - shell
+ - java
+ - ruby
+ - python
+ - javascript
+ - php
+
+toc_footers:
+ - Report a doc problem
+
+search: true
+
+code_clipboard: true
+
+---
\ No newline at end of file
diff --git a/source/bundle.html.md b/source/bundle.html.md
index 8e82e47..aee4476 100644
--- a/source/bundle.html.md
+++ b/source/bundle.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/catalog.html.md b/source/catalog.html.md
index 9670898..87c20f3 100644
--- a/source/catalog.html.md
+++ b/source/catalog.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/credit.html.md b/source/credit.html.md
index 3a07fa1..d10c9f4 100644
--- a/source/credit.html.md
+++ b/source/credit.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/custom-field.html.md b/source/custom-field.html.md
index a6fd9c5..a3b6e88 100644
--- a/source/custom-field.html.md
+++ b/source/custom-field.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/export.html.md b/source/export.html.md
index 87d0aff..a19eea8 100644
--- a/source/export.html.md
+++ b/source/export.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/includes/_aviate-health-apis.md b/source/includes/_aviate-health-apis.md
new file mode 100644
index 0000000..00fc465
--- /dev/null
+++ b/source/includes/_aviate-health-apis.md
@@ -0,0 +1,628 @@
+# Aviate Health APIs
+
+The Aviate Health feature provides several endpoints that allow you to view the health of your KillBill system and fix problems if any. This section documents the APIs exposed by the Aviate Health feature.
+
+## Models
+
+### SamplesForSampleKindAndHost
+
+It has the following fields:
+
+
+| Name | Type | Generated by | Description |
+|-------------------------------|--------|--------------|-----------------------------|
+| **nodeName** | string | system | Node name |
+| **eventGroup** | string | system | Event Group |
+| **eventCategory** | string | system | Event Category |
+| **sampleKind** | string | system | Sample Kind |
+| **sampleSerializationFormat** | string | system | Sample Serialization Format |
+| **samples** | string | system | Samples |
+
+
+### HealthData
+
+Represents HealthData. It has the following fields:
+
+| Name | Type | Generated by | Description |
+|-------------------------|-----------------------|--------------|---------------------------------------------------------|
+| **nodeInfos** | List of NodeInfo | system | Details on all nodes in the Kill Bill cluster. |
+| **parkedAccounts** | List of ParkedAccount | system | Parked accounts (limit 50), if any. |
+| **lateBusEvents** | List of BusEvent | system | Bus events that need processing (limit 100), if any. |
+| **lateNotifications** | List of Notification | system | Notifications that need processing (limit 100), if any. |
+| **recentBusEvents** | List of BusEvent | system | Recent bus events that were processed (limit 100). |
+| **recentNotifications** | List of Notification | system | Recent notifications that were processed (limit 100). |
+| **recentAccessLogs** | List of AccessLog | system | Recent HTTP requests from all nodes (at most 2 days). |
+
+### AccessLog
+
+Represents an Access Log. Captures information about the recent requests made to KB. It has the following fields:
+
+| Name | Type | Generated by | Description |
+|-----------------------------|--------|--------------|----------------------------------------|
+| **nodeName** | string | system | Node name |
+| **hostName** | string | system | Host name |
+| **timeStamp** | string | system | Datetime at which the request was made |
+| **method** | string | system | HTTP method used |
+| **uri** | string | system | Requested URI |
+| **statusCode** | string | system | Status code returned |
+| **bytesSent** | string | system | Number of bytes sent |
+
+### Notification
+
+Represents a notification from the KB `notifications` table. It has the following fields:
+
+| Name | Type | Generated by | Description |
+|-----------------------------|--------|--------------|----------------------------------------------------------------------------------------------------|
+| **recordId** | string | system | Record id |
+| **className** | string | system | Class name |
+| **eventJson** | string | system | Event JSON |
+| **userToken** | string | system | User token |
+| **createdDate** | string | system | DateTime the notification was created |
+| **creatingOwner** | string | system | Creating Owner |
+| **processingOwner** | string | system | Processing Owner |
+| **processingAvailableDate** | string | system | DateTime the notification becomes available for processing |
+| **processingState** | string | system | Processing State (One of `AVAILABLE`, `IN_PROCESSING`, `PROCESSED`, `REMOVED`, `FAILED`, `REAPED`) |
+| **errorCount** | string | system | Error Count |
+| **searchKey1** | string | system | Search Key 1 |
+| **searchKey2** | string | system | Search Key 2 |
+| **queueName** | string | system | Queue Name |
+| **effectiveDate** | string | system | Effective Date |
+| **futureUserToken** | string | system | Future User Token |
+
+### BusEvent
+
+Represents a Bus event from the KB `bus_events` table. It has the following fields:
+
+| Name | Type | Generated by | Description |
+|-----------------------------|--------|--------------|----------------------------------------------------------------------------------------------------|
+| **recordId** | string | system | Record id |
+| **className** | string | system | Class name |
+| **eventJson** | string | system | Event JSON |
+| **userToken** | string | system | User token |
+| **createdDate** | string | system | DateTime the bus event was created |
+| **creatingOwner** | string | system | Creating Owner |
+| **processingOwner** | string | system | Processing Owner |
+| **processingAvailableDate** | string | system | DateTime the bus event becomes available for processing |
+| **processingState** | string | system | Processing State (One of `AVAILABLE`, `IN_PROCESSING`, `PROCESSED`, `REMOVED`, `FAILED`, `REAPED`) |
+| **errorCount** | string | system | Error Count |
+| **searchKey1** | string | system | Search Key 1 |
+| **searchKey2** | string | system | Search Key 2 |
+
+### NodeInfo
+
+Represents information about a KB node. It has the following fields:
+
+| Name | Type | Generated by | Description |
+|----------------------|---------------------------|--------------|-------------------|
+| **time** | int | system | Time |
+| **kbClock** | string | system | TODO |
+| **nodeName** | string | system | Node Name |
+| **bootTime** | string | system | Boot Time |
+| **lastUpdatedDate** | string | system | Last Updated Date |
+| **killbillVersion** | string | system | KB version |
+| **apiVersion** | string | system | killbill-api version |
+| **platformVersion** | string | system | killbill-platform version |
+| **commonVersion** | string | system | killbill-commons version |
+| **pluginApiVersion** | string | system | killbill-plugin-api version |
+| **pluginInfos** | List of PluginInfo | system | Information about plugins on a node |
+
+### PluginInfo
+
+Represents information about a plugin. It has the following fields:
+
+| Name | Type | Generated by | Description |
+|-----------------------------|----------|--------------------------------------------|------------------------------------------|
+| **pluginKey** | string | system | Plugin Key |
+| **bundleSymbolicName** | string | system | Bundle Symbolic Name |
+| **pluginName** | string | system | Plugin Name |
+| **version** | string | system | Plugin Version |
+| **pluginState** | string | system | Plugin State |
+| **isSelectedForStart** | boolean | system | Flag that indicates if plugin is started |
+| **services** | List of PluginServiceInfo | Information about services within a plugin |
+
+### PluginServiceInfo
+
+Represents information about services offered by a plugin. It has the following fields:
+
+| Name | Type | Generated by | Description |
+|------------------------|----------|----------------------------------|--------------------------|
+| **serviceTypeName** | string | system | Service Type |
+| **registrationName** | string | system | Bundle Registration Name |
+
+
+## Endpoints
+
+### Retrieve Health Data
+
+Return the current HealthData report. It is meant to show the current health of the cluster, show debugging information, and draw attention to potential problems.
+
+//TODO - mention about com.killbill.billing.plugin.aviate.lockSleepMilliSeconds??
+
+**HTTP Request**
+
+`GET /plugins/aviate-plugin/v1/health/data`
+
+> Example Request:
+
+```shell
+curl -X GET \
+ -H 'Authorization: Bearer ${ID_TOKEN}' \
+ -H 'X-killbill-apiKey: bob' \
+ -H 'X-killbill-apisecret: lazar' \
+ http://127.0.0.1:8080/plugins/aviate-plugin/v1/health/data
+```
+
+```java
+```
+
+```ruby
+```
+
+```python
+```
+
+````php
+````
+
+````javacript
+````
+
+> Example Response:
+
+```json
+{
+ "nodeInfos": [
+ {
+ "time": 1732797874123,
+ "kbClock": "2024-11-28T12:44:34.076252400",
+ "nodeName": "DESKTOP-NCUS49R",
+ "bootTime": "2024-11-28T12:37:23.000Z",
+ "lastUpdatedDate": "2024-11-28T12:37:23.000Z",
+ "killbillVersion": "0.24.12-SNAPSHOT",
+ "apiVersion": "0.54.0",
+ "platformVersion": "0.41.11",
+ "commonVersion": "0.26.4",
+ "pluginApiVersion": "0.27.3",
+ "pluginInfos": [
+ {
+ "pluginKey": "aviate",
+ "bundleSymbolicName": "com.kill-bill.billing.plugin.java.aviate-plugin",
+ "pluginName": "aviate-plugin",
+ "version": "1.0.13-SNAPSHOT",
+ "pluginState": "RUNNING",
+ "isSelectedForStart": true,
+ "services": [
+ {
+ "serviceTypeName": "org.killbill.billing.osgi.api.Healthcheck",
+ "registrationName": "aviate-plugin"
+ },
+ {
+ "serviceTypeName": "javax.servlet.Servlet",
+ "registrationName": "aviate-plugin"
+ }
+ ]
+ },
+ {
+ "pluginKey": "",
+ "bundleSymbolicName": "org.kill-bill.billing.killbill-platform-osgi-bundles-kpm",
+ "pluginName": "org.kill-bill.billing.killbill-platform-osgi-bundles-kpm",
+ "version": "",
+ "pluginState": "RUNNING",
+ "isSelectedForStart": true,
+ "services": []
+ },
+ {
+ "pluginKey": "",
+ "bundleSymbolicName": "org.kill-bill.billing.killbill-platform-osgi-bundles-logger",
+ "pluginName": "org.kill-bill.billing.killbill-platform-osgi-bundles-logger",
+ "version": "",
+ "pluginState": "RUNNING",
+ "isSelectedForStart": true,
+ "services": []
+ },
+ {
+ "pluginKey": "",
+ "bundleSymbolicName": "org.kill-bill.billing.killbill-platform-osgi-bundles-metrics",
+ "pluginName": "org.kill-bill.billing.killbill-platform-osgi-bundles-metrics",
+ "version": "",
+ "pluginState": "RUNNING",
+ "isSelectedForStart": true,
+ "services": []
+ },
+ {
+ "pluginKey": "",
+ "bundleSymbolicName": "org.kill-bill.billing.plugin.java.stripe-plugin",
+ "pluginName": "stripe-plugin",
+ "version": "8.0.1",
+ "pluginState": "RUNNING",
+ "isSelectedForStart": true,
+ "services": [
+ {
+ "serviceTypeName": "org.killbill.billing.payment.plugin.api.PaymentPluginApi",
+ "registrationName": "killbill-stripe"
+ },
+ {
+ "serviceTypeName": "org.killbill.billing.osgi.api.Healthcheck",
+ "registrationName": "killbill-stripe"
+ },
+ {
+ "serviceTypeName": "javax.servlet.Servlet",
+ "registrationName": "killbill-stripe"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "parkedAccounts": [],
+ "lateBusEvents": [
+ {
+ "recordId": 1,
+ "className": "org.killbill.billing.tenant.api.user.DefaultTenantConfigChangeInternalEvent",
+ "eventJson": "{\"id\":\"85edc9d5-8683-434f-bfd5-ef2ebd7ab9b3\",\"key\":\"CATALOG\",\"searchKey1\":null,\"searchKey2\":1,\"userToken\":\"c4fe88f8-36c3-461d-8ace-0f0a7efc1a42\"}",
+ "userToken": "c4fe88f8-36c3-461d-8ace-0f0a7efc1a42",
+ "createdDate": "2024-01-30T06:38:25.000Z",
+ "creatingOwner": "DESKTOP-NCUS49R",
+ "processingOwner": "",
+ "processingAvailableDate": "2024-01-30T06:38:25.000Z",
+ "processingState": "PROCESSED",
+ "errorCount": 0,
+ "searchKey1": 0,
+ "searchKey2": 1
+ }
+ ],
+ "lateNotifications": [],
+ "recentBusEvents": [
+ {
+ "recordId": 184174,
+ "className": "org.killbill.billing.util.broadcast.DefaultBroadcastInternalEvent",
+ "eventJson": "{\"serviceName\":\"broadcast-service\",\"type\":\"START_PLUGIN\",\"jsonEvent\":\"{\\\"pluginKey\\\":\\\"aviate\\\",\\\"pluginName\\\":null,\\\"pluginVersion\\\":\\\"1.0.13-d197203\\\",\\\"properties\\\":[{\\\"key\\\":\\\"kbVersion\\\",\\\"value\\\":\\\"0.24.12-SNAPSHOT\\\"}]}\",\"searchKey1\":null,\"searchKey2\":0,\"userToken\":null}",
+ "userToken": "",
+ "createdDate": "2024-11-28T04:21:37.000Z",
+ "creatingOwner": "DESKTOP-NCUS49R",
+ "processingOwner": "",
+ "processingAvailableDate": "2024-11-28T04:21:37.000Z",
+ "processingState": "PROCESSED",
+ "errorCount": 0,
+ "searchKey1": 0,
+ "searchKey2": 0
+ },
+ {
+ "recordId": 184173,
+ "className": "org.killbill.billing.util.broadcast.DefaultBroadcastInternalEvent",
+ "eventJson": "{\"serviceName\":\"broadcast-service\",\"type\":\"INSTALL_PLUGIN\",\"jsonEvent\":\"{\\\"pluginKey\\\":\\\"aviate\\\",\\\"pluginName\\\":null,\\\"pluginVersion\\\":\\\"1.0.13-d197203\\\",\\\"properties\\\":[{\\\"key\\\":\\\"pluginUri\\\",\\\"value\\\":\\\"https://dl.cloudsmith.io/Y9NsUe0Lb5JBOnwf/killbill/aviate/maven/com/kill-bill/billing/plugin/java/aviate-plugin/1.0.13-d197203/aviate-plugin-1.0.13-d197203.jar\\\"},{\\\"key\\\":\\\"pluginType\\\",\\\"value\\\":\\\"java\\\"},{\\\"key\\\":\\\"kbVersion\\\",\\\"value\\\":\\\"0.24.12-SNAPSHOT\\\"}]}\",\"searchKey1\":null,\"searchKey2\":0,\"userToken\":null}",
+ "userToken": "",
+ "createdDate": "2024-11-28T04:21:32.000Z",
+ "creatingOwner": "DESKTOP-NCUS49R",
+ "processingOwner": "",
+ "processingAvailableDate": "2024-11-28T04:21:32.000Z",
+ "processingState": "PROCESSED",
+ "errorCount": 0,
+ "searchKey1": 0,
+ "searchKey2": 0
+ }
+ ],
+ "recentAccessLogs": [
+ {
+ "nodeName": "DESKTOP-NCUS49R",
+ "hostName": "127.0.0.1",
+ "timestamp": "27/Nov/2024:10:58:21 +0530",
+ "method": "GET",
+ "uri": "/1.0/kb/security/subject",
+ "statusCode": "401",
+ "bytesSent": "-"
+ },
+ {
+ "nodeName": "DESKTOP-NCUS49R",
+ "hostName": "127.0.0.1",
+ "timestamp": "27/Nov/2024:10:58:34 +0530",
+ "method": "GET",
+ "uri": "/1.0/kb/security/permissions",
+ "statusCode": "200",
+ "bytesSent": "7"
+ }
+ ]
+}
+```
+
+**Request Body**
+
+None
+
+**Query Parameters**
+
+None
+
+**Response**
+
+If successful, returns a `HealthData` object.
+
+### Retrieve Host Samples
+
+Returns metrics data for dashboards.
+
+//TODO add more information here
+
+
+**HTTP Request**
+
+`GET /plugins/aviate-plugin/v1/health/host_samples`
+
+> Example Request:
+
+```shell
+curl -X GET \
+ -H 'Content-Type: application/json' \
+ -H 'Authorization: Bearer ${ID_TOKEN}' \
+ -H 'X-killbill-apiKey: bob' \
+ -H 'X-killbill-apisecret: lazar' \
+ http://127.0.0.1:8080/plugins/aviate-plugin/v1/health/host_samples?group=shiro.pool.Wait&from=2024-01-01T00:00:00&to=2025-03-14T00:00:00
+```
+
+```java
+```
+
+```ruby
+```
+
+```python
+```
+
+````php
+````
+
+````javacript
+````
+
+> Example Response:
+
+TODO
+
+
+**Request Body**
+
+None
+
+**Query Parameters**
+
+| Name | Type | Required | Default | Description |
+|------------------------|----------------|----------|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+| **startTimeParameter** | string | false | none | Start time for the samples |
+| **endTimeParameter** | string | false | Current time | End time for the samples |
+| **hostNames** | List of String | false | None | List of host names. Multiple host names can be specified by specifying a separate `hostNames` parameter corresponding to each host |
+| **group** | string | false | None | Event group for the requested sample kinds |
+| **category_and_sample_kind** | List of String | false | None | List of samples kinds (format: category,sample_kind). Multiple category and sample kinds can be specified by specifying a separate `category_and_sample_kind` parameter corresponding to each value |
+| **granularity** | SampleGranularity | false | None | Granularity (One of `SECOND`, `MINUTE`, `HOUR`, `DAY`) |
+
+**Response**
+
+If successful, returns a status code of 200 and the requested host data.
+
+
+// ### Fix Parked Accounts - This method is not implemented in the code, so not documenting it
+
+### Fix Stuck Bus Entries
+
+Fixes stuck bus entries. Basically sets the `creating_owner`, `processing_owner`, `processing_avialable_date`, `processing_state`, `error_count` fields to `null` in the `bus_events` table for the specified recordIds.
+
+**HTTP Request**
+
+`PUT /plugins/aviate-plugin/v1/health/bus/fixup`
+
+> Example Request:
+
+```shell
+curl -X PUT \
+ -H 'Content-Type: application/json' \
+ -H 'Authorization: Bearer ${ID_TOKEN}' \
+ -H 'X-killbill-apiKey: bob' \
+ -H 'X-killbill-apisecret: lazar' \
+ -d '[1,2]' \
+ http://127.0.0.1:8080/plugins/aviate-plugin/v1/health/bus/fixup
+```
+
+```java
+```
+
+```ruby
+```
+
+```python
+```
+
+````php
+````
+
+````javacript
+````
+
+**Request Body**
+
+A List of `recordId` values from the `bus_events` table that need to be fixed.
+
+**Query Parameters**
+
+None
+
+**Response**
+
+If successful, returns a status code of 200 and an empty body.
+
+
+### Fix Stuck Notification Entries
+
+Fixes stuck notification entries. Basically sets the `creating_owner`, `processing_owner`, `processing_avialable_date`, `processing_state`, `error_count`, `effective_date` fields to `null` in the `notifications` table for the specified recordIds.
+
+**HTTP Request**
+
+`PUT /plugins/aviate-plugin/v1/health/notifications/fixup`
+
+> Example Request:
+
+```shell
+curl -X PUT \
+ -H 'Content-Type: application/json' \
+ -H 'Authorization: Bearer ${ID_TOKEN}' \
+ -H 'X-killbill-apiKey: bob' \
+ -H 'X-killbill-apisecret: lazar' \
+ -d '[1,2]' \
+ http://127.0.0.1:8080/plugins/aviate-plugin/v1/health/notifications/fixup
+```
+
+```java
+```
+
+```ruby
+```
+
+```python
+```
+
+````php
+````
+
+````javacript
+````
+
+**Request Body**
+
+A List of `recordId` values from the `notifications` table that need to be fixed.
+
+**Query Parameters**
+
+None
+
+**Response**
+
+If successful, returns a status code of 200 and an empty body.
+
+### Retrieve Diagnostic Report
+
+This endpoint generates a diagnostic report. The report includes logs, tenant config, Kill Bill & system config, and account data, similar to the [kpm diagnostic tool](https://docs.killbill.io/latest/how-to-use-kpm-diagnostic), either as JSON or as a ZIP file.
+
+A few pointers:
+
+* if the `-H "Accept: application/zip" header is specified`, creates a zip file
+* At least one query parameter needs to be specified, otherwise an empty response is returned.
+* HealthData and logs are returned only when the `-H "Accept: application/zip"` header is specified
+* Logs from only a single node will be included
+
+**HTTP Request**
+
+`GET /plugins/aviate-plugin/v1/health/diagnostic`
+
+> Example Request:
+
+```shell
+## Example 1 - Returns data for the specified account in JSON format
+curl -X GET \
+ -H 'Authorization: Bearer ${ID_TOKEN}' \
+ -H 'X-killbill-apiKey: bob' \
+ -H 'X-killbill-apisecret: lazar' \
+ http://127.0.0.1:8080/plugins/aviate-plugin/v1/health/diagnostic?accountId=af65531a-fc2e-43cd-8af1-6ec0709d9700
+
+## Example 2 - Creates a zip file. Includes account information, Kill Bill configuration data and tenant configuration data
+curl -X GET \
+ -H 'Authorization: Bearer ${ID_TOKEN}' \
+ -H 'X-killbill-apiKey: bob' \
+ -H 'X-killbill-apisecret: lazar' \
+ -H "Accept: application/zip" \
+ "http://127.0.0.1:8080/plugins/aviate-plugin/v1/health/diagnostic?accountId=af65531a-fc2e-43cd-8af1-6ec0709d9700&withKillbillConfig=true&withTenantConfig=true" -JO
+
+## Example 3 - Creates a zip file. Includes account information and the catalina.2024-11-27.log and localhost_access_log.2024-11-27.txt logs from the Tomcat directory.
+curl -X GET \
+ -H 'Authorization: Bearer ${ID_TOKEN}' \
+ -H 'X-killbill-apiKey: bob' \
+ -H 'X-killbill-apisecret: lazar' \
+ -H "Accept: application/zip" \
+ "http://127.0.0.1:8080/plugins/aviate-plugin/v1/health/diagnostic?accountId=68704a87-23d8-46db-a1ba-310daa8e1f4f&withLogs=true&logsFilenames=catalina.2024-11-27.log&logsFilenames=localhost_access_log.2024-11-27.txt" -JO
+
+## Example 4- Creates a zip file. Includes account information and the killbill.out/kaui.out log files from the /var/lib/killbill/logs directory.
+curl -X GET \
+ -H 'Authorization: Bearer ${ID_TOKEN}' \
+ -H 'X-killbill-apiKey: bob' \
+ -H 'X-killbill-apisecret: lazar' \
+ -H "Accept: application/zip" \
+ "http://127.0.0.1:8080/plugins/aviate-plugin/v1/health/diagnostic?accountId=68704a87-23d8-46db-a1ba-310daa8e1f4f&withLogs=true&logsDir=/var/lib/killbill/logs&logsFilenames=killbill.out&logsFilenames=kaui.out" -JO
+```
+
+```java
+```
+
+```ruby
+```
+
+```python
+```
+
+````php
+````
+
+````javacript
+````
+
+> Example Response:
+
+```json
+{
+ "account.data": "-- account_history record_id|id|target_record_id|external_key|email|name|first_name_length|currency|billing_cycle_day_local|parent_account_id|is_payment_delegated_to_parent|payment_method_id|reference_time|time_zone|locale|address1|address2|company_name|city|state_or_province|country|postal_code|phone|notes|migrated|change_type|created_by|created_date|updated_by|updated_date|tenant_record_id\n12999|402d7c14-0318-4706-b110-eff813d59ce2|7077|user29Nov1||||USD|0||||2024-11-29T04:11:51.000+00:00|Etc/UTC|en_US||||||US||||false|INSERT|admin|2024-11-29T04:11:51.000+00:00|admin|2024-11-29T04:11:51.000+00:00|4621\n-- accounts record_id|id|external_key|email|name|first_name_length|currency|billing_cycle_day_local|parent_account_id|is_payment_delegated_to_parent|payment_method_id|reference_time|time_zone|locale|address1|address2|company_name|city|state_or_province|country|postal_code|phone|notes|migrated|created_date|created_by|updated_date|updated_by|tenant_record_id\n7077|68704a87-23d8-46db-a1ba-310daa8e1f4f|user29Nov1||||USD|0||||2024-11-29T04:11:51.000+00:00|Etc/UTC|en_US||||||US||||false|2024-11-29T04:11:51.000+00:00|admin|2024-11-29T04:11:51.000+00:00|admin|4621\n-- audit_log record_id|id|target_record_id|table_name|change_type|created_date|created_by|reason_code|comments|user_token|account_record_id|tenant_record_id\n525321|0d34f135-5a72-4acc-90d9-7e8615717cf0|12999|ACCOUNT_HISTORY|INSERT|2024-11-29T04:11:51.000+00:00|admin|||1b557c51-4a01-45d0-977b-49cd27810153|7077|4621\n-- bus_events_history record_id|class_name|event_json|user_token|created_date|creating_owner|processing_owner|processing_available_date|processing_state|error_count|search_key1|search_key2\n184177|org.killbill.billing.account.api.user.DefaultAccountCreationEvent|{\"data\":{\"externalKey\":\"user29Nov1\",\"name\":\"user29Nov1\",\"firstNameLength\":null,\"email\":null,\"billCycleDayLocal\":0,\"currency\":\"USD\",\"parentAccountId\":null,\"isPaymentDelegatedToParent\":null,\"paymentMethodId\":null,\"referenceTime\":\"2024-11-29T04:11:51.000Z\",\"timeZone\":\"Etc/UTC\",\"locale\":\"en_US\",\"address1\":null,\"address2\":null,\"companyName\":null,\"city\":null,\"stateOrProvince\":null,\"postalCode\":null,\"country\":\"US\",\"phone\":null,\"notes\":null,\"isMigrated\":false},\"id\":\"68704a87-23d8-46db-a1ba-310daa8e1f4f\",\"searchKey1\":7077,\"searchKey2\":4621,\"userToken\":\"1b557c51-4a01-45d0-977b-49cd27810153\"}|1b557c51-4a01-45d0-977b-49cd27810153|2024-11-29T04:11:51.000+00:00|DESKTOP-NCUS49R|DESKTOP-NCUS49R|2024-11-29T04:11:51.000+00:00|PROCESSED|0|7077|4621\n-- bus_ext_events_history record_id|class_name|event_json|user_token|created_date|creating_owner|processing_owner|processing_available_date|processing_state|error_count|search_key1|search_key2\n182535|org.killbill.billing.beatrix.extbus.DefaultBusExternalEvent|{\"objectId\":\"68704a87-23d8-46db-a1ba-310daa8e1f4f\",\"objectType\":\"ACCOUNT\",\"eventType\":\"ACCOUNT_CREATION\",\"accountId\":\"68704a87-23d8-46db-a1ba-310daa8e1f4f\",\"tenantId\":\"a7ac9384-f2aa-42cb-8367-9f298d228fae\",\"metaData\":null}|1b557c51-4a01-45d0-977b-49cd27810153|2024-11-29T04:11:51.000+00:00|DESKTOP-NCUS49R|DESKTOP-NCUS49R|2024-11-29T04:11:51.000+00:00|PROCESSED|0|7077|4621\n",
+ "tenant_config.data": [
+ {
+ "key": "CATALOG",
+ "values": [
+ ""
+ ]
+ },
+ {
+ "key": "INVOICE_TRANSLATION_fr_FR",
+ "values": [
+ "invoiceTitle=FACTURE\ninvoiceDate=Date:\ninvoiceNumber=Facture #"
+ ]
+ }
+ ],
+ "killbill_configuration.data": {
+ "awt.toolkit": "sun.awt.windows.WToolkit",
+ "java.specification.version": "11",
+ "org.killbill.server.updateCheck.url": "https://raw.github.com/killbill/killbill/master/profiles/killbill/src/main/resources/update-checker/killbill-server-update-list.properties",
+ "sun.cpu.isalist": "amd64",
+ "sun.jnu.encoding": "Cp1252",
+ "org.killbill.billing.plugin.kpm.bundlesPath": "D:/var/tmp/bundles",
+ "java.naming.provider.url": "rmi://127.0.0.1:1099",
+ "sun.arch.data.model": "64",
+ "org.killbill.billing.plugin.auth.adminUsername": "admin",
+ "org.killbill.billing.plugin.kpm.kpmPath": "D:/Software/Ruby27-x64/bin/kpm.bat",
+ "org.killbill.billing.plugin.auth.adminPassword": "*****",
+ "com.killbill.billing.plugin.aviate.enableUsageApis": "false",
+ "kaui.db.password": "*****",
+ "org.killbill.server.lookupEnvironmentVariables": "true",
+ "shared.loader": "",
+ "java.util.logging.manager": "org.apache.juli.ClassLoaderLogManager",
+ "org.killbill.persistent.bus.external.tableName": "bus_ext_events",
+ "java.vm.info": "mixed mode",
+ "java.vm.version": "11.0.6+8-LTS",
+ "java.class.version": "55.0"
+ }
+}
+```
+
+**Request Body**
+
+None
+
+**Query Parameters**
+
+| Name | Type | Required | Default | Description |
+|------------------------|----------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+| **accountId** | UUID | false | none | Account Id for which to create the diagnostic report |
+| **withTenantConfig** | boolean | false | false | If specified, includes per-tenant configuration properties (like catalog, overdue, etc.) |
+| **withSystemConfig** | boolean | false | false | If specified, includes system information (KB/Kaui version, environment variables, OS information, CPU information, memory information, disk information, etc). |
+| **withKillbillConfig** | boolean | false | false | If specified, includes the global Kill Bill configuration properties |
+| **withHealthData** | boolean | false | false | If specified, includes health data. |
+| **withLogs** | boolean | false | false | If specified, includes the logs specified via the `logsDir` parameter. If `logsDir` is not specified, includes the Tomcat logs. In either case, only the log files specified via `logFileNames` are included. |
+| **logsSize** | int | false | 5242880 | Desired log size. Applicable only if withLogs=true is specifed. |
+| **logsDir** | string | false | The value of `com.killbill.billing.plugin.aviate.logsPath` if specified or TOMCAT_HOME/logs (TOMCAT_HOME is determined using the `catalina.base` system property | The directory from which to include the logs. Works only if `withLogs=true` is specifed. |
+| **logsFilenames** | List of String | false | catalina.out | Desired log file names. Works only if `withLogs=true` is specifed. Multiple log file names can be specified by specifying a separate `logsFilenames` parameter corresponding to each value |
+
+**Response**
+
+If successful, returns a status code of 200 and the requested diagnostic data.
\ No newline at end of file
diff --git a/source/index.html.md b/source/index.html.md
index 0fce6d2..03045b6 100644
--- a/source/index.html.md
+++ b/source/index.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/invoice-item.html.md b/source/invoice-item.html.md
index f29cbec..00d403f 100644
--- a/source/invoice-item.html.md
+++ b/source/invoice-item.html.md
@@ -26,7 +26,8 @@ menu_items:
- admin
- security
- aviate-catalog-apis
-
+ - aviate-health-apis
+
title: Kill Bill
language_tabs:
diff --git a/source/invoice-payment.html.md b/source/invoice-payment.html.md
index c34c53b..ac3c9fc 100644
--- a/source/invoice-payment.html.md
+++ b/source/invoice-payment.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/invoice.html.md b/source/invoice.html.md
index 2dff9a1..2e7fa2c 100644
--- a/source/invoice.html.md
+++ b/source/invoice.html.md
@@ -26,7 +26,8 @@ menu_items:
- admin
- security
- aviate-catalog-apis
-
+ - aviate-health-apis
+
title: Kill Bill
language_tabs:
diff --git a/source/payment-method.html.md b/source/payment-method.html.md
index b709d7c..49967fb 100644
--- a/source/payment-method.html.md
+++ b/source/payment-method.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/payment-transaction.html.md b/source/payment-transaction.html.md
index 3e61697..8f818b7 100644
--- a/source/payment-transaction.html.md
+++ b/source/payment-transaction.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/payment.html.md b/source/payment.html.md
index 0c6b4fe..3b222d8 100644
--- a/source/payment.html.md
+++ b/source/payment.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/security.html.md b/source/security.html.md
index 6c10ee3..37dfbcf 100644
--- a/source/security.html.md
+++ b/source/security.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/subscription.html.md b/source/subscription.html.md
index 77698c4..f47bf13 100644
--- a/source/subscription.html.md
+++ b/source/subscription.html.md
@@ -26,7 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
-
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/tag-definition.html.md b/source/tag-definition.html.md
index f8a4795..c5bf808 100644
--- a/source/tag-definition.html.md
+++ b/source/tag-definition.html.md
@@ -26,7 +26,8 @@ menu_items:
- admin
- security
- aviate-catalog-apis
-
+ - aviate-health-apis
+
title: Kill Bill
language_tabs:
diff --git a/source/tag.html.md b/source/tag.html.md
index d87dac5..991cce4 100644
--- a/source/tag.html.md
+++ b/source/tag.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/tenant.html.md b/source/tenant.html.md
index f4cb6c5..9dcad4d 100644
--- a/source/tenant.html.md
+++ b/source/tenant.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill
diff --git a/source/usage.html.md b/source/usage.html.md
index da44298..02294bc 100644
--- a/source/usage.html.md
+++ b/source/usage.html.md
@@ -26,6 +26,7 @@ menu_items:
- admin
- security
- aviate-catalog-apis
+ - aviate-health-apis
title: Kill Bill