Search for Numbers in the System

List numbers in the system

GET /api/v1/search/numbers/

List all the numbers in the System.

Example request:

GET /api/v1/search/numbers/ HTTP/1.1
Host: example.com
Request JSON Object:

Example response:

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

{
   "numbers": [
                  {
                  "tenantId": "fooTenant1",
                  "phoneNumber": "1234567",
                  "isEnterprise": true
                  },
                  {
                  "tenantId": "fooTenant2",
                  "phoneNumber": "321654",
                  "isEnterprise": false
                  }
              ]
}
Response JSON Object:
Status Codes:

The behaviour of the search API is controlled by the following configuration settings:

"MULTI_AS_BACKEND_IN_SYSTEM_SEARCH_RESULTS": true
Explanation of the parameters:
  • MULTI_AS_BACKEND_IN_SYSTEM_SEARCH_RESULTS: if true, the backendName and backendExternal name of the AS hosting the number will be added in each element of the answer. The default value is true as by default a multi-as user is allowed to see what backend is used.

List numbers usages in the system

GET /api/v1/search/numbers/usages/

List all the numbers usages in the System.

Example request:

GET /api/v1/search/numbers/usages/ HTTP/1.1
Host: example.com

Example response:

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

{
  "numbers": [
              {
                  "tenantId": "fooTenant1",
                  "phoneNumbers": 9,
                  "assignedToGroups": 9,
                  "percentageAssigned": 100,
                  "isEnterprise": true,
                  "activatedOnGroups": 9
              },
              {
                  "tenantId": "fooTenant2",
                  "phoneNumbers": 1,
                  "assignedToGroups": 1,
                  "percentageAssigned": 100,
                  "isEnterprise": true,
                  "activatedOnGroups": 1
              }
             ]
}
Response JSON Object:
Status Codes:

The behaviour of the search API is controlled by the following configuration settings:

"MULTI_AS_BACKEND_IN_SYSTEM_SEARCH_RESULTS": true
Explanation of the parameters:
  • MULTI_AS_BACKEND_IN_SYSTEM_SEARCH_RESULTS: if true, the backendName and backendExternal name of the AS hosting the number will be added in each element of the answer. The default value is true as by default a multi-as user is allowed to see what backend is used.

Get the utilization of a single DN

GET /api/v1/search/numbers/usages/(string: instance_name)/

Get the utilization of a single DN.

Example request:

GET /api/v1/search/numbers/usages/+32-25126778/ HTTP/1.1
Host: example.com

{
  "provideCCType": true
}
Request JSON Object:
  • provideCCType (boolean) – For call center numbers, enrich the user type with the call center type.

  • backendName (string) – See backendName from Search criteria.

  • backendExternalName (string) – See backendExternalName from Search criteria.

Example response:

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

{
      "tenantId": "fooTenant",
      "groupId": "fooGroup",
      "userId": "fooUser@sip.netaxis.be",
      "userType": "Normal",
      "isGroupCallingLineId": false,
      "active": true
}
Response JSON Object:
Status Codes: