9 Supported REST API Interfaces

This chapter describes the REST APIs supported by OCNWDAF.

9.1 Analytics Subscription Service

REST APIs create, modify, and delete OCNWDAF Event Subscriptions. REST APIs also send notifications about the observed event to the consumer NF.

Create an OCNWDAF Event Subscription

URI: {apiRoot}/nwdaf-eventssubscription/v1/subscriptions

Method: POST

Request Body:

Type: NnwdafEventsSubscription

Table 9-1 Request Body Parameters

Name Data Type P Cardinality Description
NnwdafEventsSubscription Object M 1 Creates a new individual OCNWDAF event subscription resource using a POST request.

Response:

Table 9-2 Supported Response Codes

Response Code Description
201 Created The response to successfully creating an OCNWDAF event subscription using a POST request. The stored subscribed event is returned.
400 Bad Request The response to a POST request if the create subscription request does not contain valid data.
500 Internal Server Error The response to a request if there is an internal server processing error.

Delete an OCNWDAF Event Subscription using SubscriptionID

URI: {apiRoot}/ocnwdaf-eventssubscription/v1/subscriptions/{subscriptionId}

Method: DELETE

Response:

Table 9-3 Supported Response Codes

Response Code Description
204 No Content The response to a successful delete subscription request.
404 Not found The response to a DELETE request if the subscription is not found.
500 Internal Server Error The response to a request if there is an internal server processing error.

Notify the Consumer NF about an observed event

URI: Notification URI

Method: POST

Request Body:

Type: NnwdafEventsSubscriptionNotification

Table 9-4 Request Body Parameters

Name Data Type P Cardinality Description
NnwdafEventsSubscriptionNotification Array M 1 up to N Provides information about observed events.

Response:

Table 9-5 Supported Response Codes

Response Code Description
204 No Content The response to a successful notification event.
500 Internal Server Error The response to a request if there is an internal server processing error.

9.2 Analytics Information Service

REST APIs are used to obtain analytics information from the Analytics Database service. The Analytics information service invokes Data collection and Analytics generation services by sending POST requests with specific AnalyticsIDs.

Retrieve OCNWDAF analytics information

URI: {apiRoot}/ nnwdaf-analyticsinfo /v1/analytics

Method: GET

Request Body:

Type:

Table 9-6 Request Body Parameters

Name Data Type P Cardinality Description
ana-req EventReportingRequirement O 0 to 1 Specifies the analytics event reporting requirement information.
event-id EventId M 1 Included to identify the analytics.
event-filter EventFilter C 0 to 1 Included to identify the analytics when filter information is needed for the related event.
supported-features SupportedFeatures O 0 to 1 Filters irrelevant responses related to unsupported features.
tgt-ue TargetUeInformation O 0 to 1 Identifies the target UE information.

Response:

Table 9-7 Supported Response Codes

Response Code Description
200 OK A successful response, returned with requested analytics information in the message body.
204 No Content Response if the requested analytics data does not exist.
400 Bad Request

Response to the request:

  • When NF consumers request both statistical and predictive analytics.
  • When the requested supportedFeatures or AnalyticsID is not valid.
  • When the request has invalid optional parameters.
  • In the absence of EventFilter in Request Parameters for data collection.
422 Unprocessable Entity The response for the request when OCNWDAF-NRFClient is not registered.
500 Internal Server Error The response to a request if there is an internal server processing error.

9.3 OCNWDAF Analytics APIs

The 5G NFs can subscribe (or cancel) to a specific network analytics and also obtain a network analytics report for a particular context from the OCNWDAF. The analytics supported are Slice Load Level, UE Mobility and UE Abnormal Behavior.

Note:

Pre-requisites:
  • The NRF is deployed and running.
  • The OCNWDAF is deployed and running.
  • The Notification microservice is deployed and running.
  • OCNWDAF profile is created.
  • OCNWDAF token is created.

The following APIs are invoked to obtain analytics information:

9.3.1 UE Abnormal Behavior Analytics

This service operation is used to subscribe to UE Abnormal Behavior Analytics.

Type: POST

URI: {apiRoot}/nnwdaf-eventssubscription/v1/subscriptions/

Initiated By: Consumers

Table 9-8 Request Body Parameters

