Update a Configuration Element
post
/rest/{versionId}/configuration/deviceConfigs/{deviceId}/configElements/update
Use this (POST) method to update all top-level element and sub-element configuration instances on the SDM database. Changes are made only to your staging area. No changes are pushed to the device until you use the Perform a Device Action (POST) method.
Request
Supported Media Types
- application/xml
- application/json
Path Parameters
Response
Supported Media Types
- application/xml
- application/json
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 update 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/updateRealmConfig.xml -H"Content-Type: application/xml" -H"Accept: application/xml" http://localhost:8080/rest/v1.1/configuration/deviceConfigs/ID9/configElements/update
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> <attribute> <name>description</name> <value>realm test</value> </attribute> </attributes> </configElement>
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Date: Tue, 12 Sep 2017 19:55:56 GMT Server: Apache X-Frame-Options: SAMEORIGIN Content-Length: 6266 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>realm test</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-12 19:55:56</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>