Skip to main content

API Portal

Configure and manage API Portals.


Introduction

The API Portal is the catalog for your API and API collections.

Through the Portal, users access the endpoint references of APIs, additional documentation and playgrounds for testing APIs.

note

You can only create one Portal per Traefik Hub agent.

Managing Portals Using CRDs

The API Portal object has the following properties.

FieldDescriptionRequired
titleThe title for the Portal is displayed on the login and main Portal page.No
descriptionA short description of the Portal. The description is displayed next to the title.No
apiGatewayName of the API Gateway used by the Portal.Yes
customDomainsConfigure 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.
You can control the generation of traefikhub.io domains in the workspace settings.
No
ui.logoUrlURL to the logo. The Supported formats are PNG, SVG, GIF and JPEG.
The logo is resized automatically and is displayed in the top header of the Portal.
No
ui.serviceConfiguration for custom API Portals. If not configured, the default API Portal UI is used.
If you use a custom Portal service, name and port are required. namespace is an optional setting.
No

Example

See the following example of a CRD configuring an API Portal.

Configuration of an API Portal with a name, a description and a custom logo
---
apiVersion: hub.traefik.io/v1alpha1
kind: APIPortal
metadata:
name: my-api-portal
spec:
title: "The Portal" # The title for the Portal
description: "The Ultimate Portal NG Digital Deluxe Edition" # A short description of the Portal.
apiGateway: my-gateway # The name of the APIGateway used by the Portal
customDomains: # Use a custom domain name for the API Portal
- "dev.example.com"
ui:
logoUrl: https://traefik.io/favicon.png # URL to a picture used as logo
service: # Configuration for custom API Portals settings
name: hub-apiportal-ui
namespace: default
port: 8080