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