Minor changes
[nonrtric/plt/ranpm.git] / pmproducer / api / api.yaml
1 openapi: 3.0.1
2 info:
3   title: Generic Dmaap and Kafka Information Producer
4   description: Reads data from DMaaP and Kafka and posts it further to information
5     consumers
6   license:
7     name: Copyright (C) 2023 Nordix Foundation. Licensed under the Apache License.
8     url: http://www.apache.org/licenses/LICENSE-2.0
9   version: "1.0"
10 servers:
11 - url: /
12 tags:
13 - name: Actuator
14   description: Monitor and interact
15   externalDocs:
16     description: Spring Boot Actuator Web API Documentation
17     url: https://docs.spring.io/spring-boot/docs/current/actuator-api/html/
18 paths:
19   /actuator/threaddump:
20     get:
21       tags:
22       - Actuator
23       summary: Actuator web endpoint 'threaddump'
24       operationId: threaddump
25       responses:
26         200:
27           description: OK
28           content:
29             text/plain;charset=UTF-8:
30               schema:
31                 type: object
32             application/vnd.spring-boot.actuator.v3+json:
33               schema:
34                 type: object
35             application/json:
36               schema:
37                 type: object
38             application/vnd.spring-boot.actuator.v2+json:
39               schema:
40                 type: object
41   /actuator/info:
42     get:
43       tags:
44       - Actuator
45       summary: Actuator web endpoint 'info'
46       operationId: info
47       responses:
48         200:
49           description: OK
50           content:
51             application/vnd.spring-boot.actuator.v3+json:
52               schema:
53                 type: object
54             application/json:
55               schema:
56                 type: object
57             application/vnd.spring-boot.actuator.v2+json:
58               schema:
59                 type: object
60   /data-producer/v1/info-types/{infoTypeId}:
61     put:
62       tags:
63       - Information Coordinator Service Simulator (exists only in test)
64       operationId: putInfoType
65       parameters:
66       - name: infoTypeId
67         in: path
68         required: true
69         style: simple
70         explode: false
71         schema:
72           type: string
73       requestBody:
74         content:
75           application/json:
76             schema:
77               $ref: '#/components/schemas/producer_info_type_info'
78         required: true
79       responses:
80         200:
81           description: OK
82           content:
83             application/json:
84               schema:
85                 type: object
86   /statistics:
87     get:
88       tags:
89       - Producer job control API
90       summary: Returns statistics
91       operationId: getStatistics
92       responses:
93         200:
94           description: OK
95           content:
96             application/json:
97               schema:
98                 $ref: '#/components/schemas/statistics_info'
99   /generic_dataproducer/health_check:
100     get:
101       tags:
102       - Producer job control API
103       summary: Producer supervision
104       description: The endpoint is provided by the Information Producer and is used
105         for supervision of the producer.
106       operationId: producerSupervision
107       responses:
108         200:
109           description: The producer is OK
110           content:
111             application/json:
112               schema:
113                 type: string
114   /generic_dataproducer/info_job:
115     get:
116       tags:
117       - Producer job control API
118       summary: Get all jobs
119       description: Returns all info jobs, can be used for trouble shooting
120       operationId: getJobs
121       responses:
122         200:
123           description: Information jobs
124           content:
125             application/json:
126               schema:
127                 type: array
128                 items:
129                   $ref: '#/components/schemas/producer_info_job_request'
130     post:
131       tags:
132       - Producer job control API
133       summary: Callback for Information Job creation/modification
134       description: The call is invoked to activate or to modify a data subscription.
135         The endpoint is provided by the Information Producer.
136       operationId: jobCreatedCallback
137       requestBody:
138         content:
139           application/json:
140             schema:
141               type: string
142         required: true
143       responses:
144         200:
145           description: OK
146           content:
147             application/json:
148               schema:
149                 $ref: '#/components/schemas/void'
150         400:
151           description: Other error in the request
152           content:
153             application/json:
154               schema:
155                 $ref: '#/components/schemas/error_information'
156         404:
157           description: Information type is not found
158           content:
159             application/json:
160               schema:
161                 $ref: '#/components/schemas/error_information'
162   /actuator/loggers:
163     get:
164       tags:
165       - Actuator
166       summary: Actuator web endpoint 'loggers'
167       operationId: loggers
168       responses:
169         200:
170           description: OK
171           content:
172             application/vnd.spring-boot.actuator.v3+json:
173               schema:
174                 type: object
175             application/json:
176               schema:
177                 type: object
178             application/vnd.spring-boot.actuator.v2+json:
179               schema:
180                 type: object
181   /actuator/health/**:
182     get:
183       tags:
184       - Actuator
185       summary: Actuator web endpoint 'health-path'
186       operationId: health-path
187       responses:
188         200:
189           description: OK
190           content:
191             application/vnd.spring-boot.actuator.v3+json:
192               schema:
193                 type: object
194             application/json:
195               schema:
196                 type: object
197             application/vnd.spring-boot.actuator.v2+json:
198               schema:
199                 type: object
200   /actuator/shutdown:
201     post:
202       tags:
203       - Actuator
204       summary: Actuator web endpoint 'shutdown'
205       operationId: shutdown
206       responses:
207         200:
208           description: OK
209           content:
210             application/vnd.spring-boot.actuator.v3+json:
211               schema:
212                 type: object
213             application/json:
214               schema:
215                 type: object
216             application/vnd.spring-boot.actuator.v2+json:
217               schema:
218                 type: object
219   /data-producer/v1/info-producers/{infoProducerId}:
220     get:
221       tags:
222       - Information Coordinator Service Simulator (exists only in test)
223       operationId: getInfoProducer
224       parameters:
225       - name: infoProducerId
226         in: path
227         required: true
228         style: simple
229         explode: false
230         schema:
231           type: string
232       responses:
233         200:
234           description: OK
235           content:
236             application/json:
237               schema:
238                 type: object
239     put:
240       tags:
241       - Information Coordinator Service Simulator (exists only in test)
242       operationId: putInfoProducer
243       parameters:
244       - name: infoProducerId
245         in: path
246         required: true
247         style: simple
248         explode: false
249         schema:
250           type: string
251       requestBody:
252         content:
253           application/json:
254             schema:
255               $ref: '#/components/schemas/producer_registration_info'
256         required: true
257       responses:
258         200:
259           description: OK
260           content:
261             application/json:
262               schema:
263                 type: object
264   /actuator/metrics/{requiredMetricName}:
265     get:
266       tags:
267       - Actuator
268       summary: Actuator web endpoint 'metrics-requiredMetricName'
269       operationId: metrics-requiredMetricName
270       parameters:
271       - name: requiredMetricName
272         in: path
273         required: true
274         style: simple
275         explode: false
276         schema:
277           type: string
278       responses:
279         200:
280           description: OK
281           content:
282             application/vnd.spring-boot.actuator.v3+json:
283               schema:
284                 type: object
285             application/json:
286               schema:
287                 type: object
288             application/vnd.spring-boot.actuator.v2+json:
289               schema:
290                 type: object
291   /generic_dataproducer/info_job/{infoJobId}:
292     delete:
293       tags:
294       - Producer job control API
295       summary: Callback for Information Job deletion
296       description: The call is invoked to terminate a data subscription. The endpoint
297         is provided by the Information Producer.
298       operationId: jobDeletedCallback
299       parameters:
300       - name: infoJobId
301         in: path
302         required: true
303         style: simple
304         explode: false
305         schema:
306           type: string
307       responses:
308         200:
309           description: OK
310           content:
311             application/json:
312               schema:
313                 $ref: '#/components/schemas/void'
314   /actuator:
315     get:
316       tags:
317       - Actuator
318       summary: Actuator root web endpoint
319       operationId: links
320       responses:
321         200:
322           description: OK
323           content:
324             application/vnd.spring-boot.actuator.v3+json:
325               schema:
326                 type: object
327                 additionalProperties:
328                   type: object
329                   additionalProperties:
330                     $ref: '#/components/schemas/Link'
331             application/json:
332               schema:
333                 type: object
334                 additionalProperties:
335                   type: object
336                   additionalProperties:
337                     $ref: '#/components/schemas/Link'
338             application/vnd.spring-boot.actuator.v2+json:
339               schema:
340                 type: object
341                 additionalProperties:
342                   type: object
343                   additionalProperties:
344                     $ref: '#/components/schemas/Link'
345   /actuator/logfile:
346     get:
347       tags:
348       - Actuator
349       summary: Actuator web endpoint 'logfile'
350       operationId: logfile
351       responses:
352         200:
353           description: OK
354           content:
355             text/plain;charset=UTF-8:
356               schema:
357                 type: object
358   /data-consumer/v1/info-jobs/{infoJobId}:
359     put:
360       tags:
361       - Information Coordinator Service Simulator (exists only in test)
362       operationId: putIndividualInfoJob
363       parameters:
364       - name: infoJobId
365         in: path
366         required: true
367         style: simple
368         explode: false
369         schema:
370           type: string
371       requestBody:
372         content:
373           application/json:
374             schema:
375               $ref: '#/components/schemas/consumer_job'
376         required: true
377       responses:
378         200:
379           description: OK
380           content:
381             application/json:
382               schema:
383                 type: object
384   /actuator/loggers/{name}:
385     get:
386       tags:
387       - Actuator
388       summary: Actuator web endpoint 'loggers-name'
389       operationId: loggers-name
390       parameters:
391       - name: name
392         in: path
393         required: true
394         style: simple
395         explode: false
396         schema:
397           type: string
398       responses:
399         200:
400           description: OK
401           content:
402             application/vnd.spring-boot.actuator.v3+json:
403               schema:
404                 type: object
405             application/json:
406               schema:
407                 type: object
408             application/vnd.spring-boot.actuator.v2+json:
409               schema:
410                 type: object
411     post:
412       tags:
413       - Actuator
414       summary: Actuator web endpoint 'loggers-name'
415       operationId: loggers-name_2
416       parameters:
417       - name: name
418         in: path
419         required: true
420         style: simple
421         explode: false
422         schema:
423           type: string
424       requestBody:
425         content:
426           application/json:
427             schema:
428               type: string
429               enum:
430               - TRACE
431               - DEBUG
432               - INFO
433               - WARN
434               - ERROR
435               - FATAL
436               - OFF
437       responses:
438         200:
439           description: OK
440           content:
441             '*/*':
442               schema:
443                 type: object
444   /actuator/health:
445     get:
446       tags:
447       - Actuator
448       summary: Actuator web endpoint 'health'
449       operationId: health
450       responses:
451         200:
452           description: OK
453           content:
454             application/vnd.spring-boot.actuator.v3+json:
455               schema:
456                 type: object
457             application/json:
458               schema:
459                 type: object
460             application/vnd.spring-boot.actuator.v2+json:
461               schema:
462                 type: object
463   /actuator/metrics:
464     get:
465       tags:
466       - Actuator
467       summary: Actuator web endpoint 'metrics'
468       operationId: metrics
469       responses:
470         200:
471           description: OK
472           content:
473             application/vnd.spring-boot.actuator.v3+json:
474               schema:
475                 type: object
476             application/json:
477               schema:
478                 type: object
479             application/vnd.spring-boot.actuator.v2+json:
480               schema:
481                 type: object
482   /actuator/heapdump:
483     get:
484       tags:
485       - Actuator
486       summary: Actuator web endpoint 'heapdump'
487       operationId: heapdump
488       responses:
489         200:
490           description: OK
491           content:
492             application/octet-stream:
493               schema:
494                 type: object
495 components:
496   schemas:
497     producer_info_job_request:
498       required:
499       - info_job_identity
500       type: object
501       properties:
502         owner:
503           type: string
504           description: The owner of the job
505         last_updated:
506           type: string
507           description: The time when the job was last updated or created (ISO-8601)
508         info_job_identity:
509           type: string
510           description: Identity of the Information Job
511         info_job_data:
512           type: object
513           description: Json for the job data
514         info_type_identity:
515           type: string
516           description: Type identity for the job
517       description: The body of the Information Producer callbacks for Information
518         Job creation and deletion
519     error_information:
520       type: object
521       properties:
522         detail:
523           type: string
524           description: ' A human-readable explanation specific to this occurrence
525             of the problem.'
526           example: Policy type not found
527         status:
528           type: integer
529           description: 'The HTTP status code generated by the origin server for this
530             occurrence of the problem. '
531           format: int32
532           example: 503
533       description: Problem as defined in https://tools.ietf.org/html/rfc7807
534     consumer_job:
535       required:
536       - info_type_id
537       - job_definition
538       - job_owner
539       - job_result_uri
540       type: object
541       properties:
542         info_type_id:
543           type: string
544           description: Information type Idenitifier of the subscription job
545         job_result_uri:
546           type: string
547           description: The target URI of the subscribed information
548         job_owner:
549           type: string
550           description: Identity of the owner of the job
551         job_definition:
552           type: object
553           description: Information type specific job data
554         status_notification_uri:
555           type: string
556           description: The target of Information subscription job status notifications
557       description: Information for an Information Job
558     void:
559       type: object
560       description: Void/empty
561     job_statistics:
562       required:
563       - jobId
564       - noOfReceivedBytes
565       - noOfReceivedObjects
566       - noOfSentBytes
567       - noOfSentObjects
568       - typeId
569       type: object
570       properties:
571         noOfSentObjects:
572           type: integer
573           format: int64
574         jobId:
575           type: string
576         outputTopic:
577           type: string
578         noOfSentBytes:
579           type: integer
580           format: int64
581         clientId:
582           type: string
583         groupId:
584           type: string
585         noOfReceivedBytes:
586           type: integer
587           format: int64
588         typeId:
589           type: string
590         inputTopic:
591           type: string
592         noOfReceivedObjects:
593           type: integer
594           format: int64
595       description: Statistics information for one job
596     statistics_info:
597       type: object
598       properties:
599         jobStatistics:
600           type: array
601           description: Statistics per job
602           items:
603             $ref: '#/components/schemas/job_statistics'
604       description: Statistics information
605     producer_registration_info:
606       required:
607       - info_job_callback_url
608       - info_producer_supervision_callback_url
609       - supported_info_types
610       type: object
611       properties:
612         info_producer_supervision_callback_url:
613           type: string
614           description: callback for producer supervision
615         supported_info_types:
616           type: array
617           description: Supported Information Type IDs
618           items:
619             type: string
620             description: Supported Information Type IDs
621         info_job_callback_url:
622           type: string
623           description: callback for Information Job
624       description: Information for an Information Producer
625     Link:
626       type: object
627       properties:
628         templated:
629           type: boolean
630         href:
631           type: string
632     producer_info_type_info:
633       required:
634       - info_job_data_schema
635       - info_type_information
636       type: object
637       properties:
638         info_type_information:
639           type: object
640           description: Type specific information for the information type
641         info_job_data_schema:
642           type: object
643           description: Json schema for the job data
644       description: Information for an Information Type