Skip to content

Commit

Permalink
Add deletion of individual sessions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
caguado committed Jan 26, 2024
1 parent ef4db4f commit a849067
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a849067

Please sign in to comment.