add href to service inventory responses
[externalapi/nbi.git] / docs / offeredapis / listener / asciiDoc.adoc
1 = API Listener
2
3
4 [[_overview]]
5 == Overview
6
7 === Api URL
8
9 https://api-designer.sso.infra.ftgroup/swagger-ui/?url=https://api-designer.sso.infra.ftgroup/api/1.0/apis/aoG0EJ01Pv/swagger.json[Swagger UI]
10
11
12 https://plantuml.rd.francetelecom.fr/proxy?fmt=svg&src=https://api-designer.sso.infra.ftgroup/api/1.0/apis/aoG0EJ01Pv/plantuml&noCache=7322.0[plant UML UI]
13
14 Listener API has to be implemented on the client side in order to receive notification.
15 Notification are received if HUB has been posted on server side.
16
17
18 === Version information
19 [%hardbreaks]
20 __Version__ : 0.1.0_inProgress
21
22
23 === URI scheme
24 [%hardbreaks]
25 __Host__ : serverRoot
26 __BasePath__ : /externalapi/listener/v1
27 __Schemes__ : HTTPS
28
29
30 === Tags
31
32 * Listener
33
34
35 === Produces
36
37 * `application/json;charset=utf-8`
38
39
40 [[_paths]]
41 == Resources
42
43 [[_listener_resource]]
44 === Listener
45
46 [[_listenercreate]]
47 ==== createEvent
48 ....
49 POST /listener
50 ....
51
52
53 ===== Description
54 The create event is used by the seller to trigger (POST) a notification to the buyer. The buyer has previously subscribed to receive notification
55
56 Specific business errors for current operation will be encapsulated in
57
58 HTTP Response 422 Unprocessable entity
59
60
61 ===== Parameters
62
63 [options="header", cols=".^2,.^3,.^4"]
64 |===
65 |Type|Name|Schema
66 |**Body**|**event** +
67 __required__|<<_listener,Listener>>
68 |===
69
70
71 ===== Responses
72
73 [options="header", cols=".^2,.^14,.^4"]
74 |===
75 |HTTP Code|Description|Schema
76 |**201**|Success|<<_listener,Listener>>
77 |**400**|Bad Request
78
79 List of supported error codes:
80 - 20: Invalid URL parameter value
81 - 21: Missing body
82 - 22: Invalid body
83 - 23: Missing body field
84 - 24: Invalid body field
85 - 25: Missing header
86 - 26: Invalid header value
87 - 27: Missing query-string parameter
88 - 28: Invalid query-string parameter value|<<_errorrepresentation,ErrorRepresentation>>
89 |**401**|Unauthorized
90
91 List of supported error codes:
92 - 40: Missing credentials
93 - 41: Invalid credentials
94 - 42: Expired credentials|<<_errorrepresentation,ErrorRepresentation>>
95 |**403**|Forbidden
96
97 List of supported error codes:
98 - 50: Access denied
99 - 51: Forbidden requester
100 - 52: Forbidden user
101 - 53: Too many requests|<<_errorrepresentation,ErrorRepresentation>>
102 |**422**|Unprocessable entity
103
104 Functional error|<<_errorrepresentation,ErrorRepresentation>>
105 |**500**|Internal Server Error
106
107 List of supported error codes:
108 - 1: Internal error|<<_errorrepresentation,ErrorRepresentation>>
109 |**503**|Service Unavailable
110
111 List of supported error codes:
112 - 5: The service is temporarily unavailable
113 - 6: Orange API is over capacity, retry later !|<<_errorrepresentation,ErrorRepresentation>>
114 |===
115
116
117 ===== Consumes
118
119 * `application/json;charset=utf-8`
120
121
122 ===== Produces
123
124 * `application/json;charset=utf-8`
125
126
127 [[_definitions]]
128 == Definitions
129
130 [[_errorrepresentation]]
131 === ErrorRepresentation
132
133 [options="header", cols=".^3,.^4"]
134 |===
135 |Name|Schema
136 |**@schemaLocation** +
137 __optional__|string
138 |**@type** +
139 __optional__|string
140 |**code** +
141 __required__|integer (int32)
142 |**message** +
143 __optional__|string
144 |**reason** +
145 __optional__|string
146 |**referenceError** +
147 __optional__|string
148 |**status** +
149 __optional__|integer (int32)
150 |===
151
152
153 [[_eventtype]]
154 === EventType
155 __Type__ : enum (ServiceOrderCreationNotification, ServiceOrderStateChangeNotification, ServiceOrderItemStateChangeNotification)
156
157
158 [[_listener]]
159 === Listener
160 An event will be triggered for each time a notification is send to a listener.
161
162
163 [options="header", cols=".^3,.^11,.^4"]
164 |===
165 |Name|Description|Schema
166 |**event** +
167 __required__|An event representation is the payload of information send with the notification; it will feature event attributes + summary view of the resource.|object
168 |**eventDate** +
169 __required__||string (date-time)
170 |**eventId** +
171 __required__|id of the event|string
172 |**eventType** +
173 __required__||<<_eventtype,EventType>>
174 |===
175