JSON API » features » features/search
Searches for telephony features in the given customer and its sub-customers recursively.
Input parameters
Requires authentication and the user role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
type | String | Type of feature to search for. "access", "callerids" (numbers with purpose set to 'Callerid only'), "cards", "customers", "mailboxes", "numbers", "people", "unumbers" (unassigned numbers), or "vouchers". | Yes | |
field | String | Field to search. "account", "affiliate", "card", "description", "forename", "hardware_address", "mailbox", "name", "role", "serial", "snumber", "surname", "tax_number", or "username". | Yes | |
search | String | The value to search for. | Yes | |
customer | Integer | ID of customer to search, including sub-customers recursively. | No | Customer of authentication user. |
match | String | What to match in the search. "exact", "start", "end", or "contains". | No | "exact" |
Responses
Code | Description |
---|---|
200 | Success. |
400 | Invalid customer specified. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
Data returned
A data structure containing the results found. The specific structure depends on the type of feature searched for.
Example: With required parameters
http://enswitch.example.com/api/json/features/search/?auth_username=user;auth_password=password;type=customers;field=name;search=example{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ ... } }
Change history
Version | Changes |
---|---|
3.14 | type input parameter changed to allow a value of "callerids". |
3.13 | Function added. |