You've already forked Traefik-Redis-Api
220 lines
5.9 KiB
YAML
220 lines
5.9 KiB
YAML
openapi: "3.1.0"
|
|
info:
|
|
title: Traefik Redis Provider API
|
|
version: "1.0"
|
|
license:
|
|
name: MIT
|
|
url: https://opensource.org/licenses/MIT
|
|
description: |
|
|
This is the API documentation for the Traefik Redis Provider.
|
|
It provides endpoints to manage routers and their configurations.
|
|
tags:
|
|
- name: routers
|
|
description: Operations related to routers
|
|
externalDocs:
|
|
description: Traefik Documentation
|
|
url: https://doc.traefik.io/traefik/
|
|
servers:
|
|
- url: http://localhost:9501
|
|
description: Local server
|
|
paths:
|
|
/{protocol}/routers/{router}:
|
|
post:
|
|
tags:
|
|
- routers
|
|
parameters:
|
|
- name: protocol
|
|
in: path
|
|
required: true
|
|
description: The protocol to use (e.g., http, udp, tcp)
|
|
example: http
|
|
schema:
|
|
type: string
|
|
- name: router
|
|
in: path
|
|
required: true
|
|
description: The name of the router to create or update
|
|
example: router-1
|
|
schema:
|
|
type: string
|
|
summary: Create or update a specific router
|
|
description: |
|
|
This endpoint creates or updates a specific router.
|
|
It allows you to configure the router with the specified settings.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Router'
|
|
responses:
|
|
'200':
|
|
description: Router created or updated successfully
|
|
|
|
delete:
|
|
tags:
|
|
- routers
|
|
parameters:
|
|
- name: router
|
|
in: path
|
|
required: true
|
|
description: The name of the router to delete
|
|
example: router-1
|
|
schema:
|
|
type: string
|
|
- name: protocol
|
|
in: path
|
|
required: true
|
|
description: The protocol to use (e.g., http, udp, tcp)
|
|
example: http
|
|
schema:
|
|
type: string
|
|
summary: Delete a specific router
|
|
description: |
|
|
This endpoint deletes a specific router.
|
|
It removes the specified router from the configuration.
|
|
responses:
|
|
'200':
|
|
description: Router deleted successfully
|
|
get:
|
|
tags:
|
|
- routers
|
|
parameters:
|
|
- name: protocol
|
|
in: path
|
|
required: true
|
|
description: The protocol to use (e.g., http, udp, tcp)
|
|
example: http
|
|
schema:
|
|
type: string
|
|
- name: router
|
|
in: path
|
|
example: router-1
|
|
required: true
|
|
description: The name of the router to retrieve
|
|
schema:
|
|
type: string
|
|
summary: Get a specific router
|
|
description: |
|
|
This endpoint retrieves a specific router.
|
|
It returns the details of the specified router.
|
|
responses:
|
|
'200':
|
|
description: A specific router
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Router'
|
|
|
|
/{protocol}/routers:
|
|
get:
|
|
tags:
|
|
- routers
|
|
parameters:
|
|
- name: protocol
|
|
in: path
|
|
required: true
|
|
example: http
|
|
description: The protocol to use (e.g., http, udp, tcp)
|
|
schema:
|
|
type: string
|
|
summary: Get all routers
|
|
description: |
|
|
This endpoint retrieves all routers.
|
|
It returns a list of routers with their details.
|
|
responses:
|
|
'200':
|
|
description: A list of routers
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
example:
|
|
- router-1
|
|
- router-2
|
|
|
|
components:
|
|
schemas:
|
|
Router:
|
|
type: object
|
|
required:
|
|
- rule
|
|
- service
|
|
properties:
|
|
observability:
|
|
type: object
|
|
properties:
|
|
tracing:
|
|
type: object
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
example: true
|
|
samplingRate:
|
|
type: number
|
|
example: 0.1
|
|
metrics:
|
|
type: object
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
example: true
|
|
buckets:
|
|
type: array
|
|
items:
|
|
type: number
|
|
example: 0.1
|
|
accessLogs:
|
|
type: object
|
|
properties:
|
|
enabled:
|
|
type: boolean
|
|
example: true
|
|
priority:
|
|
type: integer
|
|
example: 10
|
|
tls:
|
|
type: object
|
|
properties:
|
|
certResolver:
|
|
type: string
|
|
example: myresolver
|
|
domains:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
main:
|
|
type: string
|
|
example: example.com
|
|
sans:
|
|
type: array
|
|
items:
|
|
type: string
|
|
example:
|
|
- www.example.com
|
|
- api.example.com
|
|
service:
|
|
type: string
|
|
example: service-1
|
|
middlewares:
|
|
type: array
|
|
items:
|
|
type: string
|
|
example:
|
|
- middleware-1
|
|
- middleware-2
|
|
entrypoints:
|
|
type: array
|
|
items:
|
|
type: string
|
|
example:
|
|
- web
|
|
- websecure
|
|
rule:
|
|
type: string
|
|
examples:
|
|
- Host(`example.com`)
|
|
- Header(`key`, `value`)
|
|
- HeaderRegexp(`key`, `regexp`)
|