5ee40cf6ead71ad2565aa01df82da3681eb1ca2a
[externalapi/nbi.git] / docs / offeredapis / serviceOrder / markDown.md
1 # API ServiceOrder
2
3
4 <a name="overview"></a>
5 ## Overview
6
7 ### Api URL
8
9 [Swagger UI](https://api-designer.sso.infra.ftgroup/swagger-ui/?url=https://api-designer.sso.infra.ftgroup/api/1.0/apis/kl1kgvz1zR/swagger.json)
10
11
12 [plant UML UI](https://plantuml.rd.francetelecom.fr/proxy?fmt=svg&src=https://api-designer.sso.infra.ftgroup/api/1.0/apis/kl1kgvz1zR/plantuml&noCache=934804.0)
13
14 serviceOrder API designed for ONAP Beijing Release.
15 This API is build from TMF open API18.0 (applying TMF Guideline 3.0);
16 Only operations GET (by id and list) and POST are available.
17
18
19 ### Version information
20 *Version* : 1.0.0_inProgress
21
22
23 ### URI scheme
24 *Host* : serverRoot  
25 *BasePath* : /nbi/api/v1  
26 *Schemes* : HTTPS
27
28
29 ### Tags
30
31 * ServiceOrder : A Service Order is a type of order which can be used to describe a group of operations on service – one service order item per service. An action at the level of the service order item describe the operation to be done on a service (add, terminate for example). The service order is triggered from the BSS system in charge of the product order management to ONAP that will manage the service fulfillment.
32
33
34 ### Consumes
35
36 * `application/json;charset=utf-8`
37
38
39 ### Produces
40
41 * `application/json;charset=utf-8`
42
43
44 <a name="paths"></a>
45 ## Resources
46
47 <a name="serviceorder_resource"></a>
48 ### ServiceOrder
49 A Service Order is a type of order which can be used to describe a group of operations on service – one service order item per service. An action at the level of the service order item describe the operation to be done on a service (add, terminate for example). The service order is triggered from the BSS system in charge of the product order management to ONAP that will manage the service fulfillment.
50
51
52 <a name="serviceordercreate"></a>
53 #### Create a service order
54 ```
55 POST /serviceOrder
56 ```
57
58
59 ##### Description
60 This operation creates a service order entity.
61 The TMF Open API specification document provides the list of mandatory and non mandatory attributes when creating a ServiceOrder, including any possible rule conditions and applicable default values.
62 POST should be used without specifying the id and the href, the Service Order Management system is in charge of generating the id + href for the ServiceOrder.
63
64 Specific business errors for current operation will be encapsulated in
65
66 HTTP Response 422 Unprocessable entity
67
68  - 100: OrderItem with 'add' action but serviceSpecification id missing
69    
70  - 101: OrderItem with 'change'/'noChange'/'remove' but service id missing
71    
72  - 102: OrderItem with 'add' action - serviceSpecification id provided but not existing
73    
74  - 103: OrderItem with 'add' action but service id already existing in the inventory
75    
76  - 104: A customer for existing service(s) is provided but he did not exist
77    
78  - 105: OrderItem with 'change'/'noChange'/'remove' - Service id provided but it is not existing in the inventory
79    
80  - 106: [Not managed for current Relese] Issue with lcpCloudRegionId  and tenantId provided
81
82
83 ##### Parameters
84
85 |Type|Name|Schema|
86 |---|---|---|
87 |**Body**|**serviceOrder**  <br>*required*|[CreateServiceOrder](#createserviceorder)|
88
89
90 ##### Responses
91
92 |HTTP Code|Description|Schema|
93 |---|---|---|
94 |**201**|Success|[CreateServiceOrder](#createserviceorder)|
95 |**400**|Bad Request<br><br>List of supported error codes:<br>- 20: Invalid URL parameter value<br>- 21: Missing body<br>- 22: Invalid body<br>- 23: Missing body field<br>- 24: Invalid body field<br>- 25: Missing header<br>- 26: Invalid header value<br>- 27: Missing query-string parameter<br>- 28: Invalid query-string parameter value|[ErrorRepresentation](#errorrepresentation)|
96 |**401**|Unauthorized<br><br>List of supported error codes:<br>- 40: Missing credentials<br>- 41: Invalid credentials<br>- 42: Expired credentials|[ErrorRepresentation](#errorrepresentation)|
97 |**403**|Forbidden<br><br>List of supported error codes:<br>- 50: Access denied<br>- 51: Forbidden requester<br>- 52: Forbidden user<br>- 53: Too many requests|[ErrorRepresentation](#errorrepresentation)|
98 |**404**|Not Found<br><br>List of supported error codes:<br>- 60: Resource not found|[ErrorRepresentation](#errorrepresentation)|
99 |**422**|Unprocessable entity<br><br>Functional error<br><br>Specific encapsulated business errors for current operation<br><br> - 100: OrderItem with 'add' action but serviceSpecification id missing<br>   <br> - 101: OrderItem with 'change'/'noChange'/'remove' but service id missing<br>   <br> - 102: OrderItem with 'add' action - serviceSpecification id provided but not existing<br>   <br> - 103: OrderItem with 'add' action but service id already existing in the inventory<br>   <br> - 104: A customer for existing service(s) is provided but he did not exist<br>   <br> - 105: OrderItem with 'change'/'noChange'/'remove' - Service id provided but it is not existing in the inventory<br>   <br> - 106: [Not managed for current Relese] Issue with lcpCloudRegionId  and tenantId provided|[ErrorRepresentation](#errorrepresentation)|
100 |**500**|Internal Server Error<br><br>List of supported error codes:<br>- 1: Internal error|[ErrorRepresentation](#errorrepresentation)|
101 |**503**|Service Unavailable<br><br>List of supported error codes:<br>- 5: The service is temporarily unavailable<br>- 6: Orange API is over capacity, retry later !|[ErrorRepresentation](#errorrepresentation)|
102
103
104 <a name="serviceorderfind"></a>
105 #### List service orders
106 ```
107 GET /serviceOrder
108 ```
109
110
111 ##### Description
112 Retrieve and list service order entities according to given criteria.
113 Only a predefined set of attribute is proposed.
114 Attribute selection could be described in the fields attribute.
115
116 Specific business errors for current operation will be encapsulated in
117
118 HTTP Response 422 Unprocessable entity
119
120
121 ##### Parameters
122
123 |Type|Name|Description|Schema|
124 |---|---|---|---|
125 |**Query**|**description**  <br>*optional*||string|
126 |**Query**|**externalId**  <br>*optional*||string|
127 |**Query**|**fields**  <br>*optional*|this attribute could be used to filter retrieved attribute(s) and/or sort SO.|string|
128 |**Query**|**limit**  <br>*optional*|The maximum number of elements to retrieve (it can be greater than the actual available number of items).|integer (int32)|
129 |**Query**|**offset**  <br>*optional*|The index of the first element to retrieve. Zero is the first element of the collection.|integer (int32)|
130 |**Query**|**orderDate.gt**  <br>*optional*|order date greather than|string|
131 |**Query**|**orderDate.lt**  <br>*optional*|order date lower than|string|
132 |**Query**|**state**  <br>*optional*|state of the order(s) to be retrieved|string|
133
134
135 ##### Responses
136
137 |HTTP Code|Description|Schema|
138 |---|---|---|
139 |**200**|Success  <br>**Headers** :   <br>`X-Total-Count` (integer (int32))  <br>`X-Result-Count` (integer (int32))|< [ServiceOrder](#serviceorder) > array|
140 |**400**|Bad Request<br><br>List of supported error codes:<br>- 20: Invalid URL parameter value<br>- 21: Missing body<br>- 22: Invalid body<br>- 23: Missing body field<br>- 24: Invalid body field<br>- 25: Missing header<br>- 26: Invalid header value<br>- 27: Missing query-string parameter<br>- 28: Invalid query-string parameter value|[ErrorRepresentation](#errorrepresentation)|
141 |**401**|Unauthorized<br><br>List of supported error codes:<br>- 40: Missing credentials<br>- 41: Invalid credentials<br>- 42: Expired credentials|[ErrorRepresentation](#errorrepresentation)|
142 |**403**|Forbidden<br><br>List of supported error codes:<br>- 50: Access denied<br>- 51: Forbidden requester<br>- 52: Forbidden user<br>- 53: Too many requests|[ErrorRepresentation](#errorrepresentation)|
143 |**404**|Not Found<br><br>List of supported error codes:<br>- 60: Resource not found|[ErrorRepresentation](#errorrepresentation)|
144 |**422**|Unprocessable entity<br><br>Functional error|[ErrorRepresentation](#errorrepresentation)|
145 |**500**|Internal Server Error<br><br>List of supported error codes:<br>- 1: Internal error|[ErrorRepresentation](#errorrepresentation)|
146 |**503**|Service Unavailable<br><br>List of supported error codes:<br>- 5: The service is temporarily unavailable<br>- 6: Orange API is over capacity, retry later !|[ErrorRepresentation](#errorrepresentation)|
147
148
149 <a name="serviceorderget"></a>
150 #### Retrieve a service order
151 ```
152 GET /serviceOrder/{id}
153 ```
154
155
156 ##### Description
157 This operation retrieves a service order entity. 
158 Attribute selection is enabled for all first level attributes.
159
160 Specific business errors for current operation will be encapsulated in
161
162 HTTP Response 422 Unprocessable entity
163
164
165 ##### Parameters
166
167 |Type|Name|Description|Schema|
168 |---|---|---|---|
169 |**Path**|**id**  <br>*required*||string|
170 |**Query**|**fields**  <br>*optional*|Attribute selection|string|
171
172
173 ##### Responses
174
175 |HTTP Code|Description|Schema|
176 |---|---|---|
177 |**200**|Success|[ServiceOrder](#serviceorder)|
178 |**400**|Bad Request<br><br>List of supported error codes:<br>- 20: Invalid URL parameter value<br>- 21: Missing body<br>- 22: Invalid body<br>- 23: Missing body field<br>- 24: Invalid body field<br>- 25: Missing header<br>- 26: Invalid header value<br>- 27: Missing query-string parameter<br>- 28: Invalid query-string parameter value|[ErrorRepresentation](#errorrepresentation)|
179 |**401**|Unauthorized<br><br>List of supported error codes:<br>- 40: Missing credentials<br>- 41: Invalid credentials<br>- 42: Expired credentials|[ErrorRepresentation](#errorrepresentation)|
180 |**403**|Forbidden<br><br>List of supported error codes:<br>- 50: Access denied<br>- 51: Forbidden requester<br>- 52: Forbidden user<br>- 53: Too many requests|[ErrorRepresentation](#errorrepresentation)|
181 |**404**|Not Found<br><br>List of supported error codes:<br>- 60: Resource not found|[ErrorRepresentation](#errorrepresentation)|
182 |**422**|Unprocessable entity<br><br>Functional error|[ErrorRepresentation](#errorrepresentation)|
183 |**500**|Internal Server Error<br><br>List of supported error codes:<br>- 1: Internal error|[ErrorRepresentation](#errorrepresentation)|
184 |**503**|Service Unavailable<br><br>List of supported error codes:<br>- 5: The service is temporarily unavailable<br>- 6: Orange API is over capacity, retry later !|[ErrorRepresentation](#errorrepresentation)|
185
186
187 <a name="definitions"></a>
188 ## Definitions
189
190 <a name="actiontype"></a>
191 ### ActionType
192 Action type to be describer on the order item.
193 modify is not managed in Beijing release
194
195 *Type* : enum (add, modify, delete, noChange)
196
197
198 <a name="createserviceorder"></a>
199 ### CreateServiceOrder
200 This structure is used in the operation POST for a serviceOrder request.
201 Attribute description is not accurate and should be find in the serviceOrder class.
202
203
204 |Name|Description|Schema|
205 |---|---|---|
206 |**@baseType**  <br>*optional*||string|
207 |**@schemaLocation**  <br>*optional*||string|
208 |**@type**  <br>*optional*||string|
209 |**category**  <br>*optional*|Used to categorize the order that can be useful for the OM system (e.g. “broadband”, “TVOption”, ...)|string|
210 |**description**  <br>*optional*|A free-text description of the service order|string|
211 |**externalId**  <br>*optional*|ID given by the consumer and only understandable by him (to facilitate his searches)|string|
212 |**orderItem**  <br>*optional*||< [CreateServiceOrderItem](#createserviceorderitem) > array|
213 |**orderRelationship**  <br>*optional*||< [OrderRelationship](#orderrelationship) > array|
214 |**priority**  <br>*optional*|A way that can be used by consumers to prioritize orders in Service Order Management system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)|string|
215 |**relatedParty**  <br>*optional*||< [RelatedParty](#relatedparty) > array|
216 |**requestedCompletionDate**  <br>*optional*|Requested delivery date from the requestor perspective|string (date-time)|
217 |**requestedStartDate**  <br>*optional*|Order start date wished by the requestor|string (date-time)|
218
219
220 <a name="createserviceorderitem"></a>
221 ### CreateServiceOrderItem
222 This structure is used in the operation POST for a serviceOrder request to describe an item.
223 Attribute description is not accurate and should be find in the serviceOrderItem class.
224
225
226 |Name|Description|Schema|
227 |---|---|---|
228 |**@baseType**  <br>*optional*|Indicates the base type of the resource.|string|
229 |**@schemaLocation**  <br>*optional*|A link to the schema describing this REST resource|string|
230 |**@type**  <br>*optional*|Indicates the type of resource.|string|
231 |**action**  <br>*optional*||[ActionType](#actiontype)|
232 |**id**  <br>*required*|Identifier of the line item (generally it is a sequence number 01, 02, 03, …)|string|
233 |**orderItemRelationship**  <br>*optional*||< [OrderItemRelationship](#orderitemrelationship) > array|
234 |**service**  <br>*required*||[Service](#service)|
235
236
237 <a name="errorrepresentation"></a>
238 ### ErrorRepresentation
239 Representation of an error.
240
241
242 |Name|Description|Schema|
243 |---|---|---|
244 |**@schemaLocation**  <br>*optional*|it provides a link to the schema describing a REST resource|string|
245 |**@type**  <br>*optional*|The class type of a REST resource|string|
246 |**code**  <br>*required*|Application related code (as defined in the API or from a common list)|integer (int32)|
247 |**message**  <br>*optional*|Text that provide more details and corrective actions related to the error. This can be shown to a client user|string|
248 |**reason**  <br>*required*|Text that explains the reason for error. This can be shown to a client user.|string|
249 |**referenceError**  <br>*optional*|url pointing to documentation describing the error|string|
250 |**status**  <br>*optional*|http error code extension like 400-2|string|
251
252
253 <a name="hub"></a>
254 ### Hub
255 An HUB resource is used by client side to subscribe to notification.
256 Not managed in the Beijing release.
257
258
259 |Name|Schema|
260 |---|---|
261 |**callback**  <br>*required*|string|
262 |**id**  <br>*optional*|string|
263 |**query**  <br>*optional*|string|
264
265
266 <a name="orderitemrelationship"></a>
267 ### OrderItemRelationship
268 Linked order item to the one containing this attribute.
269 nbi component used this relationship to sort request to ONAP.
270
271
272 |Name|Description|Schema|
273 |---|---|---|
274 |**id**  <br>*required*|Unique identifier of an order item|string|
275 |**type**  <br>*required*||[RelationshipType](#relationshiptype)|
276
277
278 <a name="orderrelationship"></a>
279 ### OrderRelationship
280 Linked order to the one containing this attribute.
281 This relationship is not used to sort ONAP request.
282
283
284 |Name|Description|Schema|
285 |---|---|---|
286 |**@referredType**  <br>*optional*|Type of the referred order.|string|
287 |**href**  <br>*optional*|A hyperlink to the related order|string|
288 |**id**  <br>*required*|The id of the related order|string|
289 |**type**  <br>*optional*|The type of related order, can be : “dependency” if the order needs to be “not started” until another order item is complete (a service order in this case) or “cross-ref” to keep track of the source order (a productOrder)|string|
290
291
292 <a name="relatedparty"></a>
293 ### RelatedParty
294 A related party defines party which are involved in this order and the role they are playing.
295 for Beijing release:
296 With the current version of APIs used from SO and AAI we need to manage a ‘customer’. This customer concept is confusing with Customer BSS concept. We took the following rules to manage the ‘customer’ information:
297 o       It could be provided through a serviceOrder in the service Order a relatedParty with role ‘ONAPcustomer’ should be provided in the serviceOrder header (we will not consider in this release the party at item level); External API component will check if this customer exists and create it in AAI if not.
298 o       If no relatedParty are provided the service will be affected to ‘generic’ customer (dummy customer) – we assume this ‘generic’ customer always exists.
299
300
301 |Name|Description|Schema|
302 |---|---|---|
303 |**@referredType**  <br>*optional*||string|
304 |**href**  <br>*optional*|An hyperlink to the party - not used in Beijnig release|string|
305 |**id**  <br>*required*|Unique identifier of a related party|string|
306 |**name**  <br>*optional*|Name of the related party|string|
307 |**role**  <br>*required*|The role of the related party (e.g. Owner, requester, fullfiller etc).<br>ONLY 'ONAPcustomer' is considered|string|
308
309
310 <a name="relationshiptype"></a>
311 ### RelationshipType
312 Relationship type;
313 Only reliesOn is managed in Beijing release.
314
315 *Type* : enum (reliesOn)
316
317
318 <a name="service"></a>
319 ### Service
320 Service (to be added, modified, deleted) description
321
322
323 |Name|Description|Schema|
324 |---|---|---|
325 |**@schemaLocation**  <br>*optional*|The URL to get the resource schema.<br>Not managed in Beijing Release|string|
326 |**@type**  <br>*optional*|To define the service type<br>Not managed in Beijing Release|string|
327 |**href**  <br>*optional*|Reference to the Service (useful for delete or modify command).<br>Not managed in Beijing release.|string|
328 |**id**  <br>*required*|Identifier of a service instance.<br>It must be valued if orderItem action is 'delete' and corresponds to a AAI service.id|string|
329 |**name**  <br>*optional*|Name of the service - When orderItem action is 'add' this name will be used in ONAP/SO request as InstaceName.|string|
330 |**relatedParty**  <br>*optional*||< [RelatedParty](#relatedparty) > array|
331 |**serviceCharacteristic**  <br>*optional*||< [ServiceCharacteristic](#servicecharacteristic) > array|
332 |**serviceRelationship**  <br>*optional*||< [ServiceRelationship](#servicerelationship) > array|
333 |**serviceSpecification**  <br>*optional*||[ServiceSpecificationRef](#servicespecificationref)|
334 |**serviceState**  <br>*optional*|The lifecycle state of the service requested;<br>Not managed in Beijing release.|string|
335
336
337 <a name="servicecharacteristic"></a>
338 ### ServiceCharacteristic
339 ServiceCharacteristic
340
341
342 |Name|Description|Schema|
343 |---|---|---|
344 |**name**  <br>*required*|Name of characteristic|string|
345 |**value**  <br>*optional*||[Value](#value)|
346 |**valueType**  <br>*optional*||string|
347
348
349 <a name="serviceorder"></a>
350 ### ServiceOrder
351 A Service Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa
352
353
354 |Name|Description|Schema|
355 |---|---|---|
356 |**@baseType**  <br>*optional*||string|
357 |**@schemaLocation**  <br>*optional*||string|
358 |**@type**  <br>*optional*||string|
359 |**category**  <br>*optional*|Used to categorize the order that can be useful for the OM system (e.g. “broadband”, “TVOption”, ...)|string|
360 |**completionDateTime**  <br>*optional*|Date when the order was completed|string (date-time)|
361 |**description**  <br>*optional*|A free-text description of the service order|string|
362 |**expectedCompletionDate**  <br>*optional*||string (date-time)|
363 |**externalId**  <br>*optional*|ID given by the consumer and only understandable by him (to facilitate his searches)|string|
364 |**href**  <br>*optional*|Hyperlink to access the order|string|
365 |**id**  <br>*required*|ID created on repository side|string|
366 |**orderDate**  <br>*optional*||string (date-time)|
367 |**orderItem**  <br>*optional*||< [ServiceOrderItem](#serviceorderitem) > array|
368 |**orderRelationship**  <br>*optional*||< [OrderRelationship](#orderrelationship) > array|
369 |**priority**  <br>*optional*|A way that can be used by consumers to prioritize orders in Service Order Management system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)|string|
370 |**relatedParty**  <br>*optional*||< [RelatedParty](#relatedparty) > array|
371 |**requestedCompletionDate**  <br>*optional*|Requested delivery date from the requestor perspective|string (date-time)|
372 |**requestedStartDate**  <br>*optional*|Order start date wished by the requestor|string (date-time)|
373 |**startDate**  <br>*optional*|Date when the order was started for processing|string (date-time)|
374 |**state**  <br>*optional*||[StateType](#statetype)|
375
376
377 <a name="serviceorderitem"></a>
378 ### ServiceOrderItem
379 An identified part of the order. A service order is decomposed into one or more order items.
380
381
382 |Name|Description|Schema|
383 |---|---|---|
384 |**@baseType**  <br>*optional*|not used in Beijing relase|string|
385 |**@schemaLocation**  <br>*optional*|not used in Beijing relase|string|
386 |**@type**  <br>*optional*|Used to extend the order item.<br>not used in Beijing relase|string|
387 |**action**  <br>*optional*||[ActionType](#actiontype)|
388 |**id**  <br>*required*|Identifier of the line item (generally it is a sequence number 01, 02, 03, …)|string|
389 |**orderItemRelationship**  <br>*optional*||< [OrderItemRelationship](#orderitemrelationship) > array|
390 |**service**  <br>*required*||[Service](#service)|
391 |**state**  <br>*optional*||[StateType](#statetype)|
392
393
394 <a name="serviceref"></a>
395 ### ServiceRef
396 Service references
397
398
399 |Name|Description|Schema|
400 |---|---|---|
401 |**href**  <br>*optional*|Reference of the service|string|
402 |**id**  <br>*required*|Unique identifier of the service|string|
403
404
405 <a name="servicerelationship"></a>
406 ### ServiceRelationship
407 Linked Services to the one instantiate
408 nbi component used this relationship to sort request to ONAP.
409
410
411 |Name|Schema|
412 |---|---|
413 |**service**  <br>*required*|[Service](#service)|
414 |**type**  <br>*required*|[RelationshipType](#relationshiptype)|
415
416
417 <a name="servicespecificationref"></a>
418 ### ServiceSpecificationRef
419 The service specification (these attributes are fetched from the catalogue).
420
421
422 |Name|Description|Schema|
423 |---|---|---|
424 |**@baseType**  <br>*optional*|Not used in Beijing release|string|
425 |**@schemaLocation**  <br>*optional*|Not used in Beijing release|string|
426 |**@type**  <br>*optional*|Not used in Beijing release|string|
427 |**href**  <br>*optional*|Reference of the service specification<br>Not used in Beijing release.|string|
428 |**id**  <br>*required*|Unique identifier of the service specification<br>This information will be used to retrieve SDC information + mapped to SO ModelNameVersionIdin the request.|string|
429 |**name**  <br>*optional*|Name of the service specification<br>Not used in Beijing release|string|
430 |**targetServiceSchema**  <br>*optional*||[TargetServiceSchema](#targetserviceschema)|
431 |**version**  <br>*optional*|Version of the service Specification<br>Not used in Beijing release|string|
432
433
434 <a name="statetype"></a>
435 ### StateType
436 List of possible state for the order and the orderItem.
437
438 *Type* : enum (acknowledged, rejected, pending, held, inProgress, cancelled, completed, failed, partial)
439
440
441 <a name="targetserviceschema"></a>
442 ### TargetServiceSchema
443 Target to the schema describing the service spec resource
444
445
446 |Name|Description|Schema|
447 |---|---|---|
448 |**@schemaLocation**  <br>*required*|This field provided a link to the schema describing this REST resource.|string|
449 |**@type**  <br>*required*|Indicates the (class) type of resource.|string|
450
451
452 <a name="value"></a>
453 ### Value
454 Value is a descriptive structure for service characteristic;
455 For Beijing we only manage 'basic' attribute - the serviceCharacteristicValue must be used.
456
457
458 |Name|Description|Schema|
459 |---|---|---|
460 |**@schemaLocation**  <br>*optional*|This field provided a link to the schema describing this REST resource.<br>Not used in Beijing Release|string|
461 |**@type**  <br>*optional*|Indicates the (class) type of resource.<br>Not used in Beijing Release|string|
462 |**serviceCharacteristicValue**  <br>*optional*|Value of the characteristic.<br>This attribute must be used in Beijing Release to provide characteristic value.|string|
463