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