Mercurial > hg > orthanc-book
comparison OpenAPI/orthanc-openapi.yaml @ 265:4e1a034ace3f
initial publication of openapi
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 16 Aug 2019 15:10:58 +0200 |
parents | |
children | 0a97b61ae021 |
comparison
equal
deleted
inserted
replaced
264:e6a478800d42 | 265:4e1a034ace3f |
---|---|
1 openapi: 3.0.0 | |
2 info: | |
3 title: Orthanc | |
4 version: 1.0.0 | |
5 description: >- | |
6 One of the major strengths of Orthanc lies in its built-in RESTful API, that can be used to drive Orthanc from external applications, independently of the programming language that is used to develop these applications. The REST API of Orthanc gives a full programmatic access to all the core features of Orthanc. Importantly, Orthanc Explorer (the embedded administrative interface of Orthanc) entirely resorts to this REST API for all its features. This implies that anything that can be done through Orthanc Explorer, can also be done through REST queries. | |
7 servers: | |
8 - url: 'https://demo.orthanc-server.com' | |
9 paths: | |
10 /instances: | |
11 post: | |
12 tags: [Instances] | |
13 description: The upload of DICOM files is possible by querying the REST API using the following syntax. | |
14 requestBody: | |
15 description: DICOM file | |
16 content: | |
17 application/dicom: {} | |
18 responses: | |
19 200: | |
20 description: New instance successfully posted | |
21 content: | |
22 application/json: | |
23 schema: | |
24 properties: | |
25 ID: | |
26 description: New Orthanc instance ID | |
27 type: string | |
28 Path: | |
29 description: URL path for the instance | |
30 type: string | |
31 Status: | |
32 description: Status | |
33 type: string | |
34 enum: | |
35 - Success | |
36 get: | |
37 tags: [Instances] | |
38 description: Get all DICOM instances ID's in Orthanc | |
39 responses: | |
40 200: | |
41 description: Array of all instances ID's | |
42 content: | |
43 application/json: | |
44 schema: | |
45 type: array | |
46 items: | |
47 type: string | |
48 example: [ | |
49 "055bfbaf-2aae936c-82ed5a9a-9267f8b7-416a4000", | |
50 "62dc1ec1-9fc2dd9d-aa66eae1-0db608b1-e17f8ce8" | |
51 ] | |
52 /instances/{Id}: | |
53 get: | |
54 tags: [Instances] | |
55 description: Get an instance from Orthanc | |
56 parameters: | |
57 - name: Id | |
58 required: true | |
59 in: path | |
60 schema: | |
61 type: string | |
62 responses: | |
63 200: | |
64 description: Orthanc instance | |
65 content: | |
66 application/json: | |
67 schema: | |
68 properties: | |
69 FileSize: | |
70 type: number | |
71 FileUuid: | |
72 type: string | |
73 ID: | |
74 type: string | |
75 IndexInSeries: | |
76 type: number | |
77 MainDicomTags: | |
78 type: object | |
79 properties: | |
80 AcquisitionNumber: | |
81 type: string | |
82 ImageIndex: | |
83 type: string | |
84 ImagePositionPatient: | |
85 type: string | |
86 InstanceNumber: | |
87 type: string | |
88 SOPInstanceUID: | |
89 type: string | |
90 ParentSeries: | |
91 type: string | |
92 Type: | |
93 enum: | |
94 - Instance | |
95 example: { | |
96 "FileSize" : 35440, | |
97 "FileUuid" : "7976ad32-4d15-439b-8789-bf70f52200ec", | |
98 "ID" : "055bfbaf-2aae936c-82ed5a9a-9267f8b7-416a4000", | |
99 "IndexInSeries" : 59, | |
100 "MainDicomTags" : { | |
101 "AcquisitionNumber" : "2", | |
102 "ImageIndex" : "59", | |
103 "ImagePositionPatient" : "-134.74816\\-272.14441\\-712.764", | |
104 "InstanceNumber" : "59", | |
105 "SOPInstanceUID" : "1.3.12.2.1107.5.1.4.36085.2.0.3752288429331748" | |
106 }, | |
107 "ParentSeries" : "318603c5-03e8cffc-a82b6ee1-3ccd3c1e-18d7e3bb", | |
108 "Type" : "Instance" | |
109 } | |
110 delete: | |
111 tags : [Instances] | |
112 description: Delete an instance | |
113 parameters: | |
114 - name: Id | |
115 required: true | |
116 in: path | |
117 schema: | |
118 type: string | |
119 responses: | |
120 200: | |
121 description: Success | |
122 /instances/{Id}/simplified-tags: | |
123 get: | |
124 tags: [Instances] | |
125 description: Get the human readable tags for the DICOM instance. | |
126 parameters: | |
127 - name: Id | |
128 required: true | |
129 in: path | |
130 schema: | |
131 type: string | |
132 responses: | |
133 200: | |
134 description: DICOM tags and values | |
135 content: | |
136 application/json: | |
137 schema: | |
138 type: object | |
139 example: { | |
140 "ACR_NEMA_2C_VariablePixelDataGroupLength" : "57130", | |
141 "AccessionNumber" : null, | |
142 "AcquisitionDate" : "20120716", | |
143 "AcquisitionDateTime" : "20120716171219", | |
144 "AcquisitionTime" : "171219", | |
145 "ActualFrameDuration" : "3597793", | |
146 "AttenuationCorrectionMethod" : "CTAC-SG", | |
147 "PatientID" : "000000185", | |
148 "PatientName" : "Anonymous^Unknown", | |
149 "PatientOrientationCodeSequence" : [ | |
150 { | |
151 "CodeMeaning" : "recumbent", | |
152 "CodeValue" : "F-10450", | |
153 "CodingSchemeDesignator" : "99SDM", | |
154 "PatientOrientationModifierCodeSequence" : [ | |
155 { | |
156 "CodeMeaning" : "supine", | |
157 "CodeValue" : "F-10340", | |
158 "CodingSchemeDesignator" : "99SDM" | |
159 } | |
160 ] | |
161 } | |
162 ], | |
163 "StudyDescription" : "TestSUVce-TF", | |
164 "StudyID" : "23848", | |
165 "StudyInstanceUID" : "1.2.840.113704.1.111.7016.1342451220.40", | |
166 "StudyTime" : "171117", | |
167 "TypeOfDetectorMotion" : "NONE", | |
168 "Units" : "BQML", | |
169 "Unknown" : null, | |
170 "WindowCenter" : "1.496995e+04", | |
171 "WindowWidth" : "2.993990e+04" | |
172 } | |
173 /instances/{Id}/tags: | |
174 get: | |
175 tags: [Instances] | |
176 description: Get the detailed tags for the DICOM instance. | |
177 parameters: | |
178 - name: Id | |
179 required: true | |
180 in: path | |
181 schema: | |
182 type: string | |
183 responses: | |
184 200: | |
185 description: DICOM tags and values | |
186 content: | |
187 application/json: | |
188 schema: | |
189 type: object | |
190 example: | |
191 { | |
192 "0008,0005" : { | |
193 "Name" : "SpecificCharacterSet", | |
194 "Type" : "String", | |
195 "Value" : "ISO_IR 100" | |
196 }, | |
197 "0008,0008" : { | |
198 "Name" : "ImageType", | |
199 "Type" : "String", | |
200 "Value" : "ORIGINAL\\PRIMARY\\HEADER_CORRECTED" | |
201 }, | |
202 "0008,0016" : { | |
203 "Name" : "SOPClassUID", | |
204 "Type" : "String", | |
205 "Value" : "1.2.840.10008.5.1.4.1.1.128" | |
206 }, | |
207 "0008,0018" : { | |
208 "Name" : "SOPInstanceUID", | |
209 "Type" : "String", | |
210 "Value" : "1.3.12.2.1107.5.1.4.36085.2.0.3752288429331748" | |
211 }, | |
212 "0008,0020" : { | |
213 "Name" : "StudyDate", | |
214 "Type" : "String", | |
215 "Value" : "20040304" | |
216 }, | |
217 "0008,0021" : { | |
218 "Name" : "SeriesDate", | |
219 "Type" : "String", | |
220 "Value" : "20040304" | |
221 }, | |
222 "0008,0022" : { | |
223 "Name" : "AcquisitionDate", | |
224 "Type" : "String", | |
225 "Value" : "20040304" | |
226 } | |
227 } | |
228 /instances/{Id}/content/{Tag}: | |
229 get: | |
230 tags: [Instances] | |
231 description: Get the value for a single tag of a DICOM instance. | |
232 parameters: | |
233 - name: Id | |
234 required: true | |
235 in: path | |
236 schema: | |
237 type: string | |
238 - name: Tag | |
239 required: true | |
240 in: path | |
241 schema: | |
242 type: string | |
243 responses: | |
244 200: | |
245 description: Returns the DICOM tag value or value sub-structure. | |
246 content: | |
247 application/json: | |
248 schema: | |
249 type: object | |
250 text/plain: | |
251 example: Anonymous^Unknown | |
252 /instances/{Id}/file: | |
253 get: | |
254 tags: [Instances] | |
255 description: Download the DICOM instance file in DCM format. | |
256 parameters: | |
257 - name: Id | |
258 required: true | |
259 in: path | |
260 schema: | |
261 type: string | |
262 responses: | |
263 200: | |
264 description: DICOM file contents | |
265 content: | |
266 application/dicom: {} | |
267 /instances/{Id}/preview: | |
268 get: | |
269 tags: [Instances] | |
270 description: Download a preview image of the DICOM instance. | |
271 parameters: | |
272 - name: Id | |
273 required: true | |
274 in: path | |
275 schema: | |
276 type: string | |
277 - name: Accept | |
278 description: Default is image/png | |
279 required: false | |
280 in: header | |
281 schema: | |
282 type: string | |
283 enum: | |
284 - image/png | |
285 - image/jpeg | |
286 responses: | |
287 200: | |
288 description: DICOM preview | |
289 content: | |
290 image/png: {} | |
291 image/jpg: {} | |
292 /instances/{Id}/{PixelFormat}: | |
293 get: | |
294 tags: [Instances] | |
295 description: Download a preview image of the DICOM instance. | |
296 parameters: | |
297 - name: Id | |
298 required: true | |
299 in: path | |
300 schema: | |
301 type: string | |
302 - name: PixelFormat | |
303 required: true | |
304 in: path | |
305 schema: | |
306 type: string | |
307 enum: | |
308 - image-uint8 | |
309 - image-uint16 | |
310 - image-int16 | |
311 - name: Accept | |
312 required: true | |
313 in: header | |
314 schema: | |
315 type: string | |
316 enum: | |
317 - image/png | |
318 - image/jpeg | |
319 - image/x-portable-arbitrarymap | |
320 responses: | |
321 200: | |
322 description: DICOM preview | |
323 content: | |
324 image/png: {} | |
325 image/jpg: {} | |
326 image/x-portable-arbitrarymap: {} | |
327 /instances/{Id}/pdf: | |
328 get: | |
329 tags: [Instances] | |
330 description: Download the embedded PDF of the DICOM instance. | |
331 parameters: | |
332 - name: Id | |
333 required: true | |
334 in: path | |
335 schema: | |
336 type: string | |
337 responses: | |
338 200: | |
339 description: The raw PDF bytes are returned. | |
340 content: | |
341 application/pdf: {} | |
342 404: | |
343 description: The instance does not contain an encapsulated PDF or the instance is not found. | |
344 /series: | |
345 get: | |
346 tags: [Series] | |
347 description: Get all DICOM series ID's in Orthanc | |
348 responses: | |
349 200: | |
350 description: Array of all series ID's | |
351 content: | |
352 application/json: | |
353 schema: | |
354 type: array | |
355 items: | |
356 type: string | |
357 example: [ | |
358 "055bfbaf-2aae936c-82ed5a9a-9267f8b7-416a4000", | |
359 "62dc1ec1-9fc2dd9d-aa66eae1-0db608b1-e17f8ce8" | |
360 ] | |
361 /series/{Id}: | |
362 get: | |
363 tags: [Series] | |
364 description: Get a series from Orthanc | |
365 parameters: | |
366 - name: Id | |
367 required: true | |
368 in: path | |
369 schema: | |
370 type: string | |
371 responses: | |
372 200: | |
373 description: Orthanc series | |
374 content: | |
375 application/json: | |
376 schema: | |
377 properties: | |
378 ID: | |
379 type: string | |
380 ExpectedNumberOfInstances: | |
381 type: number | |
382 Instances: | |
383 type: array | |
384 items: | |
385 type: string | |
386 MainDicomTags: | |
387 type: object | |
388 properties: | |
389 Manufacturer: | |
390 type: string | |
391 Modality: | |
392 type: string | |
393 NumberOfSlices: | |
394 type: string | |
395 ProtocolName: | |
396 type: string | |
397 SeriesDate: | |
398 type: string | |
399 SeriesDescription: | |
400 type: string | |
401 SeriesInstanceUID: | |
402 type: string | |
403 SeriesNumber: | |
404 type: string | |
405 SeriesTime: | |
406 type: string | |
407 StationName: | |
408 type: string | |
409 ParentStudy: | |
410 type: string | |
411 Type: | |
412 type: string | |
413 enum: | |
414 - Series | |
415 Status: | |
416 type: string | |
417 enum: | |
418 - Complete | |
419 example: { | |
420 "ExpectedNumberOfInstances" : 45, | |
421 "ID" : "2cc6336f-2d4ae733-537b3ca3-e98184b1-ba494b35", | |
422 "Instances" : [ | |
423 "41bc3f74-360f9d10-6ae9ffa4-01ea2045-cbd457dd", | |
424 "1d3de868-6c4f0494-709fd140-7ccc4c94-a6daa3a8", | |
425 "1010f80b-161b71c0-897ec01b-c85cd206-e669a3ea", | |
426 "e668dcbf-8829a100-c0bd203b-41e404d9-c533f3d4" | |
427 ], | |
428 "MainDicomTags" : { | |
429 "Manufacturer" : "Philips Medical Systems", | |
430 "Modality" : "PT", | |
431 "NumberOfSlices" : "45", | |
432 "ProtocolName" : "CHU/Body_PET/CT___50", | |
433 "SeriesDate" : "20120716", | |
434 "SeriesDescription" : "[WB_CTAC] Body", | |
435 "SeriesInstanceUID" : "1.3.46.670589.28.2.12.30.26407.37145.2.2516.0.1342458737", | |
436 "SeriesNumber" : "587370", | |
437 "SeriesTime" : "171121", | |
438 "StationName" : "r054-svr" | |
439 }, | |
440 "ParentStudy" : "9ad2b0da-a406c43c-6e0df76d-1204b86f-78d12c15", | |
441 "Status" : "Complete", | |
442 "Type" : "Series" | |
443 } | |
444 delete: | |
445 tags : [Series] | |
446 description: Delete a series | |
447 parameters: | |
448 - name: Id | |
449 required: true | |
450 in: path | |
451 schema: | |
452 type: string | |
453 responses: | |
454 200: | |
455 description: Success | |
456 /studies: | |
457 get: | |
458 tags: [Studies] | |
459 description: Get all DICOM studies ID's in Orthanc | |
460 responses: | |
461 200: | |
462 description: Array of all study ID's | |
463 content: | |
464 application/json: | |
465 schema: | |
466 type: array | |
467 items: | |
468 type: string | |
469 example: [ | |
470 "055bfbaf-2aae936c-82ed5a9a-9267f8b7-416a4000", | |
471 "62dc1ec1-9fc2dd9d-aa66eae1-0db608b1-e17f8ce8" | |
472 ] | |
473 /studies/{Id}: | |
474 get: | |
475 tags: [Studies] | |
476 description: Get a study from Orthanc | |
477 parameters: | |
478 - name: Id | |
479 required: true | |
480 in: path | |
481 schema: | |
482 type: string | |
483 responses: | |
484 200: | |
485 description: Orthanc study | |
486 content: | |
487 application/json: | |
488 schema: | |
489 properties: | |
490 ID: | |
491 type: string | |
492 Series: | |
493 type: array | |
494 items: | |
495 type: string | |
496 MainDicomTags: | |
497 type: object | |
498 properties: | |
499 AccesionNumber: | |
500 type: string | |
501 StudyDate: | |
502 type: string | |
503 StudyDescription: | |
504 type: string | |
505 StudyID: | |
506 type: string | |
507 StudyInstanceUID: | |
508 type: string | |
509 StudyTime: | |
510 type: string | |
511 ParentPatient: | |
512 type: string | |
513 Type: | |
514 type: string | |
515 enum: | |
516 - Study | |
517 example: { | |
518 "ID" : "9ad2b0da-a406c43c-6e0df76d-1204b86f-78d12c15", | |
519 "MainDicomTags" : { | |
520 "AccessionNumber" : "(null)", | |
521 "StudyDate" : "20120716", | |
522 "StudyDescription" : "TestSUVce-TF", | |
523 "StudyID" : "23848", | |
524 "StudyInstanceUID" : "1.2.840.113704.1.111.7016.1342451220.40", | |
525 "StudyTime" : "170728" | |
526 }, | |
527 "ParentPatient" : "07a6ec1c-1be5920b-18ef5358-d24441f3-10e926ea", | |
528 "Series" : [ | |
529 "6821d761-31fb55a9-031ebecb-ba7f9aae-ffe4ddc0", | |
530 "2cc6336f-2d4ae733-537b3ca3-e98184b1-ba494b35", | |
531 "7384c47e-6398f2a8-901846ef-da1e2e0b-6c50d598" | |
532 ], | |
533 "Type" : "Study" | |
534 } | |
535 delete: | |
536 tags : [Studies] | |
537 description: Delete a study | |
538 parameters: | |
539 - name: Id | |
540 required: true | |
541 in: path | |
542 schema: | |
543 type: string | |
544 responses: | |
545 200: | |
546 description: Success | |
547 /patients: | |
548 get: | |
549 tags: [Patients] | |
550 description: Get all DICOM patient ID's in Orthanc | |
551 responses: | |
552 200: | |
553 description: Array of all patient ID's | |
554 content: | |
555 application/json: | |
556 schema: | |
557 type: array | |
558 items: | |
559 type: string | |
560 example: [ | |
561 "055bfbaf-2aae936c-82ed5a9a-9267f8b7-416a4000", | |
562 "62dc1ec1-9fc2dd9d-aa66eae1-0db608b1-e17f8ce8" | |
563 ] | |
564 /patients/{Id}: | |
565 get: | |
566 tags: [Patients] | |
567 description: Get a patient from Orthanc | |
568 parameters: | |
569 - name: Id | |
570 required: true | |
571 in: path | |
572 schema: | |
573 type: string | |
574 responses: | |
575 200: | |
576 description: Orthanc patient | |
577 content: | |
578 application/json: | |
579 schema: | |
580 properties: | |
581 ID: | |
582 type: string | |
583 Studies: | |
584 type: array | |
585 items: | |
586 type: string | |
587 MainDicomTags: | |
588 type: object | |
589 properties: | |
590 OtherPatientIDs: | |
591 type: string | |
592 PatientBirthDate: | |
593 type: string | |
594 PatientName: | |
595 type: string | |
596 PatientSex: | |
597 type: string | |
598 ParentPatient: | |
599 type: string | |
600 Type: | |
601 type: string | |
602 enum: | |
603 - Patient | |
604 example: { | |
605 "ID" : "07a6ec1c-1be5920b-18ef5358-d24441f3-10e926ea", | |
606 "MainDicomTags" : { | |
607 "OtherPatientIDs" : "(null)", | |
608 "PatientBirthDate" : "0", | |
609 "PatientID" : "000000185", | |
610 "PatientName" : "Anonymous^Unknown", | |
611 "PatientSex" : "O" | |
612 }, | |
613 "Studies" : [ "9ad2b0da-a406c43c-6e0df76d-1204b86f-78d12c15" ], | |
614 "Type" : "Patient" | |
615 } | |
616 delete: | |
617 tags : [Patients] | |
618 description: Delete a patient | |
619 parameters: | |
620 - name: Id | |
621 required: true | |
622 in: path | |
623 schema: | |
624 type: string | |
625 responses: | |
626 200: | |
627 description: Success | |
628 | |
629 /peers: | |
630 get: | |
631 tags: [Orthanc Peers] | |
632 description: Get a list of Orthanc peers. | |
633 parameters: | |
634 - name: expand | |
635 in: query | |
636 required: false | |
637 schema: | |
638 type: boolean | |
639 responses: | |
640 200: | |
641 description: List of Orthanc peers | |
642 content: | |
643 application/json: | |
644 schema: | |
645 type: array | |
646 items: | |
647 type: string | |
648 /peers/{Peer}: | |
649 put: | |
650 tags: [Orthanc Peers] | |
651 description: Add a new Orthanc peer. Note that this will only be stored in memory unless the 'OrthancPeersInDatabase' configuration option is set. | |
652 parameters: | |
653 - name: Peer | |
654 in: path | |
655 required: true | |
656 schema: | |
657 type: string | |
658 requestBody: | |
659 content: | |
660 application/json: | |
661 schema: | |
662 properties: | |
663 Url: | |
664 type: string | |
665 responses: | |
666 200: | |
667 description: Peer created | |
668 /peers/{Peer}/store: | |
669 post: | |
670 tags: [Orthanc Peers] | |
671 description: Send a resource to an Orthanc peer. Resource ID's are provided either as JSON array or a raw string. | |
672 parameters: | |
673 - name: Peer | |
674 in: path | |
675 required: true | |
676 schema: | |
677 type: string | |
678 requestBody: | |
679 content: | |
680 application/json: | |
681 schema: | |
682 type: array | |
683 items: | |
684 type: string | |
685 description: Resource ID (patient, study, series or instance) to send to the peer. | |
686 example: ["d4b46c8e-74b16992-b0f5ca11-f04a60fa-8eb13a88","d5604121-7d613ce6-c315a5-a77b3cf3-9c253b23","cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e"] | |
687 text/plain: | |
688 example: d4b46c8e-74b16992-b0f5ca11-f04a60fa-8eb13a88 | |
689 responses: | |
690 200: | |
691 description: Resources sent | |
692 | |
693 /modalities/{Modality}/store: | |
694 post: | |
695 tags: [Orthanc Peers] | |
696 description: Once you have identified the Orthanc identifier of the DICOM resource that would like to send you would use the following command to send it. | |
697 parameters: | |
698 - name: Modality | |
699 in: path | |
700 required: true | |
701 description: The Modality to invoke C-STORE from within the Orthanc configuration file | |
702 schema: | |
703 type: string | |
704 requestBody: | |
705 content: | |
706 application/json: | |
707 schema: | |
708 type: array | |
709 items: | |
710 type: string | |
711 description: Resource ID (patient, study, series or instance) to send to the remote modality. | |
712 example: ["d4b46c8e-74b16992-b0f5ca11-f04a60fa-8eb13a88","d5604121-7d613ce6-c315a5-a77b3cf3-9c253b23","cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e"] | |
713 text/plain: | |
714 example: d4b46c8e-74b16992-b0f5ca11-f04a60fa-8eb13a88 | |
715 responses: | |
716 200: | |
717 description: Resources sent | |
718 /modalities/{Modality}/query: | |
719 post: | |
720 tags: [Remote Modalities] | |
721 description: To initiate a query you perform a POST command against the Modality with the identifiers you are looking for. This search is case insensitive unless configured otherwise within the Orthanc configuration file. Note that queries are cleaned up after a period of inactivity, which can sometimes be very short. You will need to access the query results quickly. | |
722 parameters: | |
723 - name: Modality | |
724 in: path | |
725 required: true | |
726 description: The Modality to be queried from within the Orthanc configuration file | |
727 schema: | |
728 type: string | |
729 requestBody: | |
730 content: | |
731 application/json: | |
732 schema: | |
733 properties: | |
734 Level: | |
735 type: string | |
736 enum: | |
737 - Patient | |
738 - Study | |
739 - Series | |
740 - Instance | |
741 Query: | |
742 type: object | |
743 properties: | |
744 PatientID: | |
745 type: string | |
746 StudyDescription: | |
747 type: string | |
748 description: Match the study description. Note that wildcard "*" can be used to match any text (eg. "*Chest*"). | |
749 PatientName: | |
750 type: string | |
751 StudyDate: | |
752 type: string | |
753 description: This is the study date in the format "20160504". Note that ranges can be used using a hyphen (eg. "20160504-" and "20160504-20170504"). | |
754 StudyTime: | |
755 type: string | |
756 required: [Level, Query] | |
757 example: {"Level":"Study","Query": {"PatientID":"","StudyDescription":"*Chest*","PatientName":""}} | |
758 responses: | |
759 200: | |
760 description: Query successful | |
761 content: | |
762 application/json: | |
763 schema: | |
764 properties: | |
765 ID: | |
766 type: string | |
767 Path: | |
768 type: string | |
769 example: { | |
770 "ID": "5af318ac-78fb-47ff-b0b0-0df18b0588e0", | |
771 "Path": "/queries/5af318ac-78fb-47ff-b0b0-0df18b0588e0" | |
772 } | |
773 /queries/{QueryID}/level: | |
774 get: | |
775 tags: [Remote Modalities] | |
776 description: Review the query level, such as Patient, Study, Series or Instance. | |
777 parameters: | |
778 - name: QueryID | |
779 description: This is the query ID that comes from posting a query to the modality. | |
780 in: path | |
781 required: true | |
782 schema: | |
783 type: string | |
784 responses: | |
785 200: | |
786 description: Return the level of the query, whether Patient, Study, Series or Instance. | |
787 content: | |
788 text/plain: | |
789 example: Series | |
790 /queries/{QueryID}/modality: | |
791 get: | |
792 tags: [Remote Modalities] | |
793 description: Review the query modality name that the query was originally performed against. | |
794 parameters: | |
795 - name: QueryID | |
796 description: This is the query ID that comes from posting a query to the modality. | |
797 in: path | |
798 required: true | |
799 schema: | |
800 type: string | |
801 responses: | |
802 200: | |
803 description: Return the name of the modality that the query was run against. | |
804 content: | |
805 text/plain: | |
806 example: SomeModalityName | |
807 /queries/{QueryID}/query: | |
808 get: | |
809 tags: [Remote Modalities] | |
810 description: Review the query that was posted. | |
811 parameters: | |
812 - name: QueryID | |
813 description: This is the query ID that comes from posting a query to the modality. | |
814 in: path | |
815 required: true | |
816 schema: | |
817 type: string | |
818 responses: | |
819 200: | |
820 description: Return the query identifiers that were used originally when it was posted. | |
821 /queries/{QueryID}/answers: | |
822 get: | |
823 tags: [Remote Modalities] | |
824 description: Review the query answers. | |
825 parameters: | |
826 - name: QueryID | |
827 description: This is the query ID that comes from posting a query to the modality. | |
828 in: path | |
829 required: true | |
830 schema: | |
831 type: string | |
832 responses: | |
833 200: | |
834 description: Return the query answers. | |
835 /queries/{QueryID}/answers/{Idx}/content: | |
836 get: | |
837 tags: [Remote Modalities] | |
838 description: Review a specific query answer. If there are content items missing, you may add them by adding that identifier to the original query. For example if we wanted Modalities listed in this JSON answer in the initial query we would add to the POST body "ModalitiesInStudy":"" | |
839 parameters: | |
840 - name: QueryID | |
841 description: This is the query ID that comes from posting a query to the modality. | |
842 in: path | |
843 required: true | |
844 schema: | |
845 type: string | |
846 - name: Idx | |
847 description: This is the index of a specific answer in the list of answers of the query. | |
848 in: path | |
849 required: true | |
850 schema: | |
851 type: number | |
852 responses: | |
853 200: | |
854 description: Return a single query answer | |
855 content: | |
856 application/json: {} | |
857 /queries/{QueryID}/retrieve: | |
858 post: | |
859 tags: [Remote Modalities] | |
860 description: You can perform a C-Move to retrieve all studies within the original query using a post command and identifying the Modality (named in this example Orthanc), to be one to in the POST contents. The C-Move can be done asynchronously using an Orthanc job using a JSON parameter in the request body. | |
861 parameters: | |
862 - name: QueryID | |
863 description: This is the query ID that comes from posting a query to the modality. | |
864 in: path | |
865 required: true | |
866 schema: | |
867 type: string | |
868 requestBody: | |
869 description: The request body is the name of the modality to perform the C-Move or a JSON structure with additional information. | |
870 content: | |
871 text/plain: | |
872 example: Orthanc | |
873 application/json: | |
874 schema: | |
875 properties: | |
876 TargetAet: | |
877 type: string | |
878 Synchronous: | |
879 type: boolean | |
880 default: true | |
881 description: If Synchronous is set to false then this operation runs as an Orthanc job. The output of this request will indicate the Job ID. | |
882 Priority: | |
883 type: number | |
884 default: 0 | |
885 description: If Synchronous is set to false then this sets the priority of the job. The default priority is 0. | |
886 example: {"TargetAet":"Orthanc","Synchronous":false} | |
887 responses: | |
888 200: | |
889 description: Success | |
890 content: | |
891 application/json: | |
892 schema: | |
893 properties: | |
894 ID: | |
895 type: string | |
896 description: The ID of the job if the retrieve is asynchronous (ie. Synchronous is set to true) | |
897 Path: | |
898 type: string | |
899 description: The URL path of the job if the retrieve is asynchronous (ie. Synchronous is set to false) | |
900 example: { | |
901 "ID" : "11541b16-e368-41cf-a8e9-3acf4061d238", | |
902 "Path" : "/jobs/11541b16-e368-41cf-a8e9-3acf4061d238" | |
903 } | |
904 /queries/{QueryID}/answers/{Idx}/retrieve: | |
905 post: | |
906 tags: [Remote Modalities] | |
907 description: You can perform a C-Move to retrieve a specific study within the original query using a post command and identifying the Modality (named in this example Orthanc), to be one to in the POST contents. | |
908 parameters: | |
909 - name: QueryID | |
910 description: This is the query ID that comes from posting a query to the modality. | |
911 in: path | |
912 required: true | |
913 schema: | |
914 type: string | |
915 - name: Idx | |
916 description: This is the index of a specific answer in the list of answers of the query. | |
917 in: path | |
918 required: true | |
919 schema: | |
920 type: number | |
921 requestBody: | |
922 description: The request body is the name of the modality to perform the C-Move. | |
923 content: | |
924 text/plain: | |
925 example: Orthanc | |
926 responses: | |
927 200: | |
928 description: Success | |
929 /tools/find: | |
930 post: | |
931 tags: [Find] | |
932 description: Performing a find within Orthanc is very similar to using Queries against DICOM modalities and the additional options listed above work with find also. When performing a find, you will receive the Orthanc ID’s of all the matched items within your find. For example if you perform a study level find and 5 Studies match you will receive 5 study level Orthanc ID’s in JSON format as a response. | |
933 requestBody: | |
934 description: The request body gives the parameters for the find much like when querying a remote modality. | |
935 content: | |
936 application/json: | |
937 schema: | |
938 properties: | |
939 Level: | |
940 type: string | |
941 enum: | |
942 - Patient | |
943 - Study | |
944 - Series | |
945 - Instance | |
946 Limit: | |
947 type: number | |
948 Query: | |
949 properties: | |
950 Modality: | |
951 type: string | |
952 StudyDate: | |
953 type: string | |
954 PatientID: | |
955 type: string | |
956 example: {"Level":"Instance","Limit": 2, "Query":{"Modality":"CR","StudyDate":"20180323-","PatientID":"*"}} | |
957 responses: | |
958 200: | |
959 description: Success | |
960 content: | |
961 application/json: | |
962 schema: | |
963 type: array | |
964 items: | |
965 type: string | |
966 example: [ "6821d761-31fb55a9-031ebecb-ba7f9aae-ffe4ddc0", "2cc6336f-2d4ae733-537b3ca3-e98184b1-ba494b35" ] | |
967 /changes: | |
968 get: | |
969 tags: [Tracking Changes] | |
970 parameters: | |
971 - name: limit | |
972 description: Limit the number of changes to a maximum of the provided number. | |
973 in: query | |
974 required: false | |
975 schema: | |
976 type: number | |
977 - name: since | |
978 description: Show only changes that have happened after the change with the provided sequence number. | |
979 in: query | |
980 required: false | |
981 schema: | |
982 type: number | |
983 description: Whenever Orthanc receives a new DICOM instance, this event is recorded in the so-called “Changes Log”. This enables remote scripts to react to the arrival of new DICOM resources. A typical application is auto-routing, where an external script waits for a new DICOM instance to arrive into Orthanc, then forward this instance to another modality. | |
984 responses: | |
985 200: | |
986 description: The list of recent changes | |
987 content: | |
988 application/json: | |
989 schema: | |
990 properties: | |
991 Changes: | |
992 type: array | |
993 items: | |
994 properties: | |
995 ChangeType: | |
996 type: string | |
997 enum: | |
998 - NewPatient | |
999 - NewStudy | |
1000 - NewSeries | |
1001 - NewInstance | |
1002 - StablePatient | |
1003 - StableStudy | |
1004 - StableSeries | |
1005 - StableInstance | |
1006 Date: | |
1007 type: string | |
1008 ID: | |
1009 type: string | |
1010 Path: | |
1011 type: string | |
1012 ResourceType: | |
1013 type: string | |
1014 enum: | |
1015 - Patient | |
1016 - Study | |
1017 - Series | |
1018 - Instance | |
1019 Seq: | |
1020 type: number | |
1021 Done: | |
1022 type: boolean | |
1023 description: The flag Done is set to true if no further event has occurred after this lastly returned event. If Done is set to false, further events are available and can be retrieved. This is done by setting the since option that specifies from which sequence number the changes must be returned. | |
1024 Last: | |
1025 type: number | |
1026 description: The flag Last records the sequence number of the lastly returned event. | |
1027 example: { | |
1028 "Changes" : [ | |
1029 { | |
1030 "ChangeType" : "NewInstance", | |
1031 "Date" : "20130507T143902", | |
1032 "ID" : "8e289db9-0e1437e1-3ecf395f-d8aae463-f4bb49fe", | |
1033 "Path" : "/instances/8e289db9-0e1437e1-3ecf395f-d8aae463-f4bb49fe", | |
1034 "ResourceType" : "Instance", | |
1035 "Seq" : 921 | |
1036 }, | |
1037 { | |
1038 "ChangeType" : "NewSeries", | |
1039 "Date" : "20130507T143902", | |
1040 "ID" : "cceb768f-e0f8df71-511b0277-07e55743-9ef8890d", | |
1041 "Path" : "/series/cceb768f-e0f8df71-511b0277-07e55743-9ef8890d", | |
1042 "ResourceType" : "Series", | |
1043 "Seq" : 922 | |
1044 }, | |
1045 { | |
1046 "ChangeType" : "NewStudy", | |
1047 "Date" : "20130507T143902", | |
1048 "ID" : "c4ec7f68-9b162055-2c8c5888-5bf5752f-155ab19f", | |
1049 "Path" : "/studies/c4ec7f68-9b162055-2c8c5888-5bf5752f-155ab19f", | |
1050 "ResourceType" : "Study", | |
1051 "Seq" : 923 | |
1052 }, | |
1053 { | |
1054 "ChangeType" : "NewPatient", | |
1055 "Date" : "20130507T143902", | |
1056 "ID" : "dc65762c-f476e8b9-898834f4-2f8a5014-2599bc94", | |
1057 "Path" : "/patients/dc65762c-f476e8b9-898834f4-2f8a5014-2599bc94", | |
1058 "ResourceType" : "Patient", | |
1059 "Seq" : 924 | |
1060 } | |
1061 ], | |
1062 "Done" : true, | |
1063 "Last" : 924 | |
1064 } | |
1065 delete: | |
1066 tags : [Tracking Changes] | |
1067 description: Clear the content of the changes log | |
1068 responses: | |
1069 200: | |
1070 description: Success | |
1071 | |
1072 /exports: | |
1073 get: | |
1074 tags: [Exported Resources] | |
1075 description: For medical traceability, Orthanc can be configured to store a log of all the resources that have been exported to remote modalities. | |
1076 responses: | |
1077 200: {description: Success} | |
1078 | |
1079 delete: | |
1080 tags: [Exported Resources] | |
1081 description: In auto-routing scenarios, it is important to prevent this log to grow indefinitely as incoming instances are routed. You can either disable this logging by setting the option LogExportedResources to false in the configuration file, or periodically clear this log by DELETE-ing this URI. | |
1082 responses: | |
1083 200: {description: Success} | |
1084 | |
1085 /instances/{Id}/anonymize: | |
1086 post: | |
1087 tags: [Anonymization] | |
1088 description: Anonymize the instance by erasing all the tags that are specified in Table E.1-1 from PS 3.15 of the DICOM standard 2008 or 2017c (default). The response will contain the anonymized DICOM result. New UUIDs are automatically generated for the instance. | |
1089 parameters: | |
1090 - name: Id | |
1091 required: true | |
1092 in: path | |
1093 schema: | |
1094 type: string | |
1095 requestBody: | |
1096 content: | |
1097 application/json: | |
1098 schema: | |
1099 properties: | |
1100 DicomVersion: | |
1101 type: string | |
1102 description: Specifies which version of the DICOM standard shall be used for anonymization. Allowed values are 2008 and 2017c (default value if the parameter is absent). This parameter has been introduced in Orthanc 1.3.0. In earlier version, the 2008 standard was used. | |
1103 enum: | |
1104 - 2017c | |
1105 - 2008 | |
1106 Replace: | |
1107 type: object | |
1108 description: Replace is an associative array that associates a DICOM tag with its new string value. The value is dynamically cast to the proper DICOM data type (an HTTP error will occur if the cast fails). Replacements are applied after all the tags to anonymize have been removed. | |
1109 Keep: | |
1110 type: array | |
1111 items: | |
1112 type: string | |
1113 description: List of DICOM tags that should be kept through the anonymization process. | |
1114 KeepPrivateTags: | |
1115 type: boolean | |
1116 description: If KeepPrivateTags is set to true in the JSON request, private tags (i.e. manufacturer-specific tags) are not removed by the anonymization process. The default behavior consists in removing the private tags, as such tags can contain patient-specific information. | |
1117 example: {"Replace":{"PatientName":"Hello","0010-1001":"World"},"Keep":["StudyDescription", "SeriesDescription"],"KeepPrivateTags": true, "DicomVersion" : "2017c"} | |
1118 responses: | |
1119 200: | |
1120 description: The response contains a DICOM file that has been anonymized. | |
1121 content: | |
1122 application/dicom: {} | |
1123 | |
1124 /patients/{Id}/anonymize: | |
1125 post: | |
1126 tags: [Anonymization] | |
1127 description: Anonymize the patient | |
1128 parameters: | |
1129 - name: Id | |
1130 required: true | |
1131 in: path | |
1132 schema: | |
1133 type: string | |
1134 requestBody: | |
1135 content: | |
1136 application/json: | |
1137 schema: | |
1138 properties: | |
1139 DicomVersion: | |
1140 type: string | |
1141 description: Specifies which version of the DICOM standard shall be used for anonymization. Allowed values are 2008 and 2017c (default value if the parameter is absent). This parameter has been introduced in Orthanc 1.3.0. In earlier version, the 2008 standard was used. | |
1142 enum: | |
1143 - 2017c | |
1144 - 2008 | |
1145 Replace: | |
1146 type: object | |
1147 description: Replace is an associative array that associates a DICOM tag with its new string value. The value is dynamically cast to the proper DICOM data type (an HTTP error will occur if the cast fails). Replacements are applied after all the tags to anonymize have been removed. | |
1148 Keep: | |
1149 type: array | |
1150 items: | |
1151 type: string | |
1152 description: List of DICOM tags that should be kept through the anonymization process. | |
1153 KeepPrivateTags: | |
1154 type: boolean | |
1155 description: If KeepPrivateTags is set to true in the JSON request, private tags (i.e. manufacturer-specific tags) are not removed by the anonymization process. The default behavior consists in removing the private tags, as such tags can contain patient-specific information. | |
1156 Synchronous: | |
1157 type: boolean | |
1158 default: true | |
1159 description: If Synchronous is set to false then this operation runs as an Orthanc job. The output of this request will indicate the Job ID. | |
1160 Priority: | |
1161 type: number | |
1162 default: 0 | |
1163 description: If Synchronous is set to false then this sets the priority of the job. The default priority is 0. | |
1164 example: {"Replace":{"PatientName":"Hello","0010-1001":"World"},"Keep":["StudyDescription", "SeriesDescription"],"KeepPrivateTags": true, "DicomVersion" : "2017c"} | |
1165 responses: | |
1166 200: | |
1167 description: Success | |
1168 content: | |
1169 application/json: | |
1170 schema: | |
1171 properties: | |
1172 ID: | |
1173 type: string | |
1174 description: The ID of the new anonymized patient. | |
1175 Path: | |
1176 type: string | |
1177 description: The URL of the new anonymized patient. | |
1178 PatientID: | |
1179 type: string | |
1180 Type: | |
1181 type: string | |
1182 enum: | |
1183 - Patient | |
1184 example: { | |
1185 "ID" : "f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0", | |
1186 "Path" : "/patients/f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0", | |
1187 "PatientID" : "f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0", | |
1188 "Type" : "Patient" | |
1189 } | |
1190 | |
1191 /studies/{Id}/anonymize: | |
1192 post: | |
1193 tags: [Anonymization] | |
1194 description: Anonymize the study | |
1195 parameters: | |
1196 - name: Id | |
1197 required: true | |
1198 in: path | |
1199 schema: | |
1200 type: string | |
1201 requestBody: | |
1202 content: | |
1203 application/json: | |
1204 schema: | |
1205 properties: | |
1206 DicomVersion: | |
1207 type: string | |
1208 description: Specifies which version of the DICOM standard shall be used for anonymization. Allowed values are 2008 and 2017c (default value if the parameter is absent). This parameter has been introduced in Orthanc 1.3.0. In earlier version, the 2008 standard was used. | |
1209 enum: | |
1210 - 2017c | |
1211 - 2008 | |
1212 Replace: | |
1213 type: object | |
1214 description: Replace is an associative array that associates a DICOM tag with its new string value. The value is dynamically cast to the proper DICOM data type (an HTTP error will occur if the cast fails). Replacements are applied after all the tags to anonymize have been removed. | |
1215 Keep: | |
1216 type: array | |
1217 items: | |
1218 type: string | |
1219 description: List of DICOM tags that should be kept through the anonymization process. | |
1220 KeepPrivateTags: | |
1221 type: boolean | |
1222 description: If KeepPrivateTags is set to true in the JSON request, private tags (i.e. manufacturer-specific tags) are not removed by the anonymization process. The default behavior consists in removing the private tags, as such tags can contain patient-specific information. | |
1223 Synchronous: | |
1224 type: boolean | |
1225 default: true | |
1226 description: If Synchronous is set to false then this operation runs as an Orthanc job. The output of this request will indicate the Job ID. | |
1227 Priority: | |
1228 type: number | |
1229 default: 0 | |
1230 description: If Synchronous is set to false then this sets the priority of the job. The default priority is 0. | |
1231 example: {"Replace":{"PatientName":"Hello","0010-1001":"World"},"Keep":["StudyDescription", "SeriesDescription"],"KeepPrivateTags": true, "DicomVersion" : "2017c"} | |
1232 responses: | |
1233 200: | |
1234 description: Success | |
1235 content: | |
1236 application/json: | |
1237 schema: | |
1238 properties: | |
1239 ID: | |
1240 type: string | |
1241 description: The ID of the new anonymized study. | |
1242 Path: | |
1243 type: string | |
1244 description: The URL of the new anonymized study. | |
1245 example: { | |
1246 "ID" : "3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce", | |
1247 "Path" : "/studies/3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce" | |
1248 } | |
1249 | |
1250 /series/{Id}/anonymize: | |
1251 post: | |
1252 tags: [Anonymization] | |
1253 description: Anonymize the series | |
1254 parameters: | |
1255 - name: Id | |
1256 required: true | |
1257 in: path | |
1258 schema: | |
1259 type: string | |
1260 requestBody: | |
1261 content: | |
1262 application/json: | |
1263 schema: | |
1264 properties: | |
1265 DicomVersion: | |
1266 type: string | |
1267 description: Specifies which version of the DICOM standard shall be used for anonymization. Allowed values are 2008 and 2017c (default value if the parameter is absent). This parameter has been introduced in Orthanc 1.3.0. In earlier version, the 2008 standard was used. | |
1268 enum: | |
1269 - 2017c | |
1270 - 2008 | |
1271 Replace: | |
1272 type: object | |
1273 description: Replace is an associative array that associates a DICOM tag with its new string value. The value is dynamically cast to the proper DICOM data type (an HTTP error will occur if the cast fails). Replacements are applied after all the tags to anonymize have been removed. | |
1274 Keep: | |
1275 type: array | |
1276 items: | |
1277 type: string | |
1278 description: List of DICOM tags that should be kept through the anonymization process. | |
1279 KeepPrivateTags: | |
1280 type: boolean | |
1281 description: If KeepPrivateTags is set to true in the JSON request, private tags (i.e. manufacturer-specific tags) are not removed by the anonymization process. The default behavior consists in removing the private tags, as such tags can contain patient-specific information. | |
1282 Synchronous: | |
1283 type: boolean | |
1284 default: true | |
1285 description: If Synchronous is set to false then this operation runs as an Orthanc job. The output of this request will indicate the Job ID. | |
1286 Priority: | |
1287 type: number | |
1288 default: 0 | |
1289 description: If Synchronous is set to false then this sets the priority of the job. The default priority is 0. | |
1290 example: {"Replace":{"PatientName":"Hello","0010-1001":"World"},"Keep":["StudyDescription", "SeriesDescription"],"KeepPrivateTags": true, "DicomVersion" : "2017c"} | |
1291 responses: | |
1292 200: | |
1293 description: Success | |
1294 content: | |
1295 application/json: | |
1296 schema: | |
1297 properties: | |
1298 ID: | |
1299 type: string | |
1300 description: The ID of the new anonymized series. | |
1301 Path: | |
1302 type: string | |
1303 description: The URL of the new anonymized series. | |
1304 example: { | |
1305 "ID" : "3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce", | |
1306 "Path" : "/series/3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce" | |
1307 } | |
1308 | |
1309 /instances/{Id}/modify: | |
1310 post: | |
1311 tags: [Modification] | |
1312 description: Orthanc allows to modify a set of specified tags in a single DICOM instance and to download the resulting modified DICOM file. | |
1313 parameters: | |
1314 - name: Id | |
1315 required: true | |
1316 in: path | |
1317 schema: | |
1318 type: string | |
1319 requestBody: | |
1320 content: | |
1321 application/json: | |
1322 schema: | |
1323 properties: | |
1324 Replace: | |
1325 type: object | |
1326 description: The Replace associative array specifies the substitions to be applied (cf. anonymization). | |
1327 Remove: | |
1328 type: array | |
1329 items: | |
1330 type: string | |
1331 description: The Remove array specifies the list of the tags to remove. | |
1332 RemovePrivateTags: | |
1333 type: boolean | |
1334 description: If RemovePrivateTags is set to true, the private tags (i.e. manufacturer-specific tags) are removed. | |
1335 Force: | |
1336 type: boolean | |
1337 description: The Force option must be set to true, in order to allow the modification of the PatientID, as such a modification of the DICOM identifiers might lead to breaking the DICOM model of the real-world. In general, any explicit modification to one of the PatientID, StudyInstanceUID, SeriesInstanceUID, and SOPInstanceUID requires Force to be set to true, in order to prevent any unwanted side effect. | |
1338 default: false | |
1339 example: {"Replace":{"PatientName":"hello","PatientID":"world"},"Remove":["InstitutionName"],"RemovePrivateTags": true, "Force": true} | |
1340 responses: | |
1341 200: | |
1342 description: The response contains a DICOM file that has been anonymized. | |
1343 content: | |
1344 application/dicom: {} | |
1345 | |
1346 /studies/{Id}/modify: | |
1347 post: | |
1348 tags: [Modification] | |
1349 description: It is possible to modify all the instances from a study or from a series in a single request. In this case, the modified instances are stored back into the Orthanc store. | |
1350 parameters: | |
1351 - name: Id | |
1352 required: true | |
1353 in: path | |
1354 schema: | |
1355 type: string | |
1356 requestBody: | |
1357 content: | |
1358 application/json: | |
1359 schema: | |
1360 properties: | |
1361 Replace: | |
1362 type: object | |
1363 description: The Replace associative array specifies the substitions to be applied (cf. anonymization). | |
1364 Remove: | |
1365 type: array | |
1366 items: | |
1367 type: string | |
1368 description: The Remove array specifies the list of the tags to remove. | |
1369 RemovePrivateTags: | |
1370 type: boolean | |
1371 description: If RemovePrivateTags is set to true, the private tags (i.e. manufacturer-specific tags) are removed. | |
1372 Force: | |
1373 type: boolean | |
1374 description: The Force option must be set to true, in order to allow the modification of the PatientID, as such a modification of the DICOM identifiers might lead to breaking the DICOM model of the real-world. In general, any explicit modification to one of the PatientID, StudyInstanceUID, SeriesInstanceUID, and SOPInstanceUID requires Force to be set to true, in order to prevent any unwanted side effect. | |
1375 default: false | |
1376 Synchronous: | |
1377 type: boolean | |
1378 default: true | |
1379 description: If Synchronous is set to false then this operation runs as an Orthanc job. The output of this request will indicate the Job ID. | |
1380 Priority: | |
1381 type: number | |
1382 default: 0 | |
1383 description: If Synchronous is set to false then this sets the priority of the job. The default priority is 0. | |
1384 example: {"Replace":{"InstitutionName":"My own clinic"}} | |
1385 responses: | |
1386 200: | |
1387 description: Success | |
1388 content: | |
1389 application/json: | |
1390 schema: | |
1391 properties: | |
1392 ID: | |
1393 type: string | |
1394 description: The ID of the new modified study. | |
1395 Path: | |
1396 type: string | |
1397 description: The URL of the new modified study. | |
1398 example: { | |
1399 "ID" : "3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce", | |
1400 "Path" : "/studies/3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce" | |
1401 } | |
1402 | |
1403 /series/{Id}/modify: | |
1404 post: | |
1405 tags: [Modification] | |
1406 description: It is possible to modify all the instances from a study or from a series in a single request. In this case, the modified instances are stored back into the Orthanc store. | |
1407 parameters: | |
1408 - name: Id | |
1409 required: true | |
1410 in: path | |
1411 schema: | |
1412 type: string | |
1413 requestBody: | |
1414 content: | |
1415 application/json: | |
1416 schema: | |
1417 properties: | |
1418 Replace: | |
1419 type: object | |
1420 description: The Replace associative array specifies the substitions to be applied (cf. anonymization). | |
1421 Remove: | |
1422 type: array | |
1423 items: | |
1424 type: string | |
1425 description: The Remove array specifies the list of the tags to remove. | |
1426 RemovePrivateTags: | |
1427 type: boolean | |
1428 description: If RemovePrivateTags is set to true, the private tags (i.e. manufacturer-specific tags) are removed. | |
1429 Force: | |
1430 type: boolean | |
1431 description: The Force option must be set to true, in order to allow the modification of the PatientID, as such a modification of the DICOM identifiers might lead to breaking the DICOM model of the real-world. In general, any explicit modification to one of the PatientID, StudyInstanceUID, SeriesInstanceUID, and SOPInstanceUID requires Force to be set to true, in order to prevent any unwanted side effect. | |
1432 default: false | |
1433 Synchronous: | |
1434 type: boolean | |
1435 default: true | |
1436 description: If Synchronous is set to false then this operation runs as an Orthanc job. The output of this request will indicate the Job ID. | |
1437 Priority: | |
1438 type: number | |
1439 default: 0 | |
1440 description: If Synchronous is set to false then this sets the priority of the job. The default priority is 0. | |
1441 example: {"Replace":{"InstitutionName":"My own clinic"}} | |
1442 responses: | |
1443 200: | |
1444 description: Success | |
1445 content: | |
1446 application/json: | |
1447 schema: | |
1448 properties: | |
1449 ID: | |
1450 type: string | |
1451 description: The ID of the new modified study. | |
1452 Path: | |
1453 type: string | |
1454 description: The URL of the new modified study. | |
1455 example: { | |
1456 "ID" : "3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce", | |
1457 "Path" : "/series/3bd3d343-82879d86-da77321c-1d23fd6b-faa07bce" | |
1458 } | |
1459 | |
1460 /patients/{Id}/modify: | |
1461 post: | |
1462 tags: [Modification] | |
1463 description: Starting with Orthanc 0.7.5, Orthanc can also modify all the instances of a patient with a single REST call. | |
1464 parameters: | |
1465 - name: Id | |
1466 required: true | |
1467 in: path | |
1468 schema: | |
1469 type: string | |
1470 requestBody: | |
1471 content: | |
1472 application/json: | |
1473 schema: | |
1474 properties: | |
1475 Replace: | |
1476 type: object | |
1477 description: The Replace associative array specifies the substitions to be applied (cf. anonymization). | |
1478 Remove: | |
1479 type: array | |
1480 items: | |
1481 type: string | |
1482 description: The Remove array specifies the list of the tags to remove. | |
1483 RemovePrivateTags: | |
1484 type: boolean | |
1485 description: If RemovePrivateTags is set to true, the private tags (i.e. manufacturer-specific tags) are removed. | |
1486 Force: | |
1487 type: boolean | |
1488 description: The Force option must be set to true, in order to allow the modification of the PatientID, as such a modification of the DICOM identifiers might lead to breaking the DICOM model of the real-world. In general, any explicit modification to one of the PatientID, StudyInstanceUID, SeriesInstanceUID, and SOPInstanceUID requires Force to be set to true, in order to prevent any unwanted side effect. | |
1489 default: false | |
1490 Synchronous: | |
1491 type: boolean | |
1492 default: true | |
1493 description: If Synchronous is set to false then this operation runs as an Orthanc job. The output of this request will indicate the Job ID. | |
1494 Priority: | |
1495 type: number | |
1496 default: 0 | |
1497 description: If Synchronous is set to false then this sets the priority of the job. The default priority is 0. | |
1498 example: {"Replace":{"PatientID":"Hello","PatientName":"Sample patient name"},"Force":true} | |
1499 responses: | |
1500 200: | |
1501 description: Success | |
1502 content: | |
1503 application/json: | |
1504 schema: | |
1505 properties: | |
1506 ID: | |
1507 type: string | |
1508 description: The ID of the new modified patient. | |
1509 Path: | |
1510 type: string | |
1511 description: The URL of the new modified patient. | |
1512 PatientID: | |
1513 type: string | |
1514 Type: | |
1515 type: string | |
1516 enum: | |
1517 - Patient | |
1518 example: { | |
1519 "ID" : "f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0", | |
1520 "Path" : "/patients/f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0", | |
1521 "PatientID" : "f7ff9e8b-7bb2e09b-70935a5d-785e0cc5-d9d0abf0", | |
1522 "Type" : "Patient" | |
1523 } | |
1524 | |
1525 /studies/{Id}/split: | |
1526 post: | |
1527 tags: [Split/merge DICOM studies] | |
1528 description: "Starting with Orthanc 1.5.0, Orthanc supports splitting and merging DICOM studies through its REST API. By issuing the example command, the series whose Orthanc identifier is 6ca4c9f3-5e895cb3-4d82c6da-09e060fe-9c59f228, and that is part of the source study with identifier in the URL, will be removed from the source study, and will be moved to a brand new study. This is done by generating a new value for all the following DICOM tags in the DICOM instances of the series of interest: StudyInstanceUID (0x0020, 0x000d), SeriesInstanceUID (0x0020, 0x000e), and SOPInstanceUID (0x0008, 0x0018)" | |
1529 parameters: | |
1530 - name: Id | |
1531 required: true | |
1532 in: path | |
1533 schema: | |
1534 type: string | |
1535 requestBody: | |
1536 content: | |
1537 application/json: | |
1538 schema: | |
1539 properties: | |
1540 Series: | |
1541 type: array | |
1542 items: | |
1543 type: string | |
1544 description: Series gives the list of series to be separated from the parent study (mandatory option). These series must all be children of the same source study, that is specified in the URI. | |
1545 Replace: | |
1546 type: object | |
1547 description: Replace allows to overwrite the DICOM tags that are part of the "Patient Module Attributes" and the "General Study Module Attributes", as specified by the DICOM 2011 standard in Tables C.7-1 and C.7-3. | |
1548 Remove: | |
1549 type: array | |
1550 items: | |
1551 type: string | |
1552 description: Remove allows to remove DICOM tags from the same modules as in the Replace options. | |
1553 KeepSource: | |
1554 type: boolean | |
1555 description: KeepSource (Boolean value), if set to true, instructs Orthanc to keep a copy of the original series in the source study. By default, the original series are deleted from Orthanc. | |
1556 Synchronous: | |
1557 type: boolean | |
1558 default: true | |
1559 description: If Synchronous is set to false then this operation runs as an Orthanc job. The output of this request will indicate the Job ID. | |
1560 Priority: | |
1561 type: number | |
1562 default: 0 | |
1563 description: If Synchronous is set to false then this sets the priority of the job. The default priority is 0. | |
1564 example: {"Series":["6ca4c9f3-5e895cb3-4d82c6da-09e060fe-9c59f228"],"Replace":{"PatientName":"HELLO"},"Remove":["AccessionNumber"]} | |
1565 responses: | |
1566 200: | |
1567 description: Success | |
1568 | |
1569 /studies/{Id}/merge: | |
1570 post: | |
1571 tags: [Split/merge DICOM studies] | |
1572 description: "Merge DICOM series into another DICOM study. By issuing this command, the DICOM series whose Orthanc identifier is ef2ce55f-9342856a-aee23907-2667e859-9f3b734d, will be merged into target study with identifier Id in the URL. As in the case of splitting, this is done by updating the following DICOM tags: StudyInstanceUID (0x0020, 0x000d), SeriesInstanceUID (0x0020, 0x000e), and SOPInstanceUID (0x0008, 0x0018). Furthermore, all the DICOM tags that are part of the “Patient Module Attributes” and the “General Study Module Attributes” (as specified by the DICOM 2011 standard in Tables C.7-1 and C.7-3), are modified to match the target study." | |
1573 parameters: | |
1574 - name: Id | |
1575 required: true | |
1576 in: path | |
1577 schema: | |
1578 type: string | |
1579 requestBody: | |
1580 content: | |
1581 application/json: | |
1582 schema: | |
1583 properties: | |
1584 Resources: | |
1585 type: array | |
1586 items: | |
1587 type: string | |
1588 description: Resources gives the list of source studies or source series that are to be merged into the target study. | |
1589 KeepSource: | |
1590 type: boolean | |
1591 description: KeepSource (Boolean value), if set to true, instructs Orthanc to keep the source studies and series. By default, the original resources are deleted from Orthanc. | |
1592 Synchronous: | |
1593 type: boolean | |
1594 default: true | |
1595 description: If Synchronous is set to false then this operation runs as an Orthanc job. The output of this request will indicate the Job ID. | |
1596 Priority: | |
1597 type: number | |
1598 default: 0 | |
1599 description: If Synchronous is set to false then this sets the priority of the job. The default priority is 0. | |
1600 example: {"Resources":["ef2ce55f-9342856a-aee23907-2667e859-9f3b734d"]} | |
1601 responses: | |
1602 200: | |
1603 description: Success | |
1604 | |
1605 /jobs: | |
1606 get: | |
1607 tags: [Jobs] | |
1608 description: The list of all jobs can be retrieved as follows. | |
1609 responses: | |
1610 200: | |
1611 description: Success | |
1612 content: | |
1613 application/json: | |
1614 schema: | |
1615 type: array | |
1616 items: | |
1617 type: string | |
1618 example: [ "e0d12aac-47eb-454f-bb7f-9857931e2904" ] | |
1619 | |
1620 /jobs/{Id}: | |
1621 get: | |
1622 tags: [Jobs] | |
1623 description: The list of all jobs can be retrieved as follows. | |
1624 parameters: | |
1625 - name: Id | |
1626 required: true | |
1627 in: path | |
1628 schema: | |
1629 type: string | |
1630 responses: | |
1631 200: | |
1632 description: Success | |
1633 content: | |
1634 application/json: | |
1635 schema: | |
1636 properties: | |
1637 CompletionTime: | |
1638 type: string | |
1639 Content: | |
1640 type: array | |
1641 items: | |
1642 properties: | |
1643 Description: | |
1644 type: string | |
1645 InstanceCount: | |
1646 type: number | |
1647 UncompressedSizeMB: | |
1648 type: number | |
1649 CreationTime: | |
1650 type: string | |
1651 EffectiveRuntime: | |
1652 type: number | |
1653 ErrorCode: | |
1654 type: number | |
1655 ErrorDescription: | |
1656 type: string | |
1657 ID: | |
1658 type: string | |
1659 Priority: | |
1660 type: number | |
1661 Progress: | |
1662 type: number | |
1663 State: | |
1664 type: string | |
1665 enum: | |
1666 - Success | |
1667 - Failure | |
1668 - Pending | |
1669 - Running | |
1670 - Paused | |
1671 - Retry | |
1672 Timestamp: | |
1673 type: string | |
1674 Type: | |
1675 type: string | |
1676 example: { | |
1677 "CompletionTime" : "20190306T095223.753851", | |
1678 "Content" : { | |
1679 "Description" : "REST API", | |
1680 "InstancesCount" : 1, | |
1681 "UncompressedSizeMB" : 0 | |
1682 }, | |
1683 "CreationTime" : "20190306T095223.750666", | |
1684 "EffectiveRuntime" : 0.001, | |
1685 "ErrorCode" : 0, | |
1686 "ErrorDescription" : "Success", | |
1687 "ID" : "e0d12aac-47eb-454f-bb7f-9857931e2904", | |
1688 "Priority" : 0, | |
1689 "Progress" : 100, | |
1690 "State" : "Success", | |
1691 "Timestamp" : "20190306T095408.556082", | |
1692 "Type" : "Archive" | |
1693 } | |
1694 /jobs/{Id}/cancel: | |
1695 post: | |
1696 tags: [Jobs] | |
1697 description: Cancel the job | |
1698 parameters: | |
1699 - name: Id | |
1700 required: true | |
1701 in: path | |
1702 schema: | |
1703 type: string | |
1704 responses: | |
1705 200: | |
1706 description: Success | |
1707 /jobs/{Id}/pause: | |
1708 post: | |
1709 tags: [Jobs] | |
1710 description: Pause the job | |
1711 parameters: | |
1712 - name: Id | |
1713 required: true | |
1714 in: path | |
1715 schema: | |
1716 type: string | |
1717 responses: | |
1718 200: | |
1719 description: Success | |
1720 /jobs/{Id}/resume: | |
1721 post: | |
1722 tags: [Jobs] | |
1723 description: Resume the job | |
1724 parameters: | |
1725 - name: Id | |
1726 required: true | |
1727 in: path | |
1728 schema: | |
1729 type: string | |
1730 responses: | |
1731 200: | |
1732 description: Success | |
1733 /jobs/{Id}/resubmit: | |
1734 post: | |
1735 tags: [Jobs] | |
1736 description: Retry the job | |
1737 parameters: | |
1738 - name: Id | |
1739 required: true | |
1740 in: path | |
1741 schema: | |
1742 type: string | |
1743 responses: | |
1744 200: | |
1745 description: Success | |
1746 | |
1747 /tools/create-dicom: | |
1748 post: | |
1749 tags: [PDF] | |
1750 description: The /tools/create-dicom URI can be used to upload a PDF file to Orthanc. You can retrieve the PDF from the instance using /instances/{Id}/pdf. | |
1751 requestBody: | |
1752 content: | |
1753 application/json: | |
1754 schema: | |
1755 properties: | |
1756 Tags: | |
1757 properties: | |
1758 PatientName: | |
1759 type: string | |
1760 Modality: | |
1761 type: string | |
1762 Content: | |
1763 type: string | |
1764 pattern: 'data:application/pdf;base64,.*' | |
1765 description: Base 64 encoded bytes of the PDF to store. | |
1766 example: {"Tags" : {"PatientName" : "Benjamino", "Modality" : "CT"},"Content" : "data:application/pdf;base64,<base64contentsofpdf>"} | |
1767 responses: | |
1768 200: | |
1769 description: The ID of the new DICOM instance is returned. | |
1770 content: | |
1771 text/plain: | |
1772 example: "e0d12aac-47eb-454f-bb7f-9857931e2904" | |
1773 | |
1774 /tools/metrics-prometheus: | |
1775 get: | |
1776 tags: [Prometheus Metrics] | |
1777 description: Orthanc publishes its metrics according to the text-based format of Prometheus (check also the OpenMetrics project), onto the /tools/metrics-prometheus URI of the REST API. | |
1778 responses: | |
1779 200: | |
1780 description: Success | |
1781 content: | |
1782 text/plain: | |
1783 example: | | |
1784 orthanc_count_instances 1 1551868380543 | |
1785 orthanc_count_patients 1 1551868380543 | |
1786 orthanc_count_series 1 1551868380543 | |
1787 orthanc_count_studies 1 1551868380543 | |
1788 orthanc_disk_size_mb 0.0135002136 1551868380543 | |
1789 orthanc_jobs_completed 1 1551868380543 | |
1790 orthanc_jobs_failed 0 1551868380543 | |
1791 orthanc_jobs_pending 0 1551868380543 | |
1792 orthanc_jobs_running 0 1551868380543 | |
1793 orthanc_jobs_success 1 1551868380543 | |
1794 orthanc_rest_api_active_requests 1 1551868380543 | |
1795 orthanc_rest_api_duration_ms 0 1551868094265 | |
1796 orthanc_storage_create_duration_ms 0 1551865919315 | |
1797 orthanc_storage_read_duration_ms 0 1551865943752 | |
1798 orthanc_store_dicom_duration_ms 5 1551865919319 | |
1799 orthanc_uncompressed_size_mb 0.0135002136 1551868380543 | |
1800 | |
1801 /tools/metrics: | |
1802 get: | |
1803 tags: [Prometheus Metrics] | |
1804 description: Get the enablement state of the metrics gathering. | |
1805 responses: | |
1806 200: | |
1807 description: Success | |
1808 content: | |
1809 text/plain: | |
1810 example: "1" | |
1811 put: | |
1812 tags: [Prometheus Metrics] | |
1813 description: Set the enablement state of the metrics gathering. | |
1814 requestBody: | |
1815 content: | |
1816 text/plain: | |
1817 example: "1" | |
1818 responses: | |
1819 200: | |
1820 description: Success |