9d98f10957e8f52bd6d03cb66e57435f4089d904
[externalapi/nbi.git] / docs / offeredapis / swagger / hub.json
1
2     {
3     "swagger": "2.0",
4     "info": {
5     "description": "Provides the ability to subscribe to and unsubscribe from External API notifications.\n\n**Main operation**\n\n```\nPOST /hub\n```\n\nrequest sample 1\n\n```\n{\n  \"callback\": \"http://mydomain/notification\",\n  \"query\": \"eventType = ServiceOrderCreationNotification\"\n}\n```\n\nrequest sample 2\n\n```\n{\n  \"callback\": \"http://mydomain/notification\",\n  \"query\": \"eventType=ServiceOrderCreationNotification,ServiceOrderStateChangeNotification\"\n}\n```\n\n**EventType for serviceOrdering**\n\n- ServiceOrderCreationNotification\n- ServiceOrderStateChangeNotification\n- ServiceOrderItemStateChangeNotification\n\n**EventType for serviceInventory**\n\n- ServiceCreationNotification\n- ServiceAttributeValueChangeNotification\n- ServiceRemoveNotification\n\n",
6     "version": "4.1.0",
7     "title": "Hub API",
8     "contact": {
9       "name": "ONAP",
10       "url": "https://onap.readthedocs.io",
11       "email": "onap-discuss@lists.onap.org"
12     },
13     "license": {
14       "name": "Apache 2.0",
15       "url": "http://www.apache.org/licenses/LICENSE-2.0"
16     },
17     "x-planned-retirement-date": "205001",
18     "x-component": "NBI",
19     "x-logo": {
20     "url": "/redoc/logo.png",
21     "backgroundColor": "#FFFFFF"
22     }
23     },
24     
25       "host": "nbi.api.simpledemo.onap.org:30274",
26       "basePath": "/nbi/api/v4",
27       "schemes": [
28       "https"
29       ],
30     "produces": [
31     "application/json;charset=utf-8"
32     ],
33     "tags": [
34     
35       {
36       "name": "Hub",
37       "description": "provided by NBI"
38       }
39     ],
40     "paths": {
41     "x-interface": {
42     "api-version": "4.1.0",
43     "last-mod-release": "Frankfurt"
44     },
45       "/hub": {
46     "post": {
47     "tags": [
48     "Hub"
49     ],
50         "consumes": [
51            "application/json;charset=utf-8"
52     ],
53         "produces": [
54            "application/json;charset=utf-8"
55       ],
56     "operationId": "hub_Create",
57     "summary": "create hub",
58     "description": "",
59     "deprecated": false,
60     
61       "parameters": [
62       
63     {
64     "name": "Hub",
65     "required": true,
66     "in": "body",
67     "description": "",
68     "schema": {
69     "$ref": "#/definitions/HubIn"
70       }
71     }
72       ],
73     "responses": {
74     "201": {
75     "description": "Created",
76     "schema": {
77     "$ref": "#/definitions/Hub"
78     }
79     
80     }
81     }
82     },
83     "get": {
84     "tags": [
85     "Hub"
86     ],
87         "produces": [
88            "application/json;charset=utf-8"
89       ],
90     "operationId": "hub_Find",
91     "summary": "find hub",
92     "description": "",
93     "deprecated": false,
94     
95     "responses": {
96     "200": {
97     "description": "Ok",
98     "schema": {
99       "type": "array",
100       "items": {
101     "$ref": "#/definitions/Hub"
102       }
103     }
104     
105     }
106     }
107     }
108       },
109       "/hub/{hubId}": {
110     "get": {
111     "tags": [
112     "Hub"
113     ],
114         "produces": [
115            "application/json;charset=utf-8"
116       ],
117     "operationId": "hub_Get",
118     "summary": "get hub",
119     "description": "",
120     "deprecated": false,
121     
122       "parameters": [
123       
124     {
125     "name": "hubId",
126     "required": true,
127     "in": "path",
128     "type" : "string"
129     }
130       ],
131     "responses": {
132     "200": {
133     "description": "Ok",
134     "schema": {
135     "$ref": "#/definitions/Hub"
136     }
137     
138     }
139     }
140     },
141     "delete": {
142     "tags": [
143     "Hub"
144     ],
145     "operationId": "hub_Delete",
146     "summary": "delete hub",
147     "description": "",
148     "deprecated": false,
149     
150       "parameters": [
151       
152     {
153     "name": "hubId",
154     "required": true,
155     "in": "path",
156     "type" : "string"
157     }
158       ],
159     "responses": {
160     "204": {
161     "description": "No Content"
162     
163     }
164     }
165     }
166       }
167     },
168     "definitions": {
169         
170
171     "ErrorDetail": {
172     "description": "Error code and message",
173
174     
175     "required": [
176     
177       "code",
178       "message"
179     ],
180     "type": "object",
181     "properties": {
182     "code": {
183     "description": "",
184     "type": "integer",
185     "format": "int32"
186     },
187     "message": {
188     "description": "",
189     "type": "string"
190     },
191     "description": {
192     "description": "",
193     "type": "string"
194     },
195     "infoURL": {
196     "description": "",
197     "type": "string"
198     }
199     }
200     
201     },    
202
203     "Error": {
204     "description": "Error code and message",
205
206     
207     "required": [
208     
209       "code",
210       "message"
211     ],
212     "type": "object",
213     "properties": {
214     "code": {
215     "description": "",
216     "type": "integer",
217     "format": "int32"
218     },
219     "message": {
220     "description": "",
221     "type": "string"
222     },
223     "description": {
224     "description": "",
225     "type": "string"
226     },
227     "infoURL": {
228     "description": "",
229     "type": "string"
230     },
231     "details": {
232     
233     "type": "array",
234     "items": {
235     "$ref": "#/definitions/ErrorDetail"
236     }
237     }
238     }
239     
240     },    
241
242     "HubIn": {
243     "description": "Hub query and callback",
244
245     
246     "required": [
247     
248       "query",
249       "callback"
250     ],
251     "type": "object",
252     "properties": {
253     "query": {
254     "description": "The query must have an eventType= information.\\nOptionally a ? could be added to reduce hub.\\nquery”:”eventType = ServiceOrderStateChangeNotification”&serviceOrder.state=COMPLETED",
255     "type": "string"
256     },
257     "callback": {
258     "description": "URL where notification must be send",
259     "type": "string"
260     }
261     }
262     
263     },    
264
265     "Hub": {
266     "description": "Hub id, query and callback",
267
268     
269     "required": [
270     
271       "id",
272       "query",
273       "callback"
274     ],
275     "type": "object",
276     "properties": {
277     "id": {
278     "description": "",
279     "type": "string"
280     },
281     "query": {
282     "description": "The query must have an eventType= information.\\nOptionally a ? could be added to reduce hub.\\nquery”:”eventType = ServiceOrderStateChangeNotification”&serviceOrder.state=COMPLETED",
283     "type": "string"
284     },
285     "callback": {
286     "description": "URL where notification must be send",
287     "type": "string"
288     }
289     }
290     
291     }
292     }
293     }
294