1 .. This work is licensed under a Creative Commons Attribution 4.0
3 .. http://creativecommons.org/licenses/by/4.0
12 Micro-Service Bus (MSB) provides a facility to register and
15 It is particulary usefull to expose some API endpoints
16 that are not published by default when installing ONAP with OOM installer.
18 There are two methods to register an API in MSB:
27 MSB Portal/GUI is available on the following URL
28 (adapt to your ONAP installation)
32 ``http://msb.api.discovery.simpledemo.onap.org:30282/iui/microservices/default.html``
35 The following screen should appears
37 .. figure:: images/home.png
41 click on the "Service Discover" icon to get the list of
42 registred API (it will take several seconds to get the next screen)
44 .. figure:: images/service-list-2.png
47 Note: majority of Registred API have been declared using MSB API and
48 they can not be modified/deleted via MSB Portal/GUI.
51 click on "view" icon in "Control" column to have a more
52 detailed description of the registred API
54 .. figure:: images/service-detail.png
57 click on "Service Register" icon to start the register process for a new API
59 .. figure:: images/service-register.png
62 "Service Name" will be the new API name in MSB and will be used
63 to build the URL that will be exposed.
65 "Url" is the url of the existing ONAP API that we are registering
67 "Protocol" must be selected in the list (usualy REST)
69 "Version" will be part of the exposed URL
71 "Visual Range" must be selected (usualy inSystem)
73 click on "Add Host" to provide information about IP address and
74 port of the API that we are registering.
76 Tips: from an ONAP platform installed via OOM, to know about the IP/port,
79 example: to know about IP addresses used by ONAP Policy components
83 kubectl get svc -n onap | grep policy
86 Here after an example of Registered API for ONAP SO:
89 .. figure:: images/service-edit.png
97 Get the list of registred API in MSB
103 http://msb.api.discovery.simpledemo.onap.org:30280/api/microservices/v1/services \
104 -H 'Content-Type: application/json' \
105 -H 'cache-control: no-cache'
108 response (small extract only):
119 "serviceName": "aai-business",
121 "url": "/aai/v16/business",
124 "lb_policy": "ip_hash",
127 "network_plane_type": "",
137 "tls_skip_verify": true,
139 "nodeId": "_v16_aai-business_10.233.69.5_8447",
151 Register a new API (example for ONAP policy-pap API)
153 "Service Name" will be the new API name in MSB and will be used
154 to build the URL that will be exposed.
156 "Url" is the url of the existing ONAP API that we are registering
158 "Protocol" must be selected in the list (usualy REST)
160 "Version" will be part of the exposed URL
162 "Visual Range" must be selected (usualy inSystem)
164 "enable_ssl" must be set to "true" is using
165 https between MSB and API service that we are registering.
167 "nodes" is a list of IP addresses and port of the API that we are registering.
169 Tips: from an ONAP platform installed via OOM, to know about the IP/port,
171 "enable_ssl" must be set to "true" is using
172 https between MSB and API service that we are registering.
178 http://msb.api.discovery.simpledemo.onap.org:30280/api/microservices/v1/services \
179 -H 'Content-Type: application/json' \
180 -H 'cache-control: no-cache' \
182 "serviceName": "policy-api",
184 "url": "/policy/api/v1",
191 "ip": "10.233.35.125",
199 Delete an API from MSB (=unregister an API):
204 http://msb.api.discovery.simpledemo.onap.org:30280/api/microservices/v1/services/policy-pap/version/v1/nodes/10.233.15.213/6969 \
205 -H 'Content-Type: application/json' \
206 -H 'cache-control: no-cache' \
208 "serviceName": "policy-pdp-legacy",
217 "ip": "10.233.77.14",
226 Using a registred API
227 ---------------------
230 Once registered, the API can then be accessible using
231 the following URL/Port
233 ``http://msb.api.discovery.simpledemo.onap.org:30280/api/{{Service Name}}/{{Version}}/{{resource}}``
235 where {{Service Name}} and {{Version}} are mapped to what have been registered
237 {{resource}} is to be replace by the object that the API is able to manage
242 to get the service model list from SDC via MSB
243 (this API is pre-registred by default in ONAP):
249 http://msb.api.discovery.simpledemo.onap.org:30280/api/sdc/v1/catalog/services \
250 -H 'Accept: application/json' \
251 -H 'Authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=' \
252 -H 'Content-Type: application/json' \
253 -H 'USER_ID: cs0008' \
254 -H 'X-FromAppId: ONAP-Test' \
255 -H 'X-TransactionId: ONAP-Test' \
256 -H 'cache-control: no-cache' \
257 -H 'x-ecomp-instanceid: ONAP-Test'
261 to get the customer list from AAI via MSB
262 (this API is pre-registred by default in ONAP):
268 http://msb.api.discovery.simpledemo.onap.org:30280/api/aai-business/v16/customers \
269 -H 'Accept: application/json' \
270 -H 'Authorization: Basic QUFJOkFBSQ==' \
271 -H 'Content-Type: application/json' \
272 -H 'X-FromAppId: AAI' \
273 -H 'X-TransactionId: 808b54e3-e563-4144-a1b9-e24e2ed93d4f' \
274 -H 'cache-control: no-cache'
277 to get the list of policy models from Policy via MSB
278 (this policy API needs to be registred):
283 http://msb.api.discovery.simpledemo.onap.org:30280/api/policy-api/v1/policytypes \
284 -H 'Authorization: Basic aGVhbHRoY2hlY2s6emIhWHp0RzM0' \
285 -H 'X-ONAP-RequestID: 9ac7ce8e-a867-4269-bc52-c8236b7fdad6' \
286 -H 'cache-control: no-cache'