Requires any of the roles: | SystemAdministrator, Manager |
GET | /calls/active |
---|
namespace Voice.Api.Dashboard
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type CallInfo() =
member val AccountSid:String = null with get,set
member val Annotation:String = null with get,set
member val AnsweredBy:String = null with get,set
member val CallerName:String = null with get,set
member val DateCreated:String = null with get,set
member val DateUpdated:String = null with get,set
member val Direction:String = null with get,set
member val Duration:Int32 = new Int32() with get,set
member val EndTime:String = null with get,set
member val ForwardedFrom:String = null with get,set
member val From:String = null with get,set
member val FromFormatted:String = null with get,set
member val ParentCallSid:String = null with get,set
member val PhoneNumberSid:String = null with get,set
member val Price:Decimal = new Decimal() with get,set
member val PriceUnit:String = null with get,set
member val Sid:String = null with get,set
member val StartTime:String = null with get,set
member val Status:String = null with get,set
member val To:String = null with get,set
member val ToFormatted:String = null with get,set
member val Uri:String = null with get,set
[<AllowNullLiteral>]
type GetActiveCallsResponse() =
member val Calls:ResizeArray<CallInfo> = new ResizeArray<CallInfo>() with get,set
///<summary>
///Gets all activecalls
///</summary>
[<Api(Description="Gets all activecalls")>]
[<AllowNullLiteral>]
type GetActiveCalls() =
interface IGet
///<summary>
///The account ID to retrieve for
///</summary>
[<ApiMember(Description="The account ID to retrieve for")>]
member val AccountId:String = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: evovoice.io Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { calls: [ { accountSid: String, annotation: 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 } ] }