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