Package com.bandwidth.sdk.api
Class CallsApi
java.lang.Object
com.bandwidth.sdk.api.CallsApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCall
(String accountId, CreateCall createCall) Create Call Creates an outbound phone call.okhttp3.Call
createCallAsync
(String accountId, CreateCall createCall, ApiCallback<CreateCallResponse> _callback) Create Call (asynchronously) Creates an outbound phone call.okhttp3.Call
createCallCall
(String accountId, CreateCall createCall, ApiCallback _callback) Build call for createCallcreateCallWithHttpInfo
(String accountId, CreateCall createCall) Create Call Creates an outbound phone call.getCallState
(String accountId, String callId) Get Call State Information Retrieve the current state of a specific call.okhttp3.Call
getCallStateAsync
(String accountId, String callId, ApiCallback<CallState> _callback) Get Call State Information (asynchronously) Retrieve the current state of a specific call.okhttp3.Call
getCallStateCall
(String accountId, String callId, ApiCallback _callback) Build call for getCallStategetCallStateWithHttpInfo
(String accountId, String callId) Get Call State Information Retrieve the current state of a specific call.int
listCalls
(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken) Get Calls Returns a max of 10000 calls, sorted by `createdTime` from oldest to newest.okhttp3.Call
listCallsAsync
(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken, ApiCallback<List<CallState>> _callback) Get Calls (asynchronously) Returns a max of 10000 calls, sorted by `createdTime` from oldest to newest.okhttp3.Call
listCallsCall
(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken, ApiCallback _callback) Build call for listCallslistCallsWithHttpInfo
(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken) Get Calls Returns a max of 10000 calls, sorted by `createdTime` from oldest to newest.void
setApiClient
(ApiClient apiClient) void
setCustomBaseUrl
(String customBaseUrl) void
setHostIndex
(int hostIndex) void
updateCall
(String accountId, String callId, UpdateCall updateCall) Update Call Interrupts and redirects a call to a different URL that should return a BXML document.okhttp3.Call
updateCallAsync
(String accountId, String callId, UpdateCall updateCall, ApiCallback<Void> _callback) Update Call (asynchronously) Interrupts and redirects a call to a different URL that should return a BXML document.void
updateCallBxml
(String accountId, String callId, String body) Update Call BXML Interrupts and replaces an active call's BXML document.okhttp3.Call
updateCallBxmlAsync
(String accountId, String callId, String body, ApiCallback<Void> _callback) Update Call BXML (asynchronously) Interrupts and replaces an active call's BXML document.okhttp3.Call
updateCallBxmlCall
(String accountId, String callId, String body, ApiCallback _callback) Build call for updateCallBxmlupdateCallBxmlWithHttpInfo
(String accountId, String callId, String body) Update Call BXML Interrupts and replaces an active call's BXML document.okhttp3.Call
updateCallCall
(String accountId, String callId, UpdateCall updateCall, ApiCallback _callback) Build call for updateCallupdateCallWithHttpInfo
(String accountId, String callId, UpdateCall updateCall) Update Call Interrupts and redirects a call to a different URL that should return a BXML document.
-
Constructor Details
-
CallsApi
public CallsApi() -
CallsApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
createCallCall
public okhttp3.Call createCallCall(String accountId, CreateCall createCall, ApiCallback _callback) throws ApiException Build call for createCall- Parameters:
accountId
- Your Bandwidth Account ID. (required)createCall
- JSON object containing information to create an outbound call (required)_callback
- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 201 Call Successfully Created * Location - The URL for further interactions with this call
400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
createCall
Create Call Creates an outbound phone call. All calls are initially queued. Your outbound calls will initiated at a specific dequeueing rate, enabling your application to \"fire and forget\" when creating calls. Queued calls may not be modified until they are dequeued and placed, but may be removed from your queue on demand. <b>Please note:</b> Calls submitted to your queue will be placed approximately in order, but exact ordering is not guaranteed.- Parameters:
accountId
- Your Bandwidth Account ID. (required)createCall
- JSON object containing information to create an outbound call (required)- Returns:
- CreateCallResponse
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Call Successfully Created * Location - The URL for further interactions with this call
400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
createCallWithHttpInfo
public ApiResponse<CreateCallResponse> createCallWithHttpInfo(String accountId, CreateCall createCall) throws ApiException Create Call Creates an outbound phone call. All calls are initially queued. Your outbound calls will initiated at a specific dequeueing rate, enabling your application to \"fire and forget\" when creating calls. Queued calls may not be modified until they are dequeued and placed, but may be removed from your queue on demand. <b>Please note:</b> Calls submitted to your queue will be placed approximately in order, but exact ordering is not guaranteed.- Parameters:
accountId
- Your Bandwidth Account ID. (required)createCall
- JSON object containing information to create an outbound call (required)- Returns:
- ApiResponse<CreateCallResponse>
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Call Successfully Created * Location - The URL for further interactions with this call
400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
createCallAsync
public okhttp3.Call createCallAsync(String accountId, CreateCall createCall, ApiCallback<CreateCallResponse> _callback) throws ApiException Create Call (asynchronously) Creates an outbound phone call. All calls are initially queued. Your outbound calls will initiated at a specific dequeueing rate, enabling your application to \"fire and forget\" when creating calls. Queued calls may not be modified until they are dequeued and placed, but may be removed from your queue on demand. <b>Please note:</b> Calls submitted to your queue will be placed approximately in order, but exact ordering is not guaranteed.- Parameters:
accountId
- Your Bandwidth Account ID. (required)createCall
- JSON object containing information to create an outbound call (required)_callback
- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException
- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 201 Call Successfully Created * Location - The URL for further interactions with this call
400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
getCallStateCall
public okhttp3.Call getCallStateCall(String accountId, String callId, ApiCallback _callback) throws ApiException Build call for getCallState- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)_callback
- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 Call found - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
getCallState
Get Call State Information Retrieve the current state of a specific call. This information is near-realtime, so it may take a few minutes for your call to be accessible using this endpoint. **Note**: 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 HTTP 404 response.- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)- Returns:
- CallState
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Call found - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
getCallStateWithHttpInfo
public ApiResponse<CallState> getCallStateWithHttpInfo(String accountId, String callId) throws ApiException Get Call State Information Retrieve the current state of a specific call. This information is near-realtime, so it may take a few minutes for your call to be accessible using this endpoint. **Note**: 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 HTTP 404 response.- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)- Returns:
- ApiResponse<CallState>
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Call found - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
getCallStateAsync
public okhttp3.Call getCallStateAsync(String accountId, String callId, ApiCallback<CallState> _callback) throws ApiException Get Call State Information (asynchronously) Retrieve the current state of a specific call. This information is near-realtime, so it may take a few minutes for your call to be accessible using this endpoint. **Note**: 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 HTTP 404 response.- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)_callback
- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException
- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 Call found - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
listCallsCall
public okhttp3.Call listCallsCall(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken, ApiCallback _callback) throws ApiException Build call for listCalls- Parameters:
accountId
- Your Bandwidth Account ID. (required)to
- Filter results by the `to` field. (optional)from
- Filter results by the `from` field. (optional)minStartTime
- Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional)maxStartTime
- Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). (optional)disconnectCause
- Filter results to calls with specified call Disconnect Cause. (optional)pageSize
- Specifies the max number of calls that will be returned. (optional, default to 1000)pageToken
- 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)_callback
- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 Calls retrieved successfully - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
listCalls
public List<CallState> listCalls(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken) throws ApiException 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.- Parameters:
accountId
- Your Bandwidth Account ID. (required)to
- Filter results by the `to` field. (optional)from
- Filter results by the `from` field. (optional)minStartTime
- Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional)maxStartTime
- Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). (optional)disconnectCause
- Filter results to calls with specified call Disconnect Cause. (optional)pageSize
- Specifies the max number of calls that will be returned. (optional, default to 1000)pageToken
- 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:
- List<CallState>
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Calls retrieved successfully - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
listCallsWithHttpInfo
public ApiResponse<List<CallState>> listCallsWithHttpInfo(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken) throws ApiException 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.- Parameters:
accountId
- Your Bandwidth Account ID. (required)to
- Filter results by the `to` field. (optional)from
- Filter results by the `from` field. (optional)minStartTime
- Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional)maxStartTime
- Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). (optional)disconnectCause
- Filter results to calls with specified call Disconnect Cause. (optional)pageSize
- Specifies the max number of calls that will be returned. (optional, default to 1000)pageToken
- 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:
- ApiResponse<List<CallState>>
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Calls retrieved successfully - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
listCallsAsync
public okhttp3.Call listCallsAsync(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken, ApiCallback<List<CallState>> _callback) throws ApiException Get Calls (asynchronously) 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.- Parameters:
accountId
- Your Bandwidth Account ID. (required)to
- Filter results by the `to` field. (optional)from
- Filter results by the `from` field. (optional)minStartTime
- Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional)maxStartTime
- Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). (optional)disconnectCause
- Filter results to calls with specified call Disconnect Cause. (optional)pageSize
- Specifies the max number of calls that will be returned. (optional, default to 1000)pageToken
- 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)_callback
- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException
- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 Calls retrieved successfully - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
updateCallCall
public okhttp3.Call updateCallCall(String accountId, String callId, UpdateCall updateCall, ApiCallback _callback) throws ApiException Build call for updateCall- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)updateCall
- JSON object containing information to redirect an existing call to a new BXML document (required)_callback
- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 Call was successfully modified. - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 409 Conflict - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
updateCall
Update Call Interrupts and redirects a call to a different URL that should return a BXML document.- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)updateCall
- JSON object containing information to redirect an existing call to a new BXML document (required)- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Call was successfully modified. - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 409 Conflict - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
updateCallWithHttpInfo
public ApiResponse<Void> updateCallWithHttpInfo(String accountId, String callId, UpdateCall updateCall) throws ApiException Update Call Interrupts and redirects a call to a different URL that should return a BXML document.- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)updateCall
- JSON object containing information to redirect an existing call to a new BXML document (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Call was successfully modified. - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 409 Conflict - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
updateCallAsync
public okhttp3.Call updateCallAsync(String accountId, String callId, UpdateCall updateCall, ApiCallback<Void> _callback) throws ApiException Update Call (asynchronously) Interrupts and redirects a call to a different URL that should return a BXML document.- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)updateCall
- JSON object containing information to redirect an existing call to a new BXML document (required)_callback
- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException
- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 200 Call was successfully modified. - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 409 Conflict - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
updateCallBxmlCall
public okhttp3.Call updateCallBxmlCall(String accountId, String callId, String body, ApiCallback _callback) throws ApiException Build call for updateCallBxml- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)body
- (required)_callback
- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 204 Call BXML was successfully replaced. - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 409 Conflict - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
updateCallBxml
Update Call BXML Interrupts and replaces an active call's BXML document.- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)body
- (required)- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 Call BXML was successfully replaced. - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 409 Conflict - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
updateCallBxmlWithHttpInfo
public ApiResponse<Void> updateCallBxmlWithHttpInfo(String accountId, String callId, String body) throws ApiException Update Call BXML Interrupts and replaces an active call's BXML document.- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)body
- (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 Call BXML was successfully replaced. - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 409 Conflict - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-
updateCallBxmlAsync
public okhttp3.Call updateCallBxmlAsync(String accountId, String callId, String body, ApiCallback<Void> _callback) throws ApiException Update Call BXML (asynchronously) Interrupts and replaces an active call's BXML document.- Parameters:
accountId
- Your Bandwidth Account ID. (required)callId
- Programmable Voice API Call ID. (required)body
- (required)_callback
- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException
- If fail to process the API call, e.g. serializing the request body object- Http Response Details:
Status Code Description Response Headers 204 Call BXML was successfully replaced. - 400 Bad Request - 401 Unauthorized - 403 Forbidden - 404 Not Found - 405 Method Not Allowed - 409 Conflict - 415 Unsupported Media Type - 429 Too Many Requests * Retry-After - When you should try your request again.
500 Internal Server Error -
-