4 NRF State Data Retrieval APIs

REST API Details

"apiRoot" is concatenation of the following parts:
  • scheme: http, https
  • the fixed string "://"
  • authority (host and optional port)

    host and port will be CNC Console host and port details

Table 4-1 API Details

API HTTP method supported Description HTTP response codes
{apiRoot}/nrf-state-data/v1/nf-details GET

This API fetches NF Profile related data.

Both query request attributes and query result attributes can be used together to get specific results

200 OK with NFProfileDetails, if NF Details found

200 OK with Empty List <NFProfileDetails>, if NF Details not found

400 BAD Request, if request is not proper

404 NOT FOUND - If no NF Details found for input attributes and query request attribute is used to get details based on specific attribute

500 INTERNAL ERROR - If any internal error occurred while accessing NRF state data

{apiRoot}/nrf-state-data/v1/subscription-details GET

This API fetches Subscription related data.

Both query request attributes and query result attributes can be used together to get specific results

200 OK - SubscriptionDetails , if subscription details found

200 OK - Empty List <SubscriptionDetails >, if subscription details not found

400 BAD Request, if request is not proper

404 NOT FOUND - If no NF Details found for input attributes and query request attribute is used to get details based on specific attribute

500 INTERNAL ERROR - If any internal error occurred while accessing NRF state data

Details of nf-details URI

Query request parameters supported by nf-details URI

Note:

  • These attributes can be used to get results based on specific input attributes. These attribute are optional to API. In case no query request and result attribute is mentioned, then only NFinstance Ids will be provided for all of the NF Profiles.
  • In case complete profile is needed, query request attributes shall contain specific attributes nf-instance-id or nf-fqdn. Otherwise only NFinstance Ids will be provided for all of the NF Profiles by default and additionally query result attributes can be provided to get additional details.
  • At-most one query request attribute is supported, data is returned based on the request attribute.

Table 4-2 Query request attributes supported by nf-details URI

Name Data Type Details Query Example with API
nf-instance-id string NF Instance Id of Network Function {apiRoot}/nrf-state-data/v1/nf-details?nf-instance-id=<NF Instance ID>
nf-fqdn string NF Profile FQDN {apiRoot}/nrf-state-data/v1/nf-details?nf-fqdn=<Profile level NF FQDN>
nf-status string NF Profile Status {apiRoot}/nrf-state-data/v1/nf-details?nf-status=<Profile level NF Status>
Query result parameters supported by nf-details URI

Note:

  • These attributes can be used to get specific attributes of NF Profile in the response. User can mention them as wish to see in the response.
  • These attributes can be mention in query using result-attributes=<Requested Attribute 1>,<Requested Attribute 2>
  • Different query result attributes can be mention together comma (,) separated in query to get specific results.
  • In case no result attribute is mentioned, then only nf-instance-id and nf-fqdn will be returned.
  • Some of the attributes are optional in NFProfile. In case specific result attribute is asked but it is not present in NFProfile then its value will be marked UNKNOWN.

Table 4-3 Query result attributes supported by nf-details URI

Name Details Query Example with API
fqdn NF Profile FQDN required in Result attributes {apiRoot}/nrf-state-data/v1/nf-details?nf-instance-id=<NF Instance ID>&result-attributes=fqdn
nfType NF Type required in Result attributes {apiRoot}/nrf-state-data/v1/nf-details?nf-instance-id=<NF Instance ID>&result-attributes=nftype
nfServices NF Services (ServiceInstanceId and Service Name) required in Result attributes {apiRoot}/nrf-state-data/v1/nf-details?nf-instance-id=<NF Instance ID>&result-attributes=nfServices
nfStatus NF Profile Status required in Result attributes {apiRoot}/nrf-state-data/v1/nf-details?nf-fqdn=<NF FQDN>&result-attributes=nfStatus

Response structure supported by nf-details URI

Table 4-4 NFProfileDetails

