Accessing NF Resources

Perform the following procedure to access NF Resources:

To access NF Resources, you must use the access token in every request to an NF resource by placing it in the Authorization header.

The following headers are to be included while sending API request:

  • Authorization : The access token should be used in every request to a NF resource by placing it in the Authorization header
  • oc-cncc-id : M-CNCC uses the oc-cncc-id header to find the agent or master owning the instance.
  • oc-cncc-instance-id : A-CNCC Core (or M-CNCC Core ) uses the oc-cncc-instance-id header to find the NF instance for routing.

Using CNC Console IAM API, the following headers need to be passed in curl/postman request while accessing NF resource:

curl --location --request GET 'http://${cncc-mcore-ingress-external-ip}:${cncc-mcore-ingress-service-port}/<NF API URI>' \
 
--header 'oc-cncc-id: oc-cncc-id value' \
 
--header 'oc-cncc-instance-id: oc-cncc-instance-id value' \
 
--header 'Authorization: Bearer <token>'

Example: Using SCP Canary Release API, the following headers need to be passed in curl/postman request while accessing NF resource:

curl --location --request GET 'http://${cncc-mcore-ingress-external-ip}:${cncc-mcore-ingress-service-port}/ocscp/scpc-configuration/v1/canaryrelease ' \
 
--header 'oc-cncc-id: Cluster1' \
 
--header 'oc-cncc-instance-id: Cluster1-scp-instance1' \
 
--header 'Authorization: Bearer <token>'