Field Name Data Type Description
notificationURI uri The URI which receives the requested notifications from the OCNWDAF. This parameter is provided by the NF service consumer in the HTTP POST request that creates the subscriptions for event notifications.
supportedFeatures SupportedFeatures The supported feature number.
evtReq ReportingInformation Is the event reporting information applicable for each event. It contains the following attributes:
  • immRep
  • notifMethod
  • maxReportNbr
  • monDur
immRep boolean Immediate reporting indication.

If this value is set to "true" the OC-NWDAF includes the reports of the events subscribed (if available), in the HTTP POST response.

notifMethod string Event notification method. The allowed values are:
  • ON_EVENT_DETECTION
maxReportNbr integer Maximum number of reports.
monDur Date time Monitoring the duration.
eventSubscriptions array(EventSubscription) A description of the subscribed events. It contains the following attributes:
  • event
  • tgtUe
  • exptAnaType
  • exptUeBehav
event string Indicates that the event subscribed is "ABNORMAL_BEHAVIOUR".
tgtUe TargetUeInformation Identifies the target UE information for which the subscription applies by "supis" , "intGroupIds" and "anyUe" attributes.
exptAnaType ExpectedAnalyticsType Represents expected UE analytics type.
exptUeBehav ExpectedUeBehaviourData Represents expected UE behaviour.
supis array Identifies a SUPI for an UE.
intGroupIds array Represents an internal group identifier and identifies a group of UEs.
anyUe boolean Identifies any UE when set to true.

When the event parameter is "ABNORMAL_BEHAVIOUR", the following analytics are provided:

  1. Identification of target UE(s) to which the subscription applies by "supis", "intGroupIds" or "anyUe" attribute in the "tgtUe" attribute.
  2. Expected analytics type through the "exptAnaType" attribute.
  3. Expected UE behavior through "exptUeBehav" attribute.

Note:

The data types supported by OCNWDAF comply with the 3GPP specifications. For more information about the 3GPP data types, see 3GPP Technical Specification 29.520, Release 16, Network Data Analytics Services.

Table 9-9 Supported Response Codes

Code Description
201 The subscription resource is created successfully.
400

Bad Request.

The request is incorrect and subscription is not created.

500 Indicates a internal server processing error.

Examples

The following example shows how an NF creates a subscription request for UE Abnormal Behavior Analytics by submitting a POST request on the REST resource using cURL.

cURL Command

curl --location --request POST '{HTTP_ENDPOINT}' \--header 'Content-Type: application/json' \--data-raw '{JSON_OBJECT}'

Example of the Request Body

{ "notificationURI": "https://{CONSUMERAPIROOT}/notification", 
"supportedFeatures": "010", 
"evtReq": {            
        "immRep": false,            
        "notifMethod": "PERIODIC",            
        "maxReportNbr": 0,            
        "monDur": "2022-06-24T17:00:00Z" }, 
"eventSubscriptions": [{  
"event": "ABNORMAL_BEHAVIOUR",  
"tgtUe": {           
        "supis": ["{VALIDSUPID}"],           
        "intGroupIds": null,           
        "anyUe": false },  
    "exptAnaType": "MOBILITY",  
    "exptUeBehav": null      
    }]
}

9.3.2 Slice Load Level Analytics

This service operation is used to subscribe to Slice Load Level Analytics.

Type: POST

URI: {apiRoot}/nnwdaf-eventssubscription/v1/subscriptions/

Initiated By: Consumers

Table 9-10 Request Body Parameters

Field Name Data Type Description
notificationURI uri The URI which receives the requested notifications from the OCNWDAF. This parameter provided by the NF service consumer in the HTTP POST request that creates the subscriptions for event notifications.
supportedFeatures SupportedFeatures The supported feature number.
evtReq ReportingInformation Is the event reporting information applicable for each event. It contains the following attributes:
  • immRep
  • notifMethod
  • maxReportNbr
  • monDur
immRep boolean Immediate reporting indication.

This value is set to "true" the OC-NWDAF includes the reports of the events subscribed, if available, in the HTTP POST response.

notifMethod string Event notification method. The allowed values are:
  • ON_EVENT_DETECTION
  • ONE_TIME
  • PERIODIC
