Update NF Information
/{versionId}/inventory/nfMgmt/nfs/{nfId}/groups/{groupId}
Request
Response
200 Response
400 Response
401 Response
404 Response
Examples
Examples of Accessing the API
See Authenticate for how to acquire a session cookie.
The following example shows how to update NF information using curl.
curl -X PUT \
-b sessionid.txt \
-d@request.xml \
--header "Accept: application/xml" \
--header "Content-Type: application/xml" \
"https://example.com:8443/rest/v1.3/inventory/nfMgmt/nfs/ID8/groups/ID8"
The following example shows how to update NF information using Python.
import requests
from lxml import etree
url = "https://example.com:8443/rest/v1.3/inventory/nfMgmt/nfs/ID8/groups/ID8"
headers = { "Accept":"application/xml", "Content-Type: application/xml", "Cookie":cookie }
data = etree.tostring(etree.parse("request.json"))
resp = requests.put(url, headers=headers, data=data)
Example of the Request Body
The following example shows the contents of the request body in XML.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deviceGroup>
<fullName>testGrp_REST/10.5.5.154</fullName>
<id>ID24</id>
<name>SD154</name>
<parameters>
<name>snmp.community.name</name>
<value>jvbharad</value>
</parameters>
<parentGroupFullName>DevGrp_REST_updated</parentGroupFullName>
<parentGroupId>ID7</parentGroupId>
<type>DEVICE</type>
</deviceGroup>
The following example shows the contents of the request body in JSON.
{
"fullName": "Home/sd177updated",
"id": "ID13",
"name": "sd1771updated",
"parameters": {
"name": "snmp.community.name",
"value": "public"
},
"parentGroupFullName": "Home",
"parentGroupId": "ID1",
"type": "DEVICE"
}
Example of the Response Body
The following example shows the contents of the response body in XML.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deviceGroup>
<fullName>DevGrp_REST_updated/sd157</fullName>
<id>ID8</id>
<isHidden>false</isHidden>
<name>sd157</name>
<parameters>
<description>User name to use for device communication</description>
<name>username</name>
<readOnly>false</readOnly>
<value>admin</value>
</parameters>
<parameters>
<description>Password of the user</description>
<name>password</name>
<readOnly>false</readOnly>
<value>xxxx</value>
</parameters>
<parameters>
<description>The SNMP agent mode configured for the device</description>
<name>snmp.mode</name>
<readOnly>true</readOnly>
<value>v1v2</value>
<validLists>
<valueList>v1v2</valueList>
<valueList>v3</valueList>
</validLists>
</parameters>
<parameters>
<description>SNMP Community to use for device communication</description>
<name>snmp.community.name</name>
<readOnly>false</readOnly>
<value>jvbharad</value>
</parameters>
<parameters>
<description>SNMP Port to use for device communication</description>
<maxValue>9223372036854775807</maxValue>
<minValue>0</minValue>
<name>snmp.port</name>
<readOnly>false</readOnly>
<value>161</value>
</parameters>
<parentGroupFullName>DevGrp_REST_updated</parentGroupFullName>
<parentGroupId>ID7</parentGroupId>
<type>DEVICE</type>
</deviceGroup>
The following example shows the contents of the response body in JSON.
{
"fullName": "Home/sd177",
"id": "ID13",
"isHidden": "false",
"name": "sd177",
"parameters": [{
"description": "User name to use for device communication",
"name": "username",
"readOnly": false,
"value": "admin"
},{
"description": "Password of the user",
"name": "password",
"readOnly": false,
"value": "xxxx"
},{
"description": "The SNMP agent mode configured for the device",
"name": "snmp.mode",
"readOnly": true,
"value": "v1v2",
"validLists": {
"valueList": [
"v1v2",
"v3"
]
}
},{
"description": "SNMP Community to use for device communication",
"name": "snmp.community.name",
"readOnly": false,
"value": "public"
},{
"description": "SNMP Port to use for device communication",
"maxValue": 9223372036854775807,
"minValue": 0,
"name": "snmp.port",
"readOnly": false,
"value": "161"
}
],
"parentGroupFullName": "Home",
"parentGroupId": "ID1",
"type": "DEVICE"
}
Example of Updating a 2FA Device
This example shows updating a 2FA device using this API.
An example XML request body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deviceGroup>
<fullName>Home/sd66</fullName>
<id>ID43</id>
<name>sd66</name>
<parameters>
<name>2faStatus</name>
<value>enabled</value>
</parameters>
<parameters>
<name>keyId</name>
<value>ID7</value>
</parameters>
<parameters>
<name>passphrase</name>
<value>abcd1234!</value>
</parameters>
<parentGroupFullName>Home</parentGroupFullName>
<parentGroupId>ID1</parentGroupId>
<type>DEVICE</type>
</deviceGroup>
An example JSON request body:
{
"fullName": "Home/sd66",
"id": "ID43",
"name": "sd66",
"parameters": [{
"name": "snmp.community.name",
"value": "sdm103"
},
{
"name": "2faStatus",
"value": "enabled"
},
{
"name":"keyId",
"value":"ID8"
},
{
"name":"passphrase",
"value":"abcd1234!"
}
],
"parentGroupFullName": "Home",
"parentGroupId": "ID1",
"type": "DEVICE"
}
An example XML response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deviceGroup>
<fullName>Home/sd66</fullName>
<id>ID43</id>
<isHidden>false</isHidden>
<name>sd66</name>
<parameters>
<description>User name to use for device communication</description>
<name>username</name>
<readOnly>false</readOnly>
<value>admin</value>
</parameters>
<parameters>
<description>Password of the user</description>
<name>password</name>
<readOnly>false</readOnly>
<value>xxxx</value>
</parameters>
<parameters>
<description>The SNMP agent mode configured for the device</description>
<name>snmp.mode</name>
<readOnly>true</readOnly>
<value>v1v2</value>
<validLists>
<valueList>v1v2</valueList>
<valueList>v3</valueList>
</validLists>
</parameters>
<parameters>
<description>SNMP Community to use for device communication</description>
<name>snmp.community.name</name>
<readOnly>false</readOnly>
<value>sdm103</value>
</parameters>
<parameters>
<description>SNMP Port to use for device communication</description>
<maxValue>9223372036854775807</maxValue>
<minValue>0</minValue>
<name>snmp.port</name>
<readOnly>false</readOnly>
<value>161</value>
</parameters>
<parameters>
<description>2FA status on device</description>
<name>2faStatus</name>
<readOnly>false</readOnly>
<value>enabled</value>
<validLists>
<valueList>enabled</valueList>
<valueList>disabled</valueList>
</validLists>
</parameters>
<parameters>
<name>keyFile</name>
<readOnly>false</readOnly>
<value>/home/nncentral/SDM904B31/AcmePacket/NNCArchive/2FAArchive/sd66_privateKey_N17</value>
</parameters>
<parameters>
<name>passphrase</name>
<readOnly>false</readOnly>
<value>abcd1234!</value>
</parameters>
<parameters>
<name>keyId</name>
<readOnly>false</readOnly>
<value>ID7</value>
</parameters>
<parentGroupFullName>Home</parentGroupFullName>
<parentGroupId>ID1</parentGroupId>
<type>DEVICE</type>
</deviceGroup>
An example JSON response:
{
"fullName": "Home/sd66",
"id": "ID43",
"isHidden": "false",
"name": "sd66",
"parameters": [
{
"description": "User name to use for device communication",
"name": "username",
"readOnly": false,
"value": "admin"
},{
"description": "Password of the user",
"name": "password",
"readOnly": false,
"value": "xxxx"
},{
"description": "The SNMP agent mode configured for the device",
"name": "snmp.mode",
"readOnly": true,
"value": "v1v2",
"validLists": {
"valueList": [
"v1v2",
"v3"
]
}
},{
"description": "SNMP Community to use for device communication",
"name": "snmp.community.name",
"readOnly": false,
"value": "sdm103"
},{
"description": "SNMP Port to use for device communication",
"maxValue": 9223372036854775807,
"minValue": 0,
"name": "snmp.port",
"readOnly": false,
"value": "161"
},{
"description": "2FA status on device",
"name": "2faStatus",
"readOnly": false,
"value": "enabled",
"validLists": {
"valueList": [
"enabled",
"disabled"
]
}
},{
"name": "keyFile",
"readOnly": false,
"value": "/home/nncentral/SDM904B31/AcmePacket/NNCArchive/2FAArchive/sd66_privateKey"
},{
"name": "passphrase",
"readOnly": false,
"value": "abcd1234!"
},{
"name": "keyId",
"readOnly": false,
"value": "ID8"
}
],
"parentGroupFullName": "Home",
"parentGroupId": "ID1",
"type": "DEVICE"
}