Versions Compared

Key

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

...

Expand
titleAPI details



UsecaseREST MethodURI
1Add a data resource for a cmHandlePOST

{dmiRoot}/dmi/v1/ch/<cmhandle>/data/ds/ncmp-datastore:running/{parentDataResourceIdentifier}

{
<new-yang-data-resource>
}

Content-Type: application/json

"data" payload : yang-data+json

2Delete a data resource for a cmHandlePUT{dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:running/{resourceIdentifier}
3Patch a data resource for a cmHandlePATCH

{dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:running/{resourceIdentifier}

{
<yang-data-for-merging>
}

Content-Type: application/json

"data" payload : yang-data+json

4Patch multiple child resources for a single cmHandlePATCH

{dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/<dsName>/{resourceIdentifier}


Content-Type: application/json

"data" payload : yang-patch+json

5Execute a yang action on a cmhandle instancePOST

{dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:operational/{resourceIdentifier}/{action}


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

}


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

6Execute an rpc operationPOST

{dmiRoot}/dmi/v1/operations/ch/<cmHandle>/ds/ncmp-datastore:operational/ {module-name}:{action}

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

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

7Read a filtered set of data under a data resource for a cmHandlePUT

{dmiroot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:operational/{resourceIdentifier}?fields={fields-expression}

OptionDescription
fieldsRequest a subset of the target
resource contents


8Read data resources with specified fields under a given data resource for a given cmHandlePUT

{dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:operational/{resourceIdentifier}?fields={fields-expression}


OptionDescription
fieldsRequest a subset of the target
resource contents


9Get data resource with 'fileds' for a cmhandle with a given scope conditionPUT{dmiRoot}/dmi/v1/ch/{cmHandle}/data/ds/ncmp-datastore:operational/{resourcepath}?fields={fields}&scope={scope}
10Read descendant nodes to a given depth for a given cmHandlePUT

{dmiRoot}/dmi/v1/ch/{cmHandle}/data/ds/ncmp-datastore:operational/{resourceIdentifier}?depth={level}


OptionDescription
depthRequest limited sub-tree depth in
the reply content
If '1' then only immediate resource
is retrieved
If '2' then resource plus next level
resources are retrieved


11Replace data for a CMHandlePUT

{dmiRoot}/dmi/v1/ch/<cmHandle>/data/ds/ncmp-datastore:running/{resourceIdentifier}

{data : {

            .... the complete tree config to be replaced

      }}


...

Expand
titleAPI Details

*For response output, where applicable the yang-library format and conventions are used 'as is'  or extended

dmiPlugindmiPlugin
#Use CaseRest MethodServiceURIExample*
1

Get module set for a cmhandle


POST{dmiRoot}/dmi/v1/ch/cmhandle-001/modules

Header :
Content-Type: application/json


Code Block
languagexml
titleRequest Body
{
  "operation": "read",
    "cmHandleProperties ": {
      "subSystemId": "system-001"
    }
  }
}

Code Block
languagexml
titleResponse Body

Response:  
     "schemas": [
                    {
                      "moduleName": "example-identifier",
                      "revision": "example-version",
                      "namespace": "example-namespace"
                    },
					{
						...
					}
                  ]
                }

2Get yang module source for a list of modulesPOST

{dmiRoot}/dmi/v1/ch/<cmHandle>/moduleSources


DMI Plugin will make multiple requests to xNF and combine the result in a list


Code Block
languagexml
titleRequest Body
{
  "operation": "read",
	"dataType": "application/json",
    "data": {
       "modules": [
        {
          "name": "pnf-sw-upgrade",
          "revision": "2019-12-03"
        }
      ]
    },
    "cmHandleProperties": {
      "subSystemId": "system-001"
    }
}


Response: a list yang module references and source for each

Code Block
languagexml
titleResponse Body
[ {
"name" : "pnf-sw-upgrade",
"revision" : "2019-12-03",
"yang-source": "some-source", {...} ]



GET Request with body


The HTTP libraries of certain languages (notably JavaScript) don’t allow GET requests to have a request body. In fact, some users are surprised that GET requests are ever allowed to have a body.

...