maxReportNbr integer Maximum Number of Reports.
monDur Date time Monitoring duration.
eventSubscriptions array(EventSubscription)

A description of the subscribed events. It contains the following attributes:

  • event
  • anySlice
  • loadLevelThreshold
  • notificationMethod
  • snssaia
event string

Indicates that the event subscribed is load level information of Network Slice, "SLICE_LOAD_LEVEL"

anySlice boolean
  • True: Indicates applicable to all slices.
  • False: Indicates not applicable to all slices.
loadLevelThreshold integer The OCNWDAF reports the corresponding network slice load level to the NF service consumer when the load level of the network slice identified by snssais has reached.
notificationMethod NotificationMethod Indicates the notification method. The allowed values are:
  • PERIODIC: The subscription of OCNWDAF event is periodic.
  • THRESHOLD: The subscription of OCNWDAF event is on exceeding threshold value.

snssaia String Identifies of network slice to which the subscription belongs.
sst Uinteger Unsigned integer, within the range 0 up to 255, representing the Slice or Service Type.
sd String 3-octet string, representing the Slice Differentiator, in hexadecimal representation.

When the event parameter is "SLICE_LOAD_LEVEL", the following analytics are provided:

  1. The Network slice load level threshold in the "loadLevelThreshold" attribute if the "notifMethod" attribute in "evtReq" attribute is "ON_EVENT_DETECTION" or the "notificationMethod" attribute in "eventSubscriptions" attribute is "THRESHOLD" or "OMITTED".
  2. Identification of network slice(s) to which the subscription applies through the identification of network slice(s) in the "snssais" attribute or as indicated in the "anySlice" attribute.

Note:

The data types supported by OCNWDAF comply with the 3GPP specifications. For more information about the 3GPP data types, see 3GPP Technical Specification 29.520, Release 16, Network Data Analytics Services..

Table 9-11 Supported Response Codes

Code Description
201 The subscription resource is created successfully.
400

Bad Request.

The request is incorrect and subscription is not created.

500 Indicates a internal server processing error.

Examples

The following example shows how an NF creates a subscription request for Slice Load Level analytics by submitting a POST request on the REST resource using cURL.

cURL Command

curl --location --request POST '{HTTP_ENDPOINT}' \--header 'Content-Type: application/json' \--data-raw '{JSON_OBJECT}'

Example of the Request Body

{ "notificationURI": "https://{CONSUMERAPIROOT}/notification", 
"supportedFeatures": "100", 
"evtReq": {            
        "immRep": false,            
        "notifMethod": "ON_EVENT_DETECTION",            
        "maxReportNbr": 0,            
        "monDur": "2022-06-24T04:00:00Z" } 
"eventSubscriptions": [{  
"event": "SLICE_LOAD_LEVEL",  
"anySlice": false,  "loadLevelThreshold": 10,  
"notificationMethod": "THRESHOLD",  
"snssaia": [{          
    "sst": 2,          
    "sd": null }] }]}

9.3.3 UE Mobility Analytics

This service operation is used to subscribe to UE Mobility Analytics.

Type: POST

URI: {apiRoot}/nnwdaf-eventssubscription/v1/subscriptions/

Initiated By: Consumers

Table 9-12 Request Body Parameters

Field Name Data Type Description
notificationURI uri The URI which receives the requested notifications from the OCNWDAF. This parameter provided by the NF service consumer in the HTTP POST request that creates the subscriptions for event notifications.
supportedFeatures SupportedFeatures The supported feature number.
evtReq ReportingInformation Is the event reporting information applicable for each event. It contains the following attributes:
  • immRep
  • notifMethod
  • maxReportNbr
  • monDur
immRep boolean Immediate reporting indication.

This value is set to "true" the OC-NWDAF includes the reports of the events subscribed, if available, in the HTTP POST response.

notifMethod string Event notification method. The allowed values are:
  • ONE_TIME
  • PERIODIC
maxReportNbr integer Maximum Number of Reports.
monDur Date time Monitoring duration.
eventSubscriptions array(EventSubscription)

A description of the subscribed events. It contains the following attributes:

  • event
  • tgtUe
  • networkArea
event string

Indicates that the event subscribed is "UE_MOBILITY".

