You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Bandwidth::CallsApi* | [**get_call_state**](docs/CallsApi.md#get_call_state) | **GET** /accounts/{accountId}/calls/{callId} | Get Call State Information
112
+
*Bandwidth::CallsApi* | [**list_calls**](docs/CallsApi.md#list_calls) | **GET** /accounts/{accountId}/calls | Get Calls
Returns a max of 10000 calls, sorted by `createdTime` from oldest to newest. **NOTE:** If the number of calls in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel=\"next\"`) will be returned in the response. The url can be used to retrieve the next page of call records. Also, call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an empty array [] in response.
165
+
166
+
### Examples
167
+
168
+
```ruby
169
+
require'time'
170
+
require'bandwidth-sdk'
171
+
# setup authorization
172
+
Bandwidth.configure do |config|
173
+
# Configure HTTP basic authorization: Basic
174
+
config.username ='YOUR USERNAME'
175
+
config.password ='YOUR PASSWORD'
176
+
end
177
+
178
+
api_instance =Bandwidth::CallsApi.new
179
+
account_id ='9900000'# String | Your Bandwidth Account ID.
180
+
opts = {
181
+
to:'%2b19195551234', # String | Filter results by the `to` field.
182
+
from:'%2b19195554321', # String | Filter results by the `from` field.
183
+
min_start_time:'2022-06-21T19:13:21Z', # String | Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format).
184
+
max_start_time:'2022-06-21T19:13:21Z', # String | Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format).
185
+
disconnect_cause:'hangup', # String | Filter results to calls with specified call Disconnect Cause.
186
+
page_size:500, # Integer | Specifies the max number of calls that will be returned.
187
+
page_token:'page_token_example'# String | Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description.
188
+
}
189
+
190
+
begin
191
+
# Get Calls
192
+
result = api_instance.list_calls(account_id, opts)
193
+
p result
194
+
rescueBandwidth::ApiError => e
195
+
puts"Error when calling CallsApi->list_calls: #{e}"
196
+
end
197
+
```
198
+
199
+
#### Using the list_calls_with_http_info variant
200
+
201
+
This returns an Array which contains the response data, status code and headers.
puts"Error when calling CallsApi->list_calls_with_http_info: #{e}"
214
+
end
215
+
```
216
+
217
+
### Parameters
218
+
219
+
| Name | Type | Description | Notes |
220
+
| ---- | ---- | ----------- | ----- |
221
+
|**account_id**|**String**| Your Bandwidth Account ID. ||
222
+
|**to**|**String**| Filter results by the `to` field. |[optional]|
223
+
|**from**|**String**| Filter results by the `from` field. |[optional]|
224
+
|**min_start_time**|**String**| Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). |[optional]|
225
+
|**max_start_time**|**String**| Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). |[optional]|
226
+
|**disconnect_cause**|**String**| Filter results to calls with specified call Disconnect Cause. |[optional]|
227
+
|**page_size**|**Integer**| Specifies the max number of calls that will be returned. |[optional][default to 1000]|
228
+
|**page_token**|**String**| Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. |[optional]|
# Returns a max of 10000 calls, sorted by `createdTime` from oldest to newest. **NOTE:** If the number of calls in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel=\"next\"`) will be returned in the response. The url can be used to retrieve the next page of call records. Also, call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an empty array [] in response.
167
+
# @param account_id [String] Your Bandwidth Account ID.
168
+
# @param [Hash] opts the optional parameters
169
+
# @option opts [String] :to Filter results by the `to` field.
170
+
# @option opts [String] :from Filter results by the `from` field.
171
+
# @option opts [String] :min_start_time Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format).
172
+
# @option opts [String] :max_start_time Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format).
173
+
# @option opts [String] :disconnect_cause Filter results to calls with specified call Disconnect Cause.
174
+
# @option opts [Integer] :page_size Specifies the max number of calls that will be returned. (default to 1000)
175
+
# @option opts [String] :page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description.
# Returns a max of 10000 calls, sorted by `createdTime` from oldest to newest. **NOTE:** If the number of calls in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel=\"next\"`) will be returned in the response. The url can be used to retrieve the next page of call records. Also, call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an empty array [] in response.
184
+
# @param account_id [String] Your Bandwidth Account ID.
185
+
# @param [Hash] opts the optional parameters
186
+
# @option opts [String] :to Filter results by the `to` field.
187
+
# @option opts [String] :from Filter results by the `from` field.
188
+
# @option opts [String] :min_start_time Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format).
189
+
# @option opts [String] :max_start_time Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format).
190
+
# @option opts [String] :disconnect_cause Filter results to calls with specified call Disconnect Cause.
191
+
# @option opts [Integer] :page_size Specifies the max number of calls that will be returned. (default to 1000)
192
+
# @option opts [String] :page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description.
193
+
# @return [Array<(Array<CallState>, Integer, Hash)>] Array<CallState> data, response status code and response headers
0 commit comments