Webhook request - OsiriX-Foundation/KheopsAuthorization GitHub Wiki
The request send by KHEOPS when a new series or a new study is added to an album or when a new user is added to the album.
URL : webhook url
Methode : POST
Header
X-Kheops-Signature
: The HMAC hex digest of the request body. This header will be sent if the webhook is configured with a secret. The HMAC hex digest is generated using the sha2 hash function and the secret as the HMAC key.X-Kheops-Attempt
: The request numbern/x
.n
is the number of the attempt andx
is the maximum number of attempts that will be made.X-Kheops-Delivery
: An ID to identify the delivery.X-Kheops-Event
: The webhook type. Can be :new_series
,new_user
,remove_series
,delete_album
Request body
New user
{
"host": "https://demo.kheops.online",
"album_id": "reHZU15WLi",
"event_time": "2020-01-24T10:13:13.360389300",
"source": {
"email": "[email protected]",
"last_name": "user",
"first_name": "one",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e",
"is_admin": true
},
"is_manual_trigger": false,
"new_user": {
"email": "[email protected]",
"last_name": "user",
"first_name": "two",
"sub": "baa88921-db53-4a59-80d3-7853da25e7f0",
"is_admin": false
}
}
New series
{
"host": "https://demo.kheops.online",
"album_id": "cqir6dUDBC",
"event_time": "2020-01-24T09:23:06.912",
"import_source": "upload",
"source": {
"email": "[email protected]",
"last_name": "user",
"first_name": "one",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e",
"is_admin": true
},
"is_manual_trigger": false,
"updated_study": {
"patient_name": "ANEURIX",
"patient_ID": "FhM2hk",
"study_uid": "2.16.840.1.113669.632.20.1211.10000744858",
"study_date": "20080821",
"study_time": "150122.906000",
"timezone_offset_from_utc": "-0200",
"study_description": "Vasculaire^Angio_MI (Adulte)",
"study_id": "A10048724269",
"accession_number": "1234",
"referring_physician_name": "NuvOKz90RcTFE0oW",
"patient_birth_date": "19450201",
"patient_sex": "F",
"retrieve_url": "https://demo.kheops.online/api/studies/2.16.840.1.113669.632.20.1211.10000744858",
"series": [
{
"modality": "CT",
"series_description": "LL",
"series_uid": "1.3.6.1.4.1.19291.2.1.2.2413568109772100001",
"number_of_series_related_instance": 922,
"body_part_examined": "chest",
"timezone_offset_from_utc": "-0200",
"series_number": 12345,
"retrieve_url": "https://demo.kheops.online/api/studies/2.16.840.1.113669.632.20.1211.10000744858/series/1.3.6.1.4.1.19291.2.1.2.2413568109772100001"
}
]
}
}
New study
{
"host": "https://demo.kheops.online",
"album_id": "cqir6dUDBC",
"event_time": "2020-01-24T09:25:51.746",
"import_source": "send",
"source": {
"email": "[email protected]",
"last_name": "user",
"first_name": "one",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e",
"is_admin": true
},
"is_manual_trigger": false,
"updated_study": {
"patient_name": "ANEURIX",
"patient_ID": "FhM2hk",
"study_uid": "2.16.840.1.113669.632.20.1211.10000744858",
"study_date": "20080821",
"study_time": "150122.906000",
"timezone_offset_from_utc": "-0200",
"study_description": "Vasculaire^Angio_MI (Adulte)",
"study_id": "A10048724269",
"accession_number": "1234",
"referring_physician_name": "NuvOKz90RcTFE0oW",
"patient_birth_date": "19450201",
"patient_sex": "F",
"retrieve_url": "https://demo.kheops.online/api/studies/2.16.840.1.113669.632.20.1211.10000744858",
"series": [
{
"modality": "CT",
"series_description": "\"LL - Calibrated\"",
"series_uid": "1.2.276.0.7238010.5.1.3.0.36848.1378230634.93",
"number_of_series_related_instance": 1,
"body_part_examined": "chest",
"timezone_offset_from_utc": "-0200",
"series_number": 2734568347,
"retrieve_url": "https://demo.kheops.online/api/studies/2.16.840.1.113669.632.20.1211.10000744858/series/1.2.276.0.7238010.5.1.3.0.36848.1378230634.93"
},
{
"modality": "CT",
"series_description": "\"LL - Calibrated\"",
"series_uid": "1.2.276.0.7238010.5.1.3.0.41064.1378234874.1",
"number_of_series_related_instance": 1,
"body_part_examined": "chest",
"timezone_offset_from_utc": "-0200",
"series_number": 90789,
"retrieve_url": "https://demo.kheops.online/api/studies/2.16.840.1.113669.632.20.1211.10000744858/series/1.2.276.0.7238010.5.1.3.0.41064.1378234874.1"
},
{
"modality": "CT",
"series_description": "LL",
"series_uid": "1.3.6.1.4.1.19291.2.1.2.2413568109772100001",
"number_of_series_related_instance": 922,
"body_part_examined": "chest",
"timezone_offset_from_utc": "-0200",
"series_number": 67876876,
"retrieve_url": "https://demo.kheops.online/api/studies/2.16.840.1.113669.632.20.1211.10000744858/series/1.3.6.1.4.1.19291.2.1.2.2413568109772100001"
},
{...}
],
}
}
If the new series comes from a report provider, the following json parameter is added to the source
parameter.
"report_provider": {
"name": "report provider name",
"client_id": "OOjTXlQdrFwyi1vJfOh1na"
}
If the new series come from an album capability token, the following json parameter is added to the source
parameter.
"capability_token": {
"id": "x3zYcA6wjn",
"title": "the name of the token"
}
Remove series
{
"host": "https://demo.kheops.online",
"album_id": "cqir6dUDBC",
"event_time": "2020-01-24T09:23:06.912",
"remove_all_series": false,
"source": {
"email": "[email protected]",
"last_name": "user",
"first_name": "one",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e",
"is_admin": true
},
"is_manual_trigger": false,
"updated_study": {
"patient_name": "ANEURIX",
"patient_ID": "FhM2hk",
"study_uid": "2.16.840.1.113669.632.20.1211.10000744858",
"study_date": "20080821",
"study_time": "150122.906000",
"timezone_offset_from_utc": "-0200",
"study_description": "Vasculaire^Angio_MI (Adulte)",
"study_id": "A10048724269",
"accession_number": "1234",
"referring_physician_name": "NuvOKz90RcTFE0oW",
"patient_birth_date": "19450201",
"patient_sex": "F",
"retrieve_url": "https://demo.kheops.online/api/studies/2.16.840.1.113669.632.20.1211.10000744858",
"series": [
{
"modality": "CT",
"series_description": "LL",
"series_uid": "1.3.6.1.4.1.19291.2.1.2.2413568109772100001",
"number_of_series_related_instance": 922,
"body_part_examined": "chest",
"timezone_offset_from_utc": "-0200",
"series_number": 12345
}
]
}
}
Remove study
{
"host": "https://demo.kheops.online",
"album_id": "cqir6dUDBC",
"event_time": "2020-01-24T09:25:51.746",
"remove_all_series": true,
"source": {
"email": "[email protected]",
"last_name": "user",
"first_name": "one",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e",
"is_admin": true
},
"is_manual_trigger": false,
"updated_study": {
"patient_name": "ANEURIX",
"patient_ID": "FhM2hk",
"study_uid": "2.16.840.1.113669.632.20.1211.10000744858",
"study_date": "20080821",
"study_time": "150122.906000",
"timezone_offset_from_utc": "-0200",
"study_description": "Vasculaire^Angio_MI (Adulte)",
"study_id": "A10048724269",
"accession_number": "1234",
"referring_physician_name": "NuvOKz90RcTFE0oW",
"patient_birth_date": "19450201",
"patient_sex": "F",
"series": [
{
"modality": "CT",
"series_description": "\"LL - Calibrated\"",
"series_uid": "1.2.276.0.7238010.5.1.3.0.36848.1378230634.93",
"number_of_series_related_instance": 1,
"body_part_examined": "chest",
"timezone_offset_from_utc": "-0200",
"series_number": 2734568347
},
{
"modality": "CT",
"series_description": "\"LL - Calibrated\"",
"series_uid": "1.2.276.0.7238010.5.1.3.0.41064.1378234874.1",
"number_of_series_related_instance": 1,
"body_part_examined": "chest",
"timezone_offset_from_utc": "-0200",
"series_number": 90789
},
{
"modality": "CT",
"series_description": "LL",
"series_uid": "1.3.6.1.4.1.19291.2.1.2.2413568109772100001",
"number_of_series_related_instance": 922,
"body_part_examined": "chest",
"timezone_offset_from_utc": "-0200",
"series_number": 67876876
},
{...}
],
}
}
If the series is removed by an album capability token, the following json parameter is added to the source
parameter.
"capability_token": {
"id": "x3zYcA6wjn",
"title": "the name of the token"
}
Delete album
{
"host": "https://demo.kheops.online",
"album_id": "cqir6dUDBC",
"event_time": "2020-01-24T09:25:51.746",
"source": {
"email": "[email protected]",
"last_name": "user",
"first_name": "one",
"sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e",
"is_admin": true
},
"is_manual_trigger": false
}
}