tgtUe TargetUeInformation Identifies the target UE information for which the subscription applies by "supis" , "intGroupIds" and "anyUe" attributes.
networkArea NetworkAreaInfo Identification of network area to which the subscription applies.
supis array Identifies a SUPI for an UE.
intGroupIds array Represents an internal group identifier and identifies a group of UEs.
anyUe boolean Identifies any UE when set to true.

When the event parameter is "UE_MOBILITY", the following analytics are provided:

  1. Identification of target UE(s) to which the subscription applies by "supis" or "intGroupIds" attribute in the "tgtUe" attribute.
  2. Identification of network area to which the subscription applies through the identification of network area by "networkArea" attribute.

Note:

The data types supported by OCNWDAF comply with the 3GPP specifications. For more information about the 3GPP data types, see 3GPP Technical Specification 29.520, Release 16, Network Data Analytics Services.

Table 9-13 Supported Response Codes

Code Description
201 The subscription resource is created successfully.
400

Bad Request.

The request is incorrect and subscription is not created.

500 Indicates a internal server processing error.

Examples

The following example shows how an NF creates a subscription request for UE Mobility Analytics by submitting a POST request on the REST resource using cURL.

cURL Command

curl --location --request POST '{HTTP_ENDPOINT}' \--header 'Content-Type: application/json' \--data-raw '{JSON_OBJECT}'

Example of the Request Body

{ "notificationURI": "https://{CONSUMERAPIROOT}/notification",
"supportedFeatures": "002",
"evtReq": {            
        "immRep": "false",            
        "notifMethod": "PERIODIC",            
        "maxReportNbr": 0,            
        "monDur": "2022-06-24T04:00:00Z" },
"eventSubscriptions": [{     
"event": "UE_MOBILITY",
"tgtUe": {         
    "supis": ["{VALIDSUPID}"],        
    "intGroupIds": null,         
    "anyUe": false  },
    "networkArea": null  
    }]
}

9.3.4 NF Load Analytics

This service operation is used to subscribe to NF Load Analytics.

Type: POST

URI: {apiRoot}/nnwdaf-eventssubscription/v1/subscriptions/

Initiated By: Consumers

Table 9-14 Request Body Parameters

Field Name Data Type Description
AnySlice boolean Default is FALSE. If TRUE ignore any snssais, array of Snssai or slice IDs.
event string Event that is subscribed, in this case "NF_LOAD".
networkArea array

Identification of network area to which the subscription applies. The absence of networkArea means subscription to all network areas.

Note:

It should be set to "null". It is an optional field.
startTs date format in UTC timezone

UTC time indicating the start time of the observation period.

The absence of this attribute means subscription at the present time.

endTS date format in UTC timezone

UTC time indicating the end time of the observation period.

The absence of this attribute means subscription at the present time.

If provided, it should not be less than the start time.

notificationMethod string Indicates the notification method.

When notificationMethod is not provided, the default value is "THRESHOLD".

matchingDir boolean A matching direction may be provided alongside a threshold. If omitted, the default value is CROSSED. This field is optional.
nfLoadLvlThds   Indicates when the reporting should start after the after the average load level is reached. This field is provided if the "notifMethod" in "evtReq" is set to "ON_EVENT_DETECTION" or "notificationMethod" in "eventSubscriptions" is set to "THRESHOLD" or omitted.
  • "congLevel": integer
  • "nfLoadLevel": integer,
  • "nfCpuUsage": integer,
  • "nfMemoryUsage": integer,
  • "nfStorageUsage": integer
nfInstanceIds array An array of Identification(s) of NF instances. This field is optional.
nfSetIds array An array of Identification(s) of NF instance sets. This field is optional.
nfTypes array An array of Identification(s) of NF types. This field is optional.
snssais array Identification(s) of network slice to which the subscription applies. This field is optional and should be set to NULL.
tgtUe array(TargetUeInformation)
  • anyUe, boolean
  • supis, array of Supi
Only applicable to determine AMF or SMF (from the SUPI). Identifies target UE information.
congThresholds array Represents the congestion threshold levels.
  • "congLevel": 20,
  • "nfLoadLevel": 50,
  • "nfCpuUsage": 90,
  • "nfMemoryUsage": 95,
  • "nfStorageUsage": 80
