Use case 17: Create a range of extensions
Follow this example to create a range of extensions. You can then assign this extension when provisioning a new user at a later point in time.
Steps
-
Get the Data Source ID using the Data Source API.
-
Use the Data Source APIs to get the Resource Group ID(s) to which you want this extension to be associated.
-
Call the POST method on the extension API posting the extension data. For example:
POST /api/em/v2/datasources/<Data Source ID>/extensionrange
Example POST body. This body creates extensions ranging from 10000 to 10100 with no prefix or postfix added to the extension. The recording mode is Record (1). The extensions are assigned to two Resource Groups: IP Pool1 and IP Pool2.
Copy{"extensionRangeStart":"10000","extensionRangeEnd":"10100","extensionRangePrefix":
"","extensionRangePostfix":"","recordingMode":"1","secondaryRanges":[],
"resourceGroups":[{"id":12,"name":"IP Pool1","resourceGroupTypeId":
-500001,"resourceGroupTypeName":"IP Extension Pool"},{"id":13,"name":
"IP Pool2","resourceGroupTypeId":-500001,"resourceGroupTypeName":
"IP Extension Pool"}]}