1 .. This work is licensed under a Creative Commons Attribution 4.0
3 .. http://creativecommons.org/licenses/by/4.0
4 .. Copyright 2018 ORANGE
15 NBI stands for NorthBound Interface. It brings to ONAP a set of API that can
16 be used by external systems as BSS for example. These API are based on
19 *******************************************
20 Global NBI architecture for El Alto release
21 *******************************************
23 Following illustration provides a global view about **NBI** architecture,
24 integration with other ONAP components and API resource/operation provided.
26 .. image:: ../images/onap_nbi_dublin.jpg
33 Since Frankfurt, in an OOM ONAP deployment context:
35 https://nbi.api.simpledemo.onap.org:30274/nbi/api/v4
37 Locally, for dev and testing purpose:
39 http://localhost:8080/nbi/api/v4
45 APIs are described with a state version with "v" following the API Name,
46 e.g.: ``nbi/api/v4/productOrder``.
47 The schema associated with a REST API must have its version number aligned
48 with that of the REST API.
50 The version number has major, minor and revision numbers. E.g. v1.0.0
51 The version number (without the revision number) is held in the URI.
53 The major version number is incremented for an incompatible change.
54 The minor version number is incremented for a compatible change.
55 For minor modifications of the API, version numbering must not be updated,
56 provided the following backward compatibility rules are respected:
58 - New elements in a data type must be optional (``minOccurs=0``)
59 - Changes in the cardinality of an attribute in a data type must be from
60 mandatory to optional or from lower to greater
61 - New attributes defined in an element must be optional (absence of
63 - If new enumerated values are included, the former ones and its meaning must
65 - If new operations are added, the existing operations must be kept
66 - New parameters added to existing operations must be optional and existing
67 parameters must be kept
69 For major modifications of the API, not backward compatible and forcing client
70 implementations to be changed, the version number must be updated.
76 .. |pdf-icon| image:: images/pdf.png
79 .. |swagger-icon| image:: images/swagger.png
83 .. |swaggerUI-icon| image:: images/swaggerUI.png
86 .. |html-icon| image:: images/html.png
89 .. |plantuml-icon| image:: images/uml.jpg
92 .. |postman-icon| image:: images/postman.png
95 .. |xml-icon| image:: images/text_xml.png
99 :header: "API", "|swagger-icon|", "|swagger-icon|", "|plantuml-icon|", "|xml-icon|"
102 " ", "json file", "yaml file", "plant UML file", "xml schemas"
103 "hub", ":download:`link <api_hub/swagger.json>`", ":download:`link <api_hub/swagger.yaml>`", ":download:`link <api_hub/api.plantuml>`", ":download:`link <api_hub/model.xsd>`"
104 "serviceCatalog", ":download:`link <api_serviceCatalog/swagger.json>`", ":download:`link <api_serviceCatalog/swagger.yaml>`", ":download:`link <api_serviceCatalog/api.plantuml>`", ":download:`link <api_serviceCatalog/model.xsd>`"
105 "serviceInventory", ":download:`link <api_serviceInventory/swagger.json>`", ":download:`link <api_serviceInventory/swagger.yaml>`", ":download:`link <api_serviceInventory/api.plantuml>`", ":download:`link <api_serviceInventory/model.xsd>`"
106 "serviceOrder", ":download:`link <api_serviceOrder/swagger.json>`", ":download:`link <api_serviceOrder/swagger.yaml>`", ":download:`link <api_serviceOrder/api.plantuml>`", ":download:`link <api_serviceOrder/model.xsd>`"
107 "status", ":download:`link <api_status/swagger.json>`", ":download:`link <api_status/swagger.yaml>`", ":download:`link <api_status/api.plantuml>`", ":download:`link <api_status/model.xsd>`"
109 ***********************
110 API ReDoc Documentation
111 ***********************
113 * :doc:`API hub <redoc/api_hub>`
114 * :doc:`Service Catalog <redoc/api_serviceCatalog>`
115 * :doc:`Service Inventory <redoc/api_serviceInventory>`
116 * :doc:`Service Order <redoc/api_serviceOrder>`
117 * :doc:`Status <redoc/api_status>`
128 This API is based from TMF633 serviceCatalog. Only high level information
129 is provided - Swagger is documented.
131 Only ``serviceSpecification`` resource is provided.
132 Information are retrieved in **SDC** (and in TOSCA file)
133 - Only GET operation is provided - this API does not update **SDC**.
135 Only characteristics at service level will be retrieved in ONAP TOSCA file.
136 For example if an ONAP service is composed of VNF and the VF module, the
137 ``serviceSpecification`` resource will only feature characteristic described in
138 the ONAP service TOSCA model and not attributes in the TOSCA files for VNF
141 Only *basic* service characteristics will be managed in this release. By
142 *basic* we mean string, boolean, integer parameter type and we do not manage
143 *map* or *list* parameter type.
146 **GET serviceSpecification(list)**
148 Example: ``GET /nbi/api/v4/serviceSpecification/
149 ?category=NetworkService&distributionStatus=DISTRIBUTED``
151 It is possible to retrieve a list of ``serviceSpecification`` (get by list).
153 Only attributes ``category`` and ``distributionStatus`` are available for
154 ``serviceSpecification`` filtering. It is possible to select retrieved
155 attributes using fields attribute.
157 If no ``serviceSpecification`` matches, an empty list is send back.
159 **GET service Specification (id)**
161 Example: ``GET /nbi/api/v4/serviceSpecification/{uuid}``
163 It is use to retrieve one ``serviceSpecification`` - all available information
164 are retieved (see Swagger for description)
166 **GET service Specification Schema (id)**
169 ``GET /nbi/api/v4/serviceSpecification/{uuid}/specificationInputSchema``
171 It is use to retrieve one input schema from the tosca file stored in **NBI**
172 - all available information are retieved (see Swagger for description)
178 This API is based from TMF638 serviceInventory. Only high level information
179 is provided - Swagger is documented.
181 This API retrieves service(s) in the **A&AI** inventory. Only following
182 attributes will be retrieve in service inventory: ``id``, ``name``, ``state``
185 **GET Service Inventory (list)**
187 Example: ``GET /nbi/api/v4/service/?relatedParty.id=Pontus``
189 GET (by list) allows to request with following criteria (all optional) :
191 * ``id`` (id of the service instance) - id of the service instance
193 * ``serviceSpecification.id`` - id of the service specification (catalog)
194 * ``serviceSpecification.name`` - name of the service specification (catalog)
195 * ``relatedParty.id`` - id of the (**A&AI**) customer - if not filled we use
198 if no service matches, an empty list is send back.
200 1. If a request is send without any parameter, we'll retrieve the list of
201 service-instance for the *generic* customer
202 2. If only customer parameter is filled (``relatedParty.id`` +
203 role= relatedParty'ONAPcustomer') we'll retrieve the list of
204 service-instance for this customer
205 3. If serviceSpecification.id or name is filled we'll retrieve the list of
206 Service instance (from this service specification) - We'll use the customer
207 id if provided (with Role='ONAPcustomer) or generic if no customer id
210 **GET Service Inventory (id)**
212 Example: ``GET /nbi/api/v4/service/{id}`` When querying for a specific service
213 instance id, no additional filters are required.
215 The Service Inventory API will retrieve the service instance data from A&AI
216 using the nodes query with the service instance id as the key.
217 ``relatedParty.id`` + ``serviceSpecification.name`` are added to the response
218 based on the A&AI service instance url.
224 This API is based from TMF641 serviceOrder. Only high level information
225 is provided - Swagger is documented.
227 It is possible to use POST operation to create new ``serviceOrder`` in **NBI**
228 and triggers service provisioning. GET operation is also available to retrieve
229 one service order by providing id or a list of service order. For this release,
230 only a subset of criteria is available:
235 * ``orderDate.gt`` (orderDate must be greater - after -than)
236 * ``orderDate.lt`` (orderDate must be lower-before - than)
237 * ``fields`` - attribute used to filter retrieved attributes (if needed) and
239 * ``offset`` and ``limit`` are used for pagination purpose
241 ServiceOrder will manage following ``actionItem`` action:
243 * ``add`` - a new service will be created
244 * ``delete`` - an existing service will be deleted
245 * ``change`` - an existing service will be deleted and then created with new
248 **Prerequisites & assumptions**
250 * Cloud & tenant information MUST BE defined in the external API property file
251 * Management of ONAP customer for add service action
253 With the current version of APIs used from **SO** and **A&AI** we need to
254 manage a *customer*. This customer concept is confusing with Customer BSS
255 concept. We took the following rules to manage the *customer* information:
257 * It could be provided through a ``serviceOrder`` in the service Order a
258 ``relatedParty`` with role ``ONAPcustomer`` should be provided in the
259 ``serviceOrder`` header (we will not consider in this release the party
260 at item level). External API component will check if this customer exists
261 and create it in **A&AI** if not.
262 * If no ``relatedParty`` is provided, the service will be affected to
263 ``generic customer`` (dummy customer) - we assume this ``generic customer``
265 * Additionally **NBI** will create in **A&AI** the service-type if it did not
266 exists for the customer
268 **ServiceOrder management in NBI will support 2 modes:**
270 * E2E integration - **NBI** calls **SO** API to perform an End-To-end
272 * Service-level only integration - **NBI** will trigger only **SO** request at
273 serviceInstance level. **SO** prerequisite: **SO** must be able to find a
274 BPMN to process service fulfillment (integrate VNF, VNF activation in
277 The choice of the mode is done in NBI depending on information retrieved in
278 **SDC**. If the serviceSpecification is within a Category "E2E Service" ,
279 **NBI** will use E2E **SO** API, if not only API at service instance level
282 There is no difference or specific expectation in the service order API used
285 **ServiceOrder tracking**
287 State management: States are only managed by ServiceOrder component and could
288 not be updated from north side via API.
289 Accordingly to service order item fulfillment progress, order item state are
290 updated. Order state is automatically updated based on item state.
291 Additionnally to this state, **NBI** provided a completion percent progress to
292 have detailled information about order progress.
293 Order Message are retrieved in the ``GET serviceOrder`` to provide **NBI** used
294 addtionnal information about ``serviceOrder`` management.
298 It is possible for an external system to subscribe to service order
299 notifications. 3 events are managed:
301 * A new service order is created in **NBI**
302 * A service order state changes
303 * A service order item state changes
305 It is also possible to subscribe to **AAI** and **SDC** notifications via
307 4 events are managed:
309 * A new service is created in **AAI***
310 * A service attribute value is changed in **AAI**
311 * A service is removed in **AAI**
312 * A service specification is distributed in **SDC**
314 These 7 events have distinct notification allowing any system to subscribe to
315 one, two or all notification types.
317 The implementation will be split in 2 components:
319 * A HUB resource must be managed within the NBI/serviceOrder API. This HUB
320 resource allows system to subscribe to **NBI** notification
321 * An Event API must be available at listener side in order to be able to
322 receive Listener (when event occurs). **NBI** will be upgraded to use this
323 API as client - **NBI** will shoot ``POST listener/``
325 The following diagram illustrates such notification flow:
327 .. image:: images/notification.jpg
330 **East-west interaction of ONAP instances through External API**
332 Operator's SO component will talk to service provider's external API component
333 through its own external API component.
335 External API support two methods of posting a Service Order or registering for
338 1. If the incoming request is per current implementation (no additional headers
339 ) then no changes will be made. The request will be serviced per BAU flow.
340 2. If the incoming request has additional *Target* header parameters, External
341 API will identify that the request has to be relayed to another ONAP instance
342 and route the request accordingly.
344 Target parameter: The public endpoint url for target ONAP instance's External
346 http://externalDomain/nbi/api/vX
348 * For posting service order and getting service order status, the request will
349 be relayed to target (service provider's External API) as-is. These are
350 synchronous requests and operator's External API will wait for response from
351 the target and relay it back to original calling system (operator's SO).
352 * For Hub API, there is an additional step required. The listener from calling
353 system (operator's SO) will be replaced with External APIs own listener.
354 A mapping of registered subscriber and its original listener will be
355 maintained in External API's DB. Operator's External API will relay the Hub
356 API call to service provider's External API. The service provider's External
357 API will register operator's External API as a listener.
358 * After SO processing in service provider's ONAP is completed (irrespective of
359 status - reject, success, fail etc), service provider's External API will
360 notify the operator's External API about request completion. Operator's
361 External API will look-up for registered subscriber and its original listener
362 (operator's SO) and relay the message.
364 Operator's Service Orchestrator will invoke its own External API component and
365 add SP Partner URL in the header. After receiving an acknowledgement for
366 Service Order request, the SO component will register with External API's hub
367 and provide its listener for processing callback events.
369 Technical information about **East-west interaction exercise** design
370 specification and API Flow illustration (with example messages) could be found
373 https://wiki.onap.org/download/attachments/8227019/CCVPN%20Phase%202%20HLD.docx?api=v2
380 Technical information about **NBI** (dependencies, configuration, running &
381 testing) could be found here:
382 :doc:`NBI_Developer_Guide <../architecture/NBI_Developer_Guide>`
384 API Flow illustration (with example messages) is described in this document:
385 :download:`nbicallflow.pdf <pdf/nbicallflow.pdf>`