exptAnaType string

It should be set to "MOBILITY"

Represents expected UE analytics type. Absent if the "excepRequs" attribute is provided.

evtReq array

Should be ON_EVENT_DETECTION if thresholds are defined, or notificationMethod is THRESHOLD.

Represents the reporting requirements of the event subscription.

If omitted, the default values within the ReportingInformation data type apply.

  • "immRep": false, Set by default
  • "notifMethod": "ON_EVENT_DETECTION",
  • "maxReportNbr": integer,
  • "monDur": date format in UTC timezone,
  • "repPeriod": integer and optional,
  • "sampRatio": integer and optional,
  • "grpRepTime": integer and optional
notificationURI Uri URI where to receive the requested notifications. Identifies the recipient of Notifications sent by the OCNWDAF.
supportedFeatures string This property should be “NfLoad”.

Table 9-15 Supported Response Codes

Code Description
201 The subscription resource is created successfully.
400

Bad Request.

The request is incorrect and subscription is not created.

500 Indicates a internal server processing error.

Examples

The following example shows how an NF creates a subscription request for NF load analytics by submitting a POST request on the REST resource using cURL.

cURL Command

curl --location --request PUT '{apiRoot}/nnwdaf-eventssubscription/v1/subscriptions/' \--header 'Content-Type: application/json' \--data-raw '{request_body}

Example of the Request Body

{
    "eventSubscriptions": [
        {
            "anySlice": true,
            "event": "NF_LOAD",
            "networkArea": null,
        "extraReportReq": {
            "startTs": "2022-09-06T05:00:30Z",
            "endTs": "2022-10-19T23:59:59Z"
        },
        "notificationMethod": "THRESHOLD",
        "matchingDir": null,
        "nfLoadLvlThds": [
            {
                "congLevel": 20,
                "nfLoadLevel": 20,
                "nfCpuUsage": 90,
                "nfMemoryUsage": 95,
                "nfStorageUsage": 80
            }
        ],
        "nfInstanceIds": null,
        "nfSetIds": null,
        "nfTypes": [
            "AMF",
            "SMF"
        ],
        "snssaia": null,
        "tgtUe": {
            "supis": null,
            "intGroupIds": null,
            "anyUe": false
        },
        "congThresholds": [
            {
                "congLevel": 20,
                "nfLoadLevel": 50,
                "nfCpuUsage": 90,
                "nfMemoryUsage": 95,
                "nfStorageUsage": 80
            }
        ],
        "exptAnaType": "MOBILITY"
    }
],
"evtReq": {
    "immRep": false,
    "notifMethod": "ON_EVENT_DETECTION",
    "maxReportNbr": 50,
    "monDur": "2022-10-19T23:59:59Z",
    "repPeriod": 10,
    "sampRatio": 75,
    "grpRepTime": 0
},
"notificationURI": "{apiRoot}/notification",
"supportedFeatures": "040"
}

Example of the Response Body

{
    "eventSubscriptions": [
        {
            "anySlice": true,
            "event": "NF_LOAD",
        "extraReportReq": {
            "startTs": "2022-09-06T05:00:30Z",
            "endTs": "2022-10-19T23:59:59Z"
        },
        "notificationMethod": "THRESHOLD",
        "nfLoadLvlThds": [
            {
                "congLevel": 20,
                "nfLoadLevel": 20,
                "nfCpuUsage": 90,
                "nfMemoryUsage": 95,
                "nfStorageUsage": 80
            }
        ],
        "nfTypes": [
            "AMF",
            "SMF"
        ],
        "congThresholds": [
            {
                "congLevel": 20,
                "nfLoadLevel": 50,
                "nfCpuUsage": 90,
                "nfMemoryUsage": 95,
                "nfStorageUsage": 80
            }
        ],
        "exptAnaType": "MOBILITY"
    }
],
"evtReq": {
    "immRep": false,
    "notifMethod": "ON_EVENT_DETECTION",
    "maxReportNbr": 50,
    "monDur": "2022-10-19T23:59:59Z",
    "repPeriod": 10,
    "sampRatio": 75,
    "grpRepTime": 0
},
"notificationURI": "{apiRoot}/notification",
"supportedFeatures": "040"
}