Get the latest, first
Introducing:<br>Kubescape Open-API Framework (Swagger)

Introducing:
Kubescape Open-API Framework (Swagger)

Nov 10, 2022

Rotem Refael
Director of Engineering

Open source got more open source-y. Kubescape API is now documented on Swagger, the OpenAPI standard. That’s it in a nutshell. Scroll down to read more about it.

We’re excited to share that we made another important step as an open-source company. We have documented the APIs of our newly open-sourced services using Swagger, the OpenAPI standard. This will help you integrate, interact and develop for the Kubescape platform.

Now, all our in-cluster components provide OpenAPI specs that document the HTTP APIs we expose. This includes paths, operations, requests, responses, and examples of usage.

Kubescape Open-API Framework

On top of it, we provide interactive UIs that allow you to both take a look at the API documentation and see it in action. All from your web browser.

Sure, you can check the OpenAPI spec in the respective repositories of our components located at https://github.com/kubescape. But where’s the fun in that, when you can take a look at fancy UIs and fire live requests to the components?

If you’ve installed the Kubescape in-cluster components via a Helm chart, then the easiest way to access the interactive OpenAPI UIs is by using the Services deployed as a part of our Helm chart. To do that, first ensure that you have access to the services, either by exposing them on an external IP as a NodePort or a LoadBalancer service. Then, you can access the UIs at the following paths:

- `<SERVICE_IP>:<SERVICE_PORT>/openapi/v2/swaggerui` for the Swagger UI
- `<SERVICE_IP>:<SERVICE_PORT>/openapi/v2/rapi` for the RapiDoc UI
- `<SERVICE_IP>:<SERVICE_PORT>/openapi/v2/docs` for the ReDocs UI

For example, if you want to take a look at the APIs that Kubescape uses, first ensure that the service is exposed. Assuming the service is exposed at 192.168.2.1, port 8081, to check out its Swagger UI, open your browser and go to 192.168.2.1:8081/openapi/v2/swaggerui.

Alternatively, if you want to develop a particular component, you could launch the component by itself on your local machine. You could do so at any host and port you like and follow the same path. No Helm charts needed!

Go ahead and check for yourself.

slack_logos

Continue to Slack

Get the information you need directly from our experts!

new-messageContinue as a guest