Name Details Response Example
dataTimeStamp Timestamp when data was returned
{
    "dataTimeStamp":"2020-11-24T15:55:48.000Z",
    "nfProfileDataCount":3,
    "nfProfileData":[{"nfInstanceId":"13515195-c537-4645-9b97-96ec797fbbbe","fqdn":"ocamf1.oracle.com"}, 
                     {"nfInstanceId":"23515195-c537-4645-9b97-96ec797fbbbe","fqdn":"ocpcf1.oracle.com"}, 
                     {"nfInstanceId":"33515195-c537-4645-9b97-96ec797fbbbe","fqdn":"ocudr1.oracle.com"} 
                    ]

} 
nfProfileDataCount Count of NF profile data elements in response same as above
nfProfileData NF Profile data attributes requested in Query result attributes same as above

Details of subscription-details URI

Query request parameters supported by subscription-details URI

Note:

  • These attributes can be used to get results based on specific input attributes. These attribute are optional to API. In case no query request and result attribute is mentioned, then only subscription ids will be provided for all of the Subscriptions.
  • In case complete subscription is needed, query request attributes shall contain specific attributes subscription-id. Otherwise only Subscription Ids will be provided by default and additionally query result attributes can be provided to get additional details.
  • At-most one query request attribute is supported, data is returned based on the request attribute.

Table 4-5 Query request attributes supported by subscription-details URI

Name Data Type Details Query Example with API
subscription-id string Subscription Id for which data is required {apiRoot}/nrf-state-data/v1/subscription-details?subscription-id=<SUBSCRIPTION ID>
nf-status-notification-uri string NF Status Notification URI for which data is required {apiRoot}/nrf-state-data/v1/subscription-details?nf-status-notification-uri=<NF Status Notification URI>
Query result parameters supported by subscription-details URI

Note:

  • These attributes can be used to get specific attributes of Subscription in the response. User can mention them as wish to see in the response.
  • These attributes can be mention in query using result-attributes=<Requested Attribute 1>,<Requested Attribute 2>
  • Different query result attributes can be mention together comma (,) separated in query to get specific results.
  • In case no result attribute is mentioned, then only default attributes (subscriptionId) will be returned.
  • Some of the above attributes are Optional in Subscription data. In case specific result attribute is asked but it is not present in Subscription then its value will be marked UNKNOWN.

Table 4-6 Query result attributes supported by subscription-details URI

Name Details Query Example with API
reqNfFqdn Requestor NF FQDN required in Result attributes {apiRoot}/nrf-state-data/v1/subscription-details?result-attributes=reqNfFqdn
reqNfType Requestor NF Type required in Result attributes {apiRoot}/nrf-state-data/v1/subscription-details?subscription-id=<SUBSCRIPTION ID>&result-attributes=reqNfType
nfStatusNotificationUri NF Status Notification URI required in Result attributes {apiRoot}/nrf-state-data/v1/subscription-details?subscription-id=<SUBSCRIPTION ID>&result-attributes=nfStatusNotificationUri
validityTime Validity Time required in Result attributes {apiRoot}/nrf-state-data/v1/subscription-details?subscription-id=<SUBSCRIPTION ID>&result-attributes=validityTime

Response structure supported by subscription-details URI

Table 4-7 SubscriptionDetails

Name Details Response Example
dataTimeStamp Timestamp when data was returned
{
    "dataTimeStamp": "2020-11-24T15:55:48.000Z",
    "subscriptionDataCount": 3,
    "subscriptionData": [{"subscriptionId":"a1c5600116e9403bb032b214d564b729","reqNfFqdn":"amf1.oracle.com","reqNfType":"AMF"}, 
                         {"subscriptionId":"b1c5600116e9403bb032b214d564b729","reqNfFqdn":"pcf1.oracle.com","reqNfType":"PCF"},
                         {"subscriptionId":"c1c5600116e9403bb032b214d564b729","reqNfFqdn":"amf2.oracle.com","reqNfType":"UNKNOWN"}
                        ]
}
subscriptionDataCount Count of subscription data elements in response same as above
subscriptionDataData Subscription data attributes requested in query result attributes same as above

4.1 Sample Queries

Following are the queries with examples.

Query#1 - Fetches all of the NF InstanceIds

Sample query: {apiRoot}/nrf-state-data/v1/nf-details

Sample response:
{
    "dataTimeStamp":"2020-11-24T15:55:48.000Z",
    "nfProfileDataCount":3,
    "nfProfileData":[{"nfInstanceId":"13515195-c537-4645-9b97-96ec797fbbbe","fqdn":"ocamf1.oracle.com"},
                     {"nfInstanceId":"23515195-c537-4645-9b97-96ec797fbbbe","fqdn":"ocpcf1.oracle.com"},
                     {"nfInstanceId":"33515195-c537-4645-9b97-96ec797fbbbe","fqdn":"ocudr1.oracle.com"}
                    ]

}
Query#2 - Fetches all of the NF InstanceIds along with requested additional result attributes

