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