Use case 16: Create extension and assign it to a Resource Group and employee

Follow this example to create an extension and assign the extension to a Resource Group and an employee.

Steps

  1. Get the Data Source ID using the Data Source API.

  2. Use the Data Source APIs to get the Resource Group ID(s) to which you want this extension to be associated.

  3. Get the Employee ID (if Fixed seating) using Employee APIs.

  4. Call the POST method on the extensions API posting the extension data. For example:

    POST /api/em/v2/datasources/<Data Source ID>/extension

    Example POST body:

    Copy
    {"extensionValue":"9999","recordingMode":"1","secondaryExtensions":[],
    "resourceGroups":[{"id":12,"name":"IP Pool1","resourceGroupTypeId":-500001,
    "resourceGroupTypeName":"IP Extension Pool"},{"id":13,"name":"IP Pool2",
    "resourceGroupTypeId":-500001,"resourceGroupTypeName":"IP Extension Pool"}],
    "employee":{"id":214}}
  5. The extensionValue and recordingMode are required. The other parameters are optional.

    The recordMode values can be as follows:

    1 = Record

    2 = Application Controlled

    3 = Start On Trigger

    4 = Do Not Record

    5 = Recording Resource

Use cases