Skip to content

User info

gerome12 edited this page Jun 11, 2020 · 11 revisions

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 be application/json

Query Parameters

  • reference={reference} can be email or sub
  • album={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": "user@domain.com",
    "name": "user name",
    "sub": "3685d976-f1d6-443c-95d4-95ee4b749878"
}

if using reference and albumId

{
    "email": "user@domain.com",
    "name": "user name",
    "sub": "3685d976-f1d6-443c-95d4-95ee4b749878",
    "album_access": true
}

if using reference and studyInstanceUID

{
    "email": "user@domain.com",
    "name": "user name",
    "sub": "3685d976-f1d6-443c-95d4-95ee4b749878",
    "study_access": false
}

if using search

[
    {
        "email": "user1@domain.com",
        "name": "user1 name",
        "sub": "3685d976-f1d6-443c-95d4-95ee4b749878"
    },
    {
        "email": "user2@domain.com",
        "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
Clone this wiki locally