mirror of
https://github.com/hanzozt/edge-api.git
synced 2026-10-30 14:44:05 +00:00
* for openziti/ziti#3356 add www-authenticate headers - adds www-authenticate headers to all responses - moves to swagger 0.33.1 - updates readme - updates version checking in powershell and bash
316 lines
9.5 KiB
YAML
316 lines
9.5 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: [ ]
|
|
- oauth2: [ openid ]
|
|
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'
|
|
'400':
|
|
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
|
|
'429':
|
|
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
|
|
'503':
|
|
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
|
|
|
|
post:
|
|
summary: Create a terminator resource
|
|
description: Create a terminator resource. Requires admin access.
|
|
security:
|
|
- ztSession: [ ]
|
|
- oauth2: [ openid ]
|
|
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'
|
|
'429':
|
|
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
|
|
'503':
|
|
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
|
|
|
|
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: [ ]
|
|
- oauth2: [ openid ]
|
|
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'
|
|
'429':
|
|
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
|
|
'503':
|
|
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
|
|
|
|
put:
|
|
summary: Update all fields on a terminator
|
|
description: Update all fields on a terminator by id. Requires admin access.
|
|
security:
|
|
- ztSession: [ ]
|
|
- oauth2: [ openid ]
|
|
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'
|
|
'429':
|
|
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
|
|
'503':
|
|
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
|
|
|
|
patch:
|
|
summary: Update the supplied fields on a terminator
|
|
description: Update the supplied fields on a terminator. Requires admin access.
|
|
security:
|
|
- ztSession: [ ]
|
|
- oauth2: [ openid ]
|
|
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'
|
|
'429':
|
|
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
|
|
'503':
|
|
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
|
|
|
|
delete:
|
|
summary: Delete a terminator
|
|
description: Delete a terminator by id. Requires admin access.
|
|
security:
|
|
- ztSession: [ ]
|
|
- oauth2: [ openid ]
|
|
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'
|
|
'404':
|
|
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
|
|
'409':
|
|
$ref: '../shared/standard-responses.yml#/responses/cannotDeleteReferencedResourceResponse'
|
|
'429':
|
|
$ref: '../shared/standard-responses.yml#/responses/rateLimitedResponse'
|
|
'503':
|
|
$ref: '../shared/standard-responses.yml#/responses/serverUnavailableResponse'
|
|
|
|
responses:
|
|
listTerminators:
|
|
description: A list of terminators
|
|
headers:
|
|
WWW-Authenticate:
|
|
description: "Denotes different type of security token related information"
|
|
type: array
|
|
items:
|
|
type: string
|
|
schema:
|
|
$ref: '#/definitions/listTerminatorsEnvelope'
|
|
detailTerminator:
|
|
description: A single terminator
|
|
headers:
|
|
WWW-Authenticate:
|
|
description: "Denotes different type of security token related information"
|
|
type: array
|
|
items:
|
|
type: string
|
|
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' |