Create new subscription (nslcm)

Use this API to subscribe to notifications related to NS lifecycle management.

The following elements of the request, example, and response are described in this section:

Request

Table 1. Request
Aspect Value
Endpoint URL /api/etsi/nslcm/v2/subscriptions
HTTP Method POST

Request headers

Table 2. Request headers
Header Value
Content-Type application/json
Version 2.0.0

Request data

Table 3. Request data
Parameter Type Description Default value Required
filter Composite json Filter settings for this subscription, to define the subset of all notifications this subscription relates to. A particular notification is sent to the subscriber if the filter matches, or if there is no filter. The details of this attribute is outlined in this section. N/A No
callbackUri Uri The URI of the endpoint to send the notification to. N/A Yes
authentication Composite json Authentication parameters to configure the use of Authorization when sending notifications corresponding to this subscription. This attribute is only be present if the subscriber requires authorization of notifications. N/A No
verbosity String This attribute signals the requested verbosity of NS LCM operation ence notifications.
Restriction: This attribute is not supported in this release.
FULL No
The following code depicts the full structure of the JSON object for the filter attribute:
Filter settings for subscriptions, to define the subset of all values and attributes that can be specified. A particular notification is sent to the subscriber if the filter matches, or if there is no filter.
"filter": {
     "nsInstanceSubscriptionFilter": { 
           "nsdIds": [ <nsdid1>, <nsdid2> … ],
           "vnfdIds": [ <vnfdid1>, <vnfdid2> … ],
           "pnfdIds": [ <pnfdid1>, <pnfdid2> … ],
           "nsInstanceIds": [ <nsinstanceid1>, < nsinstanceid 2> … ],
           "nsInstanceNames": [ < nsInstanceName1>, < nsInstanceName2> … ],
     },
     "notificationTypes": [< list of supported notification types > ],
     "operationTypes": [< list of NS lifecycle operation types for the notification of type NsLcmOperationOccurenceNotification>],
     "operationStates": [ < list of LCM operation state values for the notification of type NsLcmOperationOccurenceNotification> ],
     "nsComponentTypes": [< list of NS component types for the notification of type NsChangeNotification>],
     "lcmOpNameImpactingNsComponent": [< list of LCM operation names for the notification of type NsChangeNotification>],
     "lcmOpOccStatusImpactingNsComponent": [< list of LCM operation status values for the notification of type NsChangeNotification>]
}
Where:
nsInstanceSubscriptionFilter
Specifies NS instances for which notifications are to be received. If none is specified, all notifications are received.
Note: The attributes nsdIds, vnfdIds, pnfdIds, nsInstanceIds and nsInstanceNames are alternatives to reference a particular NS Instances in a filter. Do not use them together in the same filter instance; choose only one alternative.
notificationTypes
Specifies a list of notificationTypes for which notifications are required. If none is specified, all notifications are received.
Note: Spell NsLcmOperationOccurenceNotification with a single r. NsChangeNotification is not supported in this release.
operationTypes
Specifies a list of operations for which NsLcmOperationOccurenceNotification notifications are required. This can be specified only if the notificationTypes attribute contains the value NsLcmOperationOccurenceNotification.
operationStates
Specifies a list states for which NsLcmOperationOccurenceNotification notifications are required. This can be specified only if the notificationTypes attribute contains the value NsLcmOperationOccurenceNotification.
nsComponentTypes
Specifies particular NS components for which NsChangeNotification notifications are required. This attribute is not supported in this release.
lcmOpNameImpactingNsComponent
Specifies particular LCM operations for which NsChangeNotification notifications are required. This attribute is not supported in this release.
lcmOpOccStatusImpactingNsComponent
Specifies a particular operation status for which NsChangeNotification notifications are required. This attribute is not supported in this release.

Request data example

Without filter:
{
              "callbackUri": "https://example.com/status/204",
              "authentication": { 
                   "authType": ["BASIC"],        
                   "paramsBasic": {            
                                   "userName": "username",
                                   "password": "pass"        
                   }    
               }
}
With filter attribute specified:
{
               "callbackUri": "https://example.com/status/204",
               "filter": {
                          "notificationTypes": ["NsLcmOperationOccurenceNotification", 
                     "NsIdentifierCreationNotification", 
                     "NsIdentifierDeletionNotification"],
                          "operationStates": ["COMPLETED", "FAILED"],
                          "operationTypes": ["INSTANTIATE"]
               },
               "authentication": { "authType": [ "BASIC" ], "paramsBasic": { "userName": 
               "username", "password": "pass" } }
}

Response codes

Table 4. Response codes
HTTP status code Description
201 When the subscription is created successfully.
303 If a subscription with the same callback URI and the same filter already exists. The HTTP response includes a Location HTTP header that contains the resource URI of the existing Individual subscription resource.
400 The response body contains details about the error.
422 When the callbackUri is unresponsive or is unreachable.
500 An internal server error has occurred.
4xx/5xx In addition to the other response codes in this table, any common error response codes.

Response headers

Table 5. Response headers
Header Description
location Contains the URL for the created Individual subscription resource.

Response data

The response body contains a representation of the created Individual subscription resource.

{
             "id": "55af024d-614b-46a8-b2ec-7a9c832077bd",
             "filter": {
             "notificationTypes": [
             "NsLcmOperationOccurenceNotification",
             "NsIdentifierCreationNotification",
             "NsIdentifierDeletionNotification"
             ],
             "operationTypes": [
             "INSTANTIATE"
             ],
             "operationStates": [
             "COMPLETED",
             "FAILED"
             ]
             },
             "callbackUri": "https://example.com/status/204",
             "_links": {
                   "self": {
                         "href": "https://<ishtar_route>/api/etsi/nslcm/v2/subscriptions/55af024d-614b-46a8-b2ec-
                   7a9c832077bd"
                   }
              }
}