User info - OsiriX-Foundation/KheopsAuthorization GitHub Wiki
Used to know if an user email or an user id is valid and if he can access to a specific study or a specific album. This resource can be used to get a list of users for autocompletion.
URL : /users
Method : GET
Auth Required : Authorization with a JWT Bearer token with the user as the sub claim.
Headers
Accept
: If present, require that this value beapplication/json
Query Parameters
reference={reference}
can be email or subalbum={albumId}
(optional)studyInstanceUID={studyInstanceUID}
(optional)
or
search={search}
(minimum 3 character)limit={limit}
offset={offset}
album={albumId}
(optional)studyInstanceUID={studyInstanceUID}
(optional)
Success Response
- Status :
200 OK
if using reference
{
"email": "[email protected]",
"name": "user name",
"sub": "3685d976-f1d6-443c-95d4-95ee4b749878"
}
if using reference
and albumId
{
"email": "[email protected]",
"name": "user name",
"sub": "3685d976-f1d6-443c-95d4-95ee4b749878",
"album_access": true
}
if using reference
and studyInstanceUID
{
"email": "[email protected]",
"name": "user name",
"sub": "3685d976-f1d6-443c-95d4-95ee4b749878",
"study_access": false
}
if using search
[
{
"email": "[email protected]",
"name": "user1 name",
"sub": "3685d976-f1d6-443c-95d4-95ee4b749878"
},
{
"email": "[email protected]",
"name": "user2 name",
"sub": "34df87gg-he398-guz-guvc-wiq4vfvc894f"
},
]
Error Response
If the calling user is a capability token with album scope
- Status :
403 Forbidden
If the calling user is not a member of the album. If the calling user can not see the study.
- Status :
404 Not Found
If the user reference is unknow.
- Status :
204 No Content