The Banzai Cloud Pipeline platform consists of different services, which provide a RESTful interface for their users. The services provided on these programmatic interfaces are easily usable with the Banzai CLI or the web interface. There are however use cases when other clients (like our CI/CD plugin), or generic HTTP clients like curl are the best way to use our services.

All of our interfaces are documented with an OpenAPI description, which allows generating client stubs (bindings) for most programming languages. We do also have pre-generated Go clients that you can import directly to your Go programs.

To help discovering the API, we also have Postman collections.

Service OpenAPI Go Client Postman
pipeline pipeline.yaml Swagger github.com/banzaicloud/pipeline/client collection
cloudinfo cloudinfo.yaml Swagger
telescopes recommender.yaml Swagger

Authentication

API requests to Cloudinfo and Telescopes are unauthenticated, while nearly all endpoints of Pipeline need an access token.

The token should be present in the Authorization header of the request. For example, you can use the following command to list the available organizations:

curl https://beta.banzaicloud.io/pipeline/api/v1/orgs -H "Authorization: Bearer $PIPELINE_TOKEN"

For details about access tokens, check the authentication section.

Examples

You can check the source code of Banzai CLI for examples about using the API from Go code.