b3acfdaf9d59bc53c55d1dd112d49e59a3e14bde
[nonrtric.git] / dmaap-adaptor-java / api / api.yaml
1 openapi: 3.0.1
2 info:
3   title: Generic Dmaap Information Producer
4   description: Reads data from DMAAP and sends it further to information consumers
5   license:
6     name: Copyright (C) 2021 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   /dmaap_dataproducer/info_job:
19     get:
20       tags:
21       - Producer job control API
22       summary: Get all jobs
23       description: Returns all info jobs, can be used for trouble shooting
24       operationId: getJobs
25       responses:
26         200:
27           description: Information jobs
28           content:
29             application/json:
30               schema:
31                 type: array
32                 items:
33                   $ref: '#/components/schemas/producer_info_job_request'
34     post:
35       tags:
36       - Producer job control API
37       summary: Callback for Information Job creation/modification
38       description: The call is invoked to activate or to modify a data subscription.
39         The endpoint is provided by the Information Producer.
40       operationId: jobCreatedCallback
41       requestBody:
42         content:
43           application/json:
44             schema:
45               type: string
46         required: true
47       responses:
48         200:
49           description: OK
50           content:
51             application/json:
52               schema:
53                 $ref: '#/components/schemas/void'
54         400:
55           description: Other error in the request
56           content:
57             application/json:
58               schema:
59                 $ref: '#/components/schemas/error_information'
60         404:
61           description: Information type is not found
62           content:
63             application/json:
64               schema:
65                 $ref: '#/components/schemas/error_information'
66   /dmaap_dataproducer/health_check:
67     get:
68       tags:
69       - Producer job control API
70       summary: Producer supervision
71       description: The endpoint is provided by the Information Producer and is used
72         for supervision of the producer.
73       operationId: producerSupervision
74       responses:
75         200:
76           description: The producer is OK
77           content:
78             application/json:
79               schema:
80                 type: string
81   /actuator/threaddump:
82     get:
83       tags:
84       - Actuator
85       summary: Actuator web endpoint 'threaddump'
86       operationId: handle_2_1_3
87       responses:
88         200:
89           description: OK
90           content:
91             '*/*':
92               schema:
93                 type: object
94   /actuator/info:
95     get:
96       tags:
97       - Actuator
98       summary: Actuator web endpoint 'info'
99       operationId: handle_9
100       responses:
101         200:
102           description: OK
103           content:
104             '*/*':
105               schema:
106                 type: object
107   /data-producer/v1/info-types/{infoTypeId}:
108     put:
109       tags:
110       - Information Coordinator Service Simulator (exists only in test)
111       operationId: putInfoType
112       parameters:
113       - name: infoTypeId
114         in: path
115         required: true
116         style: simple
117         explode: false
118         schema:
119           type: string
120       requestBody:
121         content:
122           application/json:
123             schema:
124               $ref: '#/components/schemas/producer_info_type_info'
125         required: true
126       responses:
127         200:
128           description: OK
129           content:
130             application/json:
131               schema:
132                 type: object
133   /actuator/loggers:
134     get:
135       tags:
136       - Actuator
137       summary: Actuator web endpoint 'loggers'
138       operationId: handle_6
139       responses:
140         200:
141           description: OK
142           content:
143             '*/*':
144               schema:
145                 type: object
146   /actuator/health/**:
147     get:
148       tags:
149       - Actuator
150       summary: Actuator web endpoint 'health-path'
151       operationId: handle_12
152       responses:
153         200:
154           description: OK
155           content:
156             '*/*':
157               schema:
158                 type: object
159   /data-producer/v1/info-producers/{infoProducerId}:
160     get:
161       tags:
162       - Information Coordinator Service Simulator (exists only in test)
163       operationId: getInfoProducer
164       parameters:
165       - name: infoProducerId
166         in: path
167         required: true
168         style: simple
169         explode: false
170         schema:
171           type: string
172       responses:
173         200:
174           description: OK
175           content:
176             application/json:
177               schema:
178                 type: object
179     put:
180       tags:
181       - Information Coordinator Service Simulator (exists only in test)
182       operationId: putInfoProducer
183       parameters:
184       - name: infoProducerId
185         in: path
186         required: true
187         style: simple
188         explode: false
189         schema:
190           type: string
191       requestBody:
192         content:
193           application/json:
194             schema:
195               $ref: '#/components/schemas/producer_registration_info'
196         required: true
197       responses:
198         200:
199           description: OK
200           content:
201             application/json:
202               schema:
203                 type: object
204   /actuator/metrics/{requiredMetricName}:
205     get:
206       tags:
207       - Actuator
208       summary: Actuator web endpoint 'metrics-requiredMetricName'
209       operationId: handle_5
210       parameters:
211       - name: requiredMetricName
212         in: path
213         required: true
214         style: simple
215         explode: false
216         schema:
217           type: string
218       responses:
219         200:
220           description: OK
221           content:
222             '*/*':
223               schema:
224                 type: object
225   /actuator:
226     get:
227       tags:
228       - Actuator
229       summary: Actuator root web endpoint
230       operationId: links_1
231       responses:
232         200:
233           description: OK
234           content:
235             '*/*':
236               schema:
237                 type: object
238                 additionalProperties:
239                   type: object
240                   additionalProperties:
241                     $ref: '#/components/schemas/Link'
242   /actuator/logfile:
243     get:
244       tags:
245       - Actuator
246       summary: Actuator web endpoint 'logfile'
247       operationId: handle_8
248       responses:
249         200:
250           description: OK
251           content:
252             '*/*':
253               schema:
254                 type: object
255   /actuator/loggers/{name}:
256     get:
257       tags:
258       - Actuator
259       summary: Actuator web endpoint 'loggers-name'
260       operationId: handle_7
261       parameters:
262       - name: name
263         in: path
264         required: true
265         style: simple
266         explode: false
267         schema:
268           type: string
269       responses:
270         200:
271           description: OK
272           content:
273             '*/*':
274               schema:
275                 type: object
276     post:
277       tags:
278       - Actuator
279       summary: Actuator web endpoint 'loggers-name'
280       operationId: handle_0
281       parameters:
282       - name: name
283         in: path
284         required: true
285         style: simple
286         explode: false
287         schema:
288           type: string
289       responses:
290         200:
291           description: OK
292           content:
293             '*/*':
294               schema:
295                 type: object
296   /dmaap_dataproducer/info_job/{infoJobId}:
297     delete:
298       tags:
299       - Producer job control API
300       summary: Callback for Information Job deletion
301       description: The call is invoked to terminate a data subscription. The endpoint
302         is provided by the Information Producer.
303       operationId: jobDeletedCallback
304       parameters:
305       - name: infoJobId
306         in: path
307         required: true
308         style: simple
309         explode: false
310         schema:
311           type: string
312       responses:
313         200:
314           description: OK
315           content:
316             application/json:
317               schema:
318                 $ref: '#/components/schemas/void'
319   /actuator/health:
320     get:
321       tags:
322       - Actuator
323       summary: Actuator web endpoint 'health'
324       operationId: handle_11
325       responses:
326         200:
327           description: OK
328           content:
329             '*/*':
330               schema:
331                 type: object
332   /consumer:
333     post:
334       tags:
335       - Test Consumer Simulator (exists only in test)
336       summary: Consume data
337       description: The call is invoked to push data to consumer
338       operationId: postData
339       requestBody:
340         content:
341           application/json:
342             schema:
343               type: string
344         required: true
345       responses:
346         200:
347           description: OK
348           content:
349             application/json:
350               schema:
351                 $ref: '#/components/schemas/void'
352   /dmaap-topic-1:
353     get:
354       tags:
355       - DMAAP Simulator (exists only in test)
356       summary: GET from topic
357       description: The call is invoked to activate or to modify a data subscription.
358         The endpoint is provided by the Information Producer.
359       operationId: getFromTopic
360       responses:
361         200:
362           description: OK
363           content:
364             application/json:
365               schema:
366                 $ref: '#/components/schemas/void'
367   /actuator/metrics:
368     get:
369       tags:
370       - Actuator
371       summary: Actuator web endpoint 'metrics'
372       operationId: handle_4
373       responses:
374         200:
375           description: OK
376           content:
377             '*/*':
378               schema:
379                 type: object
380   /actuator/heapdump:
381     get:
382       tags:
383       - Actuator
384       summary: Actuator web endpoint 'heapdump'
385       operationId: handle_10
386       responses:
387         200:
388           description: OK
389           content:
390             '*/*':
391               schema:
392                 type: object
393 components:
394   schemas:
395     producer_info_job_request:
396       required:
397       - info_job_identity
398       type: object
399       properties:
400         owner:
401           type: string
402           description: The owner of the job
403         last_updated:
404           type: string
405           description: The time when the job was last updated or created (ISO-8601)
406         info_job_identity:
407           type: string
408           description: Identity of the Information Job
409         target_uri:
410           type: string
411           description: URI for the target of the produced Information
412         info_job_data:
413           type: object
414           description: Json for the job data
415         info_type_identity:
416           type: string
417           description: Type identity for the job
418       description: The body of the Information Producer callbacks for Information
419         Job creation and deletion
420     error_information:
421       type: object
422       properties:
423         detail:
424           type: string
425           description: ' A human-readable explanation specific to this occurrence
426             of the problem.'
427           example: Policy type not found
428         status:
429           type: integer
430           description: 'The HTTP status code generated by the origin server for this
431             occurrence of the problem. '
432           format: int32
433           example: 503
434       description: Problem as defined in https://tools.ietf.org/html/rfc7807
435     void:
436       type: object
437       description: Void/empty
438     producer_registration_info:
439       required:
440       - info_job_callback_url
441       - info_producer_supervision_callback_url
442       - supported_info_types
443       type: object
444       properties:
445         info_producer_supervision_callback_url:
446           type: string
447           description: callback for producer supervision
448         supported_info_types:
449           type: array
450           description: Supported Information Type IDs
451           items:
452             type: string
453             description: Supported Information Type IDs
454         info_job_callback_url:
455           type: string
456           description: callback for Information Job
457       description: Information for an Information Producer
458     Link:
459       type: object
460       properties:
461         templated:
462           type: boolean
463         href:
464           type: string
465     producer_info_type_info:
466       required:
467       - info_job_data_schema
468       - info_type_information
469       type: object
470       properties:
471         info_type_information:
472           type: object
473           description: Type specific information for the information type
474         info_job_data_schema:
475           type: object
476           description: Json schema for the job data
477       description: Information for an Information Type