...
1.2 Subscribe API example:
Code Block |
---|
|
curl -X POST
http://{{baseUrl}}//api/vnfpkgm/v1/subscriptions
-H 'Content-Type: application/json'
-d '{
"filters": {
"notificationTypes": [
"VnfPackageOnboardingNotification"
],
#Only one of the three attributes "vnfProductsFromProviders", "vnfdId" and "vnfPkgId" can be selected
"vnfdId": [
"uuid_vnfdid"
]
},
"callbackUri": "http://www.vnf1.com/notification",
"authentication": {
"authType": [
"BASIC"
],
"paramsBasic": {
"userName": "username",
"password": "userpwd"
}
}
}' |
1.3 Notification API example:
POST http://www.vnf1.com/notification
Code Block |
---|
curl -X POST
http://{{baseUrl}}/URI-is-provided-by-the-client-when-creating-the-subscription-VnfPackageOnboardingNotification
-H 'Content-Type: application/json'
-d '{
"id":"notify_id",
"notificationType":"VnfPackageOnboardingNotification",
"timeStamp":"nowtime()",
"vnfPkgId":"vnfPackage_uuid",
"vnfdId":"vnfdId_uuid",
"subscriptionId":"subscription_id",
"_links":{
"subscription":{
"href":"http://subscriptionuri"
},
"vnfPackage":{
"href":"http://vnfPackageuri"
}
}
}' |
2.VnfPackage Change Notification
...
2.2 Subscribe API example:
Code Block |
---|
|
curl -X POST
http://{{baseUrl}}/api/vnfpkgm/v1/subscriptions
-H 'Content-Type: application/json'
-d '{
"filters": {
"notificationTypes": [
"VnfPackageChangeNotification"
],
#Only one of the three attributes "vnfProductsFromProviders", "vnfdId" and "vnfPkgId" can be selected
"vnfdId": [
"uuid_vnfdid"
]
},
"callbackUri": "http://www.vnf1.com/notification",
"authentication": {
"authType": [
"BASIC"
],
"paramsBasic": {
"userName": "string",
"password": "string"
}
}
}' |
2.3 Notification API example:
POST http://www.vnf1.com/notification
Code Block |
---|
curl -X POST \
http://{{baseUrl}}/URI-is-provided-by-the-client-when-creating-the-sbuscription-VnfPackageChangeNotification \
-H 'Content-Type: application/json' \
-H 'Postman-Token: 20d37747-16ec-41b1-935b-53c893a94fc9' \
-H 'cache-control: no-cache' \
-d '{
"id":"notify_id",
"notificationType":"VnfPackageChangeNotification",
"timeStamp":"nowtime()",
"vnfPkgId":"vnfPackage_uuid",
"vnfdId":"vnfdId_uuid",
"subscriptionId":"subscription_id",
"changeType":"OP_STATE_CHANGE",
"operationalState":"ENABLED",
"_links":{
"subscription":{
"href":"http://subscriptionuri"
},
"vnfPackage":{
"href":"http://vnfPackageuri"
}
}
}' |