Skip to content

Publish an API

This tutorial explains how to publish an API through the UI (User Interface).


In this tutorial, you will learn how to use the UI to publish an API.

This tutorial assumes that you have already an API deployed (as a Service) and that this service is reachable by a Traefik Hub agent.

Production deployments

We highly recommend to publish APIs through CRDs.


Select APIs in the left navigation, here you will see an overview of all of your published APIs.

To publish a new API, choose Publish API in the right top corner.

API overview

API overview

Publish an API

To publish an API, Traefik Hub needs to know some details about the Service.

Field Description Required
Name Name for the API, we recommend using kebab-case (for example,my-api). Yes
Agent The Traefik Hub agent where the API is reachable. Yes
Service The Kubernetes Service where the API is reachable.
You can search by [namespace] Service in the drop-down menu.
Port The Service port where the API is reachable. Yes
Prefix The path prefix will append the URL of the API Gateway.
For example, if the URL of the Gateway is, the prefix /my-prefix will be added, resulting in the URL
Open API Specification OpenAPI Specification (OAS) YAML/JSON file. The file can be external (hosted anywhere) or within the same Kubernetes Service as the API. The Portal should be able to connect without any kind of authentication. Yes
Labels Labels are essential for setting up API Access Control for Portals and Gateways, or to group APIs together with API Collections.
The labels you add here will be used for matching to this API.

Fill out the fields to publish an API.

Fill the form

Configuration UI for exposing an API

If you want to expose an OpenAPI Specification by path you need to configure the port number!

Once you are done, select Create to publish your API.

API versioning

Traefik Hub empowers comprehensive API version life-cycle management, offering the capability to define distinct configurations for various API versions.

Please read our general documentation about API versioning to learn all about supported versioning strategies.

Select Version information to versioning your API.

Select the version information button

Select the version information button

API versioning form

API versioning form

Once you are done, select Create to expose your API.

Select the Create button

Create button


In this tutorial, you learned how to publish an API through the UI, a quick and effortless way to test APIs.

What's next