Added support for EiJob status
[nonrtric.git] / enrichment-coordinator-service / docs / api.json
1 {
2     "basePath": "/",
3     "paths": {
4         "/producer_simulator/supervision": {"get": {
5             "summary": "Producer supervision",
6             "deprecated": false,
7             "produces": ["application/json"],
8             "operationId": "producerSupervisionUsingGET",
9             "responses": {
10                 "200": {
11                     "schema": {"type": "string"},
12                     "description": "OK"
13                 },
14                 "401": {"description": "Unauthorized"},
15                 "403": {"description": "Forbidden"},
16                 "404": {"description": "Not Found"}
17             },
18             "tags": ["Producer Callbacks"]
19         }},
20         "/A1-EI/v1/eitypes/{eiTypeId}": {"get": {
21             "summary": "Individual EI type",
22             "deprecated": false,
23             "produces": ["application/json"],
24             "operationId": "getEiTypeUsingGET",
25             "responses": {
26                 "200": {
27                     "schema": {"$ref": "#/definitions/EiTypeObject"},
28                     "description": "EI type"
29                 },
30                 "401": {"description": "Unauthorized"},
31                 "403": {"description": "Forbidden"},
32                 "404": {
33                     "schema": {"$ref": "#/definitions/ProblemDetails"},
34                     "description": "Enrichment Information type is not found"
35                 }
36             },
37             "parameters": [{
38                 "in": "path",
39                 "name": "eiTypeId",
40                 "description": "eiTypeId",
41                 "type": "string",
42                 "required": true
43             }],
44             "tags": ["A1-EI (enrichment information)"]
45         }},
46         "/consumer_simulator/eijobs/{eiJobId}/status": {"post": {
47             "summary": "Callback for EI job status",
48             "deprecated": false,
49             "produces": ["application/json"],
50             "operationId": "jobStatusCallbackUsingPOST",
51             "responses": {
52                 "200": {"description": "OK"},
53                 "201": {"description": "Created"},
54                 "401": {"description": "Unauthorized"},
55                 "403": {"description": "Forbidden"},
56                 "404": {"description": "Not Found"}
57             },
58             "parameters": [
59                 {
60                     "in": "path",
61                     "name": "eiJobId",
62                     "description": "eiJobId",
63                     "type": "string",
64                     "required": true
65                 },
66                 {
67                     "schema": {"$ref": "#/definitions/EiJobStatusObject"},
68                     "in": "body",
69                     "name": "status",
70                     "description": "status",
71                     "required": true
72                 }
73             ],
74             "tags": ["Consumer Callbacks"],
75             "consumes": ["application/json"]
76         }},
77         "/ei-producer/v1/eitypes": {"get": {
78             "summary": "EI type identifiers",
79             "deprecated": false,
80             "produces": ["application/json"],
81             "operationId": "getEiTypeIdentifiersUsingGET_1",
82             "responses": {
83                 "200": {
84                     "schema": {
85                         "type": "array",
86                         "items": {"type": "string"}
87                     },
88                     "description": "EI type identifiers"
89                 },
90                 "401": {"description": "Unauthorized"},
91                 "403": {"description": "Forbidden"},
92                 "404": {"description": "Not Found"}
93             },
94             "tags": ["Enrichment Data Producer API"]
95         }},
96         "/A1-EI/v1/eitypes": {"get": {
97             "summary": "EI type identifiers",
98             "deprecated": false,
99             "produces": ["application/json"],
100             "operationId": "getEiTypeIdentifiersUsingGET",
101             "responses": {
102                 "200": {
103                     "schema": {
104                         "type": "array",
105                         "items": {"type": "string"}
106                     },
107                     "description": "EI type identifiers"
108                 },
109                 "401": {"description": "Unauthorized"},
110                 "403": {"description": "Forbidden"},
111                 "404": {"description": "Not Found"}
112             },
113             "tags": ["A1-EI (enrichment information)"]
114         }},
115         "/producer_simulator/job_deleted": {"post": {
116             "summary": "Callback for EI job deletion",
117             "deprecated": false,
118             "produces": ["application/json"],
119             "operationId": "jobDeletedCallbackUsingPOST",
120             "responses": {
121                 "200": {"description": "OK"},
122                 "201": {"description": "Created"},
123                 "401": {"description": "Unauthorized"},
124                 "403": {"description": "Forbidden"},
125                 "404": {"description": "Not Found"}
126             },
127             "parameters": [{
128                 "schema": {"$ref": "#/definitions/producer_ei_job_request"},
129                 "in": "body",
130                 "name": "request",
131                 "description": "request",
132                 "required": true
133             }],
134             "tags": ["Producer Callbacks"],
135             "consumes": ["application/json"]
136         }},
137         "/ei-producer/v1/eiproducers/{eiProducerId}/status": {"get": {
138             "summary": "EI producer status",
139             "deprecated": false,
140             "produces": ["application/json"],
141             "operationId": "getEiProducerStatusUsingGET",
142             "responses": {
143                 "200": {
144                     "schema": {"$ref": "#/definitions/producer_status"},
145                     "description": "EI jobs"
146                 },
147                 "401": {"description": "Unauthorized"},
148                 "403": {"description": "Forbidden"},
149                 "404": {
150                     "schema": {"$ref": "#/definitions/ProblemDetails"},
151                     "description": "Enrichment Information producer is not found"
152                 }
153             },
154             "parameters": [{
155                 "in": "path",
156                 "name": "eiProducerId",
157                 "description": "eiProducerId",
158                 "type": "string",
159                 "required": true
160             }],
161             "tags": ["Enrichment Data Producer API"]
162         }},
163         "/ei-producer/v1/eiproducers": {"get": {
164             "summary": "EI producer identifiers",
165             "deprecated": false,
166             "produces": ["application/json"],
167             "operationId": "getEiProducerIdentifiersUsingGET",
168             "responses": {
169                 "200": {
170                     "schema": {
171                         "type": "array",
172                         "items": {"type": "string"}
173                     },
174                     "description": "EI producer identifiers"
175                 },
176                 "401": {"description": "Unauthorized"},
177                 "403": {"description": "Forbidden"},
178                 "404": {"description": "Not Found"}
179             },
180             "tags": ["Enrichment Data Producer API"]
181         }},
182         "/ei-producer/v1/eitypes/{eiTypeId}": {"get": {
183             "summary": "Individual EI type",
184             "deprecated": false,
185             "produces": ["application/json"],
186             "operationId": "getEiTypeUsingGET_1",
187             "responses": {
188                 "200": {
189                     "schema": {"$ref": "#/definitions/producer_ei_type_info"},
190                     "description": "EI type"
191                 },
192                 "401": {"description": "Unauthorized"},
193                 "403": {"description": "Forbidden"},
194                 "404": {
195                     "schema": {"$ref": "#/definitions/ProblemDetails"},
196                     "description": "Enrichment Information type is not found"
197                 }
198             },
199             "parameters": [{
200                 "in": "path",
201                 "name": "eiTypeId",
202                 "description": "eiTypeId",
203                 "type": "string",
204                 "required": true
205             }],
206             "tags": ["Enrichment Data Producer API"]
207         }},
208         "/status": {"get": {
209             "summary": "Returns status and statistics of this service",
210             "deprecated": false,
211             "produces": ["application/json"],
212             "operationId": "getStatusUsingGET",
213             "responses": {
214                 "200": {
215                     "schema": {"$ref": "#/definitions/status_info"},
216                     "description": "Service is living"
217                 },
218                 "401": {"description": "Unauthorized"},
219                 "403": {"description": "Forbidden"},
220                 "404": {"description": "Not Found"}
221             },
222             "tags": ["Service status"]
223         }},
224         "/A1-EI/v1/eijobs/{eiJobId}": {
225             "get": {
226                 "summary": "Individual EI job",
227                 "deprecated": false,
228                 "produces": ["application/json"],
229                 "operationId": "getIndividualEiJobUsingGET",
230                 "responses": {
231                     "200": {
232                         "schema": {"$ref": "#/definitions/EiJobObject"},
233                         "description": "EI job"
234                     },
235                     "401": {"description": "Unauthorized"},
236                     "403": {"description": "Forbidden"},
237                     "404": {
238                         "schema": {"$ref": "#/definitions/ProblemDetails"},
239                         "description": "Enrichment Information job is not found"
240                     }
241                 },
242                 "parameters": [{
243                     "in": "path",
244                     "name": "eiJobId",
245                     "description": "eiJobId",
246                     "type": "string",
247                     "required": true
248                 }],
249                 "tags": ["A1-EI (enrichment information)"]
250             },
251             "delete": {
252                 "summary": "Individual EI job",
253                 "deprecated": false,
254                 "produces": ["application/json"],
255                 "operationId": "deleteIndividualEiJobUsingDELETE",
256                 "responses": {
257                     "200": {"description": "Not used"},
258                     "401": {"description": "Unauthorized"},
259                     "204": {"description": "Job deleted"},
260                     "403": {"description": "Forbidden"},
261                     "404": {
262                         "schema": {"$ref": "#/definitions/ProblemDetails"},
263                         "description": "Enrichment Information job is not found"
264                     }
265                 },
266                 "parameters": [{
267                     "in": "path",
268                     "name": "eiJobId",
269                     "description": "eiJobId",
270                     "type": "string",
271                     "required": true
272                 }],
273                 "tags": ["A1-EI (enrichment information)"]
274             },
275             "put": {
276                 "summary": "Individual EI job",
277                 "deprecated": false,
278                 "produces": ["application/json"],
279                 "operationId": "putIndividualEiJobUsingPUT",
280                 "responses": {
281                     "200": {"description": "Job updated"},
282                     "201": {"description": "Job created"},
283                     "401": {"description": "Unauthorized"},
284                     "403": {"description": "Forbidden"},
285                     "404": {
286                         "schema": {"$ref": "#/definitions/ProblemDetails"},
287                         "description": "Enrichment Information type is not found"
288                     }
289                 },
290                 "parameters": [
291                     {
292                         "in": "path",
293                         "name": "eiJobId",
294                         "description": "eiJobId",
295                         "type": "string",
296                         "required": true
297                     },
298                     {
299                         "schema": {"$ref": "#/definitions/EiJobObject"},
300                         "in": "body",
301                         "name": "eiJobObject",
302                         "description": "eiJobObject",
303                         "required": true
304                     }
305                 ],
306                 "tags": ["A1-EI (enrichment information)"],
307                 "consumes": ["application/json"]
308             }
309         },
310         "/ei-producer/v1/eiproducers/{eiProducerId}": {
311             "get": {
312                 "summary": "Individual EI producer",
313                 "deprecated": false,
314                 "produces": ["application/json"],
315                 "operationId": "getEiProducerUsingGET",
316                 "responses": {
317                     "200": {
318                         "schema": {"$ref": "#/definitions/producer_registration_info"},
319                         "description": "EI jobs"
320                     },
321                     "401": {"description": "Unauthorized"},
322                     "403": {"description": "Forbidden"},
323                     "404": {
324                         "schema": {"$ref": "#/definitions/ProblemDetails"},
325                         "description": "Enrichment Information producer is not found"
326                     }
327                 },
328                 "parameters": [{
329                     "in": "path",
330                     "name": "eiProducerId",
331                     "description": "eiProducerId",
332                     "type": "string",
333                     "required": true
334                 }],
335                 "tags": ["Enrichment Data Producer API"]
336             },
337             "delete": {
338                 "summary": "Individual EI producer",
339                 "deprecated": false,
340                 "produces": ["application/json"],
341                 "operationId": "deleteEiProducerUsingDELETE",
342                 "responses": {
343                     "200": {"description": "Not used"},
344                     "401": {"description": "Unauthorized"},
345                     "204": {"description": "Producer deleted"},
346                     "403": {"description": "Forbidden"},
347                     "404": {
348                         "schema": {"$ref": "#/definitions/ProblemDetails"},
349                         "description": "Producer is not found"
350                     }
351                 },
352                 "parameters": [{
353                     "in": "path",
354                     "name": "eiProducerId",
355                     "description": "eiProducerId",
356                     "type": "string",
357                     "required": true
358                 }],
359                 "tags": ["Enrichment Data Producer API"]
360             },
361             "put": {
362                 "summary": "Individual EI producer",
363                 "deprecated": false,
364                 "produces": ["application/json"],
365                 "operationId": "putEiProducerUsingPUT",
366                 "responses": {
367                     "200": {"description": "Producer updated"},
368                     "201": {"description": "Producer created"},
369                     "401": {"description": "Unauthorized"},
370                     "403": {"description": "Forbidden"},
371                     "404": {"description": "Not Found"}
372                 },
373                 "parameters": [
374                     {
375                         "in": "path",
376                         "name": "eiProducerId",
377                         "description": "eiProducerId",
378                         "type": "string",
379                         "required": true
380                     },
381                     {
382                         "schema": {"$ref": "#/definitions/producer_registration_info"},
383                         "in": "body",
384                         "name": "registrationInfo",
385                         "description": "registrationInfo",
386                         "required": true
387                     }
388                 ],
389                 "tags": ["Enrichment Data Producer API"],
390                 "consumes": ["application/json"]
391             }
392         },
393         "/ei-producer/v1/eiproducers/{eiProducerId}/eijobs": {"get": {
394             "summary": "EI job definitions",
395             "deprecated": false,
396             "produces": ["application/json"],
397             "description": "EI job definitions for one EI producer",
398             "operationId": "getEiProducerJobsUsingGET",
399             "responses": {
400                 "200": {
401                     "schema": {
402                         "type": "array",
403                         "items": {"$ref": "#/definitions/producer_ei_job_request"}
404                     },
405                     "description": "EI jobs"
406                 },
407                 "401": {"description": "Unauthorized"},
408                 "403": {"description": "Forbidden"},
409                 "404": {
410                     "schema": {"$ref": "#/definitions/ProblemDetails"},
411                     "description": "Enrichment Information producer is not found"
412                 }
413             },
414             "parameters": [{
415                 "in": "path",
416                 "name": "eiProducerId",
417                 "description": "eiProducerId",
418                 "type": "string",
419                 "required": true
420             }],
421             "tags": ["Enrichment Data Producer API"]
422         }},
423         "/A1-EI/v1/eijobs": {"get": {
424             "summary": "EI job identifiers",
425             "deprecated": false,
426             "produces": ["application/json"],
427             "description": "query for EI job identifiers",
428             "operationId": "getEiJobIdsUsingGET",
429             "responses": {
430                 "200": {
431                     "schema": {
432                         "type": "array",
433                         "items": {"type": "string"}
434                     },
435                     "description": "EI job identifiers"
436                 },
437                 "401": {"description": "Unauthorized"},
438                 "403": {"description": "Forbidden"},
439                 "404": {
440                     "schema": {"$ref": "#/definitions/ProblemDetails"},
441                     "description": "Enrichment Information type is not found"
442                 }
443             },
444             "parameters": [
445                 {
446                     "in": "query",
447                     "allowEmptyValue": false,
448                     "name": "eiTypeId",
449                     "description": "selects EI jobs of matching EI type",
450                     "type": "string",
451                     "required": false
452                 },
453                 {
454                     "in": "query",
455                     "allowEmptyValue": false,
456                     "name": "owner",
457                     "description": "selects EI jobs for one EI job owner",
458                     "type": "string",
459                     "required": false
460                 }
461             ],
462             "tags": ["A1-EI (enrichment information)"]
463         }},
464         "/A1-EI/v1/eijobs/{eiJobId}/status": {"get": {
465             "summary": "EI job status",
466             "deprecated": false,
467             "produces": ["application/json"],
468             "operationId": "getEiJobStatusUsingGET",
469             "responses": {
470                 "200": {
471                     "schema": {"$ref": "#/definitions/EiJobStatusObject"},
472                     "description": "EI job status"
473                 },
474                 "401": {"description": "Unauthorized"},
475                 "403": {"description": "Forbidden"},
476                 "404": {
477                     "schema": {"$ref": "#/definitions/ProblemDetails"},
478                     "description": "Enrichment Information job is not found"
479                 }
480             },
481             "parameters": [{
482                 "in": "path",
483                 "name": "eiJobId",
484                 "description": "eiJobId",
485                 "type": "string",
486                 "required": true
487             }],
488             "tags": ["A1-EI (enrichment information)"]
489         }},
490         "/producer_simulator/job_created": {"post": {
491             "summary": "Callback for EI job creation",
492             "deprecated": false,
493             "produces": ["application/json"],
494             "operationId": "jobCreatedCallbackUsingPOST",
495             "responses": {
496                 "200": {"description": "OK"},
497                 "201": {"description": "Created"},
498                 "401": {"description": "Unauthorized"},
499                 "403": {"description": "Forbidden"},
500                 "404": {"description": "Not Found"}
501             },
502             "parameters": [{
503                 "schema": {"$ref": "#/definitions/producer_ei_job_request"},
504                 "in": "body",
505                 "name": "request",
506                 "description": "request",
507                 "required": true
508             }],
509             "tags": ["Producer Callbacks"],
510             "consumes": ["application/json"]
511         }}
512     },
513     "host": "localhost:38499",
514     "definitions": {
515         "producer_ei_job_request": {
516             "description": "The body of the EI producer callbacks for EI job creation and deletion",
517             "type": "object",
518             "title": "producer_ei_job_request",
519             "required": ["ei_job_identity"],
520             "properties": {
521                 "ei_job_identity": {
522                     "description": "Idenitity of the EI job",
523                     "type": "string"
524                 },
525                 "ei_job_data": {
526                     "description": "Json for the job data",
527                     "type": "object"
528                 },
529                 "target_uri": {
530                     "description": "URI for the target of the EI",
531                     "type": "string"
532                 },
533                 "ei_type_identity": {
534                     "description": "Type idenitity for the job",
535                     "type": "string"
536                 }
537             }
538         },
539         "EiTypeObject": {
540             "description": "Information for an EI type",
541             "type": "object",
542             "title": "EiTypeObject"
543         },
544         "producer_ei_type_registration_info": {
545             "description": "Information for an EI type",
546             "type": "object",
547             "title": "producer_ei_type_registration_info",
548             "required": ["ei_type_identity"],
549             "properties": {
550                 "ei_type_identity": {
551                     "description": "EI type identity",
552                     "type": "string"
553                 },
554                 "ei_job_data_schema": {
555                     "description": "Json schema for the job data",
556                     "type": "object"
557                 }
558             }
559         },
560         "status_info": {
561             "type": "object",
562             "title": "status_info",
563             "properties": {
564                 "no_of_producers": {
565                     "format": "int32",
566                     "description": "Number of EI producers",
567                     "type": "integer"
568                 },
569                 "no_of_jobs": {
570                     "format": "int32",
571                     "description": "Number of EI jobs",
572                     "type": "integer"
573                 },
574                 "no_of_types": {
575                     "format": "int32",
576                     "description": "Number of EI types",
577                     "type": "integer"
578                 },
579                 "status": {
580                     "description": "status text",
581                     "type": "string"
582                 }
583             }
584         },
585         "Mono«ResponseEntity«object»»": {
586             "type": "object",
587             "title": "Mono«ResponseEntity«object»»"
588         },
589         "producer_ei_type_info": {
590             "description": "Information for an EI type",
591             "type": "object",
592             "title": "producer_ei_type_info",
593             "properties": {
594                 "ei_producer_ids": {
595                     "description": "Registered producers",
596                     "type": "array",
597                     "items": {"type": "string"}
598                 },
599                 "ei_job_data_schema": {
600                     "description": "Json schema for the job data",
601                     "type": "object"
602                 }
603             }
604         },
605         "producer_registration_info": {
606             "description": "Information for an EI producer",
607             "type": "object",
608             "title": "producer_registration_info",
609             "required": [
610                 "ei_job_creation_callback_url",
611                 "ei_job_deletion_callback_url",
612                 "ei_producer_supervision_callback_url",
613                 "supported_ei_types"
614             ],
615             "properties": {
616                 "supported_ei_types": {
617                     "description": "Supported EI types",
618                     "type": "array",
619                     "items": {"$ref": "#/definitions/producer_ei_type_registration_info"}
620                 },
621                 "ei_job_creation_callback_url": {
622                     "description": "callback for job creation",
623                     "type": "string"
624                 },
625                 "ei_job_deletion_callback_url": {
626                     "description": "callback for job deletion",
627                     "type": "string"
628                 },
629                 "ei_producer_supervision_callback_url": {
630                     "description": "callback for producer supervision",
631                     "type": "string"
632                 }
633             }
634         },
635         "producer_status": {
636             "description": "Status for an EI Producer",
637             "type": "object",
638             "title": "producer_status",
639             "required": ["operational_state"],
640             "properties": {"operational_state": {
641                 "description": "Operational state, values:\nENABLED: TBD\nDISABLED: TBD.",
642                 "type": "string",
643                 "enum": [
644                     "ENABLED",
645                     "DISABLED"
646                 ]
647             }}
648         },
649         "ProblemDetails": {
650             "description": "A problem detail to carry details in a HTTP response according to RFC 7807",
651             "type": "object",
652             "title": "ProblemDetails",
653             "properties": {
654                 "detail": {
655                     "description": "A human-readable explanation specific to this occurrence of the problem.",
656                     "type": "string",
657                     "example": "EI job type not found"
658                 },
659                 "status": {
660                     "format": "int32",
661                     "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
662                     "type": "integer",
663                     "example": 404
664                 }
665             }
666         },
667         "Void": {
668             "description": "Void/empty",
669             "type": "object",
670             "title": "Void"
671         },
672         "EiJobStatusObject": {
673             "description": "Status for an EI job",
674             "type": "object",
675             "title": "EiJobStatusObject",
676             "required": ["eiJobStatus"],
677             "properties": {"eiJobStatus": {
678                 "description": "values:\nENABLED: the A1-EI producer is able to deliver EI result for the EI job\nDISABLED: the A1-EI producer is unable to deliver EI result for the EI job",
679                 "type": "string",
680                 "enum": [
681                     "ENABLED",
682                     "DISABLED"
683                 ]
684             }}
685         },
686         "EiJobObject": {
687             "description": "Information for an Enrichment Information Job",
688             "type": "object",
689             "title": "EiJobObject",
690             "required": [
691                 "eiTypeId",
692                 "jobDefinition",
693                 "jobOwner",
694                 "jobResultUri"
695             ],
696             "properties": {
697                 "eiTypeId": {
698                     "description": "EI type Idenitifier of the EI job",
699                     "type": "string"
700                 },
701                 "jobResultUri": {
702                     "description": "The target URI of the EI data",
703                     "type": "string"
704                 },
705                 "jobOwner": {
706                     "description": "Identity of the owner of the job",
707                     "type": "string"
708                 },
709                 "jobStatusNotificationUri": {
710                     "description": "The target of EI job status notifications",
711                     "type": "string"
712                 },
713                 "jobDefinition": {
714                     "description": "EI type specific job data",
715                     "type": "object"
716                 }
717             }
718         }
719     },
720     "swagger": "2.0",
721     "info": {
722         "description": "This page lists all the rest apis for the service.",
723         "title": "Enrichment Data service",
724         "version": "1.0"
725     },
726     "tags": [
727         {
728             "name": "A1-EI (enrichment information)",
729             "description": "Consumer Controller"
730         },
731         {
732             "name": "Consumer Callbacks",
733             "description": "Consumer Simulator Controller"
734         },
735         {
736             "name": "Enrichment Data Producer API",
737             "description": "Producer Controller"
738         },
739         {
740             "name": "Producer Callbacks",
741             "description": "Producer Simulator Controller"
742         },
743         {
744             "name": "Service status",
745             "description": "Status Controller"
746         }
747     ]
748 }