Skip to content

Commit

Permalink
Merge pull request #334 from reshmabidikar/work-for-333
Browse files Browse the repository at this point in the history
Auth API documentation
  • Loading branch information
reshmabidikar authored Feb 5, 2025
2 parents 15c2395 + 6337e3f commit 7128e30
Show file tree
Hide file tree
Showing 29 changed files with 148 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/account.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/admin.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
50 changes: 50 additions & 0 deletions source/auth.html.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
includes:
- aviate-catalog

current_page: aviate-catalog

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-auth
- aviate-catalog
- aviate-health
- aviate-metering

title: Kill Bill

language_tabs:
- shell
- java
- ruby
- python
- javascript
- php

toc_footers:
- <a href="mailto:[email protected]">Report a doc problem </a>

search: true

code_clipboard: true

---
1 change: 1 addition & 0 deletions source/aviate-catalog.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/aviate-health.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/aviate-metering.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/bundle.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/catalog.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/credit.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/custom-field.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/export.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
59 changes: 59 additions & 0 deletions source/includes/_aviate-auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Aviate Auth

The Aviate Plugin uses a JWT based authentication mechanism. Thus, a valid JWT is required to access all APIs.

## Auth API

The Auth API generates a JWT for authenticating with the Aviate Plugin. This token must be included in the Authorization header for subsequent API requests. Note that the Auth API must be invoked with an email and password in order to generate the JWT.

**HTTP Request**

`POST /plugins/aviate-plugin/v1/auth`

> Example Request:
```shell
curl -X POST \
-H 'Content-Type: application/json' \
-u "<email>:<password>" \
-H 'X-killbill-apiKey: alphaF' \
-H 'X-killbill-apisecret: alphaF' \
'http://127.0.0.1:8080/plugins/aviate-plugin/v1/auth'
```

```java
```

```ruby
```

```python
```

````php
````

````javacript
````

> Example Response:
````json
{
"token": "eyJraWQi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ZxWyodGUg-x41HmYG8Q0DEAa0CbZiaj-sI3YMTOB9dRW5UHxSCy7LPpzaNd_ZRB0_MatzTbBgesSMowz9kJMyhnSCKRJLtazdzeNXapij9pg50paasMZPqlqPvvFrc5zHNRUTF84tN19cdvvmj87qZDFMMoc0X8GihrmgqsI6eJ3vAKiECwoeRKPJwHioFxu8Id9atV_1jRoSS-owULkFnfIKDSQ"
}
````

**Request Body**

None


**Query Parameters**

None


**Response**

If successful, returns a status code of 200 and a JSON String with the token.
4 changes: 4 additions & 0 deletions source/includes/_aviate-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Product, plan, and pricelist resources are uniquely identified by the tuple {ten

At the time of writing, the aviate catalog plugin does not expose any endpoints for catalog retrieval. Instead, the catalog can be retrieved via the [KB Catalog APIs](https://apidocs.killbill.io/catalog).

### Authentication

The Aviate Plugin uses a JWT based authentication mechanism. Thus, all the APIs listed in this document require a valid token. This can be obtained via the [Auth API](aviate_auth.html#auth_api).

## Resources

This section lists the models used by the Catalog APIs
Expand Down
6 changes: 6 additions & 0 deletions source/includes/_aviate-health.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

The [Aviate Health feature](https://docs.killbill.io/latest/aviate-health) 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.

## Before You Begin

### Authentication

The Aviate Plugin uses a JWT based authentication mechanism. Thus, all the APIs listed in this document require a valid token. This can be obtained via the [Auth API](aviate_auth.html#auth_api).

## Resources

### MetricsResult
Expand Down
6 changes: 6 additions & 0 deletions source/includes/_aviate-metering.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

The Aviate plugin offers a metering feature that allows performing usage aggregation. As part of this functionality, the plugin exposes some metering APIs. These APIs provide the ability to create billing meters and record usage data against these meters. This section documents the metering APIs exported by the Aviate plugin.

## Before You Begin

### Authentication

The Aviate Plugin uses a JWT based authentication mechanism. Thus, all the APIs listed in this document require a valid token. This can be obtained via the [Auth API](aviate_auth.html#auth_api).

## Resources

### BillingMeter
Expand Down
Empty file added source/includes/_aviate_auth.md
Empty file.
1 change: 1 addition & 0 deletions source/index.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/invoice-item.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/invoice-payment.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/invoice.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/payment-method.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/payment-transaction.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/payment.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/security.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/subscription.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/tag-definition.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/tag.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/tenant.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down
1 change: 1 addition & 0 deletions source/usage.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ menu_items:
- export
- admin
- security
- aviate-auth
- aviate-catalog
- aviate-health
- aviate-metering
Expand Down

0 comments on commit 7128e30

Please sign in to comment.