JSON API » recording » recording/recordings/list
Gets the fields of call recordings.
Input parameters
Requires authentication and the record role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
customer | Integer | ID of customer to get record recordings for. | Yes, unless recordgroup is specified. | Customer of authentication user. |
recordgroup | Integer | ID of record group to get record recordings for. | Yes, unless customer is specified. | All in customer. |
start | Integer | Start Unix timestamp. | Recommended | 0 |
end | Integer | End Unix timestamp. | Recommended | Now. |
called | String | Return calls with called number containing this string. Empty string for all calls. | No | Empty string. |
caller | String | Return calls with callerid containing this string. Empty string for all calls. | No | Empty string. |
complete | Integer | 1 to return only completed calls, 0 to return only calls in progress, -1 to return all calls. | No | 1 |
totaltime_minimum | Integer | Minimum call duration in seconds. | No | 0 |
totaltime_maximum | Integer | Maximum call duration in seconds. -1 for no limit. | No | -1 |
sort | String | Field to sort by. "cnumber", "expires", "snumber", "start", or "totaltime". | No | "start" |
descending | Integer | 1 to sort descending, 0 not to. | No | 0 |
Specify the customer or recordgroup, but not both. Failure to specify the start and end may put a heavy load on the database.
Responses
Code | Description |
---|---|
200 | Success. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
Data returned
An array of fields, corresponding to the rows of the recordings table in the database. Sound files are not included.
Example: With record group
https://www.015pbx.net/local/api/json/recording/recordings/list/?auth_username=user;auth_password=password;recordgroup=123;start=1230000000;end=1240000000{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "uniqueid":"1234567890", ... }, { "uniqueid":"1234567891", ... } ] }