github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/fixtures/bugs/2919/edge-api/management/sessions.yml (about)

     1  ---
     2  paths:
     3    sessions:
     4      get:
     5        summary: List sessions
     6        description: |
     7          Retrieves a list of active sessions resources; supports filtering, sorting, and pagination. Requires admin access.
     8  
     9          Sessions are tied to an API session and are moved when an API session times out or logs out. Active sessions
    10          (i.e. Ziti SDK connected to an edge router) will keep the session and API session marked as active.
    11        security:
    12          - ztSession: [ ]
    13        tags:
    14          - Session
    15        operationId: listSessions
    16        parameters:
    17          - $ref: '../shared/parameters.yml#/limit'
    18          - $ref: '../shared/parameters.yml#/offset'
    19          - $ref: '../shared/parameters.yml#/filter'
    20        responses:
    21          '200':
    22            $ref: '#/responses/listSessionsManagement'
    23          '401':
    24            $ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
    25          '400':
    26            $ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
    27    sessions-id:
    28      parameters:
    29        - $ref: '../shared/parameters.yml#/id'
    30      get:
    31        summary: Retrieves a single session
    32        description: Retrieves a single session by id. Requires admin access.
    33        security:
    34          - ztSession: [ ]
    35        tags:
    36          - Session
    37        operationId: detailSession
    38        responses:
    39          '200':
    40            $ref: '#/responses/detailSessionManagement'
    41          '404':
    42            $ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
    43          '401':
    44            $ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
    45      delete:
    46        summary: Delete a session
    47        description: Delete a session by id. Requires admin access.
    48        security:
    49          - ztSession: [ ]
    50        tags:
    51          - Session
    52        operationId: deleteSession
    53        responses:
    54          '200':
    55            $ref: '../shared/standard-responses.yml#/responses/deleteResponse'
    56          '400':
    57            $ref: '../shared/standard-responses.yml#/responses/badRequestResponse'
    58          '401':
    59            $ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
    60          '409':
    61            $ref: '../shared/standard-responses.yml#/responses/cannotDeleteReferencedResourceResponse'
    62    sessions-id-route-path:
    63      parameters:
    64        - $ref: '../shared/parameters.yml#/id'
    65      get:
    66        summary: Retrieves a single session's router path
    67        description: Retrieves a single session's route path by id. Requires admin access.
    68        security:
    69          - ztSession: [ ]
    70        tags:
    71          - Session
    72        operationId: detailSessionRoutePath
    73        responses:
    74          '200':
    75            $ref: '#/responses/detailSessionRoutePath'
    76          '404':
    77            $ref: '../shared/standard-responses.yml#/responses/notFoundResponse'
    78          '401':
    79            $ref: '../shared/standard-responses.yml#/responses/unauthorizedResponse'
    80  
    81  responses:
    82    detailSessionRoutePath:
    83      description: A single session's route path
    84      schema:
    85        $ref: '#/definitions/detailSessionRoutePathEnvelope'
    86    listSessionsManagement:
    87      description: A list of sessions
    88      schema:
    89        $ref: '#/definitions/listSessionsManagementEnvelope'
    90    detailSessionManagement:
    91      description: A single session
    92      schema:
    93        $ref: '#/definitions/detailSessionManagementEnvelope'
    94  
    95  
    96  definitions:
    97    detailSessionRoutePathEnvelope:
    98      type: object
    99      required:
   100        - meta
   101        - data
   102      properties:
   103        meta:
   104          $ref: '../shared/standard-responses.yml#/definitions/meta'
   105        data:
   106          $ref: '#/definitions/sessionRoutePathDetail'
   107    sessionRoutePathDetail:
   108      type: object
   109      properties:
   110        routePath:
   111          type: array
   112          items:
   113            type: string
   114    listSessionsManagementEnvelope:
   115      type: object
   116      required:
   117        - meta
   118        - data
   119      properties:
   120        meta:
   121          $ref: '../shared/standard-responses.yml#/definitions/meta'
   122        data:
   123          $ref: '#/definitions/sessionManagementList'
   124    detailSessionManagementEnvelope:
   125      type: object
   126      required:
   127        - meta
   128        - data
   129      properties:
   130        meta:
   131          $ref: '../shared/standard-responses.yml#/definitions/meta'
   132        data:
   133          $ref: '#/definitions/sessionManagementDetail'
   134    sessionManagementList:
   135        type: array
   136        items:
   137          $ref: '#/definitions/sessionManagementDetail'
   138    sessionManagementDetail:
   139      allOf:
   140        - $ref: '../shared/sessions.yml#/definitions/sessionDetail'
   141        - type: object
   142          properties:
   143            servicePolicies:
   144              type: array
   145              items:
   146                $ref: '../shared/base-entity.yml#/definitions/entityRef'