Uplift of PMS from ONAP
[nonrtric.git] / enrichment-coordinator-service / api / ecs-api.yaml
1 openapi: 3.0.1
2 info:
3   title: Enrichment Information Service
4   description: <h1>API documentation</h1><h2>General</h2><p>  The service is mainly
5     a broker between data producers and data consumers. A data producer has the ability
6     to producer one or several type of data (EI type). One type of data can be produced
7     by zero to many producers. <br /><br />A data consumer can have several active
8     data subscriptions (EI job). One EI job consists of the type of data to produce
9     and additional parameters for filtering of the data. These parameters are different
10     for different data types.</p><h2>APIs provided by the service</h2><h4>A1-EI</h4><p>  This
11     API is between Near-RT RIC, which is a data consumer, and the Non-RT RIC. </p><h4>Data
12     producer API</h4><p>  This API is between data producers and this service. It
13     is divivided into two parts, where one is provided by this service (registration)
14     and one part is provided by the data producer.</p><h4>EI Service status</h4><p>  This
15     API provides a means to monitor the service.</p>
16   license:
17     name: Copyright (C) 2020 Nordix Foundation. Licensed under the Apache License.
18     url: http://www.apache.org/licenses/LICENSE-2.0
19   version: "1.0"
20 servers:
21 - url: /
22 tags:
23 - name: A1-EI (registration)
24   description: Data consumer EI job registration
25 - name: A1-EI (callbacks)
26   description: Data consumer EI job status callbacks
27 - name: Data producer (callbacks)
28   description: API implemented by data producers
29 - name: Data producer (registration)
30   description: API for data producers
31 - name: EI Service status
32   description: API for monitoring of the service
33 paths:
34   /producer_simulator/ei_job:
35     post:
36       tags:
37       - Data producer (callbacks)
38       summary: Callback for EI job creation/modification
39       description: The call is invoked to activate or to modify a data subscription.
40         The endpoint is provided by the EI producer.
41       operationId: jobCreatedCallback
42       requestBody:
43         content:
44           application/json:
45             schema:
46               $ref: '#/components/schemas/producer_ei_job_request'
47         required: true
48       responses:
49         200:
50           description: OK
51           content:
52             application/json:
53               schema:
54                 $ref: '#/components/schemas/Void'
55   /A1-EI/v1/eitypes/{eiTypeId}:
56     get:
57       tags:
58       - A1-EI (registration)
59       summary: Individual EI type
60       operationId: getEiType_1
61       parameters:
62       - name: eiTypeId
63         in: path
64         required: true
65         style: simple
66         explode: false
67         schema:
68           type: string
69       responses:
70         200:
71           description: EI type
72           content:
73             application/json:
74               schema:
75                 $ref: '#/components/schemas/EiTypeObject'
76         404:
77           description: Enrichment Information type is not found
78           content:
79             application/json:
80               schema:
81                 $ref: '#/components/schemas/ProblemDetails'
82   /ei-producer/v1/eitypes:
83     get:
84       tags:
85       - Data producer (registration)
86       summary: EI type identifiers
87       operationId: getEiTypeIdentifiers
88       responses:
89         200:
90           description: EI type identifiers
91           content:
92             application/json:
93               schema:
94                 type: array
95                 items:
96                   type: string
97   /A1-EI/v1/eitypes:
98     get:
99       tags:
100       - A1-EI (registration)
101       summary: EI type identifiers
102       operationId: getEiTypeIdentifiers_1
103       responses:
104         200:
105           description: EI type identifiers
106           content:
107             application/json:
108               schema:
109                 type: array
110                 items:
111                   type: string
112   /ei-producer/v1/eiproducers/{eiProducerId}/status:
113     get:
114       tags:
115       - Data producer (registration)
116       summary: EI producer status
117       operationId: getEiProducerStatus
118       parameters:
119       - name: eiProducerId
120         in: path
121         required: true
122         style: simple
123         explode: false
124         schema:
125           type: string
126       responses:
127         200:
128           description: EI producer status
129           content:
130             application/json:
131               schema:
132                 $ref: '#/components/schemas/producer_status'
133         404:
134           description: Enrichment Information producer is not found
135           content:
136             application/json:
137               schema:
138                 $ref: '#/components/schemas/ProblemDetails'
139   /producer_simulator/ei_job/{eiJobId}:
140     delete:
141       tags:
142       - Data producer (callbacks)
143       summary: Callback for EI job deletion
144       description: The call is invoked to terminate a data subscription. The endpoint
145         is provided by the EI producer.
146       operationId: jobDeletedCallback
147       parameters:
148       - name: eiJobId
149         in: path
150         required: true
151         style: simple
152         explode: false
153         schema:
154           type: string
155       responses:
156         200:
157           description: OK
158           content:
159             application/json:
160               schema:
161                 $ref: '#/components/schemas/Void'
162   /ei-producer/v1/eitypes/{eiTypeId}:
163     get:
164       tags:
165       - Data producer (registration)
166       summary: Individual EI type
167       operationId: getEiType
168       parameters:
169       - name: eiTypeId
170         in: path
171         required: true
172         style: simple
173         explode: false
174         schema:
175           type: string
176       responses:
177         200:
178           description: EI type
179           content:
180             application/json:
181               schema:
182                 $ref: '#/components/schemas/producer_ei_type_info'
183         404:
184           description: Enrichment Information type is not found
185           content:
186             application/json:
187               schema:
188                 $ref: '#/components/schemas/ProblemDetails'
189     put:
190       tags:
191       - Data producer (registration)
192       summary: Individual EI type
193       operationId: putEiType
194       parameters:
195       - name: eiTypeId
196         in: path
197         required: true
198         style: simple
199         explode: false
200         schema:
201           type: string
202       requestBody:
203         content:
204           application/json:
205             schema:
206               $ref: '#/components/schemas/producer_ei_type_info'
207         required: true
208       responses:
209         200:
210           description: Type updated
211           content:
212             application/json:
213               schema:
214                 $ref: '#/components/schemas/Void'
215         201:
216           description: Type created
217           content:
218             application/json:
219               schema:
220                 $ref: '#/components/schemas/Void'
221         400:
222           description: Bad request
223           content:
224             application/json:
225               schema:
226                 $ref: '#/components/schemas/ProblemDetails'
227     delete:
228       tags:
229       - Data producer (registration)
230       summary: Individual EI type
231       operationId: deleteEiType
232       parameters:
233       - name: eiTypeId
234         in: path
235         required: true
236         style: simple
237         explode: false
238         schema:
239           type: string
240       responses:
241         200:
242           description: Not used
243           content:
244             application/json:
245               schema:
246                 $ref: '#/components/schemas/Void'
247         204:
248           description: Producer deleted
249           content:
250             application/json:
251               schema:
252                 $ref: '#/components/schemas/Void'
253         404:
254           description: Enrichment Information type is not found
255           content:
256             application/json:
257               schema:
258                 $ref: '#/components/schemas/ProblemDetails'
259         406:
260           description: The Enrichment Information type has one or several active producers
261           content:
262             application/json:
263               schema:
264                 $ref: '#/components/schemas/ProblemDetails'
265   /status:
266     get:
267       tags:
268       - EI Service status
269       summary: Returns status and statistics of this service
270       operationId: getStatus
271       responses:
272         200:
273           description: Service is living
274           content:
275             application/json:
276               schema:
277                 $ref: '#/components/schemas/status_info'
278   /ei-producer/v1/eiproducers:
279     get:
280       tags:
281       - Data producer (registration)
282       summary: EI producer identifiers
283       operationId: getEiProducerIdentifiers
284       parameters:
285       - name: ei_type_id
286         in: query
287         description: If given, only the producers for the EI Data type is returned.
288         required: false
289         style: form
290         explode: true
291         schema:
292           type: string
293       responses:
294         200:
295           description: EI producer identifiers
296           content:
297             application/json:
298               schema:
299                 type: array
300                 items:
301                   type: string
302   /A1-EI/v1/eijobs/{eiJobId}:
303     get:
304       tags:
305       - A1-EI (registration)
306       summary: Individual EI job
307       operationId: getIndividualEiJob
308       parameters:
309       - name: eiJobId
310         in: path
311         required: true
312         style: simple
313         explode: false
314         schema:
315           type: string
316       responses:
317         200:
318           description: EI job
319           content:
320             application/json:
321               schema:
322                 $ref: '#/components/schemas/EiJobObject'
323         404:
324           description: Enrichment Information job is not found
325           content:
326             application/json:
327               schema:
328                 $ref: '#/components/schemas/ProblemDetails'
329     put:
330       tags:
331       - A1-EI (registration)
332       summary: Individual EI job
333       operationId: putIndividualEiJob
334       parameters:
335       - name: eiJobId
336         in: path
337         required: true
338         style: simple
339         explode: false
340         schema:
341           type: string
342       requestBody:
343         content:
344           application/json:
345             schema:
346               $ref: '#/components/schemas/EiJobObject'
347         required: true
348       responses:
349         200:
350           description: Job updated
351           content:
352             application/json:
353               schema:
354                 $ref: '#/components/schemas/Void'
355         201:
356           description: Job created
357           content:
358             application/json:
359               schema:
360                 $ref: '#/components/schemas/Void'
361         404:
362           description: Enrichment Information type is not found
363           content:
364             application/json:
365               schema:
366                 $ref: '#/components/schemas/ProblemDetails'
367     delete:
368       tags:
369       - A1-EI (registration)
370       summary: Individual EI job
371       operationId: deleteIndividualEiJob
372       parameters:
373       - name: eiJobId
374         in: path
375         required: true
376         style: simple
377         explode: false
378         schema:
379           type: string
380       responses:
381         200:
382           description: Not used
383           content:
384             application/json:
385               schema:
386                 $ref: '#/components/schemas/Void'
387         204:
388           description: Job deleted
389           content:
390             application/json:
391               schema:
392                 $ref: '#/components/schemas/Void'
393         404:
394           description: Enrichment Information job is not found
395           content:
396             application/json:
397               schema:
398                 $ref: '#/components/schemas/ProblemDetails'
399   /ei-producer/v1/eiproducers/{eiProducerId}:
400     get:
401       tags:
402       - Data producer (registration)
403       summary: Individual EI producer
404       operationId: getEiProducer
405       parameters:
406       - name: eiProducerId
407         in: path
408         required: true
409         style: simple
410         explode: false
411         schema:
412           type: string
413       responses:
414         200:
415           description: EI producer
416           content:
417             application/json:
418               schema:
419                 $ref: '#/components/schemas/producer_registration_info'
420         404:
421           description: Enrichment Information producer is not found
422           content:
423             application/json:
424               schema:
425                 $ref: '#/components/schemas/ProblemDetails'
426     put:
427       tags:
428       - Data producer (registration)
429       summary: Individual EI producer
430       operationId: putEiProducer
431       parameters:
432       - name: eiProducerId
433         in: path
434         required: true
435         style: simple
436         explode: false
437         schema:
438           type: string
439       requestBody:
440         content:
441           application/json:
442             schema:
443               $ref: '#/components/schemas/producer_registration_info'
444         required: true
445       responses:
446         200:
447           description: Producer updated
448           content:
449             application/json:
450               schema:
451                 $ref: '#/components/schemas/Void'
452         201:
453           description: Producer created
454           content:
455             application/json:
456               schema:
457                 $ref: '#/components/schemas/Void'
458     delete:
459       tags:
460       - Data producer (registration)
461       summary: Individual EI producer
462       operationId: deleteEiProducer
463       parameters:
464       - name: eiProducerId
465         in: path
466         required: true
467         style: simple
468         explode: false
469         schema:
470           type: string
471       responses:
472         200:
473           description: Not used
474           content:
475             application/json:
476               schema:
477                 $ref: '#/components/schemas/Void'
478         204:
479           description: Producer deleted
480           content:
481             application/json:
482               schema:
483                 $ref: '#/components/schemas/Void'
484         404:
485           description: Producer is not found
486           content:
487             application/json:
488               schema:
489                 $ref: '#/components/schemas/ProblemDetails'
490   /producer_simulator/health_check:
491     get:
492       tags:
493       - Data producer (callbacks)
494       summary: Producer supervision
495       description: The endpoint is provided by the EI producer and is used for supervision
496         of the producer.
497       operationId: producerSupervision
498       responses:
499         200:
500           description: The producer is OK
501           content:
502             application/json:
503               schema:
504                 type: string
505   /ei-producer/v1/eiproducers/{eiProducerId}/eijobs:
506     get:
507       tags:
508       - Data producer (registration)
509       summary: EI job definitions
510       description: EI job definitions for one EI producer
511       operationId: getEiProducerJobs
512       parameters:
513       - name: eiProducerId
514         in: path
515         required: true
516         style: simple
517         explode: false
518         schema:
519           type: string
520       responses:
521         200:
522           description: EI producer
523           content:
524             application/json:
525               schema:
526                 type: array
527                 items:
528                   $ref: '#/components/schemas/producer_ei_job_request'
529         404:
530           description: Enrichment Information producer is not found
531           content:
532             application/json:
533               schema:
534                 $ref: '#/components/schemas/ProblemDetails'
535   /A1-EI/v1/eijobs:
536     get:
537       tags:
538       - A1-EI (registration)
539       summary: EI job identifiers
540       description: query for EI job identifiers
541       operationId: getEiJobIds
542       parameters:
543       - name: eiTypeId
544         in: query
545         description: selects EI jobs of matching EI type
546         required: false
547         style: form
548         explode: true
549         schema:
550           type: string
551       - name: owner
552         in: query
553         description: selects EI jobs for one EI job owner
554         required: false
555         style: form
556         explode: true
557         schema:
558           type: string
559       responses:
560         200:
561           description: EI job identifiers
562           content:
563             application/json:
564               schema:
565                 type: array
566                 items:
567                   type: string
568         404:
569           description: Enrichment Information type is not found
570           content:
571             application/json:
572               schema:
573                 $ref: '#/components/schemas/ProblemDetails'
574   /A1-EI/v1/eijobs/{eiJobId}/status:
575     get:
576       tags:
577       - A1-EI (registration)
578       summary: EI job status
579       operationId: getEiJobStatus
580       parameters:
581       - name: eiJobId
582         in: path
583         required: true
584         style: simple
585         explode: false
586         schema:
587           type: string
588       responses:
589         200:
590           description: EI job status
591           content:
592             application/json:
593               schema:
594                 $ref: '#/components/schemas/EiJobStatusObject'
595         404:
596           description: Enrichment Information job is not found
597           content:
598             application/json:
599               schema:
600                 $ref: '#/components/schemas/ProblemDetails'
601   /example_dataconsumer/eijobs/{eiJobId}/status:
602     post:
603       tags:
604       - A1-EI (callbacks)
605       summary: Callback for changed EI job status
606       description: The primitive is implemented by the data consumer and is invoked
607         when a EI job status has been changed.
608       operationId: jobStatusCallback
609       parameters:
610       - name: eiJobId
611         in: path
612         required: true
613         style: simple
614         explode: false
615         schema:
616           type: string
617       requestBody:
618         content:
619           application/json:
620             schema:
621               $ref: '#/components/schemas/EiJobStatusObject'
622         required: true
623       responses:
624         200:
625           description: OK
626           content:
627             application/json:
628               schema:
629                 $ref: '#/components/schemas/Void'
630 components:
631   schemas:
632     producer_ei_job_request:
633       required:
634       - ei_job_identity
635       type: object
636       properties:
637         owner:
638           type: string
639           description: The owner of the job
640         ei_job_identity:
641           type: string
642           description: Idenitity of the EI job
643         last_updated:
644           type: string
645           description: The time when the job was last updated or created (ISO-8601)
646         ei_job_data:
647           type: object
648           description: Json for the job data
649         target_uri:
650           type: string
651           description: URI for the target of the EI
652         ei_type_identity:
653           type: string
654           description: Type idenitity for the job
655       description: The body of the EI producer callbacks for EI job creation and deletion
656     EiTypeObject:
657       type: object
658       description: Information for an EI type
659     status_info:
660       required:
661       - no_of_jobs
662       - no_of_producers
663       - no_of_types
664       - status
665       type: object
666       properties:
667         no_of_producers:
668           type: integer
669           description: Number of EI producers
670           format: int32
671         no_of_types:
672           type: integer
673           description: Number of EI types
674           format: int32
675         no_of_jobs:
676           type: integer
677           description: Number of EI jobs
678           format: int32
679         status:
680           type: string
681           description: status text
682     producer_ei_type_info:
683       required:
684       - ei_job_data_schema
685       type: object
686       properties:
687         ei_job_data_schema:
688           type: object
689           description: Json schema for the job data
690       description: Information for an EI type
691     producer_registration_info:
692       required:
693       - ei_job_callback_url
694       - ei_producer_supervision_callback_url
695       - supported_ei_types
696       type: object
697       properties:
698         supported_ei_types:
699           type: array
700           description: Supported EI type IDs
701           items:
702             type: string
703             description: Supported EI type IDs
704         ei_producer_supervision_callback_url:
705           type: string
706           description: callback for producer supervision
707         ei_job_callback_url:
708           type: string
709           description: callback for EI job
710       description: Information for an EI producer
711     producer_status:
712       required:
713       - operational_state
714       type: object
715       properties:
716         operational_state:
717           type: string
718           description: Represents the operational states
719           enum:
720           - ENABLED
721           - DISABLED
722       description: Status for an EI Producer
723     ProblemDetails:
724       type: object
725       properties:
726         detail:
727           type: string
728           description: A human-readable explanation specific to this occurrence of
729             the problem.
730           example: EI job type not found
731         status:
732           type: integer
733           description: The HTTP status code generated by the origin server for this
734             occurrence of the problem.
735           format: int32
736           example: 404
737       description: A problem detail to carry details in a HTTP response according
738         to RFC 7807
739     Void:
740       type: object
741       description: 'Void/empty '
742     EiJobStatusObject:
743       required:
744       - eiJobStatus
745       type: object
746       properties:
747         eiJobStatus:
748           type: string
749           description: Allowed values for EI job status
750           enum:
751           - ENABLED
752           - DISABLED
753       description: Status for an EI job
754     EiJobObject:
755       required:
756       - eiTypeId
757       - jobDefinition
758       - jobOwner
759       - jobResultUri
760       type: object
761       properties:
762         eiTypeId:
763           type: string
764           description: EI type Idenitifier of the EI job
765         jobResultUri:
766           type: string
767           description: The target URI of the EI data
768         jobOwner:
769           type: string
770           description: Identity of the owner of the job
771         statusNotificationUri:
772           type: string
773           description: The target of EI job status notifications
774         jobDefinition:
775           type: object
776           description: EI type specific job data
777       description: Information for an Enrichment Information Job