Files
ziti/specs/source/management/sessions.yml
T
Andrew Martinez f28061de4f fixes missing 400s from list endpoints
- update some CA fields that were not marked required/nullable
- some list endpoints were missing 400 response definitions
- foundation dep update
2021-07-27 14:53:35 -04:00

146 lines
4.4 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: '#/responses/listSessionsManagement'
'401':
$ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
'400':
$ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
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: '#/responses/detailSessionManagement'
'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'
listSessionsManagement:
description: A list of sessions
schema:
$ref: '#/definitions/listSessionsManagementEnvelope'
detailSessionManagement:
description: A single session
schema:
$ref: '#/definitions/detailSessionManagementEnvelope'
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
listSessionsManagementEnvelope:
type: object
required:
- meta
- data
properties:
meta:
$ref: '../shared/standard-responses.yml#/definitions/meta'
data:
$ref: '#/definitions/sessionManagementList'
detailSessionManagementEnvelope:
type: object
required:
- meta
- data
properties:
meta:
$ref: '../shared/standard-responses.yml#/definitions/meta'
data:
$ref: '#/definitions/sessionManagementDetail'
sessionManagementList:
type: array
items:
$ref: '#/definitions/sessionManagementDetail'
sessionManagementDetail:
allOf:
- $ref: '../shared/sessions.yml#/definitions/sessionDetail'
- type: object
properties:
servicePolicies:
type: array
items:
$ref: '../shared/base-entity.yml#/definitions/entityRef'