Create a Configuration Element
post
/rest/{versionId}/configuration/deviceConfigs/{deviceId}/configElements/create
Use this (POST) method to create a configuration element object with default values. All configurations that a device supports are modeled as a Type-Of configuration element which has configuration attributes. For example, if a configuration element of the type NetworkInterface is requested, a configuration object is returned with default populated attributes that can be used to configure the network-interface element instance. Similarly, when a configuration element of type RealmConfig is requested, it returns a configuration object with default populated attributes that can be used to configure the realm-config element instance and so on. This is a convenience method that allows a user to ask the server to construct any type of configuration element that is based on the current model and release that the targeted device is running. The create method returns a configuration element object but does not persist this to the SDM database. The user can modify the configuration element, and then use the add method to add this object to the targeted device configuration. Refer to the Add an Element Type and Add an Element Type (POST) methods for more information.
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 create a configuration element by type 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/elementType.xml -H"Content-Type: application/xml" -H"Accept: application/xml" http://localhost:8080/rest/v1.1/configuration/deviceConfigs/ID9/configElements/create
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"?> <elementTypeRequest> <elementTypePath>realmConfig</elementTypePath> </elementTypeRequest>
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Date: Mon, 11 Sep 2017 20:05:27 GMT Server: Apache X-Frame-Options: SAMEORIGIN Content-Length: 5863 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/> </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/> </attribute> <attribute> <name>dataVersion</name> <value/> </attribute> <attribute> <name>addrPrefix</name> <value>0.0.0.0</value> </attribute> <attribute> <name>lastModifiedBy</name> <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> <elementTypePath>realmConfig</elementTypePath> </configElement>