Skip to content

Overview

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


Introduction

API Portal in browser

Traefik Hub API Portal

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"
  ui:
    logoUrl: https://traefik.io/favicon.png
    service:
      name: hub-apiportal-ui
      namespace: default
      port: 8080

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.

Custom Portal

spec.ui.service

This is an optional setting

If not configured the default Portal UI is used.

If you use a custom Portal service name and port are required!

namespace is an optional setting.


What's next