Files
ziti/specs/source/management/sessions.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

102 lines
3.2 KiB
YAML

---
paths:
sessions:
get:
summary: List sessions
description: |
Retrieves a list of active sessions resources; supports filtering, sorting, and pagination. Requires admin access.
Sessions are tied to an API session and are moved when an API session times out or logs out. Active sessions
(i.e. Ziti SDK connected to an edge router) will keep the session and API session marked as active.
security:
- ztSession: [ ]
tags:
- Session
operationId: listSessions
parameters:
- $ref: '../shared/parameters.yml#/limit'
- $ref: '../shared/parameters.yml#/offset'
- $ref: '../shared/parameters.yml#/filter'
responses:
'200':
$ref: '../shared/sessions.yml#/responses/listSessions'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
sessions-id:
parameters:
- $ref: '../shared/parameters.yml#/id'
get:
summary: Retrieves a single session
description: Retrieves a single session by id. Requires admin access.
security:
- ztSession: [ ]
tags:
- Session
operationId: detailSession
responses:
'200':
$ref: '../shared/sessions.yml#/responses/detailSession'
'404':
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
delete:
summary: Delete a session
description: Delete a session by id. Requires admin access.
security:
- ztSession: [ ]
tags:
- Session
operationId: deleteSession
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'
sessions-id-route-path:
parameters:
- $ref: '../shared/parameters.yml#/id'
get:
summary: Retrieves a single session's router path
description: Retrieves a single session's route path by id. Requires admin access.
security:
- ztSession: [ ]
tags:
- Session
operationId: detailSessionRoutePath
responses:
'200':
$ref: '#/responses/detailSessionRoutePath'
'404':
$ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
responses:
detailSessionRoutePath:
description: A single session's route path
schema:
$ref: '#/definitions/detailSessionRoutePathEnvelope'
definitions:
detailSessionRoutePathEnvelope:
type: object
required:
- meta
- data
properties:
meta:
$ref: '../shared/standard-responses.yml#/definitions/meta'
data:
$ref: '#/definitions/sessionRoutePathDetail'
sessionRoutePathDetail:
type: object
properties:
routePath:
type: array
items:
type: string