Update serviceOrder swagger with clarifications on serviceState
[externalapi/nbi.git] / docs / offeredapis / api_serviceOrder / swagger.yaml
1 #    Copyright (c) 2018 Orange
2 #    Copyright (c) 2020 Wipro Limited
3
4 #    Licensed under the Apache License, Version 2.0 (the "License");
5 #    you may not use this file except in compliance with the License.
6 #    You may obtain a copy of the License at
7 #
8 #        http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #    Unless required by applicable law or agreed to in writing, software
11 #    distributed under the License is distributed on an "AS IS" BASIS,
12 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #    See the License for the specific language governing permissions and
14 #    limitations under the License.swagger: "2.0"
15 swagger: '2.0'
16 info:
17   description: "# About the ONAP Service Order API\n The Service Catalog API is based on the TM Forum 641 Service Ordering API.\n ## API Overview\n### General Description \n The Service Order API is used to request the instantiation, deletion or modification of a service\n\nA 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 describes the operation to be completed on a service (add, delete for example). The service order is triggered from external system such as the BSS system in charge of the product order management to ONAP that will manage the service fulfillment.\n\nList of available subscription for serviceOrdering notifications, see /hub resources swagger for more detailed information:\n\n- ServiceOrderCreationNotification\n- ServiceOrderStateChangeNotification\n- ServiceOrderItemStateChangeNotification\n\n### Relationship and Dependencies\n This Service Ordering API is related to the TM Forum 641 Service Ordering API and also to MEF LSO LEGATO Service Ordering API.\n\nThis API takes a subset of the Service Ordering API formal specification and maps it to the internals of ONAP APIS. By doing this we allow a well known, standardized JSON REST representation of the Service Templates available in ONAP to be ordered via well known Service Order formet. The main interaction for a Service Order are with ONAP Service Orchestrator (SO) for Service Instanctiation, ONAP Service and Design Center (SDC) for validating the order is for a known ONAP Service and AAI to make sure that for a service deltion or modification order, that the service instance is a valid Service instance in the ONAP Inventory\n\n### API Structure and Approach\nThe Service Ordering API can be used to order a Service from ONAP for any specific ONAP Service Template offering in the ONAP Service Catalog, or it can be used to modify or delete a Service Instance that has been already created in ONAP inventory. \n## Getting Started with the API (Hello World)\nThe Service Ordering API is available via two schemes, http and https. For interacting with the API the simplest method is via http. To interact with this API via https, your Client would be required to load the neccessary https certificate. \n\nThe default installation of ONAP via OOM, will configure the use of two Node ports for External APIs. NodePorts are used to allow client applications, that run outside of Kubernetes, access to ONAP components deployed by OOM. For this Service Ordering API, the External API Framework has a http Node port of 30274. For https, the Node port is 30292.\n\n From outside ONAP, a client can interact with External API by first getting the IP that the NBI docker container is running on, and then using the appropriate nodeport according to the access scheme. For example to retrieve a list of all Service orders  in ONAP SOM you can use http method GET to http://{nbi_ip}:30274/nbi/api/v4/serviceOrder/ \n### SDK quick intro\nThere are many tools that can be used to view and edit this swagger file like swagger editor, Atom and senya. For example this swagger file can be loaded into https://editor.swagger.io/. This UI acts both as an online editor and viewer. \n### How to start the client side implementation\n* Code generation, is available via the Generate Client option in the swagger editor. Client stubs can be generated in multiple languages, for example java, go, python etc. These Client stub code can be incorporated in the Application you wish to access the Service Ordering API from.\n\n### How to start the server side implementation\n* Not applicable, the service side for this API will be the NBI container running the External API Framework Springboot application.\n\n## API Description\nIncludes summary of information drawn from API definitions in OpenAPI / Swagger files\n### Resource Endpoint / Resource Quick Reference\nGET /serviceOrder/ : This operation returns a list service orders from External API Framework DB\n\nGET /serviceOrder/{id} : This operation returns the service order associated with this id.\n\n POST /serviceOrder : This operation is used to create a service order, with one of the following three action types, add, delete or modify. Note add is used to Instantiate a new service Instance of the specified Service Template ( SDC uuid) when NBI makes calls to SO to execute the instantiation workflows. The delete action is used to delete a specified service instance id ( AAI instance id ), while action modify is to modify the service instance.\n\n### Data Schema\n#### Main API Entities\nDescribe the major entities used in the API\n\nThe main entity of the API is the ServiceOrder resource. This entity is the top level entity of the API, and is returned as either a single instance when queried with id, or as JSON arroy of ServiceOrder entities when queried as a list.\n\nThe major child enties are relatedParty which points to the customer who is ordering the Service. This customer is related to the customer in the AAI where this servie instance for the order is placed. The orderItem is an array, meaning more that one service can be orders within the one Serice Order. i.e. each orderItem corresponds to one service instance. The serviceSpecCharacteristics entities are used to describe the attributes that can be supplied to instantiate a Service Instance of this Service Template.\n#### Payload data structures\nIf any, describe the appropriate data structures that are included within payload of the API.\n\nNot applicable\n### Security on the API\nAuthentication; Authorization; Credentials/access token; etc.\n\n https certificate required if using https. No authentication on http requests.In production this API should be behind an API Gateway with the necessary authentication\n### Response Codes\nThe meaning of Status Codes & Errors\n\nSee response codes for each API resource in the API section below\n### Rate Limits and Thresholds\nRequests per unit time allowed; Pagination\n\n No rate limits or thresholds, in production this API should be behind an API Gateway with the necessary limits.\n### Validation constraints\nDescribe any behavioral and structural validation constraints\n\nNot applicable\n### Assumptions\nFor example, any Pre/Post conditions\n\n For this API to function, SDC is required to be running and Service models designed in the SDC catalog. SO, AAI and DMaaP also need to be running as a minimum. \n## API Interactions and Flows\n### Interaction Examples\nIllustrate sequence of client calls to this API, possibly based on Use Cases, presented with diagrams, tables, etc\n\nThe Service Order API flow of use can generally follow the sequence below\n\n\n#### Call ONAP to discover what available services it can offer\n```\ncurl -X GET \"http://serverRoot:30274/nbi/api/v4/serviceSpecification/\" -H \"accept: application/json;charset=utf-8\"\n```\n#### Example Response Values\n```\n[\n  {\r\n        \"id\": \"0ec83a1f-51e7-44e7-b773-3f37ddb937cd\",\r\n        \"name\": \"EPLServiceTemplate\",\r\n        \"invariantUUID\": \"ddf31f35-8e71-4f5a-a383-4241b87ca7a7\",\r\n        \"category\": \"Network L4+\",\r\n        \"distributionStatus\": \"DISTRIBUTED\",\r\n        \"version\": \"1.0\",\r\n        \"lifecycleStatus\": \"CERTIFIED\",\r\n        \"relatedParty\": {\r\n            \"id\": \"jm0007\",\r\n            \"role\": \"lastUpdater\"\r\n        }\r\n    }\n]\n```\n\nUsing the id returned from the list of Service Specifications, pick one you would like to order an instance of.\n Using the instantation serviceCharacteristics from the Catalog construct the Service Order POST body associated with this template.\n Then POST the Service Order with an action of add to ask ONAP to instanctiate a Service Instance.\n\n#### Example POST Service Order Body\n\n```\n{\r\n        \"externalId\": \"BBS_BSS_TrackindId8888\",\r\n        \"priority\": \"1\",\r\n        \"description\": \"Service Order for a new HSIA CFS\",\r\n        \"category\": \"Network Service\",\r\n        \"relatedParty\": [\r\n            {\r\n                \"id\": \"BBSCustomer\",\r\n                \"href\": null,\r\n                \"role\": \"ONAPcustomer\",\r\n                \"name\": \"EnterpriseA\",\r\n                \"@referredType\": \"Consumer\"\r\n            }\r\n        ],\r\n        \"orderItem\": [\r\n            {\r\n                \"id\": \"1\",\r\n                \"action\": \"add\",\r\n                \"service\": {\r\n                    \"name\": \"BBS_E2E_Service\",\r\n                    \"serviceState\": \"active\",\r\n                    \"serviceCharacteristic\": [\r\n                        {\r\n                            \"name\": \"ont_ont_serial_num\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_serial_num\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_rg_mac_addr\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"rg_mac_addr\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_downstream_speed\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"10\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_mac_addr\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_mac_addr\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_access_id\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"profile_ip_access_id\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_swVersion\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_swVersion\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_manufacturer\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_manufacturer\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_service_type\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"service_type\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_pnf_name\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_pnf_name\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_upstream_speed\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"10\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_nf_type\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_nf_type\"\r\n                            }\r\n                        }\r\n                    ],\r\n                    \"serviceSpecification\": {\r\n                        \"id\": \"90b476bc-0988-4417-bae9-41b376f0e1b6\"\r\n                    }\r\n                }\r\n            }\r\n        ]\r\n}\n```\n\n\n#### You can then track the Service Order progress using the returned order id from the POST response. Use GET with the returned order id GET /nbi/api/v4/serviceOrder/5c988c98e3caf4000173cb4d\n\n#### Example GET Service Order by specific order id Response\n```\n\n{\r\n        \"id\": \"5c988c98e3caf4000173cb4d\",\r\n        \"href\": \"serviceOrder/5c988c98e3caf4000173cb4d\",\r\n        \"externalId\": \"BBS_BSS_TrackindId6979\",\r\n        \"priority\": \"1\",\r\n        \"description\": \"Service Order for a new HSIA CFS\",\r\n        \"category\": \"Network Service\",\r\n        \"state\": \"inProgress\",\r\n        \"orderDate\": \"2019-03-25T08:08:56.297Z\",\r\n        \"completionDateTime\": null,\r\n        \"expectedCompletionDate\": null,\r\n        \"requestedStartDate\": null,\r\n        \"requestedCompletionDate\": null,\r\n        \"startDate\": null,\r\n        \"@baseType\": null,\r\n        \"@type\": null,\r\n        \"@schemaLocation\": null,\r\n        \"relatedParty\": [\r\n            {\r\n                \"id\": \"testcustomer5\",\r\n                \"href\": null,\r\n                \"role\": \"ONAPcustomer\",\r\n                \"name\": \"EnterpriseA\",\r\n                \"@referredType\": \"Consumer\"\r\n            }\r\n        ],\r\n        \"orderRelationship\": null,\r\n        \"orderItem\": [\r\n            {\r\n                \"orderMessage\": [],\r\n                \"id\": \"1\",\r\n                \"action\": \"add\",\r\n                \"state\": \"inProgress\",\r\n                \"percentProgress\": \"0\",\r\n                \"@type\": null,\r\n                \"@schemaLocation\": null,\r\n                \"@baseType\": null,\r\n                \"orderItemRelationship\": [],\r\n                \"service\": {\r\n                    \"id\": \"ee8ddf86-b653-4377-809a-05811fea8501\",\r\n                    \"href\": null,\r\n                    \"name\": \"BBS_E2E_Service\",\r\n                    \"serviceState\": \"active\",\r\n                    \"@type\": null,\r\n                    \"@schemaLocation\": null,\r\n                    \"serviceCharacteristic\": [\r\n                        {\r\n                            \"name\": \"ont_ont_serial_num\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_serial_num\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_rg_mac_addr\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"rg_mac_addr\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_downstream_speed\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"10\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_mac_addr\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_mac_addr\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_access_id\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"profile_ip_access_id\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_swVersion\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_swVersion\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_manufacturer\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_manufacturer\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_service_type\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"service_type\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_pnf_name\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_pnf_name\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"edgeinternetprofile_ip_upstream_speed\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"10\"\r\n                            }\r\n                        },\r\n                        {\r\n                            \"name\": \"ont_ont_nf_type\",\r\n                            \"valueType\": null,\r\n                            \"value\": {\r\n                                \"@type\": null,\r\n                                \"@schemaLocation\": null,\r\n                                \"serviceCharacteristicValue\": \"ont_ont_nf_type\"\r\n                            }\r\n                        }\r\n                    ],\r\n                    \"serviceRelationship\": null,\r\n                    \"relatedParty\": null,\r\n                    \"serviceSpecification\": {\r\n                        \"id\": \"90b476bc-0988-4417-bae9-41b376f0e1b6\",\r\n                        \"href\": null,\r\n                        \"name\": null,\r\n                        \"version\": null,\r\n                        \"targetServiceSchema\": null,\r\n                        \"@type\": null,\r\n                        \"@schemaLocation\": null,\r\n                        \"@baseType\": null\r\n                    }\r\n                },\r\n                \"orderItemMessage\": []\r\n            }\r\n        ],\r\n        \"orderMessage\": null\r\n}\n```\n\n"
18   version: 4.1.0
19   title: ServiceOrder API
20   contact:
21     name: ONAP
22     url: 'https://onap.readthedocs.io'
23     email: onap-discuss@lists.onap.org
24   license:
25     name: Apache 2.0
26     url: 'http://www.apache.org/licenses/LICENSE-2.0'
27   x-planned-retirement-date: '205001'
28   x-component: NBI
29   x-logo:
30     url: /redoc/logo.png
31     backgroundColor: '#FFFFFF'
32 host: 'serverRoot:30274'
33 basePath: /nbi/api/v4
34 schemes:
35   - http
36   - https
37 produces:
38   - application/json;charset=utf-8
39 tags:
40   - name: ServiceOrder
41     description: provided by NBI
42   - name: Notification
43     description: 'provided by subscribers, which MUST registered by creating a hub resource'
44 paths:
45   x-interface:
46     api-version: 4.1.0
47     last-mod-release: Frankfurt
48   /serviceOrder:
49     post:
50       tags:
51         - ServiceOrder
52       consumes:
53         - application/json;charset=utf-8
54       produces:
55         - application/json;charset=utf-8
56       operationId: serviceOrder_Create
57       summary: Create a service order
58       description: >-
59         This operation creates a service order entity.
60
61         The TMF Open API specification document provides the list of mandatory
62         and non mandatory attributes when creating a ServiceOrder, including any
63         possible rule conditions and applicable default values.
64
65         POST should be used without specifying the id and the href, the Service
66         Order Management system is in charge of generating the id + href for the
67         ServiceOrder.
68
69
70         In Beijing Release, NBI will use only POST
71         {{url}}/ecomp/mso/infra/serviceInstances/v4 SO API. This mean that only
72         the 'service-instance' level will be created in AAI. Additional resource
73         like VNF and/OR VF are not created.
74
75
76         In Casablanca release, NBI has been improved to also be able to use POST
77         {{url}}/e2eServiceInstances/v3 SO API. This API is able to instantiate
78         in ONAP E2E service; This is useful for CCVPN and VoLTE UC.
79
80         Depending on the service category defined in SDC, NBI will use one or
81         the other SO API. If category starts with e2e, NBI will use 
82         {url}}/e2eServiceInstances/v3 SO API - else it will use
83         {{url}}/ecomp/mso/infra/serviceInstances/v4 SO API.
84       deprecated: false
85       parameters:
86         - name: serviceOrder
87           required: true
88           in: body
89           description: ''
90           schema:
91             $ref: '#/definitions/CreateServiceOrder'
92         - name: Target
93           required: false
94           in: header
95           description: ''
96           type: string
97       responses:
98         '201':
99           description: Created
100           schema:
101             $ref: '#/definitions/ServiceOrder'
102     get:
103       tags:
104         - ServiceOrder
105       produces:
106         - application/json;charset=utf-8
107       operationId: serviceOrder_Find
108       summary: List service orders
109       description: |-
110         Retrieve and list service order entities according to given criteria.
111         Only a predefined set of attribute is proposed.
112         Attribute selection could be described in the fields attribute.
113       deprecated: false
114       parameters:
115         - name: externalId
116           required: false
117           in: query
118           description: ''
119           type: string
120         - name: state
121           required: false
122           in: query
123           description: state of the order(s) to be retrieved
124           type: string
125         - name: description
126           required: false
127           in: query
128           description: ''
129           type: string
130         - name: orderDate.gt
131           required: false
132           in: query
133           description: order date greather than
134           type: string
135         - name: orderDate.lt
136           required: false
137           in: query
138           description: order date lower than
139           type: string
140         - name: fields
141           required: false
142           in: query
143           description: >-
144             this attribute could be used to filter retrieved attribute(s) and/or
145             sort SO.
146           type: string
147         - name: offset
148           required: false
149           in: query
150           description: >-
151             The index of the first element to retrieve. Zero is the first
152             element of the collection.
153           type: integer
154           format: int32
155         - name: limit
156           required: false
157           in: query
158           description: >-
159             The maximum number of elements to retrieve (it can be greater than
160             the actual available number of items).
161           type: integer
162           format: int32
163       responses:
164         '200':
165           description: Ok
166           schema:
167             type: array
168             items:
169               $ref: '#/definitions/ServiceOrder'
170           headers:
171             X-Total-Count:
172               description: ''
173               type: integer
174               format: int32
175             X-Result-Count:
176               description: ''
177               type: integer
178               format: int32
179   '/serviceOrder/{id}':
180     get:
181       tags:
182         - ServiceOrder
183       produces:
184         - application/json;charset=utf-8
185       operationId: serviceOrder_Get
186       summary: Retrieve a service order
187       description: |-
188         This operation retrieves a service order entity. 
189         Attribute selection is enabled for all first level attributes.
190       deprecated: false
191       parameters:
192         - name: id
193           required: true
194           in: path
195           description: ''
196           type: string
197         - name: fields
198           required: false
199           in: query
200           description: Attribute selection
201           type: string
202         - name: Target
203           required: false
204           in: header
205           description: ''
206           type: string
207       responses:
208         '200':
209           description: Ok
210           schema:
211             $ref: '#/definitions/ServiceOrder'
212   /notification:
213     post:
214       tags:
215         - Notification
216       consumes:
217         - application/json;charset=utf-8
218       produces:
219         - application/json;charset=utf-8
220       operationId: notification_Create
221       summary: NBI will send notification to this operation provided by subscribers
222       description: |-
223         Notification structure depends of the eventType:
224
225         - ServiceOrderCreationNotification
226         - ServiceOrderStateChangeNotification
227
228         ```
229         {
230           "eventId": "string",
231           "eventDate": "2019-03-12T16:21:27.530Z",
232           "eventType": "string",
233           "event": {
234             "id": "string",
235             "href": "string",
236             "externalId": "string",
237             "state": "acknowledged",
238             "orderDate": "2019-03-12T16:21:27.530Z",
239             "completionDateTime": "2019-03-12T16:21:27.530Z"
240           }
241         }
242         ```
243
244         - ServiceOrderItemStateChangeNotification
245
246         ```
247         {
248           "eventId": "string",
249           "eventDate": "2019-03-12T16:21:44.066Z",
250           "eventType": "string",
251           "event": {
252             "id": "string",
253             "href": "string",
254             "externalId": "string",
255             "state": "acknowledged",
256             "orderDate": "2019-03-12T16:21:44.066Z",
257             "completionDateTime": "2019-03-12T16:21:44.066Z",
258             "orderItem": [
259               {
260                 "id": "string",
261                 "action": "add",
262                 "state": "acknowledged",
263                 "service": {
264                   "id": "string",
265                   "href": "string",
266                   "name": "string",
267                   "serviceState": "string",
268                   "serviceCharacteristic": [
269                     {
270                       "name": "string",
271                       "valueType": "string",
272                       "value": {
273                         "serviceCharacteristicValue": "string"
274                       }
275                     }
276                   ],
277                   "serviceRelationship": [
278                     {
279                       "type": "reliesOn"
280                     }
281                   ],
282                   "relatedParty": [
283                     {
284                       "id": "string",
285                       "href": "string",
286                       "role": "string",
287                       "name": "string",
288                       "@referredType": "string"
289                     }
290                   ],
291                   "serviceSpecification": {
292                     "id": "string",
293                     "href": "string",
294                     "name": "string",
295                     "version": "string",
296                   }
297                 }
298               }
299             ]
300           }
301         }
302         ```
303       deprecated: false
304       parameters:
305         - name: Notification
306           required: true
307           in: body
308           description: ''
309           schema:
310             $ref: '#/definitions/Notification'
311         - name: Target
312           required: false
313           in: header
314           description: ''
315           type: string
316       responses:
317         '201':
318           description: Created
319           schema:
320             $ref: '#/definitions/Notification'
321 definitions:
322   ActionType:
323     description: |-
324       Action type to be describer on the order item.
325       modify is not managed in Beijing release
326     type: string
327     enum:
328       - add
329       - modify
330       - delete
331       - noChange
332   StateType:
333     description: List of possible state for the order and the orderItem.
334     type: string
335     enum:
336       - acknowledged
337       - rejected
338       - pending
339       - held
340       - inProgress
341       - cancelled
342       - completed
343       - failed
344       - partial
345   RelationshipType:
346     description: |-
347       Relationship type;
348       Only reliesOn is managed in Beijing release.
349     type: string
350     enum:
351       - reliesOn
352   EventType:
353     description: The Event Type
354     type: string
355     enum:
356       - ServiceOrderCreationNotification
357       - ServiceOrderStateChangeNotification
358       - ServiceOrderItemStateChangeNotification
359   ServiceState:
360     description: The lifecycle state of the service requested - Required for E2E service activation and deactivation with ServiceOrderItem.action as 'modify'.For any other service modification request,service state value should not be passed.Lifecycle is not fully managed in Guilin release
361     type: string
362     enum:
363       - active
364       - inactive
365   SeverityMessage:
366     description: 'Message Severity, either information or error'
367     type: string
368     enum:
369       - information
370       - error
371   Error:
372     description: Error code and reason
373     required:
374       - code
375       - reason
376     type: object
377     properties:
378       code:
379         description: Application related code (as defined in the API or from a common list)
380         type: integer
381         format: int32
382       reason:
383         description: >-
384           Text that explains the reason for error. This can be shown to a client
385           user.
386         type: string
387       message:
388         description: >-
389           Text that provide more details and corrective actions related to the
390           error. This can be shown to a client user
391         type: string
392       status:
393         description: http error code extension like 400-2
394         type: string
395       referenceError:
396         description: url pointing to documentation describing the error
397         type: string
398   ServiceRelationship:
399     description: |-
400       Linked Services to the one instantiate
401       nbi component used this relationship to sort request to ONAP.
402     required:
403       - type
404       - service
405     type: object
406     properties:
407       type:
408         $ref: '#/definitions/RelationshipType'
409       service:
410         $ref: '#/definitions/Service'
411   ServiceRef:
412     description: Service references
413     required:
414       - id
415     type: object
416     properties:
417       id:
418         description: Unique identifier of the service
419         type: string
420       href:
421         description: Reference of the service
422         type: string
423   ServiceCharacteristic:
424     description: ServiceCharacteristic
425     required:
426       - name
427     type: object
428     properties:
429       name:
430         description: Name of characteristic
431         type: string
432       valueType:
433         description: ''
434         type: string
435       value:
436         $ref: '#/definitions/Value'
437   RelatedParty:
438     description: "A related party defines party which are involved in this order and the role they are playing.\nfor Beijing release:\nWith 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:\no\tIt 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.\no\tIf no relatedParty are provided the service will be affected to ‘generic’ customer (dummy customer) – we assume this ‘generic’ customer always exists."
439     required:
440       - id
441       - role
442     type: object
443     properties:
444       id:
445         description: Unique identifier of a related party
446         type: string
447       href:
448         description: An hyperlink to the party - not used in Beijnig release
449         type: string
450       role:
451         description: |-
452           The role of the related party (e.g. Owner, requester, fullfiller etc).
453           ONLY 'ONAPcustomer' is considered
454         type: string
455       name:
456         description: Name of the related party
457         type: string
458       '@referredType':
459         description: ''
460         type: string
461   ServiceSpecificationRef:
462     description: >-
463       The service specification (these attributes are fetched from the
464       catalogue).
465     required:
466       - id
467     type: object
468     properties:
469       id:
470         description: >-
471           Unique identifier of the service specification
472
473           This information will be used to retrieve SDC information + mapped to
474           SO ModelNameVersionIdin the request.
475         type: string
476       href:
477         description: |-
478           Reference of the service specification
479           Not used in Beijing release.
480         type: string
481       name:
482         description: |-
483           Name of the service specification
484           Not used in Beijing release
485         type: string
486       version:
487         description: |-
488           Version of the service Specification
489           Not used in Beijing release
490         type: string
491       targetServiceSchema:
492         $ref: '#/definitions/TargetServiceSchema'
493       '@type':
494         description: Not used in Beijing release
495         type: string
496       '@schemaLocation':
497         description: Not used in Beijing release
498         type: string
499       '@baseType':
500         description: Not used in Beijing release
501         type: string
502   Service:
503     description: 'Service (to be added, modified, deleted) description'
504     required:
505       - id
506     type: object
507     properties:
508       id:
509         description: >-
510           Identifier of a service instance.
511
512           It must be valued if orderItem action is 'delete' and corresponds to a
513           AAI service.id
514         type: string
515       serviceType:
516         description: |-
517           Business type of the service.
518           For example : 5G
519         type: string
520       href:
521         description: |-
522           Reference to the Service (useful for delete or modify command).
523           Not managed in Beijing release.
524         type: string
525       name:
526         description: >-
527           Name of the service - When orderItem action is 'add' this name will be
528           used in ONAP/SO request as InstaceName.
529         type: string
530       serviceState:
531         $ref: '#/definitions/ServiceState'
532       '@type':
533         description: |-
534           To define the service type
535           Not managed in Beijing Release
536         type: string
537       '@schemaLocation':
538         description: |-
539           The URL to get the resource schema.
540           Not managed in Beijing Release
541         type: string
542       serviceCharacteristic:
543         type: array
544         items:
545           $ref: '#/definitions/ServiceCharacteristic'
546       serviceRelationship:
547         type: array
548         items:
549           $ref: '#/definitions/ServiceRelationship'
550       relatedParty:
551         type: array
552         items:
553           $ref: '#/definitions/RelatedParty'
554       serviceSpecification:
555         $ref: '#/definitions/ServiceSpecificationRef'
556   OrderItemRelationship:
557     description: |-
558       Linked order item to the one containing this attribute.
559       nbi component used this relationship to sort request to ONAP.
560     required:
561       - type
562       - id
563     type: object
564     properties:
565       type:
566         $ref: '#/definitions/RelationshipType'
567       id:
568         description: Unique identifier of an order item
569         type: string
570   ServiceOrderItem:
571     description: >-
572       An identified part of the order. A service order is decomposed into one or
573       more order items.
574     required:
575       - id
576       - service
577     type: object
578     properties:
579       id:
580         description: >-
581           Identifier of the line item (generally it is a sequence number 01, 02,
582           03, …)
583         type: string
584       action:
585         $ref: '#/definitions/ActionType'
586       state:
587         $ref: '#/definitions/StateType'
588       percentProgress:
589         description: Progress of the delivery in percentage.
590         type: string
591       '@type':
592         description: |-
593           Used to extend the order item.
594           not used in Beijing relase
595         type: string
596       '@schemaLocation':
597         description: not used in Beijing relase
598         type: string
599       '@baseType':
600         description: not used in Beijing relase
601         type: string
602       orderItemRelationship:
603         type: array
604         items:
605           $ref: '#/definitions/OrderItemRelationship'
606       service:
607         $ref: '#/definitions/Service'
608       orderItemMessage:
609         type: array
610         items:
611           $ref: '#/definitions/OrderMessage'
612   ServiceOrder:
613     description: >-
614       A Service Order is a type of order which can be used to place an order
615       between a customer and a service provider or between a service provider
616       and a partner and vice versa
617     required:
618       - id
619     type: object
620     properties:
621       id:
622         description: ID created on repository side
623         type: string
624       href:
625         description: Hyperlink to access the order
626         type: string
627       externalId:
628         description: >-
629           ID given by the consumer and only understandable by him (to facilitate
630           his searches)
631         type: string
632       priority:
633         description: >-
634           A way that can be used by consumers to prioritize orders in Service
635           Order Management system (from 0 to 4 : 0 is the highest priority, and
636           4 the lowest)
637         type: string
638       description:
639         description: A free-text description of the service order
640         type: string
641       category:
642         description: >-
643           Used to categorize the order that can be useful for the OM system
644           (e.g. “broadband”, “TVOption”, ...)
645         type: string
646       state:
647         $ref: '#/definitions/StateType'
648       orderDate:
649         description: ''
650         type: string
651         format: date-time
652       completionDateTime:
653         description: Date when the order was completed
654         type: string
655         format: date-time
656       requestedStartDate:
657         description: Order start date wished by the requestor
658         type: string
659         format: date-time
660       requestedCompletionDate:
661         description: Requested delivery date from the requestor perspective
662         type: string
663         format: date-time
664       expectedCompletionDate:
665         description: ''
666         type: string
667         format: date-time
668       startDate:
669         description: Date when the order was started for processing
670         type: string
671         format: date-time
672       '@baseType':
673         description: ''
674         type: string
675       '@type':
676         description: ''
677         type: string
678       '@schemaLocation':
679         description: ''
680         type: string
681       relatedParty:
682         type: array
683         items:
684           $ref: '#/definitions/RelatedParty'
685       orderRelationship:
686         type: array
687         items:
688           $ref: '#/definitions/OrderRelationship'
689       orderItem:
690         type: array
691         items:
692           $ref: '#/definitions/ServiceOrderItem'
693       orderMessage:
694         type: array
695         items:
696           $ref: '#/definitions/OrderMessage'
697   OrderRelationship:
698     description: |-
699       Linked order to the one containing this attribute.
700       This relationship is not used to sort ONAP request.
701     required:
702       - id
703     type: object
704     properties:
705       type:
706         description: >-
707           The type of related order, can be : “dependency” if the order needs to
708           be “not started” until another order item is complete (a service order
709           in this case) or “cross-ref” to keep track of the source order (a
710           productOrder)
711         type: string
712       id:
713         description: The id of the related order
714         type: string
715       href:
716         description: A hyperlink to the related order
717         type: string
718       '@referredType':
719         description: Type of the referred order.
720         type: string
721   TargetServiceSchema:
722     description: Target to the schema describing the service spec resource
723     required:
724       - '@type'
725       - '@schemaLocation'
726     type: object
727     properties:
728       '@type':
729         description: Indicates the (class) type of resource.
730         type: string
731       '@schemaLocation':
732         description: >-
733           This field provided a link to the schema describing this REST
734           resource.
735         type: string
736   Value:
737     description: Value is a descriptive structure for service characteristic
738     type: object
739     properties:
740       serviceCharacteristicValue:
741         description: Value of the characteristic.
742         type: string
743   CreateServiceOrderItem:
744     description: >-
745       This structure is used in the operation POST for a serviceOrder request to
746       describe an item.
747
748       Attribute description is not accurate and should be find in the
749       serviceOrderItem class.
750     required:
751       - id
752       - service
753     type: object
754     properties:
755       id:
756         description: >-
757           Identifier of the line item (generally it is a sequence number 01, 02,
758           03, …)
759         type: string
760       action:
761         $ref: '#/definitions/ActionType'
762       orderItemRelationship:
763         type: array
764         items:
765           $ref: '#/definitions/OrderItemRelationship'
766       service:
767         $ref: '#/definitions/Service'
768   CreateServiceOrder:
769     description: >-
770       This structure is used in the operation POST for a serviceOrder request.
771
772       Attribute description is not accurate and should be find in the
773       serviceOrder class.
774     type: object
775     properties:
776       externalId:
777         description: >-
778           ID given by the consumer and only understandable by him (to facilitate
779           his searches)
780         type: string
781       priority:
782         description: >-
783           A way that can be used by consumers to prioritize orders in Service
784           Order Management system (from 0 to 4 : 0 is the highest priority, and
785           4 the lowest)
786         type: string
787       description:
788         description: A free-text description of the service order
789         type: string
790       category:
791         description: >-
792           Used to categorize the order that can be useful for the OM system
793           (e.g. “broadband”, “TVOption”, ...)
794         type: string
795       requestedStartDate:
796         description: Order start date wished by the requestor
797         type: string
798         format: date-time
799       requestedCompletionDate:
800         description: Requested delivery date from the requestor perspective
801         type: string
802         format: date-time
803       relatedParty:
804         type: array
805         items:
806           $ref: '#/definitions/RelatedParty'
807       orderRelationship:
808         type: array
809         items:
810           $ref: '#/definitions/OrderRelationship'
811       orderItem:
812         type: array
813         items:
814           $ref: '#/definitions/CreateServiceOrderItem'
815   ServiceOrderSummary:
816     description: >-
817       This structure is used to provide a subset of serviceOrder attributes to
818       be provided in particular for notification messages
819     required:
820       - id
821     type: object
822     properties:
823       id:
824         description: ID created on repository side
825         type: string
826       href:
827         description: Hyperlink to access the order
828         type: string
829       externalId:
830         description: >-
831           ID given by the consumer and only understandable by him (to facilitate
832           his searches)
833         type: string
834       state:
835         $ref: '#/definitions/StateType'
836       orderDate:
837         description: ''
838         type: string
839         format: date-time
840       completionDateTime:
841         description: Date when the order was completed
842         type: string
843         format: date-time
844   Notification:
845     description: Notification structure for a serviceOrdering notification
846     required:
847       - eventId
848       - eventDate
849       - eventType
850       - event
851     type: object
852     properties:
853       eventId:
854         description: ''
855         type: string
856       eventDate:
857         description: ''
858         type: string
859         format: date-time
860       eventType:
861         $ref: '#/definitions/EventType'
862       event:
863         $ref: '#/definitions/ServiceOrderSummaryWithItem'
864   ServiceOrderItemSummary:
865     description: Service Order item summary to be used for notification
866     required:
867       - id
868       - service
869     type: object
870     properties:
871       id:
872         description: >-
873           Identifier of the line item (generally it is a sequence number 01, 02,
874           03, …)
875         type: string
876       action:
877         $ref: '#/definitions/ActionType'
878       state:
879         $ref: '#/definitions/StateType'
880       service:
881         $ref: '#/definitions/Service'
882   ServiceOrderSummaryWithItem:
883     description: Service order item summary with item description
884     required:
885       - id
886     type: object
887     properties:
888       id:
889         description: ID created on repository side
890         type: string
891       href:
892         description: Hyperlink to access the order
893         type: string
894       externalId:
895         description: >-
896           ID given by the consumer and only understandable by him (to facilitate
897           his searches)
898         type: string
899       state:
900         $ref: '#/definitions/StateType'
901       orderDate:
902         description: ''
903         type: string
904         format: date-time
905       completionDateTime:
906         description: Date when the order was completed
907         type: string
908         format: date-time
909       orderItem:
910         type: array
911         items:
912           $ref: '#/definitions/ServiceOrderItemSummary'
913   OrderMessage:
914     description: An optional array of messages associated with the Order
915     required:
916       - severity
917       - correctionRequired
918     type: object
919     properties:
920       code:
921         description: A code associated to this message
922         type: string
923       field:
924         description: Service Order attribute related to this error message
925         type: string
926       messageInformation:
927         description: Message related to this order
928         type: string
929       severity:
930         $ref: '#/definitions/SeverityMessage'
931       correctionRequired:
932         description: >-
933           Indicator that an action is required to allow service order
934           fullfilment to follow up
935         type: boolean