From a849067fca35ec966ea568ebbd9cb249f124d32d Mon Sep 17 00:00:00 2001 From: Carlos Aguado Date: Fri, 26 Jan 2024 09:06:01 +0000 Subject: [PATCH] Add deletion of individual sessions Implement a method to depeer by deleting existing sessions. The batched creation method does not create an obvious collection resource on the server side that may be used for a depeering situation therefore this commit only implements individual session deletion. To tackle a situation where depeering is desired for a whole metro or IX while respecting this RESTful interface, we will need to define a separate aggregate resource that can be used to operate atomically on the set of target sessions. --- api/openapi.yaml | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index 5fc3143..bb73645 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -115,12 +115,6 @@ paths: required: true schema: type: integer - - name: request_id - in: query - description: request identifier - required: false - schema: - type: string - name: max_results in: query description: Hint to paginate the request with the maximum number of results the caller is able to process. @@ -148,6 +142,46 @@ paths: '403': $ref: '#/components/responses/ErrorResponse' + /sessions/{session_id}: + get: + description: Retrieves a given session by it server-generated ID provided on creation. + parameters: + - name: session_id + in: path + description: Server-generated stable identifier for the session. + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Session' + '400': + $ref: '#/components/responses/ErrorResponse' + '403': + $ref: '#/components/responses/ErrorResponse' + + delete: + description: Requests to turn the session down and delete it from the server. + parameters: + parameters: + - name: session_id + in: path + description: Server-generated stable identifier for the session. + required: true + schema: + type: string + responses: + '204': + description: Session is scheduled for deletion and no longer usable + '400': + $ref: '#/components/responses/ErrorResponse' + '403': + $ref: '#/components/responses/ErrorResponse' + components: schemas: Location: