Files
ziti/specs/source/client/services.yml
T
Andrew Martinez b562fb5c07 splits API specs into composible modules
- 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)
2021-05-04 11:30:32 -04:00

104 lines
3.1 KiB
YAML

---
paths:
services:
get:
summary: List services
description: |
Retrieves a list of config resources; supports filtering, sorting, and pagination. Requires admin access.
security:
- ztSession: [ ]
tags:
- Service
operationId: listServices
parameters:
- $ref: '../shared/parameters.yml#/limit'
- $ref: '../shared/parameters.yml#/offset'
- $ref: '../shared/parameters.yml#/filter'
- $ref: '../shared/parameters.yml#/roleFilter'
- $ref: '../shared/parameters.yml#/roleSemantic'
responses:
'200':
$ref: '../shared/services.yml#/responses/listServices'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
services-id:
parameters:
- $ref: '../shared/parameters.yml#/id'
get:
summary: Retrieves a single service
description: Retrieves a single service by id. Requires admin access.
security:
- ztSession: [ ]
tags:
- Service
operationId: detailService
responses:
'200':
$ref: '../shared/services.yml#/responses/detailService'
'404':
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
services-id-terminators:
parameters:
- $ref: '../shared/parameters.yml#/id'
get:
summary: List of terminators assigned to a service
description: |
Retrieves a list of terminator resources that are assigned specific service; supports filtering, sorting, and pagination.
security:
- ztSession: [ ]
tags:
- Service
operationId: listServiceTerminators
parameters:
- $ref: '../shared/parameters.yml#/limit'
- $ref: '../shared/parameters.yml#/offset'
- $ref: '../shared/parameters.yml#/filter'
responses:
'200':
$ref: '#/responses/listClientTerminators'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
responses:
listClientTerminators:
description: A list of terminators
schema:
$ref: '#/definitions/listClientTerminatorsEnvelope'
definitions:
listClientTerminatorsEnvelope:
type: object
required:
- meta
- data
properties:
meta:
$ref: '../shared/standard-responses.yml#/definitions/meta'
data:
$ref: '#/definitions/terminatorClientList'
terminatorClientList:
type: array
items:
$ref: '#/definitions/terminatorClientDetail'
terminatorClientDetail:
type: object
allOf:
- $ref: '../shared/base-entity.yml#/definitions/baseEntity'
- type: object
required:
- serviceId
- service
- routerId
- identity
properties:
serviceId:
type: string
service:
$ref: '../shared/base-entity.yml#/definitions/entityRef'
routerId:
type: string
identity:
type: string