Merge "Minor bugs fix in ORU-app simulator" into e-release
[nonrtric.git] / dmaap-mediator-producer / api / swagger.json
1 {
2     "swagger": "2.0",
3     "info": {
4         "title": "DMaaP Mediator Producer",
5         "contact": {},
6         "license": {
7             "name": "Apache 2.0",
8             "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
9         },
10         "version": "1.1.0"
11     },
12     "paths": {
13         "/admin/log": {
14             "put": {
15                 "description": "Set the log level of the producer.",
16                 "tags": [
17                     "Admin"
18                 ],
19                 "summary": "Set log level",
20                 "parameters": [
21                     {
22                         "enum": [
23                             "Error",
24                             "Warn",
25                             "Info",
26                             "Debug"
27                         ],
28                         "type": "string",
29                         "description": "string enums",
30                         "name": "level",
31                         "in": "query"
32                     }
33                 ],
34                 "responses": {
35                     "200": {
36                         "description": ""
37                     },
38                     "400": {
39                         "description": "Problem as defined in https://tools.ietf.org/html/rfc7807",
40                         "schema": {
41                             "$ref": "#/definitions/ErrorInfo"
42                         },
43                         "headers": {
44                             "Content-Type": {
45                                 "type": "string",
46                                 "description": "application/problem+json"
47                             }
48                         }
49                     }
50                 }
51             }
52         },
53         "/health_check": {
54             "get": {
55                 "description": "Get the status of the producer. Will show if the producer has registered in ICS.",
56                 "produces": [
57                     "application/json"
58                 ],
59                 "tags": [
60                     "Data producer (callbacks)"
61                 ],
62                 "summary": "Get status",
63                 "responses": {
64                     "200": {
65                         "description": "OK",
66                         "schema": {
67                             "$ref": "#/definitions/"
68                         }
69                     }
70                 }
71             }
72         },
73         "/info_job": {
74             "post": {
75                 "description": "Callback for ICS to add an info job",
76                 "consumes": [
77                     "application/json"
78                 ],
79                 "tags": [
80                     "Data producer (callbacks)"
81                 ],
82                 "summary": "Add info job",
83                 "parameters": [
84                     {
85                         "description": "Info job data",
86                         "name": "user",
87                         "in": "body",
88                         "required": true,
89                         "schema": {
90                             "$ref": "#/definitions/JobInfo"
91                         }
92                     }
93                 ],
94                 "responses": {
95                     "200": {
96                         "description": ""
97                     },
98                     "400": {
99                         "description": "Problem as defined in https://tools.ietf.org/html/rfc7807",
100                         "schema": {
101                             "$ref": "#/definitions/ErrorInfo"
102                         },
103                         "headers": {
104                             "Content-Type": {
105                                 "type": "string",
106                                 "description": "application/problem+json"
107                             }
108                         }
109                     }
110                 }
111             }
112         },
113         "/info_job/{infoJobId}": {
114             "delete": {
115                 "description": "Callback for ICS to delete an info job",
116                 "tags": [
117                     "Data producer (callbacks)"
118                 ],
119                 "summary": "Delete info job",
120                 "parameters": [
121                     {
122                         "type": "string",
123                         "description": "Info job ID",
124                         "name": "infoJobId",
125                         "in": "path",
126                         "required": true
127                     }
128                 ],
129                 "responses": {
130                     "200": {
131                         "description": ""
132                     }
133                 }
134             }
135         },
136         "/swagger": {
137             "get": {
138                 "description": "Get the Swagger API documentation for the producer.",
139                 "tags": [
140                     "Admin"
141                 ],
142                 "summary": "Get Swagger Documentation",
143                 "responses": {
144                     "200": {
145                         "description": ""
146                     }
147                 }
148             }
149         }
150     },
151     "definitions": {
152         "": {
153             "type": "object",
154             "properties": {
155                 "registeredStatus": {
156                     "description": "The registration status of the producer in Information Coordinator Service. Either `registered` or `not registered`",
157                     "type": "string",
158                     "example": "registered"
159                 }
160             }
161         },
162         "BufferTimeout": {
163             "type": "object",
164             "properties": {
165                 "maxSize": {
166                     "type": "integer"
167                 },
168                 "maxTimeMiliseconds": {
169                     "type": "integer"
170                 }
171             }
172         },
173         "ErrorInfo": {
174             "type": "object",
175             "properties": {
176                 "detail": {
177                     "description": "A human-readable explanation specific to this occurrence of the problem.",
178                     "type": "string",
179                     "example": "Info job type not found"
180                 },
181                 "instance": {
182                     "description": "A URI reference that identifies the specific occurrence of the problem.",
183                     "type": "string"
184                 },
185                 "status": {
186                     "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
187                     "type": "integer",
188                     "example": 400
189                 },
190                 "title": {
191                     "description": "A short, human-readable summary of the problem type.",
192                     "type": "string"
193                 },
194                 "type": {
195                     "description": "A URI reference that identifies the problem type.",
196                     "type": "string"
197                 }
198             }
199         },
200         "JobInfo": {
201             "type": "object",
202             "properties": {
203                 "info_job_data": {
204                     "$ref": "#/definitions/Parameters"
205                 },
206                 "info_job_identity": {
207                     "type": "string"
208                 },
209                 "info_type_identity": {
210                     "type": "string"
211                 },
212                 "last_updated": {
213                     "type": "string"
214                 },
215                 "owner": {
216                     "type": "string"
217                 },
218                 "target_uri": {
219                     "type": "string"
220                 }
221             }
222         },
223         "Parameters": {
224             "type": "object",
225             "properties": {
226                 "bufferTimeout": {
227                     "$ref": "#/definitions/BufferTimeout"
228                 }
229             }
230         }
231     }
232 }