Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

<OP>/ncmp/<v{v-number}>/ch/<cm-handle>/<data|operations|{ncmp-operationaction}>/ds/{datastore}/[rp:]{resource-path}?{query}

URI
Mandatory or Optional
<OP>the HTTP methodMandatory
ncmp /the ncmp root resourceMandatory
<v{v-number}>version of the ncmp interface <path> is the target resource URI <query> is the query parameter listMandatory
ch/<cm-handle>unique (string) identifier of a yang tree instance.Optional
<data|operations|{ncmp-action}>request category - yang data, rpc operation or a (non-modelled) ncmp api action. this could be data, operations or ncmp-action (e.g. 'sync-data')Mandatory
ds/{datastore}optional datastoreOptional
<resource-path>the path expression identifying the resource that is being accessed by the operation. If this field is not present, then the target resource is the API itself.Optional
<query>

the set of parameters associated with the RESTCONF message; see Section 3.4 of [RFC3986]. RESTCONF parameters have the familiar form of "name=value" pairs. Most query parameters are optional to implement by the server and optional to use by the client. Each optional query parameter is identified by a URI

Optional

...

Expand


#Req/usecase

REST

Method

 URI / Payload

Request/Response ExampleStatusRelease I
1

Async read of a data resource getting
specific fields from ncmp-datastores:
passthrough-running for a given
cmHandle

GET

{ncmp-root}/ncmp/v1/ch/<cm-handle>/{dataresource-identifier}?fields={fields}&topic={topicId}


Note 'topic' and 'fields' are only supported in passthrough mode at this time (ONAP Release I). If not passthrough then an exception is thrown from NCMP at this time.
Accept : application/json
Always return the yang-data+json in the "data" event payload

The ONAP plugin (for initial inventory) may need an ODL mountpoint which will be created outside CPS and DMI plugin


Scenario : Read the GNBCUCPFunction for cm-handle "335ff" as passthrough

Method  : GET

URI         : {ncmp-root}/ncmp/v1/ch/335ff/data/ds/GNBCUCPFunction?fields=pLMNId;gNBId;gNBIdLength;syncStatus&topic=anr-app:anr24234234:v2

OR

{ncmp-root}/ncmp/v1/ch/335ff/data/ds/ncmp-datastores:passthrough-running?fields=_3gpp-common-managed-element:ManagedElement/_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction(pLMNId;gNBId;gNBIdLength)&topic=anr-app:anr24234234:v2

Header :
      Accept: application/yang-data+json

Response :
{
responseId : 323234
}

Event Response:

  {
"requestId" : "dd3434",
"data" : {
"_3gpp-common-managed-element:ManagedElement" : [
{
"id"="Kista-001",
? _3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction : [
{
"id"="1",
"attributes" : {
"pLMNId : [ { "mcc" : "01", "mnc" : "123" }],
"gNBId" : 123,
"gNBIdLength" : 3
}
}
]
}
]
}
}

passthrough-running is supported in Istanbul using

  • RestConf Path only
  • ?fields implemented by SDNC/Node
  • ?topic implemented by DMI plugin


Note 'topic' and 'fields' are only supported in passthrough mode at this time (ONAP Release I). If not passthrough then an exception is thrown from NCMP at this time.

Always return the yang-data+json in the "data" event payload

yes
2

Read of a data resource getting specific
fields for a given cmHandle

GET

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier}?fields={fields}

Scenario : 

Method: GET

URI         :  {ncmp-root}/ncmp/v1/ch/335ff/data

Header :
      Accept: application/json

Response:

HTTP/1.1 200 OK
Date: Thu, 26 Apr 2021 20:56:30 GMT
Server: example-server
Content-Type: application/yang-data+json
{
}

passthrough-running is supported in Istanbul using

  • RestConf Path only
  • ?fields implemented by SDNC/Node
  • ?topic implemented by DMI plugin

3

Read a  data resource directly from 
source (passthrough) for a cmHandle.  Only return specific field(s).

Synchronous call

GET

{ncmp-root}/ncmp/v1/data/ch/{data-resource-identifier}?fields={fields}


Accept: application/yang-data+json

Scenario : Read the 

Method  : GET

URI         :{ncmp-root}/ncmp/v1/ch/335ff/data

Header :
      Accept: application/yang-data+json

Response:

HTTP/1.1 200 OK 
Date: Thu, 26 Apr 2021 20:56:30 GMT 
Server: example-server 
Content-Type: application/yang-data+json

{
}

