-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GET /sessions endpoint for retrieving all active sessions of authenticated user #228
Changes from 8 commits
239ad1c
c55fa13
a77a92e
8f394bf
f1011d8
3f9f2fb
26d3bca
36bdf5f
2aacae2
75aa001
a44faf8
42131e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -222,7 +222,38 @@ | |||||||
- oAuth2ClientCredentials: [] | ||||||||
- threeLegged: | ||||||||
- "qod-sessions-write" | ||||||||
|
||||||||
get: | ||||||||
tags: | ||||||||
- QoS sessions | ||||||||
summary: Get all active sessions information | ||||||||
description: Get information about all active sessions authorized to be retrieved by the provided access token. | ||||||||
operationId: getSessions | ||||||||
parameters: | ||||||||
- name: phoneNumber | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be better to filter on $ref: "#/components/schemas/Device and not just phone number. |
||||||||
in: query | ||||||||
required: false | ||||||||
description: Allows filtering of sessions by device (phone number). | ||||||||
schema: | ||||||||
$ref: "#/components/schemas/PhoneNumber" | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add two more spaces to resolve linting issue.
kacper-kicinski marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
responses: | ||||||||
"200": | ||||||||
description: Contains information about the complete list of active sessions | ||||||||
content: | ||||||||
application/json: | ||||||||
schema: | ||||||||
$ref: "#/components/schemas/SessionInfoList" | ||||||||
"401": | ||||||||
$ref: "#/components/responses/Generic401" | ||||||||
"403": | ||||||||
$ref: "#/components/responses/Generic403" | ||||||||
"500": | ||||||||
$ref: "#/components/responses/Generic500" | ||||||||
"503": | ||||||||
$ref: "#/components/responses/Generic503" | ||||||||
security: | ||||||||
- oAuth2ClientCredentials: [] | ||||||||
- threeLegged: | ||||||||
- "qod-sessions-read" | ||||||||
/sessions/{sessionId}: | ||||||||
get: | ||||||||
tags: | ||||||||
|
@@ -433,6 +464,19 @@ | |||||||
- expiresAt | ||||||||
- qosStatus | ||||||||
|
||||||||
SessionInfoList: | ||||||||
description: List response of active sessions authorized to be retrieved by the provided access token. | ||||||||
type: object | ||||||||
required: | ||||||||
- sessions | ||||||||
properties: | ||||||||
sessions: | ||||||||
description: Array of sessions to be returned. | ||||||||
type: array | ||||||||
minItems: 0 | ||||||||
items: | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
$ref: "#/components/schemas/SessionInfo" | ||||||||
|
||||||||
CreateSession: | ||||||||
description: Attributes required to create a session | ||||||||
type: object | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be interesting to add additional filters, specially to allow filtering sessions for some specific device