mirror of https://github.com/k3s-io/k3s
83 lines
1.9 KiB
YAML
83 lines
1.9 KiB
YAML
# When you made a change to this YAML, please validate with https://editor.swagger.io
|
|
openapi: 3.0.2
|
|
info:
|
|
version: 1.0.0
|
|
title: RootlessKit API
|
|
servers:
|
|
- url: 'http://rootlesskit/v1'
|
|
description: Local UNIX socket server. The host part of the URL is ignored.
|
|
paths:
|
|
/ports:
|
|
get:
|
|
responses:
|
|
'200':
|
|
description: An array of PortStatus
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PortStatuses'
|
|
post:
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PortSpec'
|
|
responses:
|
|
'201':
|
|
description: PortStatus with ID
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PortStatus'
|
|
'/ports/{id}':
|
|
delete:
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
format: int64
|
|
responses:
|
|
'200':
|
|
description: Null response
|
|
components:
|
|
schemas:
|
|
PortSpec:
|
|
required:
|
|
- proto
|
|
properties:
|
|
proto:
|
|
type: string
|
|
enum:
|
|
- tcp
|
|
- udp
|
|
- sctp
|
|
parentIP:
|
|
type: string
|
|
parentPort:
|
|
type: integer
|
|
format: int32
|
|
minimum: 1
|
|
maximum: 65535
|
|
# future version may support requests with parentPort<=0 for automatic port assignment
|
|
childPort:
|
|
type: integer
|
|
format: int32
|
|
minimum: 1
|
|
maximum: 65535
|
|
PortStatus:
|
|
required:
|
|
- id
|
|
properties:
|
|
id:
|
|
type: integer
|
|
format: int64
|
|
spec:
|
|
$ref: '#/components/schemas/PortSpec'
|
|
PortStatuses:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/PortStatus'
|