blob: 7b3d011e8d70e2f24b19915f8c153cb32938ea98 [file] [log] [blame]
elinuxhenrik7a09fbb2020-12-04 16:51:19 +01001openapi: 3.0.1
2info:
3 title: Enrichment Data service
4 description: This page lists all the rest apis for the service.
5 version: "1.0"
6servers:
PatrikBuhr1da5c882020-12-07 15:15:08 +01007- url: /
elinuxhenrik7a09fbb2020-12-04 16:51:19 +01008tags:
9- name: A1-EI (enrichment information)
10 description: Consumer Controller
PatrikBuhre912ee42021-01-11 15:03:54 +010011- name: A1-EI (enrichment information) callbacks
elinuxhenrik7a09fbb2020-12-04 16:51:19 +010012 description: Consumer Simulator Controller
PatrikBuhre912ee42021-01-11 15:03:54 +010013- name: Data Producer Job Control (example producer)
elinuxhenrik7a09fbb2020-12-04 16:51:19 +010014 description: Producer Simulator Controller
PatrikBuhre912ee42021-01-11 15:03:54 +010015- name: Data Producer Registry API
16 description: Producer Controller
elinuxhenrik7a09fbb2020-12-04 16:51:19 +010017- name: Service status
18 description: Status Controller
19paths:
20 /producer_simulator/ei_job:
21 post:
22 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +010023 - Data Producer Job Control (example producer)
elinuxhenrik7a09fbb2020-12-04 16:51:19 +010024 summary: Callback for EI job creation
25 operationId: jobCreatedCallbackUsingPOST
26 requestBody:
27 description: request
28 content:
29 application/json:
30 schema:
31 $ref: '#/components/schemas/producer_ei_job_request'
32 required: true
33 responses:
34 200:
35 description: OK
36 content: {}
37 201:
38 description: Created
39 content: {}
40 401:
41 description: Unauthorized
42 content: {}
43 403:
44 description: Forbidden
45 content: {}
46 404:
47 description: Not Found
48 content: {}
49 deprecated: false
50 /A1-EI/v1/eitypes/{eiTypeId}:
51 get:
52 tags:
53 - A1-EI (enrichment information)
54 summary: Individual EI type
55 operationId: getEiTypeUsingGET
56 parameters:
57 - name: eiTypeId
58 in: path
59 description: eiTypeId
60 required: true
61 schema:
62 type: string
63 responses:
64 200:
65 description: EI type
66 content:
67 application/json:
68 schema:
69 $ref: '#/components/schemas/EiTypeObject'
70 401:
71 description: Unauthorized
72 content: {}
73 403:
74 description: Forbidden
75 content: {}
76 404:
77 description: Enrichment Information type is not found
78 content:
79 application/json:
80 schema:
81 $ref: '#/components/schemas/ProblemDetails'
82 deprecated: false
83 /consumer_simulator/eijobs/{eiJobId}/status:
84 post:
85 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +010086 - A1-EI (enrichment information) callbacks
elinuxhenrik7a09fbb2020-12-04 16:51:19 +010087 summary: Callback for EI job status
88 operationId: jobStatusCallbackUsingPOST
89 parameters:
90 - name: eiJobId
91 in: path
92 description: eiJobId
93 required: true
94 schema:
95 type: string
96 requestBody:
97 description: status
98 content:
99 application/json:
100 schema:
101 $ref: '#/components/schemas/EiJobStatusObject'
102 required: true
103 responses:
104 200:
105 description: OK
106 content: {}
107 201:
108 description: Created
109 content: {}
110 401:
111 description: Unauthorized
112 content: {}
113 403:
114 description: Forbidden
115 content: {}
116 404:
117 description: Not Found
118 content: {}
119 deprecated: false
120 /ei-producer/v1/eitypes:
121 get:
122 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +0100123 - Data Producer Registry API
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100124 summary: EI type identifiers
125 operationId: getEiTypeIdentifiersUsingGET_1
126 responses:
127 200:
128 description: EI type identifiers
129 content:
130 application/json:
131 schema:
132 type: array
133 items:
134 type: string
135 401:
136 description: Unauthorized
137 content: {}
138 403:
139 description: Forbidden
140 content: {}
141 404:
142 description: Not Found
143 content: {}
144 deprecated: false
145 /A1-EI/v1/eitypes:
146 get:
147 tags:
148 - A1-EI (enrichment information)
149 summary: EI type identifiers
150 operationId: getEiTypeIdentifiersUsingGET
151 responses:
152 200:
153 description: EI type identifiers
154 content:
155 application/json:
156 schema:
157 type: array
158 items:
159 type: string
160 401:
161 description: Unauthorized
162 content: {}
163 403:
164 description: Forbidden
165 content: {}
166 404:
167 description: Not Found
168 content: {}
169 deprecated: false
170 /ei-producer/v1/eiproducers/{eiProducerId}/status:
171 get:
172 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +0100173 - Data Producer Registry API
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100174 summary: EI producer status
175 operationId: getEiProducerStatusUsingGET
176 parameters:
177 - name: eiProducerId
178 in: path
179 description: eiProducerId
180 required: true
181 schema:
182 type: string
183 responses:
184 200:
185 description: EI jobs
186 content:
187 application/json:
188 schema:
189 $ref: '#/components/schemas/producer_status'
190 401:
191 description: Unauthorized
192 content: {}
193 403:
194 description: Forbidden
195 content: {}
196 404:
197 description: Enrichment Information producer is not found
198 content:
199 application/json:
200 schema:
201 $ref: '#/components/schemas/ProblemDetails'
202 deprecated: false
203 /producer_simulator/ei_job/{eiJobId}:
204 delete:
205 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +0100206 - Data Producer Job Control (example producer)
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100207 summary: Callback for EI job deletion
208 operationId: jobDeletedCallbackUsingDELETE
209 parameters:
210 - name: eiJobId
211 in: path
212 description: eiJobId
213 required: true
214 schema:
215 type: string
216 responses:
217 200:
218 description: OK
219 content: {}
220 204:
221 description: No Content
222 content: {}
223 401:
224 description: Unauthorized
225 content: {}
226 403:
227 description: Forbidden
228 content: {}
229 deprecated: false
230 /ei-producer/v1/eiproducers:
231 get:
232 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +0100233 - Data Producer Registry API
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100234 summary: EI producer identifiers
235 operationId: getEiProducerIdentifiersUsingGET
PatrikBuhre912ee42021-01-11 15:03:54 +0100236 parameters:
237 - name: ei_type_id
238 in: query
239 description: If given, only the producers for the EI Data type is returned.
240 allowEmptyValue: false
241 schema:
242 type: string
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100243 responses:
244 200:
245 description: EI producer identifiers
246 content:
247 application/json:
248 schema:
249 type: array
250 items:
251 type: string
252 401:
253 description: Unauthorized
254 content: {}
255 403:
256 description: Forbidden
257 content: {}
258 404:
259 description: Not Found
260 content: {}
261 deprecated: false
262 /ei-producer/v1/eitypes/{eiTypeId}:
263 get:
264 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +0100265 - Data Producer Registry API
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100266 summary: Individual EI type
267 operationId: getEiTypeUsingGET_1
268 parameters:
269 - name: eiTypeId
270 in: path
271 description: eiTypeId
272 required: true
273 schema:
274 type: string
275 responses:
276 200:
277 description: EI type
278 content:
279 application/json:
280 schema:
281 $ref: '#/components/schemas/producer_ei_type_info'
282 401:
283 description: Unauthorized
284 content: {}
285 403:
286 description: Forbidden
287 content: {}
288 404:
289 description: Enrichment Information type is not found
290 content:
291 application/json:
292 schema:
293 $ref: '#/components/schemas/ProblemDetails'
294 deprecated: false
PatrikBuhre912ee42021-01-11 15:03:54 +0100295 put:
296 tags:
297 - Data Producer Registry API
298 summary: Individual EI type
299 operationId: putEiTypeUsingPUT
300 parameters:
301 - name: eiTypeId
302 in: path
303 description: eiTypeId
304 required: true
305 schema:
306 type: string
307 requestBody:
308 description: registrationInfo
309 content:
310 application/json:
311 schema:
312 $ref: '#/components/schemas/producer_ei_type_info'
313 required: true
314 responses:
315 200:
316 description: OK
317 content:
318 application/json:
319 schema:
320 type: object
321 201:
322 description: Created
323 content: {}
324 401:
325 description: Unauthorized
326 content: {}
327 403:
328 description: Forbidden
329 content: {}
330 404:
331 description: Not Found
332 content: {}
333 deprecated: false
334 delete:
335 tags:
336 - Data Producer Registry API
337 summary: Individual EI type
338 operationId: deleteEiTypeUsingDELETE
339 parameters:
340 - name: eiTypeId
341 in: path
342 description: eiTypeId
343 required: true
344 schema:
345 type: string
346 responses:
347 200:
348 description: Not used
349 content: {}
350 204:
351 description: Producer deleted
352 content: {}
353 401:
354 description: Unauthorized
355 content: {}
356 403:
357 description: Forbidden
358 content: {}
359 404:
360 description: Enrichment Information type is not found
361 content:
362 application/json:
363 schema:
364 $ref: '#/components/schemas/ProblemDetails'
365 406:
366 description: The Enrichment Information type has one or several active producers
367 content:
368 application/json:
369 schema:
370 $ref: '#/components/schemas/ProblemDetails'
371 deprecated: false
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100372 /status:
373 get:
374 tags:
375 - Service status
376 summary: Returns status and statistics of this service
377 operationId: getStatusUsingGET
378 responses:
379 200:
380 description: Service is living
381 content:
382 application/json:
383 schema:
384 $ref: '#/components/schemas/status_info'
385 401:
386 description: Unauthorized
387 content: {}
388 403:
389 description: Forbidden
390 content: {}
391 404:
392 description: Not Found
393 content: {}
394 deprecated: false
395 /A1-EI/v1/eijobs/{eiJobId}:
396 get:
397 tags:
398 - A1-EI (enrichment information)
399 summary: Individual EI job
400 operationId: getIndividualEiJobUsingGET
401 parameters:
402 - name: eiJobId
403 in: path
404 description: eiJobId
405 required: true
406 schema:
407 type: string
408 responses:
409 200:
410 description: EI job
411 content:
412 application/json:
413 schema:
414 $ref: '#/components/schemas/EiJobObject'
415 401:
416 description: Unauthorized
417 content: {}
418 403:
419 description: Forbidden
420 content: {}
421 404:
422 description: Enrichment Information job is not found
423 content:
424 application/json:
425 schema:
426 $ref: '#/components/schemas/ProblemDetails'
427 deprecated: false
428 put:
429 tags:
430 - A1-EI (enrichment information)
431 summary: Individual EI job
432 operationId: putIndividualEiJobUsingPUT
433 parameters:
434 - name: eiJobId
435 in: path
436 description: eiJobId
437 required: true
438 schema:
439 type: string
440 requestBody:
441 description: eiJobObject
442 content:
443 application/json:
444 schema:
445 $ref: '#/components/schemas/EiJobObject'
446 required: true
447 responses:
448 200:
449 description: Job updated
450 content: {}
451 201:
452 description: Job created
453 content: {}
454 401:
455 description: Unauthorized
456 content: {}
457 403:
458 description: Forbidden
459 content: {}
460 404:
461 description: Enrichment Information type is not found
462 content:
463 application/json:
464 schema:
465 $ref: '#/components/schemas/ProblemDetails'
466 deprecated: false
467 delete:
468 tags:
469 - A1-EI (enrichment information)
470 summary: Individual EI job
471 operationId: deleteIndividualEiJobUsingDELETE
472 parameters:
473 - name: eiJobId
474 in: path
475 description: eiJobId
476 required: true
477 schema:
478 type: string
479 responses:
480 200:
481 description: Not used
482 content: {}
483 204:
484 description: Job deleted
485 content: {}
486 401:
487 description: Unauthorized
488 content: {}
489 403:
490 description: Forbidden
491 content: {}
492 404:
493 description: Enrichment Information job is not found
494 content:
495 application/json:
496 schema:
497 $ref: '#/components/schemas/ProblemDetails'
498 deprecated: false
499 /ei-producer/v1/eiproducers/{eiProducerId}:
500 get:
501 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +0100502 - Data Producer Registry API
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100503 summary: Individual EI producer
504 operationId: getEiProducerUsingGET
505 parameters:
506 - name: eiProducerId
507 in: path
508 description: eiProducerId
509 required: true
510 schema:
511 type: string
512 responses:
513 200:
514 description: EI jobs
515 content:
516 application/json:
517 schema:
518 $ref: '#/components/schemas/producer_registration_info'
519 401:
520 description: Unauthorized
521 content: {}
522 403:
523 description: Forbidden
524 content: {}
525 404:
526 description: Enrichment Information producer is not found
527 content:
528 application/json:
529 schema:
530 $ref: '#/components/schemas/ProblemDetails'
531 deprecated: false
532 put:
533 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +0100534 - Data Producer Registry API
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100535 summary: Individual EI producer
536 operationId: putEiProducerUsingPUT
537 parameters:
538 - name: eiProducerId
539 in: path
540 description: eiProducerId
541 required: true
542 schema:
543 type: string
544 requestBody:
545 description: registrationInfo
546 content:
547 application/json:
548 schema:
549 $ref: '#/components/schemas/producer_registration_info'
550 required: true
551 responses:
552 200:
553 description: Producer updated
554 content: {}
555 201:
556 description: Producer created
557 content: {}
558 401:
559 description: Unauthorized
560 content: {}
561 403:
562 description: Forbidden
563 content: {}
564 404:
565 description: Not Found
566 content: {}
567 deprecated: false
568 delete:
569 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +0100570 - Data Producer Registry API
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100571 summary: Individual EI producer
572 operationId: deleteEiProducerUsingDELETE
573 parameters:
574 - name: eiProducerId
575 in: path
576 description: eiProducerId
577 required: true
578 schema:
579 type: string
580 responses:
581 200:
582 description: Not used
583 content: {}
584 204:
585 description: Producer deleted
586 content: {}
587 401:
588 description: Unauthorized
589 content: {}
590 403:
591 description: Forbidden
592 content: {}
593 404:
594 description: Producer is not found
595 content:
596 application/json:
597 schema:
598 $ref: '#/components/schemas/ProblemDetails'
599 deprecated: false
600 /producer_simulator/health_check:
601 get:
602 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +0100603 - Data Producer Job Control (example producer)
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100604 summary: Producer supervision
605 operationId: producerSupervisionUsingGET
606 responses:
607 200:
608 description: OK
609 content:
610 application/json:
611 schema:
612 type: string
613 401:
614 description: Unauthorized
615 content: {}
616 403:
617 description: Forbidden
618 content: {}
619 404:
620 description: Not Found
621 content: {}
622 deprecated: false
623 /ei-producer/v1/eiproducers/{eiProducerId}/eijobs:
624 get:
625 tags:
PatrikBuhre912ee42021-01-11 15:03:54 +0100626 - Data Producer Registry API
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100627 summary: EI job definitions
628 description: EI job definitions for one EI producer
629 operationId: getEiProducerJobsUsingGET
630 parameters:
631 - name: eiProducerId
632 in: path
633 description: eiProducerId
634 required: true
635 schema:
636 type: string
637 responses:
638 200:
639 description: EI jobs
640 content:
641 application/json:
642 schema:
643 type: array
644 items:
645 $ref: '#/components/schemas/producer_ei_job_request'
646 401:
647 description: Unauthorized
648 content: {}
649 403:
650 description: Forbidden
651 content: {}
652 404:
653 description: Enrichment Information producer is not found
654 content:
655 application/json:
656 schema:
657 $ref: '#/components/schemas/ProblemDetails'
658 deprecated: false
659 /A1-EI/v1/eijobs:
660 get:
661 tags:
662 - A1-EI (enrichment information)
663 summary: EI job identifiers
664 description: query for EI job identifiers
665 operationId: getEiJobIdsUsingGET
666 parameters:
667 - name: eiTypeId
668 in: query
669 description: selects EI jobs of matching EI type
670 allowEmptyValue: false
671 schema:
672 type: string
673 - name: owner
674 in: query
675 description: selects EI jobs for one EI job owner
676 allowEmptyValue: false
677 schema:
678 type: string
679 responses:
680 200:
681 description: EI job identifiers
682 content:
683 application/json:
684 schema:
685 type: array
686 items:
687 type: string
688 401:
689 description: Unauthorized
690 content: {}
691 403:
692 description: Forbidden
693 content: {}
694 404:
695 description: Enrichment Information type is not found
696 content:
697 application/json:
698 schema:
699 $ref: '#/components/schemas/ProblemDetails'
700 deprecated: false
701 /A1-EI/v1/eijobs/{eiJobId}/status:
702 get:
703 tags:
704 - A1-EI (enrichment information)
705 summary: EI job status
706 operationId: getEiJobStatusUsingGET
707 parameters:
708 - name: eiJobId
709 in: path
710 description: eiJobId
711 required: true
712 schema:
713 type: string
714 responses:
715 200:
716 description: EI job status
717 content:
718 application/json:
719 schema:
720 $ref: '#/components/schemas/EiJobStatusObject'
721 401:
722 description: Unauthorized
723 content: {}
724 403:
725 description: Forbidden
726 content: {}
727 404:
728 description: Enrichment Information job is not found
729 content:
730 application/json:
731 schema:
732 $ref: '#/components/schemas/ProblemDetails'
733 deprecated: false
734components:
735 schemas:
736 producer_ei_job_request:
737 title: producer_ei_job_request
738 required:
739 - ei_job_identity
740 type: object
741 properties:
742 owner:
743 type: string
744 description: The owner of the job
745 ei_job_identity:
746 type: string
747 description: Idenitity of the EI job
PatrikBuhr2dbde312021-01-15 13:12:39 +0100748 last_updated:
749 type: string
750 description: The time when the job was last updated or created (ISO-8601)
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100751 ei_job_data:
752 type: object
753 properties: {}
754 description: Json for the job data
755 target_uri:
756 type: string
757 description: URI for the target of the EI
758 ei_type_identity:
759 type: string
760 description: Type idenitity for the job
761 description: The body of the EI producer callbacks for EI job creation and deletion
762 EiTypeObject:
763 title: EiTypeObject
764 type: object
765 description: Information for an EI type
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100766 status_info:
767 title: status_info
768 type: object
769 properties:
770 no_of_producers:
771 type: integer
772 description: Number of EI producers
773 format: int32
774 no_of_jobs:
775 type: integer
776 description: Number of EI jobs
777 format: int32
778 no_of_types:
779 type: integer
780 description: Number of EI types
781 format: int32
782 status:
783 type: string
784 description: status text
785 Mono«ResponseEntity«object»»:
786 title: Mono«ResponseEntity«object»»
787 type: object
788 producer_ei_type_info:
789 title: producer_ei_type_info
790 type: object
791 properties:
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100792 ei_job_data_schema:
793 type: object
794 properties: {}
795 description: Json schema for the job data
796 description: Information for an EI type
797 producer_registration_info:
798 title: producer_registration_info
799 required:
800 - ei_job_callback_url
801 - ei_producer_supervision_callback_url
802 - supported_ei_types
803 type: object
804 properties:
805 supported_ei_types:
806 type: array
PatrikBuhre912ee42021-01-11 15:03:54 +0100807 description: Supported EI type IDs
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100808 items:
PatrikBuhre912ee42021-01-11 15:03:54 +0100809 type: string
elinuxhenrik7a09fbb2020-12-04 16:51:19 +0100810 ei_producer_supervision_callback_url:
811 type: string
812 description: callback for producer supervision
813 ei_job_callback_url:
814 type: string
815 description: callback for EI job
816 description: Information for an EI producer
817 producer_status:
818 title: producer_status
819 required:
820 - operational_state
821 type: object
822 properties:
823 operational_state:
824 type: string
825 description: |-
826 Operational state, values:
827 ENABLED: TBD
828 DISABLED: TBD.
829 enum:
830 - ENABLED
831 - DISABLED
832 description: Status for an EI Producer
833 ProblemDetails:
834 title: ProblemDetails
835 type: object
836 properties:
837 detail:
838 type: string
839 description: A human-readable explanation specific to this occurrence of
840 the problem.
841 example: EI job type not found
842 status:
843 type: integer
844 description: The HTTP status code generated by the origin server for this
845 occurrence of the problem.
846 format: int32
847 example: 404
848 description: A problem detail to carry details in a HTTP response according
849 to RFC 7807
850 Void:
851 title: Void
852 type: object
853 description: Void/empty
854 EiJobStatusObject:
855 title: EiJobStatusObject
856 required:
857 - eiJobStatus
858 type: object
859 properties:
860 eiJobStatus:
861 type: string
862 description: |-
863 values:
864 ENABLED: the A1-EI producer is able to deliver EI result for the EI job
865 DISABLED: the A1-EI producer is unable to deliver EI result for the EI job
866 enum:
867 - ENABLED
868 - DISABLED
869 description: Status for an EI job
870 EiJobObject:
871 title: EiJobObject
872 required:
873 - eiTypeId
874 - jobDefinition
875 - jobOwner
876 - jobResultUri
877 type: object
878 properties:
879 eiTypeId:
880 type: string
881 description: EI type Idenitifier of the EI job
882 jobResultUri:
883 type: string
884 description: The target URI of the EI data
885 jobOwner:
886 type: string
887 description: Identity of the owner of the job
888 jobStatusNotificationUri:
889 type: string
890 description: The target of EI job status notifications
891 jobDefinition:
892 type: object
893 properties: {}
894 description: EI type specific job data
895 description: Information for an Enrichment Information Job