Improve license scan result
[externalapi/nbi.git] / docs / offeredapis / api_hub / swagger.yaml
1 #    Copyright (c) 2018 Orange
2 #
3 #    Licensed under the Apache License, Version 2.0 (the "License");
4 #    you may not use this file except in compliance with the License.
5 #    You may obtain a copy of the License at
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #    Unless required by applicable law or agreed to in writing, software
10 #    distributed under the License is distributed on an "AS IS" BASIS,
11 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #    See the License for the specific language governing permissions and
13 #    limitations under the License.swagger: "2.0"
14 swagger: "2.0"
15 info:
16   description: "Provides the ability to subscribe to and unsubscribe from External\
17     \ API notifications.\n\n**Main operation**\n\n```\nPOST /hub\n```\n\nrequest sample\
18     \ 1\n\n```\n{\n  \"callback\": \"http://mydomain/notification\",\n  \"query\"\
19     : \"eventType = ServiceOrderCreationNotification\"\n}\n```\n\nrequest sample 2\n\
20     \n```\n{\n  \"callback\": \"http://mydomain/notification\",\n  \"query\": \"eventType=ServiceOrderCreationNotification,ServiceOrderStateChangeNotification\"\
21     \n}\n```\n\n**EventType for serviceOrdering**\n\n- ServiceOrderCreationNotification\n\
22     - ServiceOrderStateChangeNotification\n- ServiceOrderItemStateChangeNotification\n\
23     \n**EventType for serviceInventory**\n\n- ServiceCreationNotification\n- ServiceAttributeValueChangeNotification\n\
24     - ServiceRemoveNotification\n\n"
25   version: "4.0.1"
26   title: "API Hub"
27   x-logo:
28     url: "/redoc/logo.png"
29     backgroundColor: "#FFFFFF"
30 host: "api.orange.com"
31 basePath: "/"
32 schemes:
33 - "http"
34 produces:
35 - "application/json;charset=utf-8"
36 tags:
37 - name: "Hub"
38   description: "provided by NBI"
39 paths:
40   /hub:
41     post:
42       tags:
43       - "Hub"
44       consumes:
45       - "application/json;charset=utf-8"
46       produces:
47       - "application/json;charset=utf-8"
48       operationId: "hubCreate"
49       summary: "create hub"
50       description: ""
51       deprecated: false
52       parameters:
53       - name: "Hub"
54         required: true
55         in: "body"
56         description: ""
57         schema:
58           $ref: "#/definitions/HubIn"
59       responses:
60         201:
61           description: "Created"
62           schema:
63             $ref: "#/definitions/Hub"
64     get:
65       tags:
66       - "Hub"
67       produces:
68       - "application/json;charset=utf-8"
69       operationId: "hubFind"
70       summary: "find hub"
71       description: ""
72       deprecated: false
73       responses:
74         200:
75           description: "Ok"
76           schema:
77             type: "array"
78             items:
79               $ref: "#/definitions/Hub"
80   /hub/{hubId}:
81     get:
82       tags:
83       - "Hub"
84       produces:
85       - "application/json;charset=utf-8"
86       operationId: "hubGet"
87       summary: "get hub"
88       description: ""
89       deprecated: false
90       parameters:
91       - name: "hubId"
92         required: true
93         in: "path"
94         type: "string"
95       responses:
96         200:
97           description: "Ok"
98           schema:
99             $ref: "#/definitions/Hub"
100     delete:
101       tags:
102       - "Hub"
103       operationId: "hubDelete"
104       summary: "delete hub"
105       description: ""
106       deprecated: false
107       parameters:
108       - name: "hubId"
109         required: true
110         in: "path"
111         type: "string"
112       responses:
113         204:
114           description: "No Content"
115 definitions:
116   ErrorDetail:
117     description: ""
118     required:
119     - "code"
120     - "message"
121     type: "object"
122     properties:
123       code:
124         description: ""
125         type: "integer"
126         format: "int32"
127       message:
128         description: ""
129         type: "string"
130       description:
131         description: ""
132         type: "string"
133       infoURL:
134         description: ""
135         type: "string"
136   Error:
137     description: ""
138     required:
139     - "code"
140     - "message"
141     type: "object"
142     properties:
143       code:
144         description: ""
145         type: "integer"
146         format: "int32"
147       message:
148         description: ""
149         type: "string"
150       description:
151         description: ""
152         type: "string"
153       infoURL:
154         description: ""
155         type: "string"
156       details:
157         type: "array"
158         items:
159           $ref: "#/definitions/ErrorDetail"
160   HubIn:
161     description: ""
162     required:
163     - "query"
164     - "callback"
165     type: "object"
166     properties:
167       query:
168         description: "The query must have an eventType= information.\\nOptionally\
169           \ a ? could be added to reduce hub.\\nquery”:”eventType = ServiceOrderStateChangeNotification”\
170           &serviceOrder.state=COMPLETED"
171         type: "string"
172       callback:
173         description: "URL where notification must be send"
174         type: "string"
175   Hub:
176     description: ""
177     required:
178     - "id"
179     - "query"
180     - "callback"
181     type: "object"
182     properties:
183       id:
184         description: ""
185         type: "string"
186       query:
187         description: "The query must have an eventType= information.\\nOptionally\
188           \ a ? could be added to reduce hub.\\nquery”:”eventType = ServiceOrderStateChangeNotification”\
189           &serviceOrder.state=COMPLETED"
190         type: "string"
191       callback:
192         description: "URL where notification must be send"
193         type: "string"