passthrough-running is supported in Istanbul using

  • RestConf Path only
  • ?fields implemented by SDNC/Node
  • ?topic implemented by DMI plugin
Yes
4Create a data resource for a cmhandlePOST

cmp-root}/ncmp/v1/ch/<cm-handle>/data/{parent-data-resource-identifier}


     <new-yang-data-resource>
}    

Scenario : Create 

Method  : POST 

URI     : {ncmp-root}/ncmp/v1/ch/34l5k32/data/

Header :
      Content-Type: application/yang-data+json

Body :


passthrough-running is supported in Istanbul using 

  • RESTConf Path only


ncmp-datastores:running is not supported in Istanbul


5

Update a data resource for a cmhandle with plain-patch update

PATCH

{ncmp-root}/ncmp/v1/ch/<cmhandle>/data/{data-resource-identifier}

{
<updated-yang-data-resource>
}

Content: application/yang-data+json

Behaves as a merge - merge with existing if it exists or create if it does not exist.

Scenario :

Method  : PATCH

URI        :{ncmp-root}/ncmp/v1/ch/34l5k32/data/

Header :
      Content-Type: application/yang-data+json

Body :

{
}

NOTE : If not passthrough then ALL attributes MUST be supplied for the patch at this time. Otherwise, other attributes are removed from CPS.

passthrough-running is supported in Istanbul using 

  • RESTConf Path only

ncmp-datastores:running is not supported in Istanbul

this will be treated as a merge


6Update a data resource with multiple
edits for a cmhandle with yang-patch
update
PATCH

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier}

{
<updated-yang-data-resource>
}

Content: application/yang-data+json

If using yang-patch content then ds/ncmp-datastore-passthrough-running mus be used by rad apps until full
support is available from NCMP/CPS

Scenario : Update _3gpp-common-managed-element:ManagedElement=Kista-001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1 with multiple operations on the tree

Method : PATCH

Header :
Content-Type: application/yang-patch+json

Body :

{
"ietf-restconf:yang-patch" : {
"patch-id" : "change-cell-and-carriers",
"edit" : [
{
"edit-id" : 1,
"operation" : "create",
"target" : "/_3gpp-nr-nrm-nrcelldu:NRCellDU=1",
"value" : {
"_3gpp-nr-nrm-nrcelldu:NRCellDU" : {
"id" : 1,
"cId" : 511,
"userLabel" : "some-cell-label",
...
}
}
},
{
"edit-id" : 2, "operation" : "create",
"target" : "/_3gpp-nr-nrm-nrcelldu:NRCellDU=2",
"value" : {
"_3gpp-nr-nrm-nrcelldu:NRCellDU" : {
"id" : 2,
"cId" : 512,
"userLabel" : "some-other-cell-label",
...
}
}
},
{
"edit-id" : 3,
"operation" : "merge",
"target" : "/_3gpp-nr-nrm-nrcelldu:NRCellDU=3",
"value" : {
"_3gpp-nr-nrm-nrcelldu:NRCellDU" : {
"cId" : 412,
"userLabel" : "yet-another-cell-label",
...
}
}
},
{
"edit-id" : 4,
"operation" : "merge",
"target" : "_3gpp-nr-nrm-nrcelldu:NRCellDU=4",
"value" : {
"_3gpp-nr-nrm-nrcelldu:NRCellDU" : {
"cId" : 412,
"userLabel" : "yet-another-cell-label",
...
}
}
}
]
}
}
Response :
HTTP/1.1 200 OK
Date: Thu, 26 Jan 2017 20:56:30 GMT
Server: example-server
Last-Modified: Thu, 26 Jan 2017 20:56:30 GMT
Content-Type: application/yang-patch+json
{
"ietf-yang-patch:yang-patch-status" : {
"patch-id" : "change-cell-and-carriers",
"ok" : [null]
}
}

NOTE : Passthrough only. Not supported in ONAP Release I.


7

Delete a data resource for a cmhandle

DELETE

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier}

Scenario: Delete 

Method : DELETE

URI : {ncmp-root}/ncmp/v1/ch/34l5k32/data/

Header :
Accept: application/json
Body : {}

passthrough-running is supported in Istanbul using 

  • RESTConf Path only


ncmp-datastores:running is not supported in Istanbul for delete


8Get all cmhandles that support a given
module
GET{ncmp-root}/ncmp/v1/data/ch?module={module-name}
Content: application/json

