mirror of
https://github.com/openziti/ziti.git
synced 2026-10-12 15:28:05 +00:00
b562fb5c07
- splits Open API 2.0 (swagger) into client/management APIs - uses go-swaggers flatten capabilities - uses newer version of go-swagger (v0.27.0) - introduces /edge/client/v1, /edge/management/v1 - non-prefixed URLs default to /edge/client/v1 - splits some shared management/client API handlers - renames some REST models to "client" instead of "limited" - passes all apitests, fails dataflow upd test (main fails this as well) - updates generate rest script for powershell - todo: test generate rest script for bash - todo: use xweb (different branch)
265 lines
7.7 KiB
YAML
265 lines
7.7 KiB
YAML
---
|
|
paths:
|
|
terminators:
|
|
get:
|
|
summary: List terminators
|
|
description: |
|
|
Retrieves a list of terminator resources; supports filtering, sorting, and pagination. Requires admin access.
|
|
security:
|
|
- ztSession: [ ]
|
|
tags:
|
|
- Terminator
|
|
operationId: listTerminators
|
|
parameters:
|
|
- $ref: '../shared/parameters.yml#/limit'
|
|
- $ref: '../shared/parameters.yml#/offset'
|
|
- $ref: '../shared/parameters.yml#/filter'
|
|
responses:
|
|
'200':
|
|
$ref: '#/responses/listTerminators'
|
|
'401':
|
|
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
|
|
post:
|
|
summary: Create a terminator resource
|
|
description: Create a terminator resource. Requires admin access.
|
|
security:
|
|
- ztSession: [ ]
|
|
tags:
|
|
- Terminator
|
|
operationId: createTerminator
|
|
parameters:
|
|
- name: terminator
|
|
in: body
|
|
required: true
|
|
description: A terminator to create
|
|
schema:
|
|
$ref: '#/definitions/terminatorCreate'
|
|
responses:
|
|
'201':
|
|
$ref: '../shared/standard-responses.yml#/responses/createResponse'
|
|
'400':
|
|
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
|
|
'401':
|
|
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
|
|
terminators-id:
|
|
parameters:
|
|
- $ref: '../shared/parameters.yml#/id'
|
|
get:
|
|
summary: Retrieves a single terminator
|
|
description: Retrieves a single terminator by id. Requires admin access.
|
|
security:
|
|
- ztSession: [ ]
|
|
tags:
|
|
- Terminator
|
|
operationId: detailTerminator
|
|
responses:
|
|
'200':
|
|
$ref: '#/responses/detailTerminator'
|
|
'404':
|
|
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
|
|
'401':
|
|
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
|
|
put:
|
|
summary: Update all fields on a terminator
|
|
description: Update all fields on a terminator by id. Requires admin access.
|
|
security:
|
|
- ztSession: [ ]
|
|
tags:
|
|
- Terminator
|
|
operationId: updateTerminator
|
|
parameters:
|
|
- name: terminator
|
|
in: body
|
|
required: true
|
|
description: A terminator update object
|
|
schema:
|
|
$ref: '#/definitions/terminatorUpdate'
|
|
responses:
|
|
'200':
|
|
$ref: '../shared/standard-responses.yml#/responses/updateResponse'
|
|
'400':
|
|
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
|
|
'404':
|
|
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
|
|
'401':
|
|
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
|
|
patch:
|
|
summary: Update the supplied fields on a terminator
|
|
description: Update the supplied fields on a terminator. Requires admin access.
|
|
security:
|
|
- ztSession: [ ]
|
|
tags:
|
|
- Terminator
|
|
operationId: patchTerminator
|
|
parameters:
|
|
- name: terminator
|
|
in: body
|
|
required: true
|
|
description: A terminator patch object
|
|
schema:
|
|
$ref: '#/definitions/terminatorPatch'
|
|
responses:
|
|
'200':
|
|
$ref: '../shared/standard-responses.yml#/responses/patchResponse'
|
|
'400':
|
|
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
|
|
'404':
|
|
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
|
|
'401':
|
|
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
|
|
delete:
|
|
summary: Delete a terminator
|
|
description: Delete a terminator by id. Requires admin access.
|
|
security:
|
|
- ztSession: [ ]
|
|
tags:
|
|
- Terminator
|
|
operationId: deleteTerminator
|
|
responses:
|
|
'200':
|
|
$ref: '../shared/standard-responses.yml#/responses/deleteResponse'
|
|
'400':
|
|
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
|
|
'401':
|
|
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
|
|
'409':
|
|
$ref: '../shared/standard-responses.yml#/responses/cannotDeleteReferencedResourceResponse'
|
|
|
|
responses:
|
|
listTerminators:
|
|
description: A list of terminators
|
|
schema:
|
|
$ref: '#/definitions/listTerminatorsEnvelope'
|
|
detailTerminator:
|
|
description: A single terminator
|
|
schema:
|
|
$ref: '#/definitions/detailTerminatorEnvelope'
|
|
|
|
definitions:
|
|
listTerminatorsEnvelope:
|
|
type: object
|
|
required:
|
|
- meta
|
|
- data
|
|
properties:
|
|
meta:
|
|
$ref: '../shared/standard-responses.yml#/definitions/meta'
|
|
data:
|
|
$ref: '#/definitions/terminatorList'
|
|
detailTerminatorEnvelope:
|
|
type: object
|
|
required:
|
|
- meta
|
|
- data
|
|
properties:
|
|
meta:
|
|
$ref: '../shared/standard-responses.yml#/definitions/meta'
|
|
data:
|
|
$ref: '#/definitions/terminatorDetail'
|
|
terminatorList:
|
|
type: array
|
|
items:
|
|
$ref: '#/definitions/terminatorDetail'
|
|
terminatorDetail:
|
|
type: object
|
|
allOf:
|
|
- $ref: '../shared/base-entity.yml#/definitions/baseEntity'
|
|
- type: object
|
|
required:
|
|
- serviceId
|
|
- service
|
|
- routerId
|
|
- router
|
|
- binding
|
|
- address
|
|
- identity
|
|
- cost
|
|
- precedence
|
|
- dynamicCost
|
|
properties:
|
|
serviceId:
|
|
type: string
|
|
service:
|
|
$ref: '../shared/base-entity.yml#/definitions/entityRef'
|
|
routerId:
|
|
type: string
|
|
router:
|
|
$ref: '../shared/base-entity.yml#/definitions/entityRef'
|
|
binding:
|
|
type: string
|
|
address:
|
|
type: string
|
|
identity:
|
|
type: string
|
|
cost:
|
|
$ref: '../shared/terminators.yml#/definitions/terminatorCost'
|
|
precedence:
|
|
$ref: '../shared/terminators.yml#/definitions/terminatorPrecedence'
|
|
dynamicCost:
|
|
$ref: '../shared/terminators.yml#/definitions/terminatorCost'
|
|
terminatorCreate:
|
|
type: object
|
|
required:
|
|
- service
|
|
- router
|
|
- address
|
|
- binding
|
|
properties:
|
|
service:
|
|
type: string
|
|
router:
|
|
type: string
|
|
binding:
|
|
type: string
|
|
address:
|
|
type: string
|
|
identity:
|
|
type: string
|
|
identitySecret:
|
|
type: string
|
|
format: byte
|
|
cost:
|
|
$ref: '../shared/terminators.yml#/definitions/terminatorCost'
|
|
precedence:
|
|
$ref: '../shared/terminators.yml#/definitions/terminatorPrecedence'
|
|
tags:
|
|
$ref: '../shared/base-entity.yml#/definitions/tags'
|
|
terminatorUpdate:
|
|
type: object
|
|
required:
|
|
- service
|
|
- router
|
|
- address
|
|
- binding
|
|
properties:
|
|
service:
|
|
type: string
|
|
router:
|
|
type: string
|
|
binding:
|
|
type: string
|
|
address:
|
|
type: string
|
|
cost:
|
|
$ref: '../shared/terminators.yml#/definitions/terminatorCost'
|
|
precedence:
|
|
$ref: '../shared/terminators.yml#/definitions/terminatorPrecedence'
|
|
tags:
|
|
$ref: '../shared/base-entity.yml#/definitions/tags'
|
|
terminatorPatch:
|
|
type: object
|
|
properties:
|
|
service:
|
|
type: string
|
|
router:
|
|
type: string
|
|
binding:
|
|
type: string
|
|
address:
|
|
type: string
|
|
cost:
|
|
$ref: '../shared/terminators.yml#/definitions/terminatorCost'
|
|
precedence:
|
|
$ref: '../shared/terminators.yml#/definitions/terminatorPrecedence'
|
|
tags:
|
|
$ref: '../shared/base-entity.yml#/definitions/tags' |