Add a Configuration Element

post

/rest/{versionId}/configuration/device-configs/{deviceId}/config-elements/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

Path Parameters
Back to Top

Response

200 Response

Config instance for the given element type added successfully.

400 Response

The user input is invalid.

401 Response

The user is unauthorized.

403 Response

The user doesn't have the required permission

404 Response

The object (resource URI, config, and so on) of your input request cannot be found.

409 Response

The object (resource, config, and so on) of your input request already exists.

500 Response

An internal server error has occurred while processing the request.
Back to Top

Examples

Examples of Accessing the API

See Authenticate page to acquire a token.

The following example shows how to use curl to add a Configuration Element.

curl -X POST \
    -d @request.json \
    -H @auth_header.txt \
    "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/configuration/device-configs/<deviceId>/config-elements/add"

The following example shows how to use Python to add a Configuration Element.

import requests
import json
headers = {
	"Accept": "application/json",
	"Authorization": "Bearer <auth-token>"
}
with open("request.json") as f: data = json.load(f)
url  = "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/configuration/device-configs/<deviceId>/config-elements/add"
resp = requests.post(url, headers=headers, data=data)

Note:

Use the Get a List of Devices Associated with Config Manager API to find the deviceId parameter.

Example of the Request Body

The following shows an example of the contents of the request file sent as the request body.

{
  "attributes": [
    {
      "name": "outsideLinePrefix",
      "value": ""
    },
    {
      "name": "parent",
      "value": "corporate"
    },
    {
      "name": "geographicLocation",
      "value": ""
    },
    {
      "name": "dataVersion",
      "value": ""
    },
    {
      "name": "countryCode",
      "value": ""
    },
    {
      "name": "name",
      "value": "TestDialingContext"
    },
    {
      "name": "description",
      "value": "Test ecb config add via Rest API add config"
    },
    {
      "name": "type",
      "value": "corporate"
    }
  ],
  "elementTypePath": "dialingContext"
}    

Example of the Response Body

The following example shows the contents of the response body.

{
  "attributes": [
    {
      "name": "outsideLinePrefix",
      "value": ""
    },
    {
      "name": "parent",
      "value": "corporate"
    },
    {
      "name": "geographicLocation",
      "value": ""
    },
    {
      "name": "lastModifiedDate",
      "value": "2026-01-21 07:18:55"
    },
    {
      "name": "dataVersion",
      "value": ""
    },
    {
      "name": "countryCode",
      "value": ""
    },
    {
      "name": "lastModifiedBy",
      "value": "OSDMC_admin_192.0.2.10"
    },
    {
      "name": "name",
      "value": "TestDialingContext"
    },
    {
      "name": "description",
      "value": "Test ecb config add via Rest API add config"
    }
  ],
  "elementTypePath": "dialingContext"
}    

Example 2 of Accessing this API

This example shows adding an element with sub-elements.

curl -X POST \
    -d @request.json \
    -H @auth_header.txt \
    "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/configuration/device-configs/<deviceId>/config-elements/add"

The following shows an example of the request body.

{
  "attributes": [
    {
      "name": "id",
      "value": "realm11"
    }
  ],
  "childrenElements": [
    {
      "attributes": [
        {
          "name": "subPortId",
          "value": "0"
        },
        {
          "name": "name",
          "value": "lo0"
        },
        {
          "name": "family",
          "value": "4"
        }
      ],
      "elementTypePath": "realmConfig/networkInterfaceId"
    }
  ],
  "elementTypePath": "realmConfig"
}        

The following shows an example response.

