Requires any of the roles: | SystemAdministrator, Manager |
GET | /calls/active |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Gets all activecalls
*/
@Api(Description="Gets all activecalls")
public static class GetActiveCalls implements IGet
{
/**
* The account ID to retrieve for
*/
@ApiMember(Description="The account ID to retrieve for")
public String accountId = null;
public String getAccountId() { return accountId; }
public GetActiveCalls setAccountId(String value) { this.accountId = value; return this; }
}
public static class GetActiveCallsResponse
{
public ArrayList<CallInfo> calls = null;
public ArrayList<CallInfo> getCalls() { return calls; }
public GetActiveCallsResponse setCalls(ArrayList<CallInfo> value) { this.calls = value; return this; }
}
public static class CallInfo
{
public String accountSid = null;
public String answeredBy = null;
public String callerName = null;
public String dateCreated = null;
public String dateUpdated = null;
public String direction = null;
public Integer duration = null;
public String endTime = null;
public String forwardedFrom = null;
public String from = null;
public String fromFormatted = null;
public String parentCallSid = null;
public String phoneNumberSid = null;
public BigDecimal price = null;
public String priceUnit = null;
public String sid = null;
public String startTime = null;
public String status = null;
public String to = null;
public String toFormatted = null;
public String uri = null;
public String getAccountSid() { return accountSid; }
public CallInfo setAccountSid(String value) { this.accountSid = value; return this; }
public String getAnsweredBy() { return answeredBy; }
public CallInfo setAnsweredBy(String value) { this.answeredBy = value; return this; }
public String getCallerName() { return callerName; }
public CallInfo setCallerName(String value) { this.callerName = value; return this; }
public String getDateCreated() { return dateCreated; }
public CallInfo setDateCreated(String value) { this.dateCreated = value; return this; }
public String getDateUpdated() { return dateUpdated; }
public CallInfo setDateUpdated(String value) { this.dateUpdated = value; return this; }
public String getDirection() { return direction; }
public CallInfo setDirection(String value) { this.direction = value; return this; }
public Integer getDuration() { return duration; }
public CallInfo setDuration(Integer value) { this.duration = value; return this; }
public String getEndTime() { return endTime; }
public CallInfo setEndTime(String value) { this.endTime = value; return this; }
public String getForwardedFrom() { return forwardedFrom; }
public CallInfo setForwardedFrom(String value) { this.forwardedFrom = value; return this; }
public String getFrom() { return from; }
public CallInfo setFrom(String value) { this.from = value; return this; }
public String getFromFormatted() { return fromFormatted; }
public CallInfo setFromFormatted(String value) { this.fromFormatted = value; return this; }
public String getParentCallSid() { return parentCallSid; }
public CallInfo setParentCallSid(String value) { this.parentCallSid = value; return this; }
public String getPhoneNumberSid() { return phoneNumberSid; }
public CallInfo setPhoneNumberSid(String value) { this.phoneNumberSid = value; return this; }
public BigDecimal getPrice() { return price; }
public CallInfo setPrice(BigDecimal value) { this.price = value; return this; }
public String getPriceUnit() { return priceUnit; }
public CallInfo setPriceUnit(String value) { this.priceUnit = value; return this; }
public String getSid() { return sid; }
public CallInfo setSid(String value) { this.sid = value; return this; }
public String getStartTime() { return startTime; }
public CallInfo setStartTime(String value) { this.startTime = value; return this; }
public String getStatus() { return status; }
public CallInfo setStatus(String value) { this.status = value; return this; }
public String getTo() { return to; }
public CallInfo setTo(String value) { this.to = value; return this; }
public String getToFormatted() { return toFormatted; }
public CallInfo setToFormatted(String value) { this.toFormatted = value; return this; }
public String getUri() { return uri; }
public CallInfo setUri(String value) { this.uri = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /calls/active HTTP/1.1 Host: team.evovoice.io Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"calls":[{"accountSid":"String","answeredBy":"String","callerName":"String","dateCreated":"String","dateUpdated":"String","direction":"String","duration":0,"endTime":"String","forwardedFrom":"String","from":"String","fromFormatted":"String","parentCallSid":"String","phoneNumberSid":"String","price":0,"priceUnit":"String","sid":"String","startTime":"String","status":"String","to":"String","toFormatted":"String","uri":"String"}]}