Sample query: {apiRoot}/nrf-state-data/v1/nf-details

Sample response:
{
    "dataTimeStamp":"2020-11-24T15:55:48.000Z",
    "nfProfileDataCount":3,
    "nfProfileData":[{"nfInstanceId":"13515195-c537-4645-9b97-96ec797fbbbe","fqdn":"ocpcf1.oracle.com","nfType":"PCF"}, 
                     {"nfInstanceId":"23515195-c537-4645-9b97-96ec797fbbbe","fqdn":"ocpcf2.oracle.com","nfType":"PCF"}, 
                     {"nfInstanceId":"33515195-c537-4645-9b97-96ec797fbbbe","fqdn":"ocudr1.oracle.com","nfType":"UDR"}
                    ]
} 
Query#3 - Fetches complete NF Profile based on NF Instance ID

Sample query: {apiRoot}/nrf-state-data/v1/nf-details?nf-instance-id=<NF Instance ID>

Sample response:
{
    "dataTimeStamp":"2020-11-24T15:55:48.000Z",
    "nfProfileDataCount":1,
    "nfProfileData":[{<< !!!!Complete NF Profile!!!! >>}]
}
Query#4 - Fetches NF Profile FQDN attribute value based on NF Instance ID

Sample query: {apiRoot}/nrf-state-data/v1/nf-details?nf-instance-id=<NF Instance ID>&result-attributes=fqdn

Sample response:
{
    "dataTimeStamp":"2020-11-24T15:55:48.000Z",
    "nfProfileDataCount":1,
    "nfProfileData":[{"nfInstanceId":"33515195-c537-4645-9b97-96ec797fbbbe","fqdn":"ocpcf1.oracle.com"}]
}
Query#5 - Fetches NF Services attribute of NF Profile based on NF Instance ID

Sample query: {apiRoot}/nrf-state-data/v1/nf-details?nf-instance-id=<NF Instance ID>&result-attributes=nfServices

Sample response:
{
    "dataTimeStamp":"2020-11-24T15:55:48.000Z",
    "nfProfileDataCount":1,
    "nfProfileData":[{"nfInstanceId":"33515195-c537-4645-9b97-96ec797fbbbe","nfServices":[{"<serviceInstanceId":"aaaa","serviceName":"ABC"},
                                                                                          {"<serviceInstanceId":"bbbb","serviceName":"XYZ"}]
                     }]
 }
Query#6 - Fetches complete NF Profile based on NF FQDN

Sample query: {apiRoot}/nrf-state-data/v1/nf-details?nf-fqdn=<NF FQDN>

Sample response:
{
    "dataTimeStamp":"2020-11-24T15:55:48.000Z",
    "nfProfileDataCount":1,
    "nfProfileData":[{<< !!!!Complete NF Profile!!!! >>}]
} 
Query#7 - Fetches NF Status attribute value of NF Profile based on NF Instance ID

Sample query: {apiRoot}/nrf-state-data/v1/nf-details?nf-instance-id=<NF Instance ID>&result-attributes=nfStatus

Sample response:
{
    "dataTimeStamp":"2020-11-24T15:55:48.000Z",
    "nfProfileDataCount":1,
    "nfProfileData":[{"nfInstanceId":"33515195-c537-4645-9b97-96ec797fbbbe","nfStatus":"Suspended"}]
}
Query#8 - Fetches NFInstance Id and its NF Status attribute value based on NF FQDN

Sample query: {apiRoot}/nrf-state-data/v1/nf-details?nf-fqdn=<NF FQDN>&result-attributes=nfStatus

Sample response:
{
    "dataTimeStamp":"2020-11-24T15:55:48.000Z",
    "count":3,
    "nfProfileData":[{"nfInstanceId":"13515195-c537-4645-9b97-96ec797fbbbe","nfStatus":"Suspended"}]
}
Query#9 - Fetches NF Profile details based on NF Status