{
  "attributes": [
    {
      "name": "stunEnable",
      "value": "disabled"
    },
    {
      "name": "symmetricLatching",
      "value": "disabled"
    },
    {
      "name": "hmrString",
      "value": ""
    },
    {
      "name": "options",
      "value": ""
    },
    {
      "name": "id",
      "value": "realm11"
    },
    {
      "name": "sipProfile",
      "value": ""
    },
    {
      "name": "preferredNetworkAddrType",
      "value": "none"
    },
    {
      "name": "earlyMediaAllow",
      "value": ""
    },
    {
      "name": "denyTimer",
      "value": "30"
    },
    {
      "name": "untrustedCacFailThreshold",
      "value": "0"
    },
    {
      "name": "errMsgThreshold",
      "value": "0"
    },
    {
      "name": "featureTrfo",
      "value": ""
    },
    {
      "name": "dataVersion",
      "value": ""
    },
    {
      "name": "trustLevel",
      "value": "none"
    },
    {
      "name": "referNotifyProvisional",
      "value": "none"
    },
    {
      "name": "maxMsgThreshold",
      "value": "0"
    },
    {
      "name": "maxEndPointsPerNat",
      "value": "0"
    },
    {
      "name": "isMSMRelease",
      "value": "disabled"
    },
    {
      "name": "referCallTransfer",
      "value": "disabled"
    },
    {
      "name": "maxMsgThresholdUntrusted",
      "value": "0"
    },
    {
      "name": "enforcementProfile",
      "value": ""
    },
    {
      "name": "tcpMediaProfile",
      "value": ""
    },
    {
      "name": "sipIsupProfile",
      "value": ""
    },
    {
      "name": "dynReferTerm",
      "value": "disabled"
    },
    {
      "name": "qosEnable",
      "value": "disabled"
    },
    {
      "name": "sessionMaxLifeLimit",
      "value": "0"
    },
    {
      "name": "acctEnable",
      "value": "enabled"
    },
    {
      "name": "altFamilyRealm",
      "value": ""
    },
    {
      "name": "lastModifiedDate",
      "value": "2026-01-20 09:35:14"
    },
    {
      "name": "addrPrefix",
      "value": ""
    },
    {
      "name": "lastModifiedBy",
      "value": "OSDMC_admin_192.0.2.10"
    },
    {
      "name": "nonMmBwCAC",
      "value": "disabled"
    },
    {
      "name": "natInvalidMsgThreshold",
      "value": "0"
    }
  ],
  "childrenElements": [
    {
      "attributes": [
        {
          "name": "subPortId",
          "value": "0"
        },
        {
          "name": "name",
          "value": "lo0"
        },
        {
          "name": "family",
          "value": "4"
        }
      ],
      "elementTypePath": "realmConfig/networkInterfaceId"
    }
  ],
  "elementTypePath": "realmConfig"
}        

Example 3 of Accessing this API

This example shows adding a tos-setting sub-element inside an existing media-policy element.

curl -X POST \
    -d @request.json \
    -H @auth_header.txt \
    "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/configuration/device-configs/<deviceId>/config-elements/add"

The following shows an example of the request body.

{
  "parentElement": {
    "elementTypePath": "mediaPolicy",
    "attributes": [
      {
        "name": "name",
        "value": "testMePolicy"
      }
    ]
  },
  "elementTypePath": "mediaPolicy/tosSetting",
  "attributes": [
    {
      "name": "mediaType",
      "value": "testType"
    },
    {
      "name": "mediaSubType",
      "value": "testSubType"
    }
  ]
}        

The following shows an example response.

{
  "attributes": [
    {
      "name": "mediaType",
      "value": "testType"
    },
    {
      "name": "tosValue",
      "value": "0x00"
    },
    {
      "name": "mediaSubType",
      "value": "testSubType"
    }
  ],
  "elementTypePath": "mediaPolicy/tosSetting"
}        

Example 4 of Accessing this API

This example shows adding an element with multiple levels of sub-elements.

curl -X POST \
    -d @request.json \
    -H @auth_header.txt \
    "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/configuration/device-configs/<deviceId>/config-elements/add"

The following shows an example of the request body.

{
  "childrenElements": [
    {
      "elementTypePath": "mediaPolicy/tosSetting",
      "attributes": [
        {
          "name": "mediaType",
          "value": "testSetting"
        },
        {
          "name": "mediaSubType",
          "value": "testSubTesting"
        }
      ],
      "childrenElements": [
        {
          "elementTypePath": "mediaPolicy/tosSetting/mediaAttribute",
          "attributes": [
            {
              "name": "value",
              "value": "testMediaSettingMediaAttribute"
            }
          ]
        }
      ]
    }
  ],
  "elementTypePath": "mediaPolicy",
  "attributes": [
    {
      "name": "name",
      "value": "testMePolicy"
    }
  ]
}        

