Skip to content

API Portal

Old documentation for Hub v1

Kubernetes only!

This page demonstrates how to set up and use the Traefik Hub API Portal.

This is a more advanced topic and requires deeper knowledge of Kubernetes!


Introduction

API Portal in browser

An API Portal is a web-based interface that allows developers to discover, explore, and consume APIs (Application Programming Interfaces).

The API Portal is the landing page of an API or an API collection.

In the Portal, the consumer can view a representation of the OpenAPI specification and effortlessly interact and try out every API operation.

Creating an API Portal

In Traefik Hub, an API Portal links to an API Gateway.

Custom Resource Definition

Use a CRD to set up a Portal.

The following example configures an API Portal and connects it to an API Gateway.

---
apiVersion: hub.traefik.io/v1alpha1
kind: APIPortal
metadata:
  name: my-api-portal
spec:
  description: "The Ultimate Portal NG Digital Deluxe Edition"
  apiGateway: my-gateway
  customDomains:
    - "dev.example.com"

Description

spec.description

Description of the API Portal, for example my-api-portal.

Required

Gateway

spec.apiGateway

Name of the APIGateway CRD used by the Portal.

Custom Domains

spec.customDomains

Configure custom domain name for the API Portal, for example dev.example.com.

This is an optional setting, if not configured, Traefik Hub will generate a random domain under the traefikhub.io namespace.

Production deployments

We highly recommend the use of custom domains for production deployments!

Domains generated by Traefik Hub will change with every redeployment, resulting in a new domain.


What's next