Requires any of the roles: | SystemAdministrator, Manager |
GET | /calls/active |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Voice.Api.Dashboard;
namespace Voice.Api.Dashboard
{
public partial class CallInfo
{
public virtual string AccountSid { get; set; }
public virtual string Annotation { get; set; }
public virtual string AnsweredBy { get; set; }
public virtual string CallerName { get; set; }
public virtual string DateCreated { get; set; }
public virtual string DateUpdated { get; set; }
public virtual string Direction { get; set; }
public virtual int Duration { get; set; }
public virtual string EndTime { get; set; }
public virtual string ForwardedFrom { get; set; }
public virtual string From { get; set; }
public virtual string FromFormatted { get; set; }
public virtual string ParentCallSid { get; set; }
public virtual string PhoneNumberSid { get; set; }
public virtual decimal Price { get; set; }
public virtual string PriceUnit { get; set; }
public virtual string Sid { get; set; }
public virtual string StartTime { get; set; }
public virtual string Status { get; set; }
public virtual string To { get; set; }
public virtual string ToFormatted { get; set; }
public virtual string Uri { get; set; }
}
///<summary>
///Gets all activecalls
///</summary>
[Api(Description="Gets all activecalls")]
public partial class GetActiveCalls
: IGet
{
///<summary>
///The account ID to retrieve for
///</summary>
[ApiMember(Description="The account ID to retrieve for")]
public virtual string AccountId { get; set; }
}
public partial class GetActiveCallsResponse
{
public GetActiveCallsResponse()
{
Calls = new List<CallInfo>{};
}
public virtual List<CallInfo> Calls { 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 } ] }