Scenario : Get the all cmhandles that support a given module
Method : GET
URI : {ncmp-root}/ncmp/v1/data/ch?module=_3gpp-nr-nrm-gnbdufunction
Header :
Accept: application/json

Response:
{
cm-handles : [ "ew534fe", "23ft4", "434fsdf", ... ]
}



9

Get model info for CMHandle

GET

{ncmp-root}/ncmp/v1/ch/{cm-handle}/data/ietf-yang-library:modules-set

Scenario : Get the model data for CMHandle

Method  : GET

URI          :{ncmp-root}/ncmp/v1/ch/2334dedf/data/ietf-yang-library:modules-set

Header :
      Accept: application/yang-data+json

Response:

{
"ietf-yang-library:modules-set" : [ # from RFC 8525
{
"name" : "5479120c17a619545ea6aff7aa19838b036ebbd7",
"module" : [
{
"name" : "_3gpp-nr-nrm-nrsectorcarrier",
"revision" : "2020-12-09",
"namespace" : "urn:3gpp:sa5:_3gpp-nr-nrmnrnetwork-nrsectorcarrier",
"location" : "http://emsadapter.com/modules/_3gppnr-nrm-nrsectorcarrier",
"submodule" : [
{
"name" : "xxxx-module",
"revision" : "2020-12-17",
"namespace" : "urn:3gpp:sa5:xxx-module",
"submodule" : [
{
...
}
]
}
]
},
{
"name" : "ietf-yang-library",
"revision" : "2016-06-21",
"namespace" : "urn:ietf:params:xml:ns:yang:ietfyang-library"
}
]
}

passthrough-running is supported in Istanbul using

  • RestConf Path only
  • ?fields implemented by SDNC/Node
  • ?topic implemented by DMI plugin


ncmp-datastores:running is not supported in Istanbul for delete


10

Execute a yang action

POST

{ncmp-root}/ncmp/v1/ch/<cm-handle>/data/ds/ncmp-datastores:passthrough-running/{data-resource-identifier}/{action}
{
    input: {
                  "param1Name" : "param1Value”,
                  "param2Name" : "param2Value”
             }
}

Note : If the "action" statement 
has no "input" section, the  request 
message MUST NOT include a message-body


Method  : POST 

URI         :  {ncmp-root}/ncmp/v1/ch/3445fff/data/ds/ncmp-datastores:passthrough-operational/

Header :
      Content-Type: application/yang-data+json

Body :


passthrough-running is supported in Istanbul using 

  • RESTConf Path only


ncmp-datastores:running is not supported in Istanbul


11

Execute an rpc operation

POST

{ncmp-root}/ncmp/v1/operations/ch//operations /ds/ncmp-datastores :passthrough-operational/{module-name}:{action}

{  
    input: {
                  "param1Name" : "param1Value”,
                  "param2Name" : "param2Value”
             }
}

Note : If there is no "input" 
section, the  request MUST NOT include a 
message-body


Method  : POST 

URI : {ncmp-root}/ncmp/v1/operations/ch/3445fff/ds/ncmp-datastores:passthrough-operational/_3gpp-common-managed-element:resetDevice (dummy action)

Header :
      Content-Type: application/yang-data+json

Body :
{
     "input" : {
           "param1Name" : "param1Value”,
           "param2Name" : "param2Value”
    }
}


Response :
HTTP/1.1 200 OK Date: Thu, 26 Jan 2017 20:56:30 GMT Server: example-server
Content-Type: application/yang-data+json

passthrough-running is supported in Istanbul using 

  • RESTConf Path only


ncmp-datastores:running is not supported in Istanbul


12

Read descendant data resources with 
specified fields under a  given data 
resource for a given cmHandle

GET

{ncmp-root}/ncmp/v1/ch/<cm-handle>/{data-resource-identifier}?fields={fields-expression}

options 

OptionDescription
fieldsRequest a subset of the target
resource contents


Scenario : Read all NRCellDU MOs with attributes userLabel and id under the _3gpp-nr-nrm-gnbdufunction:GNBDUFunction MO

Method  : GET

URI         :{ncmp-root}/ncmp/v1/ch/3445fff/data/ManagedElement[@id=Kista-001]
/GNBCUCPFunction[@id=1]?fields=_3gpp-nr-nrm-nrcelldu:NRCellDU/attributes
(administrativeState;operationalState)

Header :
      Accept : application/yang-data+json

Response :

      HTTP/1.1 200 OK
      Date: Thu, 26 Jan 2017 20:56:30 GMT
      Server: example-server
      Content-Type: application/yang-data+json

      {
       _3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1 {

                                       _3gpp-nr-nrm-nrcelldu:NRCellDU=1 {
                                           "top3gpp:id" : "NR-Cell-001"
                                           "attributes" : {
                                                  "administrativeState " : "LOCKED",
                                                  "operationalState" : "disabled"
                                           }
                                        },
                                        _3gpp-nr-nrm-nrcelldu:NRCellDU=2 {
                                           "top3gpp:id" : "NR-Cell-002"
                                           "attributes" : {
                                                  "administrativeState " : "LOCKED",
                                                  "operationalState" : "disabled"
                                           }
                                        },  
                                         _3gpp-nr-nrm-nrcelldu:NRCellDU=3 {
                                           "top3gpp:id" : "NR-Cell-003"
                                            "attributes" : {
                                                  "administrativeState " : "LOCKED",
                                                  "operationalState" : "disabled"
                                           }
                                        },  

                                        _3gpp-nr-nrm-nrcelldu:NRCellDU=4 {
                                           "top3gpp:id" : "NR-Cell-004"
                                           "attributes" : {
                                                  "administrativeState " : "LOCKED",
                                                  "operationalState" : "disabled"
                                           }
                                        },  

                                        _3gpp-nr-nrm-nrcelldu:NRCellDU=5 {
                                           "top3gpp:id" : "NR-Cell-005"
                                           "attributes" : {
                                                  "administrativeState " : "LOCKED",
                                                  "operationalState" : "disabled"
                                           }
                                        }
                              }
                    }

passthrough-running is supported in Istanbul using

  • RestConf Path only
  • ?fields implemented by SDNC/Node
  • ?topic implemented by DMI plugin

13

Read data resources to a given depth 
for a given cmHandle

POST

{ncmp-root}/ncmp/v1/ch/<cm-handle>{data-resource-identifier}?depth={level}


OptionDescription
depthRequest limited sub-tree depth
in the reply content
If '1' then only immediate data
resource is retrieved
If 'x' then x levels of data tree
are retrieved
'unbounded' will get the full tree
starting at the given dataresource-identifier



Method  : POST

URI         : {ncmp-root}/ncmp/v1/ch/3445fff/ManagedElement[@id=Kista-001]/GNBDUFunction[@id=1]?depth=4

Header :
      Content-Type: application/yang-data+json
      Accept : application/yang-data+json

Body:

Response :

      HTTP/1.1 200 OK
      Date: Thu, 26 Jan 2017 20:56:30 GMT
      Server: example-server
      Content-Type: application/yang-data+json
 
      {
         _3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1 {  
# level 1

                                       _3gpp-nr-nrm-nrsectorcarrier:
NRSectorCarrier=1 {     # level 2
                                           "top3gpp:id" : "NRSectorCarrier-1",  # level 3
                                           "attributes" : {                                    # level 3
                                                  "txDirection" : "DL_AND_UL",     # level 4
                                                  "arfcnUL" : "55555",                    # level 4
                                                   ...
                                           }
                                        },  
                                       _3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier=2 {
                                           "top3gpp:id" : "NRSectorCarrier-2",
                                           "attributes" : {
                                                  "txDirection" : "DL_AND_UL",
                                                  "arfcnUL" : "66666".
                                                   ...
                                           }
                                        },  

                                       _3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier=3{
                                           "top3gpp:id" : "NRSectorCarrier-3",
                                           "attributes" : {
                                                  "txDirection" : "DL_AND_UL",
                                                  "arfcnUL" : "77777".
                                                   ...
                                           }
                                        },  

                                       _3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier=4 {
                                           "top3gpp:id" : "NRSectorCarrier-4",
                                           "attributes" : {
                                                  "txDirection" : "DL_AND_UL",
                                                  "arfcnUL" : "88888".
                                                   ...
                                        },

                                     _3gpp-nr-nrm-nrcelldu:NRCellDU=1 {
                                           "top3gpp:id" : "NR-Cell-001"
                                           "attributes" : {
                                                  "administrativeState " : "LOCKED",
                                                  "operationalState" : "disabled"
                                                   ...
                                           }
                                        },
                                        _3gpp-nr-nrm-nrcelldu:NRCellDU=2 {
                                           "top3gpp:id" : "NR-Cell-002"
                                           "attributes" : {
                                                  "administrativeState " : "LOCKED",
                                                  "operationalState" : "disabled"
                                                   ...
                                           }
                                        },  
                                         _3gpp-nr-nrm-nrcelldu:NRCellDU=3 {
                                           "top3gpp:id" : "NR-Cell-003"
                                            "attributes" : {
                                                  "administrativeState " : "LOCKED",
                                                  "operationalState" : "disabled"
                                                   ...
                                           }
                                        },  

                                        _3gpp-nr-nrm-nrcelldu:NRCellDU=4 {
                                           "top3gpp:id" : "NR-Cell-004"
                                           "attributes" : {
                                                  "administrativeState " : "LOCKED",
                                                  "operationalState" : "disabled"
                                                   ...
                                           }
                                        },  

                                        _3gpp-nr-nrm-nrcelldu:NRCellDU=5 {
                                           "top3gpp:id" : "NR-Cell-005"
                                           "attributes" : {
                                                  "administrativeState " : "LOCKED",
                                                  "operationalState" : "disabled"
                                                   ...
                                           }
                                        }
              }
         }

passthrough-running is supported in Istanbul using 

  • RESTConf Path only


ncmp-datastores:running is not supported in Istanbul


14

Replace a data resource for a cmhandle

PUT

ncmp-root}/ncmp/v1/ch/<cm-handle>/data/{data-resource-identifier}

{

<yang-data-resource-identifier>

}

Scenario : Replace _3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier=4 txDirection
to "DL_AND_UL" under _3gpp-common-managed-element:ManagedElement=Kista001/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1 - removes all config params not specified including sub-tree if one exists

Method  : PUT

URI         : {ncmp-root}/ncmp/v1/ch/34l5k32/data/ManagedElement[@id=Kista-001]
/GNBDUFunction[@id=1]/NRSectorCarrier[@id=4]

Header :
      Accept : application/yang-data+json

Body :

{
            _3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier" : {
                 "id" : 4
                  "attributes" : {
                          "txDirection" : "DL_AND_UL"
          }
     }
}

passthrough-running is supported in Istanbul using 

  • RESTConf Path only


ncmp-datastores:running is not supported in Istanbul


15

Async Requests

GET/
POST/
PATCH
/PUT/
DELETE

{ncmp-root}/ncmp/v1/ch/<cmhandle>/data/ds/ncmp-datastores:passthrough-running/ {xpath}?topic=<dmaap-topic-Identifier>

**Async communication channel is DMaaP

Immediate response with a requestId is sent to the caller and the CRUD request is executed asynchronously where data is returned via the provided topic identifier.

Scenario : Async request to NCMPMethod : GET/POST/PATCH/PUT/DELETE

URI : {ncmp-root}/ncmp/v1/ch/de3455/data/ManagedElement[@id=Kista-001]/GNBDUFunction[@id=1]?topic=5G:SectorCarrierOrchestrator-0012391:12

Body :    //  Include body where required
{
       ....
}

Response   :
{
     "requestId" : "<some-requestId>"
}

response data is published on the topic identified by <topicIdentifier> keyed on request.


Event Successful Reponse :
{
"requestId" : "dd3434",
"data" : { # Example is for a GET with Accept:
application/yang-data+json
_3gpp-nr-nrm-gnbdufunction:GNBDUFunction=1 {
_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier=1 {
attributes {
"txDirection" : "DL_AND_UL",
"arfcnUL" : "55555"
}
},
_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier=2 {
attributes {
"txDirection" : "DL_AND_UL",
"arfcnUL" : "66666"
}
},
_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier=3{
attributes {
"txDirection" : "DL_AND_UL",
"arfcnUL" : "77777"
},
_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier=4 {
attributes {
"txDirection" : "DL_AND_UL",
"arfcnUL" : "88888"
}
}
}
}
}
}
Event Fails Reponse :
{
"requestId" : "dd3434",
"ietf-restconf:errors" : {
"error" : [
{
"error-type" : "protocol",
"error-tag" : "unknown-element",
"error-path" : "ManagedElement[@id=Kista-001]
/GNBDUFunction[@id=1]"
"error-message" : "Data resource does not exist"
}
]
}
}


16Request (trigger) Data SyncGETPOST

{ncmp-root}/ncmp/v1/ch/node123<ch-handle>/operations/sync-data

Scenario : Client requests to sync a nodeMethod : GET

URI : {ncmp-root}/ncmp/v1/ch/node123/operations/sync-data

Response   :
{
    TBC (see open issue #29)
}HTTP-Status code (only, no body)


Yes



NCMP / DMI Overview

Expand

draw.io Diagram
bordertrue
diagramNameNCMP Northbound REST API
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth971
revision8

...