2497dcfd1173de9fb1a4320ad73052bd4502c504
[externalapi/nbi.git] / docs / offeredapis / api_hub / swagger.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.0.0_inProgress",
7     "title": "API Hub",
8     "x-logo": {
9     "url": "/redoc/logo.png",
10     "backgroundColor": "#FFFFFF"
11     }
12     },
13     
14       "host": "api.orange.com",
15       "basePath":       "/",
16       "schemes": [
17       "http"
18       ],
19     "produces": [
20     "application/json;charset=utf-8"
21     ],
22     "tags": [
23     
24       {
25       "name": "Hub",
26       "description": "provided by NBI"
27       }
28     ],
29     "paths": {
30       "/hub": {
31     "post": {
32     "tags": [
33     "Hub"
34     ],
35         "consumes": [
36            "application/json;charset=utf-8"
37     ],
38         "produces": [
39            "application/json;charset=utf-8"
40       ],
41     "operationId": "hubCreate",
42     "summary": "create hub",
43     "description": "",
44     "deprecated": false,
45     
46       "parameters": [
47       
48     {
49     "name": "Hub",
50     "required": true,
51     "in": "body",
52     "description": "",
53     "schema": {
54     "$ref": "#/definitions/HubIn"
55       }
56     }
57       ],
58     "responses": {
59     "201": {
60     "description": "Created",
61     "schema": {
62     "$ref": "#/definitions/Hub"
63     }
64     
65     }
66     }
67     },
68     "get": {
69     "tags": [
70     "Hub"
71     ],
72         "produces": [
73            "application/json;charset=utf-8"
74       ],
75     "operationId": "hubFind",
76     "summary": "find hub",
77     "description": "",
78     "deprecated": false,
79     
80     "responses": {
81     "200": {
82     "description": "Ok",
83     "schema": {
84       "type": "array",
85       "items": {
86     "$ref": "#/definitions/Hub"
87       }
88     }
89     
90     }
91     }
92     }
93       },
94       "/hub/{hubId}": {
95     "get": {
96     "tags": [
97     "Hub"
98     ],
99         "produces": [
100            "application/json;charset=utf-8"
101       ],
102     "operationId": "hubGet",
103     "summary": "get hub",
104     "description": "",
105     "deprecated": false,
106     
107       "parameters": [
108       
109     {
110     "name": "hubId",
111     "required": true,
112     "in": "path",
113     "type" : "string"
114     }
115       ],
116     "responses": {
117     "200": {
118     "description": "Ok",
119     "schema": {
120     "$ref": "#/definitions/Hub"
121     }
122     
123     }
124     }
125     },
126     "delete": {
127     "tags": [
128     "Hub"
129     ],
130     "operationId": "hubDelete",
131     "summary": "delete hub",
132     "description": "",
133     "deprecated": false,
134     
135       "parameters": [
136       
137     {
138     "name": "hubId",
139     "required": true,
140     "in": "path",
141     "type" : "string"
142     }
143       ],
144     "responses": {
145     "204": {
146     "description": "No Content"
147     
148     }
149     }
150     }
151       }
152     },
153     "definitions": {
154         
155
156     "ErrorDetail": {
157     "description": "",
158
159     
160     "required": [
161     
162       "code",
163       "message"
164     ],
165     "type": "object",
166     "properties": {
167     "code": {
168     "description": "",
169     "type": "integer",
170     "format": "int32"
171     },
172     "message": {
173     "description": "",
174     "type": "string"
175     },
176     "description": {
177     "description": "",
178     "type": "string"
179     },
180     "infoURL": {
181     "description": "",
182     "type": "string"
183     }
184     }
185     
186     },    
187
188     "Error": {
189     "description": "",
190
191     
192     "required": [
193     
194       "code",
195       "message"
196     ],
197     "type": "object",
198     "properties": {
199     "code": {
200     "description": "",
201     "type": "integer",
202     "format": "int32"
203     },
204     "message": {
205     "description": "",
206     "type": "string"
207     },
208     "description": {
209     "description": "",
210     "type": "string"
211     },
212     "infoURL": {
213     "description": "",
214     "type": "string"
215     },
216     "details": {
217     
218     "type": "array",
219     "items": {
220     "$ref": "#/definitions/ErrorDetail"
221     }
222     }
223     }
224     
225     },    
226
227     "HubIn": {
228     "description": "",
229
230     
231     "required": [
232     
233       "query",
234       "callback"
235     ],
236     "type": "object",
237     "properties": {
238     "query": {
239     "description": "The query must have an eventType= information.\\nOptionally a ? could be added to reduce hub.\\nquery”:”eventType = ServiceOrderStateChangeNotification”&serviceOrder.state=COMPLETED",
240     "type": "string"
241     },
242     "callback": {
243     "description": "URL where notification must be send",
244     "type": "string"
245     }
246     }
247     
248     },    
249
250     "Hub": {
251     "description": "",
252
253     
254     "required": [
255     
256       "id",
257       "query",
258       "callback"
259     ],
260     "type": "object",
261     "properties": {
262     "id": {
263     "description": "",
264     "type": "string"
265     },
266     "query": {
267     "description": "The query must have an eventType= information.\\nOptionally a ? could be added to reduce hub.\\nquery”:”eventType = ServiceOrderStateChangeNotification”&serviceOrder.state=COMPLETED",
268     "type": "string"
269     },
270     "callback": {
271     "description": "URL where notification must be send",
272     "type": "string"
273     }
274     }
275     
276     }
277     }
278     }
279