This is to update swagger as per ONAP style guidelines
[externalapi/nbi.git] / docs / offeredapis / api_serviceOrder / 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: "# 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"
17   version: 4.1.0
18   title: ServiceOrder API
19   contact:
20     name: ONAP
21     url: 'https://onap.readthedocs.io'
22     email: onap-discuss@lists.onap.org
23   license:
24     name: Apache 2.0
25     url: 'http://www.apache.org/licenses/LICENSE-2.0'
26   x-planned-retirement-date: '205001'
27   x-component: NBI
28   x-logo:
29     url: /redoc/logo.png
30     backgroundColor: '#FFFFFF'
31 host: 'serverRoot:30274'
32 basePath: /nbi/api/v4
33 schemes:
34   - http
35   - https
36 produces:
37   - application/json;charset=utf-8
38 tags:
39   - name: ServiceOrder
40     description: provided by NBI
41   - name: Notification
42     description: 'provided by subscribers, which MUST registered by creating a hub resource'
43 paths:
44   x-interface:
45     api-version: 4.1.0
46     last-mod-release: Frankfurt
47   /serviceOrder:
48     post:
49       tags:
50         - ServiceOrder
51       consumes:
52         - application/json;charset=utf-8
53       produces:
54         - application/json;charset=utf-8
55       operationId: serviceOrder_Create
56       summary: Create a service order
57       description: >-
58         This operation creates a service order entity.
59
60         The TMF Open API specification document provides the list of mandatory
61         and non mandatory attributes when creating a ServiceOrder, including any
62         possible rule conditions and applicable default values.
63
64         POST should be used without specifying the id and the href, the Service
65         Order Management system is in charge of generating the id + href for the
66         ServiceOrder.
67
68
69         In Beijing Release, NBI will use only POST
70         {{url}}/ecomp/mso/infra/serviceInstances/v4 SO API. This mean that only
71         the 'service-instance' level will be created in AAI. Additional resource
72         like VNF and/OR VF are not created.
73
74
75         In Casablanca release, NBI has been improved to also be able to use POST
76         {{url}}/e2eServiceInstances/v3 SO API. This API is able to instantiate
77         in ONAP E2E service; This is useful for CCVPN and VoLTE UC.
78
79         Depending on the service category defined in SDC, NBI will use one or
80         the other SO API. If category starts with e2e, NBI will use 
81         {url}}/e2eServiceInstances/v3 SO API - else it will use
82         {{url}}/ecomp/mso/infra/serviceInstances/v4 SO API.
83       deprecated: false
84       parameters:
85         - name: serviceOrder
86           required: true
87           in: body
88           description: ''
89           schema:
90             $ref: '#/definitions/CreateServiceOrder'
91         - name: Target
92           required: false
93           in: header
94           description: ''
95           type: string
96       responses:
97         '201':
98           description: Created
99           schema:
100             $ref: '#/definitions/ServiceOrder'
101     get:
102       tags:
103         - ServiceOrder
104       produces:
105         - application/json;charset=utf-8
106       operationId: serviceOrder_Find
107       summary: List service orders
108       description: |-
109         Retrieve and list service order entities according to given criteria.
110         Only a predefined set of attribute is proposed.
111         Attribute selection could be described in the fields attribute.
112       deprecated: false
113       parameters:
114         - name: externalId
115           required: false
116           in: query
117           description: ''
118           type: string
119         - name: state
120           required: false
121           in: query
122           description: state of the order(s) to be retrieved
123           type: string
124         - name: description
125           required: false
126           in: query
127           description: ''
128           type: string
129         - name: orderDate.gt
130           required: false
131           in: query
132           description: order date greather than
133           type: string
134         - name: orderDate.lt
135           required: false
136           in: query
137           description: order date lower than
138           type: string
139         - name: fields
140           required: false
141           in: query
142           description: >-
143             this attribute could be used to filter retrieved attribute(s) and/or
144             sort SO.
145           type: string
146         - name: offset
147           required: false
148           in: query
149           description: >-
150             The index of the first element to retrieve. Zero is the first
151             element of the collection.
152           type: integer
153           format: int32
154         - name: limit
155           required: false
156           in: query
157           description: >-
158             The maximum number of elements to retrieve (it can be greater than
159             the actual available number of items).
160           type: integer
161           format: int32
162       responses:
163         '200':
164           description: Ok
165           schema:
166             type: array
167             items:
168               $ref: '#/definitions/ServiceOrder'
169           headers:
170             X-Total-Count:
171               description: ''
172               type: integer
173               format: int32
174             X-Result-Count:
175               description: ''
176               type: integer
177               format: int32
178   '/serviceOrder/{id}':
179     get:
180       tags:
181         - ServiceOrder
182       produces:
183         - application/json;charset=utf-8
184       operationId: serviceOrder_Get
185       summary: Retrieve a service order
186       description: |-
187         This operation retrieves a service order entity. 
188         Attribute selection is enabled for all first level attributes.
189       deprecated: false
190       parameters:
191         - name: id
192           required: true
193           in: path
194           description: ''
195           type: string
196         - name: fields
197           required: false
198           in: query
199           description: Attribute selection
200           type: string
201         - name: Target
202           required: false
203           in: header
204           description: ''
205           type: string
206       responses:
207         '200':
208           description: Ok
209           schema:
210             $ref: '#/definitions/ServiceOrder'
211   /notification:
212     post:
213       tags:
214         - Notification
215       consumes:
216         - application/json;charset=utf-8
217       produces:
218         - application/json;charset=utf-8
219       operationId: notification_Create
220       summary: NBI will send notification to this operation provided by subscribers
221       description: |-
222         Notification structure depends of the eventType:
223
224         - ServiceOrderCreationNotification
225         - ServiceOrderStateChangeNotification
226
227         ```
228         {
229           "eventId": "string",
230           "eventDate": "2019-03-12T16:21:27.530Z",
231           "eventType": "string",
232           "event": {
233             "id": "string",
234             "href": "string",
235             "externalId": "string",
236             "state": "acknowledged",
237             "orderDate": "2019-03-12T16:21:27.530Z",
238             "completionDateTime": "2019-03-12T16:21:27.530Z"
239           }
240         }
241         ```
242
243         - ServiceOrderItemStateChangeNotification
244
245         ```
246         {
247           "eventId": "string",
248           "eventDate": "2019-03-12T16:21:44.066Z",
249           "eventType": "string",
250           "event": {
251             "id": "string",
252             "href": "string",
253             "externalId": "string",
254             "state": "acknowledged",
255             "orderDate": "2019-03-12T16:21:44.066Z",
256             "completionDateTime": "2019-03-12T16:21:44.066Z",
257             "orderItem": [
258               {
259                 "id": "string",
260                 "action": "add",
261                 "state": "acknowledged",
262                 "service": {
263                   "id": "string",
264                   "href": "string",
265                   "name": "string",
266                   "serviceState": "string",
267                   "serviceCharacteristic": [
268                     {
269                       "name": "string",
270                       "valueType": "string",
271                       "value": {
272                         "serviceCharacteristicValue": "string"
273                       }
274                     }
275                   ],
276                   "serviceRelationship": [
277                     {
278                       "type": "reliesOn"
279                     }
280                   ],
281                   "relatedParty": [
282                     {
283                       "id": "string",
284                       "href": "string",
285                       "role": "string",
286                       "name": "string",
287                       "@referredType": "string"
288                     }
289                   ],
290                   "serviceSpecification": {
291                     "id": "string",
292                     "href": "string",
293                     "name": "string",
294                     "version": "string",
295                   }
296                 }
297               }
298             ]
299           }
300         }
301         ```
302       deprecated: false
303       parameters:
304         - name: Notification
305           required: true
306           in: body
307           description: ''
308           schema:
309             $ref: '#/definitions/Notification'
310         - name: Target
311           required: false
312           in: header
313           description: ''
314           type: string
315       responses:
316         '201':
317           description: Created
318           schema:
319             $ref: '#/definitions/Notification'
320 definitions:
321   ActionType:
322     description: |-
323       Action type to be describer on the order item.
324       modify is not managed in Beijing release
325     type: string
326     enum:
327       - add
328       - modify
329       - delete
330       - noChange
331   StateType:
332     description: List of possible state for the order and the orderItem.
333     type: string
334     enum:
335       - acknowledged
336       - rejected
337       - pending
338       - held
339       - inProgress
340       - cancelled
341       - completed
342       - failed
343       - partial
344   RelationshipType:
345     description: |-
346       Relationship type;
347       Only reliesOn is managed in Beijing release.
348     type: string
349     enum:
350       - reliesOn
351   EventType:
352     description: The Event Type
353     type: string
354     enum:
355       - ServiceOrderCreationNotification
356       - ServiceOrderStateChangeNotification
357       - ServiceOrderItemStateChangeNotification
358   SeverityMessage:
359     description: 'Message Severity, either information or error'
360     type: string
361     enum:
362       - information
363       - error
364   Error:
365     description: Error code and reason
366     required:
367       - code
368       - reason
369     type: object
370     properties:
371       code:
372         description: Application related code (as defined in the API or from a common list)
373         type: integer
374         format: int32
375       reason:
376         description: >-
377           Text that explains the reason for error. This can be shown to a client
378           user.
379         type: string
380       message:
381         description: >-
382           Text that provide more details and corrective actions related to the
383           error. This can be shown to a client user
384         type: string
385       status:
386         description: http error code extension like 400-2
387         type: string
388       referenceError:
389         description: url pointing to documentation describing the error
390         type: string
391   ServiceRelationship:
392     description: |-
393       Linked Services to the one instantiate
394       nbi component used this relationship to sort request to ONAP.
395     required:
396       - type
397       - service
398     type: object
399     properties:
400       type:
401         $ref: '#/definitions/RelationshipType'
402       service:
403         $ref: '#/definitions/Service'
404   ServiceRef:
405     description: Service references
406     required:
407       - id
408     type: object
409     properties:
410       id:
411         description: Unique identifier of the service
412         type: string
413       href:
414         description: Reference of the service
415         type: string
416   ServiceCharacteristic:
417     description: ServiceCharacteristic
418     required:
419       - name
420     type: object
421     properties:
422       name:
423         description: Name of characteristic
424         type: string
425       valueType:
426         description: ''
427         type: string
428       value:
429         $ref: '#/definitions/Value'
430   RelatedParty:
431     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."
432     required:
433       - id
434       - role
435     type: object
436     properties:
437       id:
438         description: Unique identifier of a related party
439         type: string
440       href:
441         description: An hyperlink to the party - not used in Beijnig release
442         type: string
443       role:
444         description: |-
445           The role of the related party (e.g. Owner, requester, fullfiller etc).
446           ONLY 'ONAPcustomer' is considered
447         type: string
448       name:
449         description: Name of the related party
450         type: string
451       '@referredType':
452         description: ''
453         type: string
454   ServiceSpecificationRef:
455     description: >-
456       The service specification (these attributes are fetched from the
457       catalogue).
458     required:
459       - id
460     type: object
461     properties:
462       id:
463         description: >-
464           Unique identifier of the service specification
465
466           This information will be used to retrieve SDC information + mapped to
467           SO ModelNameVersionIdin the request.
468         type: string
469       href:
470         description: |-
471           Reference of the service specification
472           Not used in Beijing release.
473         type: string
474       name:
475         description: |-
476           Name of the service specification
477           Not used in Beijing release
478         type: string
479       version:
480         description: |-
481           Version of the service Specification
482           Not used in Beijing release
483         type: string
484       targetServiceSchema:
485         $ref: '#/definitions/TargetServiceSchema'
486       '@type':
487         description: Not used in Beijing release
488         type: string
489       '@schemaLocation':
490         description: Not used in Beijing release
491         type: string
492       '@baseType':
493         description: Not used in Beijing release
494         type: string
495   Service:
496     description: 'Service (to be added, modified, deleted) description'
497     required:
498       - id
499     type: object
500     properties:
501       id:
502         description: >-
503           Identifier of a service instance.
504
505           It must be valued if orderItem action is 'delete' and corresponds to a
506           AAI service.id
507         type: string
508       serviceType:
509         description: |-
510           Business type of the service.
511           For example : 5G
512         type: string
513       href:
514         description: |-
515           Reference to the Service (useful for delete or modify command).
516           Not managed in Beijing release.
517         type: string
518       name:
519         description: >-
520           Name of the service - When orderItem action is 'add' this name will be
521           used in ONAP/SO request as InstaceName.
522         type: string
523       serviceState:
524         description: |-
525           The lifecycle state of the service requested;
526           Not managed in Beijing release.
527         type: string
528       '@type':
529         description: |-
530           To define the service type
531           Not managed in Beijing Release
532         type: string
533       '@schemaLocation':
534         description: |-
535           The URL to get the resource schema.
536           Not managed in Beijing Release
537         type: string
538       serviceCharacteristic:
539         type: array
540         items:
541           $ref: '#/definitions/ServiceCharacteristic'
542       serviceRelationship:
543         type: array
544         items:
545           $ref: '#/definitions/ServiceRelationship'
546       relatedParty:
547         type: array
548         items:
549           $ref: '#/definitions/RelatedParty'
550       serviceSpecification:
551         $ref: '#/definitions/ServiceSpecificationRef'
552   OrderItemRelationship:
553     description: |-
554       Linked order item to the one containing this attribute.
555       nbi component used this relationship to sort request to ONAP.
556     required:
557       - type
558       - id
559     type: object
560     properties:
561       type:
562         $ref: '#/definitions/RelationshipType'
563       id:
564         description: Unique identifier of an order item
565         type: string
566   ServiceOrderItem:
567     description: >-
568       An identified part of the order. A service order is decomposed into one or
569       more order items.
570     required:
571       - id
572       - service
573     type: object
574     properties:
575       id:
576         description: >-
577           Identifier of the line item (generally it is a sequence number 01, 02,
578           03, …)
579         type: string
580       action:
581         $ref: '#/definitions/ActionType'
582       state:
583         $ref: '#/definitions/StateType'
584       percentProgress:
585         description: Progress of the delivery in percentage.
586         type: string
587       '@type':
588         description: |-
589           Used to extend the order item.
590           not used in Beijing relase
591         type: string
592       '@schemaLocation':
593         description: not used in Beijing relase
594         type: string
595       '@baseType':
596         description: not used in Beijing relase
597         type: string
598       orderItemRelationship:
599         type: array
600         items:
601           $ref: '#/definitions/OrderItemRelationship'
602       service:
603         $ref: '#/definitions/Service'
604       orderItemMessage:
605         type: array
606         items:
607           $ref: '#/definitions/OrderMessage'
608   ServiceOrder:
609     description: >-
610       A Service Order is a type of order which can be used to place an order
611       between a customer and a service provider or between a service provider
612       and a partner and vice versa
613     required:
614       - id
615     type: object
616     properties:
617       id:
618         description: ID created on repository side
619         type: string
620       href:
621         description: Hyperlink to access the order
622         type: string
623       externalId:
624         description: >-
625           ID given by the consumer and only understandable by him (to facilitate
626           his searches)
627         type: string
628       priority:
629         description: >-
630           A way that can be used by consumers to prioritize orders in Service
631           Order Management system (from 0 to 4 : 0 is the highest priority, and
632           4 the lowest)
633         type: string
634       description:
635         description: A free-text description of the service order
636         type: string
637       category:
638         description: >-
639           Used to categorize the order that can be useful for the OM system
640           (e.g. “broadband”, “TVOption”, ...)
641         type: string
642       state:
643         $ref: '#/definitions/StateType'
644       orderDate:
645         description: ''
646         type: string
647         format: date-time
648       completionDateTime:
649         description: Date when the order was completed
650         type: string
651         format: date-time
652       requestedStartDate:
653         description: Order start date wished by the requestor
654         type: string
655         format: date-time
656       requestedCompletionDate:
657         description: Requested delivery date from the requestor perspective
658         type: string
659         format: date-time
660       expectedCompletionDate:
661         description: ''
662         type: string
663         format: date-time
664       startDate:
665         description: Date when the order was started for processing
666         type: string
667         format: date-time
668       '@baseType':
669         description: ''
670         type: string
671       '@type':
672         description: ''
673         type: string
674       '@schemaLocation':
675         description: ''
676         type: string
677       relatedParty:
678         type: array
679         items:
680           $ref: '#/definitions/RelatedParty'
681       orderRelationship:
682         type: array
683         items:
684           $ref: '#/definitions/OrderRelationship'
685       orderItem:
686         type: array
687         items:
688           $ref: '#/definitions/ServiceOrderItem'
689       orderMessage:
690         type: array
691         items:
692           $ref: '#/definitions/OrderMessage'
693   OrderRelationship:
694     description: |-
695       Linked order to the one containing this attribute.
696       This relationship is not used to sort ONAP request.
697     required:
698       - id
699     type: object
700     properties:
701       type:
702         description: >-
703           The type of related order, can be : “dependency” if the order needs to
704           be “not started” until another order item is complete (a service order
705           in this case) or “cross-ref” to keep track of the source order (a
706           productOrder)
707         type: string
708       id:
709         description: The id of the related order
710         type: string
711       href:
712         description: A hyperlink to the related order
713         type: string
714       '@referredType':
715         description: Type of the referred order.
716         type: string
717   TargetServiceSchema:
718     description: Target to the schema describing the service spec resource
719     required:
720       - '@type'
721       - '@schemaLocation'
722     type: object
723     properties:
724       '@type':
725         description: Indicates the (class) type of resource.
726         type: string
727       '@schemaLocation':
728         description: >-
729           This field provided a link to the schema describing this REST
730           resource.
731         type: string
732   Value:
733     description: Value is a descriptive structure for service characteristic
734     type: object
735     properties:
736       serviceCharacteristicValue:
737         description: Value of the characteristic.
738         type: string
739   CreateServiceOrderItem:
740     description: >-
741       This structure is used in the operation POST for a serviceOrder request to
742       describe an item.
743
744       Attribute description is not accurate and should be find in the
745       serviceOrderItem class.
746     required:
747       - id
748       - service
749     type: object
750     properties:
751       id:
752         description: >-
753           Identifier of the line item (generally it is a sequence number 01, 02,
754           03, …)
755         type: string
756       action:
757         $ref: '#/definitions/ActionType'
758       orderItemRelationship:
759         type: array
760         items:
761           $ref: '#/definitions/OrderItemRelationship'
762       service:
763         $ref: '#/definitions/Service'
764   CreateServiceOrder:
765     description: >-
766       This structure is used in the operation POST for a serviceOrder request.
767
768       Attribute description is not accurate and should be find in the
769       serviceOrder class.
770     type: object
771     properties:
772       externalId:
773         description: >-
774           ID given by the consumer and only understandable by him (to facilitate
775           his searches)
776         type: string
777       priority:
778         description: >-
779           A way that can be used by consumers to prioritize orders in Service
780           Order Management system (from 0 to 4 : 0 is the highest priority, and
781           4 the lowest)
782         type: string
783       description:
784         description: A free-text description of the service order
785         type: string
786       category:
787         description: >-
788           Used to categorize the order that can be useful for the OM system
789           (e.g. “broadband”, “TVOption”, ...)
790         type: string
791       requestedStartDate:
792         description: Order start date wished by the requestor
793         type: string
794         format: date-time
795       requestedCompletionDate:
796         description: Requested delivery date from the requestor perspective
797         type: string
798         format: date-time
799       relatedParty:
800         type: array
801         items:
802           $ref: '#/definitions/RelatedParty'
803       orderRelationship:
804         type: array
805         items:
806           $ref: '#/definitions/OrderRelationship'
807       orderItem:
808         type: array
809         items:
810           $ref: '#/definitions/CreateServiceOrderItem'
811   ServiceOrderSummary:
812     description: >-
813       This structure is used to provide a subset of serviceOrder attributes to
814       be provided in particular for notification messages
815     required:
816       - id
817     type: object
818     properties:
819       id:
820         description: ID created on repository side
821         type: string
822       href:
823         description: Hyperlink to access the order
824         type: string
825       externalId:
826         description: >-
827           ID given by the consumer and only understandable by him (to facilitate
828           his searches)
829         type: string
830       state:
831         $ref: '#/definitions/StateType'
832       orderDate:
833         description: ''
834         type: string
835         format: date-time
836       completionDateTime:
837         description: Date when the order was completed
838         type: string
839         format: date-time
840   Notification:
841     description: Notification structure for a serviceOrdering notification
842     required:
843       - eventId
844       - eventDate
845       - eventType
846       - event
847     type: object
848     properties:
849       eventId:
850         description: ''
851         type: string
852       eventDate:
853         description: ''
854         type: string
855         format: date-time
856       eventType:
857         $ref: '#/definitions/EventType'
858       event:
859         $ref: '#/definitions/ServiceOrderSummaryWithItem'
860   ServiceOrderItemSummary:
861     description: Service Order item summary to be used for notification
862     required:
863       - id
864       - service
865     type: object
866     properties:
867       id:
868         description: >-
869           Identifier of the line item (generally it is a sequence number 01, 02,
870           03, …)
871         type: string
872       action:
873         $ref: '#/definitions/ActionType'
874       state:
875         $ref: '#/definitions/StateType'
876       service:
877         $ref: '#/definitions/Service'
878   ServiceOrderSummaryWithItem:
879     description: Service order item summary with item description
880     required:
881       - id
882     type: object
883     properties:
884       id:
885         description: ID created on repository side
886         type: string
887       href:
888         description: Hyperlink to access the order
889         type: string
890       externalId:
891         description: >-
892           ID given by the consumer and only understandable by him (to facilitate
893           his searches)
894         type: string
895       state:
896         $ref: '#/definitions/StateType'
897       orderDate:
898         description: ''
899         type: string
900         format: date-time
901       completionDateTime:
902         description: Date when the order was completed
903         type: string
904         format: date-time
905       orderItem:
906         type: array
907         items:
908           $ref: '#/definitions/ServiceOrderItemSummary'
909   OrderMessage:
910     description: An optional array of messages associated with the Order
911     required:
912       - severity
913       - correctionRequired
914     type: object
915     properties:
916       code:
917         description: A code associated to this message
918         type: string
919       field:
920         description: Service Order attribute related to this error message
921         type: string
922       messageInformation:
923         description: Message related to this order
924         type: string
925       severity:
926         $ref: '#/definitions/SeverityMessage'
927       correctionRequired:
928         description: >-
929           Indicator that an action is required to allow service order
930           fullfilment to follow up
931         type: boolean