Use case 5: Create Extension to be assigned to provision a new user

This example shows how to create an extension to be assigned to provision a new user.

Prerequisites

  • The Data Source that contains the extension information is created and you have obtained its ID.
  • The user is already created and you have obtained the User/Employee ID.
  • Assume the Data Source ID is 101 and the User/Employee ID is 4000.

Steps

  1. Create the Extension using POST method on the API using the end point /api/em/v2/datasources/101/extension

    Sample Post Body:

    Copy
    {  "extensionValue": "1234567",  "recordingMode": "1" }
  2. Get the Data Port ID of the extension created above using a GET method with the end point /api/em/v2/datasources/101/dataports?dataPortType=Extension&dataPortValue=1234567

    Sample Response:

    Copy
    { "data" : [ { "type" : "DataPort", "id" : 51, "attributes" : 
    { "value" : "1234567", "type" : "Extension", "id" : 51 } } ] }
  3. Use a POST method on the API using the end point /wfo/user-mgmtapi/v1/employees/4000/workspace

    Sample Post Body:

    Copy
    { "data" : [ { "type" : "workspace", "id" : "456", "attributes" : 
    { "assets" : [ { "dataSourceID" : 101, "employeeID" : 4000, 
    "dataPortID" : 51}] } } ] }

Extensions created must be assigned to a recorder by means of a Resource Group. The API for that purpose will be released shortly. Until that API is released, you must use the application to perform that function.

Use cases