-
Notifications
You must be signed in to change notification settings - Fork 11
Get a list of events (comments and mutations)
Used to get all comments (private and public) and all mutations about an album. For getting events, the user must be a memeber of the album.
URL : /albums/{album_id}/events
Method : GET
Auth Required : Authorization with a JWT Bearer token with the user as the sub claim. The user must be a member of the album.
Headers
-
Accept
: If present, require that this value beapplication/json
URL Parameters
-
types={comments,mutations}
(Optional)- "comments" return all publics comments and all pivates comments with the calling user order by date.
- "mutations" return all events about the album like : AddUser, AddAdmin, RemoveUser, PromoteAdmin, DemoteAdmin, CreateAlbum, LeaveAlbum, ImportStudy, ImportSeries, RemoveStudy, RemoveSeries, EditAlbum, CreateReportProvider, EditReportProvider, DeleteReportProvider, NewReport
-
limit={limit}
(Optional) -
offset={offset}
(Optional)
Success Response
-
Status :
200 OK
Events are sorted by descending date.
[
{
"event_type": "Comment",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"comment": "second comment",
"post_date": "2018-09-23T06:59:01",
"is_private": true,
"target": {
"email": "user2@domaine.com",
"last_name": "user2 last name",
"first_name": "user2 first name",
"sub": "d4f3b303bd4e-4b98-dac4-9341-c2fd0b66"
}
},
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-22T06:59:42",
"target": {
"email": "user2@domaine.com",
"last_name": "user2 last name",
"first_name": "user2 first name",
"sub": "d4f3b303bd4e-4b98-dac4-9341-c2fd0b66"
},
"mutation_type": "ADD_USER"
},
{
"event_type": "Comment",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"comment": "first comment",
"post_date": "2018-09-21T06:59:02",
"is_private": false
},
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-20T06:58:28",
"mutation_type": "CREATE_ALBUM"
},
{...}
]
The response is a JSON array of events.
Comments events can be : private or public.
Public comment :
{
"event_type": "Comment",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"comment": "first comment",
"post_date": "2018-09-21T06:59:02",
"is_private": false
}
Private comment :
{
"event_type": "Comment",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"comment": "second comment",
"post_date": "2018-09-23T06:59:01",
"is_private": true,
"target": {
"email": "user2@domaine.com",
"last_name": "user2 last name",
"first_name": "user2 first name",
"sub": "d4f3b303bd4e-4b98-dac4-9341-c2fd0b66"
}
}
Mutations events can be : ADD_USER, ADD_ADMIN, REMOVE_USER, PROMOTE_ADMIN, DEMOTE_ADMIN, CREATE_ALBUM, LEAVE_ALBUM, IMPORT_STUDY, IMPORT_SERIES, REMOVE_STUDY, REMOVE_SERIES, EDIT_ALBUM, CREATE_REPORT_PROVIDER, EDIT_REPORT_PROVIDER, DELETE_REPORT_PROVIDER or NEW_REPORT
IMPORT_STUDY, REMOVE_STUDY :
by a user :
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-25T07:35:41",
"mutation_type": "IMPORT_STUDY",
"study": {
"UID": "2.16.840.1.113669.632.20.1211.10000314223",
"description": "PET^PETCT_WB_apc (Adult)"
}
}
with a capability token
{
"event_type": "Mutation",
"capability": {
"id": "hIU3IUjdh9",
"title": "the title"
},
"post_date": "2018-09-25T07:35:41",
"mutation_type": "IMPORT_STUDY",
"study": {
"UID": "2.16.840.1.113669.632.20.1211.10000314223",
"description": "PET^PETCT_WB_apc (Adult)"
}
}
IMPORT_SERIES, REMOVE_SERIES :
by a user :
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-25T07:35:41",
"mutation_type": "IMPORT_SERIES",
"study": {
"UID": "2.16.840.1.113669.632.20.1211.10000314223",
"description": "PET^PETCT_WB_apc (Adult)"
},
"series": {
"UID": "3.14.840.5.751489.471.55.1218.14752314753",
"description": "CT WB_Native_2mm"
}
}
with a capability token :
{
"event_type": "Mutation",
"capability": {
"id": "hIU3IUjdh9",
"title": "the title"
},
"post_date": "2018-09-25T07:35:41",
"mutation_type": "IMPORT_SERIES",
"study": {
"UID": "2.16.840.1.113669.632.20.1211.10000314223",
"description": "PET^PETCT_WB_apc (Adult)"
},
"series": {
"UID": "3.14.840.5.751489.471.55.1218.14752314753",
"description": "CT WB_Native_2mm"
}
}
ADD_USER, ADD_ADMIN, REMOVE_USER, PROMOTE_ADMIN, DEMOTE_ADMIN :
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-22T06:59:42",
"target": {
"email": "user2@domaine.com",
"last_name": "user2 last name",
"first_name": "user2 first name",
"sub": "d4f3b303bd4e-4b98-dac4-9341-c2fd0b66"
}
"mutation_type": "ADD_USER"
}
LEAVE_ALBUM :
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-25T07:02:31",
"mutation_type": "LEAVE_ALBUM"
}
CREATE_ALBUM :
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-20T06:58:28",
"mutation_type": "CREATE_ALBUM"
}
EDIT_ALBUM:
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-20T06:58:28",
"mutation_type": "EDIT_ALBUM",
"..." : ...coming soon
}
CREATE_REPORT_PROVIDER, EDIT_REPORT_PROVIDER, DELETE_REPORT_PROVIDER:
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-20T06:58:28",
"mutation_type": "CREATE_REPORT_PROVIDER",
"report_provider": {
"name": "name",
"is_removed": false,
"id": "dhiuGD29Hhbniu"
}
}
If the report provider has been removed :
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-20T06:58:28",
"mutation_type": "DELETE_REPORT_PROVIDER",
"report_provider": {
"name": "name",
"is_removed": true
}
}
NEW_REPORT:
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-20T06:58:28",
"mutation_type": "NEW_REPORT",
"report_provider": {
"name": "name",
"is_removed": false,
"id": "dhiuGD29Hhbniu"
},
"study": {
"UID": "2.16.840.1.113669.632.20.1211.10000314223",
"description": "PET^PETCT_WB_apc (Adult)"
},
"series": {
"UID": "3.14.840.5.751489.471.55.1218.14752314753",
"description": "report description"
}
}
If the report provider has been removed :
{
"event_type": "Mutation",
"origin": {
"email": "user1@domaine.com",
"last_name": "user1 last name",
"first_name": "user1 first name",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e"
},
"post_date": "2018-09-20T06:58:28",
"mutation_type": "NEW_REPORT",
"report_provider": {
"name": "name",
"is_removed": true
},
"study": {
"UID": "2.16.840.1.113669.632.20.1211.10000314223",
"description": "PET^PETCT_WB_apc (Adult)"
},
"series": {
"UID": "3.14.840.5.751489.471.55.1218.14752314753",
"description": "report description"
}
}
Error Response
If the user is not found.
If the album id does not exist.
If the user is not a member of the album.
-
Status :
404 Not Found
- Authentication API
- Study List
- Studies/Series Favorites
- Working with the Inbox
- DICOMweb Capability Tokens
- Webhooks
-
Working with Albums
- Album List
- Get an Album
- Create an album
- Edit an album
- Delete an album
- Add a study
- Add a series
- Remove a study
- Remove a series
- Add a User
- Remove a User
- Get the list of Users
- Add and upgrade an user to Admin
- Downgrade an admin to User
- Add an album to favorites
- Remove an album from favorites
- Post a comment
- Get a list of events (comments and mutations)
- Others
- Report Providers