696232517bd46a5a48000c72b7a78072b357baa7
[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:
6
7
8 Alacarte mode 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 ONAP NBI will convert that request to ONAP SO request.
14
15
16 ServiceOrder management in NBI will support 2 modes:
17
18 * E2E integration - NBI calls SO API to perform an End-To-end integration
19 * Service-level only integration - NBI will trigger only SO request at
20   serviceInstance level (not at VNF, not at Vf-module level and nothing will
21   be created on cloud platform)
22
23 ONAP SO prerequisite: SO must be able to find a BPMN to process service
24 fulfillment (integrate VNF, VNF activation in SDNC, VF module
25
26 The choice of the mode is done by NBI depending on information retrieved
27 in SDC. If the serviceSpecification is within a Category “E2E Service” ,
28 NBI will use E2E SO API, if not only API at service instance level
29 will be used.
30
31 There is no difference or specific expectation in the service order API
32 used by NBI user.
33
34
35 Example of serviceOrder to instantiate (=add) a service based on model
36 with id=0d463b0c-e559-4def-8d7b-df64cfbd3159
37
38
39 ::
40
41   curl -X POST \
42     http://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/serviceOrder \
43     -H 'Accept: application/json' \
44     -H 'Content-Type: application/json' \
45     -H 'cache-control: no-cache' \
46     -d '{
47     "externalId": "BSS_order_001",
48     "priority": "1",
49     "description": "this is a service order to instantiate a service",
50     "category": "Consumer",
51     "requestedStartDate": "",
52     "requestedCompletionDate": "",
53     "relatedParty": [
54       {
55         "id": "JohnDoe",
56         "role": "ONAPcustomer",
57         "name": "JohnDoe"
58       }
59     ],
60     "orderItem": [
61       {
62         "id": "1",
63         "action": "add",
64         "service": {
65           "name": "my_service_model_instance_01",
66           "serviceState": "active",
67           "serviceSpecification": {
68             "id": "0d463b0c-e559-4def-8d7b-df64cfbd3159"
69           }
70         }
71       }
72     ]
73   }'
74
75 In the response, you will obtain the serviceOrderId value.
76
77 Then you have the possibility to check about the serviceorder
78 (here after the serviceOrderId=5d06309da0e46400017b1123).
79
80 This will allow you to get the serviceOrder Status (completed, failed...)
81
82 ::
83
84   curl -X GET \
85     http://nbi.api.simpledemo.onap.org:30274/nbi/api/v4/serviceOrder/5d06309da0e46400017b1123 \
86     -H 'Accept: application/json' \
87     -H 'Content-Type: application/json' \
88     -H 'cache-control: no-cache'