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:
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" { "numbers": [ { "tenantId": "fooTenant1", "phoneNumber": "1234567", "isEnterprise": true }, { "tenantId": "fooTenant2", "phoneNumber": "321654", "isEnterprise": false } ] }
- Response JSON Object:
numbers (array) – a list of numbers objects as defined as Numbers in list attributes.
- Status Codes:
200 OK – no error
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:
numbers (array) – a list of numbers usages objects as defined as Number usage in list attributes.
- Status Codes:
200 OK – no error
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:
tenantId (string) – See tenantId from Number usage instance attributes.
groupId (string) – See groupId from Number usage instance attributes.
userId (string) – See userId from Number usage instance attributes.
userType (string) – See userType from Number usage instance attributes.
isGroupCallingLineId (boolean) – See isGroupCallingLineId from Number usage instance attributes.
active (boolean) – See active from Number usage instance attributes.
backendName (string) – (Conditional) the name of the backend where the Tenant owning the number is defined. Only returned in case of multi-as user.
backendExternalName (string) – (Conditional) the external name of the backend where the Tenant owning the number is defined. Only returned in case of multi-as user and if the value is defined in the related Backend object.
- Status Codes:
200 OK – no error
Configuration Information for Numbers Usage Search¶
The APIO behaviour is controlled by the following settings:
"PROVIDE_CALL_CENTER_TYPE": true
This parameter is used as the default value for provideCCType GET number request parameter. Its default value is false.