POST /pm-extension-ms/auth-code/v1

This method is used to add the authorization code to the specific extension number.

To add the authorization code for the specific extension number:
  1. Perform the authentication and login to the API. For more information, see POST /auth/login.

  2. Use POST /pm-extension-ms/auth-code/v1 to send an HTTP POST request to the authentication service.

  3. Set the parameters as listed in the following table.

    Parameter Name

    Sample Value

    Supported Value

    Description

    subsystemName

    subsystemName

    string

    Indicates the subsystemName.
    Note: This parameter is mandatory.
  4. Click Try it Out option.

  5. Under Request body select application/json from drop-down list.

  6. Enter the request body parameter values as follows:
    {
      "extensionNumber": "string",
      "authorizationCode": "string",
      "hashType": "CLEARTEXT",
      "callLoggingCode": "string",
      "customer": "string",
      "newCustomer": "string",
      "commonServiceProfile": 0,
      "restrictUsageToThisExtensionOnly": true
    }
    The following table describes the request body parameters.

    Parameter Name

    Sample Value

    Description

    >extensionNumber

    String

    Extension Number.
    Note: This parameter is mandatory.

    >authorizationCode

    String

    Enter the Authorization Code for the extension. Authorization codes are used to limit the public access possibilities for different user groups or individuals in the MiVoice MX-ONE, that is, by using an authorization code a user can get other access possibilities for public calls. There are two types of authorization codes, common and individual.

    A common authorization code is shared by all extensions in the system.

    An individual authorization code is always associated to a directory number in the system.

    Format: 2 to 64 digits/characters.

    Maximum Length: 64

    Minimum Length: 2
    Note: This parameter is mandatory.

    >hashType

    String

    Select the Hash-Type.

    Options:
    • CLEARTEXT

    • MD5A1

    • SHA256

    • SHA256_MD5A1
      Note: This parameter is mandatory.

    >callLoggingCode

    String

    Enter a Call Logging Code. A Call Information Logging (CIL) code is associated with each authorization code. It is used to identify the calling party in call logging.

    Format: 1 to 20 digits.

    Maximum Length: 20

    Minimum Length: 1
    Note: This parameter is mandatory.

    >customer

    String

    This is the customer name of the authorization code being edited. The name can be changed using the New Customer Name field.

    >newCustomer

    String

    Select the customer group that the user can change to by using the entered authorizaiton code Customer group, also called a Multi Tenant group, makes it possible to subdive resources or make it possible for several smaller companies to share the same system. Each subdivision or company is defined as a customer. The customer group can consist of up to 50000 customers.

    Options: The customer group feature can be divided into five major functions:
    • Customer-dependent selection of PBX operator group for calls to the customer group"s common PBX operator number.

    • Customer-dependent selection of centralized operator, i.e. customer centralized operator, for rerouted calls and calls to PBX operator group.

    • Customer-dependent day-service and night-service position.

    • Customer-dependent route selection.

    • Common diversion positions.

    >commonServiceProfile

    integer (int32)

    Select the Common Service Profile. Common service profiles define privileges and settings for IP, mobile, DECT and virtual extensions.
    Note: This parameter is mandatory.

    >restrictUsage

    ToThisExtension

    Only

    string

    Restrict the use of this authorization code so that it only can be used from the specified extension.
    Note: This parameter is mandatory.
  7. Click on Execute to generate the request URL.

    Request URL:
    https://<IP_Address>:<PORT>/pm-extension-ms/auth-code/v1?subsystemName=1
    The following table lists the expected responses.

    Response Type

    Value

    Schema

    Valid Response

    201 Created

    {
      "extensionNumber": "string",
      "authorizationCode": "string",
      "hashType": "CLEARTEXT",
      "callLoggingCode": "string",
      "customer": "string",
      "newCustomer": "string",
      "commonServiceProfile": 0,
      "restrictUsageToThisExtensionOnly": true
    }

    Error Response

    400 Bad Request

    Not applicable

    401 Authentication Failure

    Not applicable

    403 Forbidden

    Not applicable

    404 Not found

    Not applicable