The following shows an example response.

{
  "childrenElements": [
    {
      "elementTypePath": "mediaPolicy/tosSetting",
      "attributes": [
        {
          "name": "mediaType",
          "value": "testSetting"
        },
        {
          "name": "mediaSubType",
          "value": "testSubTesting"
        }
      ],
      "childrenElements": [
        {
          "elementTypePath": "mediaPolicy/tosSetting/mediaAttribute",
          "attributes": [
            {
              "name": "value",
              "value": "testMediaSettingMediaAttribute"
            }
          ]
        }
      ]
    }
  ],
  "elementTypePath": "mediaPolicy",
  "attributes": [
    {
      "name": "name",
      "value": "testMePolicy"
    }
  ]
}        

Example 5 of Accessing this API

This example shows adding a sub-element when the parent element is already added.

curl -X POST \
    -d @request.json \
    -H @auth_header.txt \
    "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/configuration/device-configs/<deviceId>/config-elements/add"

The following shows an example of the request body.

{
  "parentElement": {
    "elementTypePath": "mediaPolicy",
    "attributes": [
      {
        "name": "name",
        "value": "testMePolicy"
      }
    ],
    "childrenElements": [
      {
        "elementTypePath": "mediaPolicy/tosSetting",
        "attributes": [
          {
            "name": "mediaType",
            "value": "testSetting"
          },
          {
            "name": "mediaSubType",
            "value": "testSubTesting"
          }
        ]
      }
    ]
  },
  "elementTypePath": "mediaPolicy/tosSetting/mediaAttribute",
  "attributes": [
    {
      "name": "value",
      "value": "testMediaAttr2"
    }
  ]
}        

The following shows an example response.

{
  "attributes": [
    {
      "name": "rtpTtl",
      "value": "0"
    },
    {
      "name": "lastModifiedDate",
      "value": "2026-01-20 10:57:52"
    },
    {
      "name": "dataVersion",
      "value": ""
    },
    {
      "name": "lastModifiedBy",
      "value": "OSDMC_admin_192.0.2.10"
    },
    {
      "name": "name",
      "value": "testMePolicy"
    }
  ],
  "childrenElements": [
    {
      "attributes": [
        {
          "name": "mediaType",
          "value": "testSetting"
        },
        {
          "name": "tosValue",
          "value": "0x00"
        },
        {
          "name": "mediaSubType",
          "value": "testSubTesting"
        }
      ],
      "childrenElements": [
        {
          "attributes": [
            {
              "name": "value",
              "value": "testMediaSettingMediaAttribute"
            }
          ],
          "elementTypePath": "mediaPolicy/tosSetting/mediaAttribute"
        },
        {
          "attributes": [
            {
              "name": "value",
              "value": "testMediaAttr2"
            }
          ],
          "elementTypePath": "mediaPolicy/tosSetting/mediaAttribute"
        }
      ],
      "elementTypePath": "mediaPolicy/tosSetting"
    }
  ],
  "elementTypePath": "mediaPolicy"
}        

Example 6 of Accessing this API

This example shows adding the factory-accounts element.

curl -X POST \
    -d @request.json \
    -H @auth_header.txt \
    "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/configuration/device-configs/<deviceId>/config-elements/add"

The following shows an example of the request body.

{
  "elementTypePath": "factoryAccounts"
}

The following shows an example response.

{
  "attributes": [
    {
      "name": "m_state",
      "value": "enabled"
    },
    {
      "name": "lastModifiedDate",
      "value": "2026-01-21 07:34:46"
    },
    {
      "name": "dataVersion",
      "value": ""
    },
    {
      "name": "lastModifiedBy",
      "value": "OSDMC_admin_192.0.2.10"
    }
  ],
  "elementTypePath": "factoryAccounts"
}
Back to Top