Calling Plan Digit Strings

List all digit strings in a Group

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/calling_plan/digit_strings/

List all available digit strings in a Group.

Example request:

GET /api/v1/tenants/footenant/groups/foogroup/services/calling_plan/digit_strings/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "digitPatterns": [
      {
         "name": "A Digit String",
         "digitPattern": "2710"
      },
      {
         "name": "Another Digit String",
         "digitPattern": "0804"
      },
      {
         "name": "Test Digit String",
         "digitPattern": "0123*"
      }
   ]
}
Response JSON Object:
Status Codes:

Create a digit string in a Group

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/calling_plan/digit_strings/

Create a digit string in a Group.

Authorization rights: minimum Group Admin.

Example request:

POST /api/v1/tenants/footenant/groups/foogroup/services/calling_plan/digit_strings/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "name": "New Digit String",
   "digitPattern": "0208"
}
Request JSON Object:
  • name (string) – Name used to define the digit string.

  • digitPattern (string) – Digit pattern associated to the digit string. Digit patterns are used to restrict calls in the Incoming Calling Plan and Outgoing Calling Plan. The digit pattern may contain digits 0-9,+,?, and trailing * digit. Digit patterns can also contain ‘#’, and ‘*’ digits anywhere in the string. To distinguish between a ‘*’ as a digit from ‘*’ as a wildcard character, a back-slash character shall be used as an escape in front of ‘*’ being a digit. Note that ‘*’ as a wildcard is still only allowed at the end of string. The range syntax [n1-n2] is also supported, where n1 and n2 denotes a digit in the range 0 to 9.

Example response:

HTTP/1.1 201 CREATED
Content-Type: "application/json"

{}
Status Codes:

Modify a digit string in a Group

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/calling_plan/digit_strings/(string: name)

Modify a digit string in a Group.

Authorization rights: minimum Group Admin.

Example request:

PUT /api/v1/tenants/footenant/groups/foogroup/services/calling_plan/digit_strings/DigitString/ HTTP/1.1
Host: example.com
  Content-Type: "application/json"
  {
      "digitPattern": "0607"
  }
Request JSON Object:
  • name (string) – Name used to define the digit string is the key, must already exist.

  • digitPattern (string) – (Optional) New digit pattern associated to the digit string.

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Remove a digit string from a Group

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/services/calling_plan/digit_strings/(string: name)/

Remove a digit string from a Group.

Authorization rights: minimum Group Admin.

Example request:

DELETE /api/v1/tenants/footenant/groups/foogroup/services/calling_plan/digit_strings/DigitString/ HTTP/1.1
Host: example.com
Request JSON Object:
  • name – name of digit pattern.

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes:
  • 200 OK – no error. Note that any error encountered with a name in the list will trigger an error

  • 400 Bad Request – bad request due to invalid parameters

  • 404 Not Found – service not assigned.