Kobi
is a CLI to manage and automate the deployment of BIAN service domain API specifications to a Kong
- List all avaialbe BIAN service domain API Specifications for download or publishing
- Download a BIAN API service domain API Specification to the local machine
- Publish an API Specification from the BIAN API Repository directly to a running Kong Developer Portal
- Initialise the supporting files for a Kong Developer Portal
Kobi is compatible with Kong Enterprise, version 1.0 and greater, and BIAN 9.1 through to BIAN 12.0. Future releases will be compatibile with later versions of BIAN and Kong Konnect Cloud.
The kobi
CLI is developed on golang
using cobra
CLI. The executable ./kobi
is included in this repository, or it can be built from source (go build
). For universal access, place the kobi
binary in a folder inclded on the path (e.g. ~/go/bin/kobi
).
Kobi
uses environment variables to connect to the Kong Developer Portal.
KOBI_KONG_ADDR
(Defaults to http://localhost:8001) - URL of Kong Admin APIKOBI_KONG_TOKEN
- RBAC token for configured Kong user with write permissions to the Kong Developer Portal Files API
Use the --help
flag of any command to view usage instructions in the terminal
All commands have the below optional flags:
Short | Long | Default | Description |
---|---|---|---|
-b | --bian-version | 9.1 | Set the BIAN version to obtain the API specs for. Supported values are [9.1, 10, 11, 12] . |
-t | --api-type | semantic |
Only valid for BIAN 12. Valid options are semantic and iso . |
Use to list the installed version of Kobi
➜ kobi-cli git:(main) ✗ kobi version
BIAN integration with Kong - kobi v0.0.1
Use to list all service domains available at the remote BIAN
repository.
➜ kobi-cli git:(main) ✗ kobi list --bian-version 9.1
-- Listing all available BIAN service domains --
ACFFulfillment
ATMNetworkOperations
AccountRecovery
AccountsReceivable
AdvancedVoiceServicesManagement
AdvancedVoiceServicesOperations
Advertising
...
Use to download a single service domain API specification to the local computer.
- Service (mandatory) - specify the service domain to download the API speicifcation for
- Output (
-o
or--output
) - specify the filename to save the API spec to. Defaults to the name of the service domain.
➜ kobi-cli git:(main) ✗ kobi download --bian-version 12 --api-type iso CurrentAccount
download called for service CurrentAccount
Downloading API spec...
Decoding API spec...
Creating output file...
Writing output file...
Success!
Use to publish a single service domain API specification to a running Kong Developer Portal.
- Service (mandatory) - specify the service domain to download the API speicifcation for
- Workspace (
-w
or--workspace
) - specify the Kong Workspace to publish the API spec to. Defaults to the default workspace.
➜ kobi-cli kobi publish AccountsReceivable -w KOBI
Downloading API spec...
Decoding API spec...
Kong address is http://127.0.0.1:8001/KOBI/files
Sending HTTP Request...
Success...
kobi is licensed with Apache License Version 2.0. Please read the LICENSE file for more details.