Skip to content

Album List

gerome12 edited this page Jan 15, 2021 · 24 revisions

Used to get a list of albums for a given user.

URL : /albums

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

URL Parameters

  • name={name}

    • *{name} : end with
    • {name}* : start with
    • *{name}* : contain
  • modality={modality}

  • favorite={true/false} by default : false

  • created_time={date}

  • last_event_time={date}

    • -{date} : before the date (include date)
    • {date}- : after the date (include date)
    • {date_1}-{date_2} : from date_1 to date_2 (include date)
    • date format : YYYYMMDD
  • limit={limit}

  • offset={offset}

  • fuzzymatching={true/false} by default : false

  • sort={sortBy} by default : sort by creation date descending

    • name
    • created_time
    • last_event_time
    • number_of_studies
    • number_of_users
    • number_of_comments
    • sort={param} for ascending
    • sort=-{param} for descending
  • canCreateCapabilityToken={true/false} by default : false

Return a list of albums where the user can create a Capability Token

  • canAddSeries={true/false} by default : false

Return a list of albums where the user can upload series

Success Response

  • Status : 200 OK

Header X-Total-Count contains the total number of albums to which the user has access

[
    {
        "album_id": "37bs6GW5cR",
        "name": "album name",
        "description": "some description",
        "created_time": "2018-08-12T08:22:31",
        "last_event_time": "2018-09-21T09:38:42",
        "modalities" : ["CT","MR"],
        "number_of_users": 5,
        "number_of_comments": 17,
        "number_of_studies": 12,
        "number_of_series": 35,
        "add_user": false,
        "download_series": true,
        "send_series": true,
        "delete_series": false,
        "add_series": true,
        "write_comments": true,
        "is_favorite": false,
        "notification_new_series": true,
        "notification_new_comment": true,
        "is_admin": true
    },
    {...}
]

Error Response

If Queries Parameters are incorrect.

  • Status : 400 Bad Request

If the user is not found

  • Status : 404 Not Found
Clone this wiki locally