Add a configuration element
post
/rest/{versionId}/configuration/deviceConfigs/{deviceId}/configElements/add
Use this (POST) method to add a configuration element to a targeted device configuration. The element is added to the SDM database and is not pushed to the device until a device action is initiated. Refer to the Perform a Device Action (POST) method for more information.
Request
Supported Media Types
- application/xml
- application/json
Path Parameters
Response
200 Response
successful operation
400 Response
The user input is invalid.
401 Response
The session ID is invalid.
404 Response
The object (resource URI, device, and so on) of your input request cannot be found.
Examples
The following example shows how to add a configuration element by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL
Example of cURL Data
The following shows an example of cURL data sent with the request.
curl -v -b sessionid.txt -X POST -d@config/addRealmConfigElement.xml -H"Content-Type: application/xml" -H"Accept: application/xml" http://localhost:8080/rest/v1.1/configuration/deviceConfigs/ID9/configElements/add
Example of Request Body
The following shows an example of the user request body input in XML format.
<?xml version="1.0" encoding="UTF-8"?> <configElement> <elementTypePath>realmConfig</elementTypePath> <attributes> <attribute> <name>id</name> <value>flung-realm-1</value> </attribute> </attributes>" <childrenElements> <childrenElement> <elementTypePath>realmConfig/networkInterfaceId</elementTypePath> <attributes> <attribute> <name>name</name> <value>M00</value> </attribute> <attribute> <name>subPortId</name> <value>5</value> </attribute> <attribute> <name>family</name> <value>4</value> </attribute> </attributes> </childrenElement> </childrenElements> </configElement>
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Date: Mon, 11 Sep 2017 21:01:31 GMT Server: Apache X-Frame-Options: SAMEORIGIN Content-Length: 6256 Vary: Accept-Encoding Content-Type: application/xml
Example of Response Body
The following example shows the contents of the response body in XML format.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <configElement> <attributes> <attribute> <name>outtranslationId</name> <value/> </attribute> <attribute> <name>parent</name> <value/> </attribute> <attribute> <name>maxMsgThreshold</name> <value>0</value> </attribute> <attribute> <name>hideEgressMediaUpdate</name> <value>disabled</value> </attribute> <attribute> <name>xnqState</name> <value>xnq-unknown</value> </attribute> <attribute> <name>trunkContext</name> <value/> </attribute> <attribute> <name>qosConstraintName</name> <value/> </attribute> <attribute> <name>maxPriorityBandwidth</name> <value>0</value> </attribute> <attribute> <name>codecPolicyInRealm</name> <value>disabled</value> </attribute> <attribute> <name>stunEnable</name> <value>disabled</value> </attribute> <attribute> <name>symmetricLatching</name> <value>disabled</value> </attribute> <attribute> <name>hmrString</name> <value/> </attribute> <attribute> <name>maxEndPointsPerNat</name> <value>0</value> </attribute> <attribute> <name>userCacMode</name> <value>none</value> </attribute> <attribute> <name>fallbackBandwidth</name> <value>0</value> </attribute> <attribute> <name>delayedMediaUpdate</name> <value>disabled</value> </attribute> <attribute> <name>options</name> <value/> </attribute> <attribute> <name>monthlyMinutes</name> <value>0</value> </attribute> <attribute> <name>id</name> <value>flung-realm-1</value> </attribute> <attribute> <name>isMSMRelease</name> <value>disabled</value> </attribute> <attribute> <name>callRecordingServerId</name> <value/> </attribute> <attribute> <name>hairpinId</name> <value>0</value> </attribute> <attribute> <name>natTrustThreshold</name> <value>0</value> </attribute> <attribute> <name>referCallTransfer</name> <value>disabled</value> </attribute> <attribute> <name>icmpDetectMultip</name> <value>0</value> </attribute> <attribute> <name>maxMsgThresholdUntrusted</name> <value>0</value> </attribute> <attribute> <name>netMgmtCtrl</name> <value>disabled</value> </attribute> <attribute> <name>enforcementProfile</name> <value/> </attribute> <attribute> <name>generateUDPCksum</name> <value>disabled</value> </attribute> <attribute> <name>tcpMediaProfile</name> <value/> </attribute> <attribute> <name>dnsRealm</name> <value/> </attribute> <attribute> <name>sipProfile</name> <value/> </attribute> <attribute> <name>inManipulationId</name> <value/> </attribute> <attribute> <name>sipIsupProfile</name> <value/> </attribute> <attribute> <name>cacFailThreshold</name> <value>0</value> </attribute> <attribute> <name>restrictedLatching</name> <value>none</value> </attribute> <attribute> <name>classProfile</name> <value/> </attribute> <attribute> <name>userCacBandwidth</name> <value>0</value> </attribute> <attribute> <name>userCacSessions</name> <value>0</value> </attribute> <attribute> <name>dynReferTerm</name> <value>disabled</value> </attribute> <attribute> <name>intranslationId</name> <value/> </attribute> <attribute> <name>preferredNetworkAddrType</name> <value>none</value> </attribute> <attribute> <name>qosEnable</name> <value>disabled</value> </attribute> <attribute> <name>description</name> <value/> </attribute> <attribute> <name>restrictionMask</name> <value>32</value> </attribute> <attribute> <name>mediaPolicy</name> <value/> </attribute> <attribute> <name>outManipulationId</name> <value/> </attribute> <attribute> <name>earlyMediaAllow</name> <value/> </attribute> <attribute> <name>stunServerPort</name> <value>3478</value> </attribute> <attribute> <name>manipPattern</name> <value/> </attribute> <attribute> <name>stunServerIp</name> <value>0.0.0.0</value> </attribute> <attribute> <name>maxBandwidth</name> <value>0</value> </attribute> <attribute> <name>denyTimer</name> <value>30</value> </attribute> <attribute> <name>paiStrip</name> <value>disabled</value> </attribute> <attribute> <name>untrustedCacFailThreshold</name> <value>0</value> </attribute> <attribute> <name>errMsgThreshold</name> <value>0</value> </attribute> <attribute> <name>subscriptionInfo</name> <value>END_USER_NONE</value> </attribute> <attribute> <name>mrInNetwork</name> <value>enabled</value> </attribute> <attribute> <name>mediaSecPolicy</name> <value/> </attribute> <attribute> <name>acctEnable</name> <value>enabled</value> </attribute> <attribute> <name>altFamilyRealm</name> <value/> </attribute> <attribute> <name>codecPolicy</name> <value/> </attribute> <attribute> <name>rateLimit</name> <value>0</value> </attribute> <attribute> <name>lastModifiedDate</name> <value>2017-09-11 21:01:31</value> </attribute> <attribute> <name>dataVersion</name> <value/> </attribute> <attribute> <name>addrPrefix</name> <value>0.0.0.0</value> </attribute> <attribute> <name>lastModifiedBy</name> <value>NNC_admin_10.196.0.194</value> </attribute> <attribute> <name>srtpMsmPassthrough</name> <value>disabled</value> </attribute> <attribute> <name>noRtcp</name> <value>disabled</value> </attribute> <attribute> <name>constraintName</name> <value/> </attribute> <attribute> <name>trustLevel</name> <value>none</value> </attribute> <attribute> <name>diamE2AddrRealm</name> <value/> </attribute> <attribute> <name>stunChangedPort</name> <value>3479</value> </attribute> <attribute> <name>icmpTargetIp</name> <value>0.0.0.0</value> </attribute> <attribute> <name>nonMmBwCAC</name> <value>disabled</value> </attribute> <attribute> <name>icmpAdvInterval</name> <value>0</value> </attribute> <attribute> <name>bwManager</name> <value/> </attribute> <attribute> <name>mmInSystem</name> <value>enabled</value> </attribute> <attribute> <name>natInvalidMsgThreshold</name> <value>0</value> </attribute> <attribute> <name>referNotifyProvisional</name> <value>none</value> </attribute> <attribute> <name>mrInRealm</name> <value>disabled</value> </attribute> <attribute> <name>mmSameIp</name> <value>enabled</value> </attribute> <attribute> <name>waitTimeForInvalidRegister</name> <value>0</value> </attribute> <attribute> <name>stunChangedIp</name> <value>0.0.0.0</value> </attribute> </attributes> <childrenElements> <childrenElement> <attributes> <attribute> <name>subPortId</name> <value>5</value> </attribute> <attribute> <name>name</name> <value>M00</value> </attribute> <attribute> <name>family</name> <value>4</value> </attribute> </attributes> <elementTypePath>realmConfig/networkInterfaceId</elementTypePath> </childrenElement> </childrenElements> <elementTypePath>realmConfig</elementTypePath> </configElement>