Sample query: {apiRoot}/nrf-state-data/v1/nf-details?nf-status=<NF Status>&result-attributes=fqdn,nfType

Sample response:
{
    "dataTimeStamp": "2020-11-24T15:55:48.000Z",
    "nfProfileDataCount": 3,
    "nfProfileData": [{"nfInstanceId":"13515195-c537-4645-9b97-96ec797fbbbe", "fqdn":"ocpcf1.oracle.com", "nfType":"PCF"},
                      {"nfInstanceId":"23515195-c537-4645-9b97-96ec797fbbbe", "fqdn":"ocpcf2.oracle.com", "nfType":"PCF"},
                      {"nfInstanceId":"33515195-c537-4645-9b97-96ec797fbbbe", "fqdn":"ocudr1.oracle.com", "nfType":"UDR"}
                     ]
}
Query#10 - Fetches all of the subscriptions

Sample query: {apiRoot}/nrf-state-data/v1/subscription-details

Sample response:
{
    "dataTimeStamp": "2020-11-24T15:55:48.000Z",
    "subscriptionDataCount": 3,
    "subscriptionData": [{"subscriptionId": "a1c5600116e9403bb032b214d564b729"},
                         {"subscriptionId": "b1c5600116e9403bb032b214d564b729"},
                         {"subscriptionId": "c1c5600116e9403bb032b214d564b729"}
                      ]
}
Query#11- Fetches all of the subscriptions along with requested result attributes

Sample query: {apiRoot}/nrf-state-data/v1/subscription-details?result-attributes=reqNfFqdn,reqNfType

Sample response:
{
    "dataTimeStamp": "2020-11-24T15:55:48.000Z",
    "subscriptionDataCount": 3,
    "subscriptionData": [{"subscriptionId":"a1c5600116e9403bb032b214d564b729","reqNfFqdn":"amf1.oracle.com","reqNfType":"AMF"},
                         {"subscriptionId":"b1c5600116e9403bb032b214d564b729","reqNfFqdn":"pcf1.oracle.com","reqNfType":"PCF"},
                         {"subscriptionId":"c1c5600116e9403bb032b214d564b729","reqNfFqdn":"amf2.oracle.com","reqNfType":"UNKNOWN"}
                        ]
}
Query#12 - Fetches Subscription Data based on Subscription ID

Sample query: {apiRoot}/nrf-state-data/v1/subscription-details?subscription-id=<SUBSCRIPTION ID>

Sample response:
{
  "dataTimeStamp":"2020-11-24T15:55:48.000Z",
  "subscriptionDataCount":3,
  "subscriptionData":[<< !!!!Complete Subscription Data!!!!>>]
}
Query#13 - Fetches specific attributes of Subscription Data based on Subscription ID

Sample query: {apiRoot}/nrf-state-data/v1/subscription-details?subscription-id=<SUBSCRIPTION ID>&result-attributes=reqNfFqdn,reqNfType

Sample response:
{
    "dataTimeStamp": "2020-11-24T15:55:48.000Z",
    "subscriptionDataCount": 3,
    "subscriptionData": [{"subscriptionId":"a1c5600116e9403bb032b214d564b729","reqNfFqdn":"amf1.oracle.com","reqNfType":"AMF"},
                         {"subscriptionId":"b1c5600116e9403bb032b214d564b729","reqNfFqdn":"pcf1.oracle.com","reqNfType":"PCF"},
                         {"subscriptionId":"c1c5600116e9403bb032b214d564b729","reqNfFqdn":"amf2.oracle.com","reqNfType":"UNKNOWN"}
                        ]
} 
Query#14 - Fetches Subscription IDs based on nf-status-notification-uri

Sample query: {apiRoot}/nrf-state-data/v1/subscription-details?nf-status-notification-uri=<NF Status Notification URI>&result-attributes=reqNfFqdn,reqNfType

Sample response:
{
    "dataTimeStamp": "2020-11-24T15:55:48.000Z",
    "subscriptionDataCount": 2,
    "subscriptionData": [{"subscriptionId":"a1c5600116e9403bb032b214d564b729","reqNfFqdn":"amf1.oracle.com","reqNfType":"AMF"},
                         {"subscriptionId":"b1c5600116e9403bb032b214d564b729","reqNfFqdn":"UNKNOWN","reqNfType":"PCF"}
                        ]
}