Updated late coming comments to Patch 91089 and added links
[doc.git] / docs / guides / onap-user / instantiate / instantiation / nbi / index.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0
2 .. International License. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2019 ONAP Contributors.  All rights reserved.
4
5 .. _doc_guide_user_ser_inst_nbi:
6
7
8 Service Instantiation via ONAP NBI API (TM Forum)
9 =================================================
10
11 ONAP NBI allow you to use a TM Forum standardized API (serviceOrder API)
12
13 Additional info in:
14
15 .. toctree::
16    :maxdepth: 1
17    :titlesonly:
18
19    NBI Guide <../../../../../submodules/externalapi/nbi.git/docs/offeredapis/offeredapis.rst>
20
21
22 ONAP NBI will convert that request to ONAP SO request.
23
24
25 ServiceOrder management in NBI will support 2 modes:
26
27 * E2E integration - NBI calls SO API to perform an End-To-end integration
28 * Service-level only integration - NBI will trigger only SO request at
29   serviceInstance level (not at VNF, not at Vf-module level and nothing will
30   be created on cloud platform)
31
32 ONAP SO prerequisite: SO must be able to find a BPMN to process service
33 fulfillment (integrate VNF, VNF activation in SDNC, VF module)
34
35 The choice of the mode is done by NBI depending on information retrieved
36 in SDC. If the serviceSpecification is within a Category "E2E Service" ,
37 NBI will use E2E SO API, if not only API at service instance level
38 will be used.
39
40 There is no difference or specific expectation in the service order API
41 used by NBI user.
42
43
44 Example of serviceOrder to instantiate (=add) a service based on model
45 with id=0d463b0c-e559-4def-8d7b-df64cfbd3159
46
47
48 ::
49
50   curl -X POST \
51     http://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/serviceOrder \
52     -H 'Accept: application/json' \
53     -H 'Content-Type: application/json' \
54     -H 'cache-control: no-cache' \
55     -d '{
56     "externalId": "BSS_order_001",
57     "priority": "1",
58     "description": "this is a service order to instantiate a service",
59     "category": "Consumer",
60     "requestedStartDate": "",
61     "requestedCompletionDate": "",
62     "relatedParty": [
63       {
64         "id": "JohnDoe",
65         "role": "ONAPcustomer",
66         "name": "JohnDoe"
67       }
68     ],
69     "orderItem": [
70       {
71         "id": "1",
72         "action": "add",
73         "service": {
74           "name": "my_service_model_instance_01",
75           "serviceState": "active",
76           "serviceSpecification": {
77             "id": "0d463b0c-e559-4def-8d7b-df64cfbd3159"
78           }
79         }
80       }
81     ]
82   }'
83
84 In the response, you will obtain the serviceOrderId value.
85
86 Then you have the possibility to check about the serviceorder
87 (here after the serviceOrderId=5d06309da0e46400017b1123).
88
89 This will allow you to get the serviceOrder Status (completed, failed...)
90
91 ::
92
93   curl -X GET \
94     http://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/serviceOrder/5d06309da0e46400017b1123 \
95     -H 'Accept: application/json' \
96     -H 'Content-Type: application/json' \
97     -H 'cache-control: no-cache'