call log request did not work in sand box

  • 1
  • Question
  • Updated 2 years ago
  • Doesn't Need an Answer
  • (Edited)
same code for call log api, worked last week, this week I tried again, stopped working, return empty.    Active call api works.


Dim URL As New Uri(WebUtility.HtmlEncode("https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log"))

API_request.Method = "GET"        API_request.Headers("Authorization") = "Bearer " & Acc_Token
        API_request.Accept = "application/json"
===================================

+ Me {REST_API.Form1, Text: Form1} REST_API.Form1+ API_request {System.Net.HttpWebRequest} System.Net.HttpWebRequest
- response {System.Net.HttpWebResponse} System.Net.HttpWebResponse
__identity Nothing Object
CharacterSet "UTF-8" String
ConnectionGroupName Nothing String
ContentEncoding "" String
ContentLength -1 Long
ContentType "application/json; charset=UTF-8" String
+ Cookies {System.Net.CookieCollection} System.Net.CookieCollection
+ CoreResponseData {System.Net.CoreResponseData} System.Net.CoreResponseData
+ Headers {Transfer-Encoding: chunked  Connection: keep-alive  RCRequestId: b4403588-97d2-11e6-9a4e-005056bb26b9  RoutingKey: SJC11P01PAS01  Content-Language: en-US  Vary: Accept-Encoding, User-Agent  x-throttling-group: Heavy  X-Rate-Limit-Group: heavy  X-Rate-Limit-Limit: 10  X-Rate-Limit-Remaining: 9  X-Rate-Limit-Window: 60  X-AGW-Host: sjc11-c01-agw13.devtest.ringcentral.com  Content-Type: application/json; charset=UTF-8  Date: Fri, 21 Oct 2016 21:09:50 GMT  Set-Cookie: RCRoutingInfo=B:JjvG963zMhLp2i9ovcWFNFBA3Z0SlO9Db3kZ8SMmxrq2PPC09d0V6DyGF34WxjqZ; Path=/  Server: nginx/1.8.0    } System.Net.WebHeaderCollection
Identity Nothing Object
InternalSetFromCache Write Only Properties are not supported Boolean
InternalSetIsCacheFresh Write Only Properties are not supported Boolean
InternalSetIsMutuallyAuthenticated Write Only Properties are not supported Boolean
IsCacheFresh False Boolean
IsFromCache False Boolean
IsMutuallyAuthenticated False Boolean
IsWebSocketResponse False Boolean
KeepAlive True Boolean
LastModified #10/21/2016 4:10:03 PM# Date
m_Certificate Nothing System.Security.Cryptography.X509Certificates.X509Certificate
m_CharacterSet "UTF-8" String
m_ConnectionGroupName Nothing String
+ m_ConnectStream {System.Net.ConnectStream} System.IO.Stream
m_ContentLength -1 Long
+ m_cookies {System.Net.CookieCollection} System.Net.CookieCollection
+ m_CoreResponseData {System.Net.CoreResponseData} System.Net.CoreResponseData
m_disposed False Boolean
+ m_HttpResponseHeaders {Transfer-Encoding: chunked  Connection: keep-alive  RCRequestId: b4403588-97d2-11e6-9a4e-005056bb26b9  RoutingKey: SJC11P01PAS01  Content-Language: en-US  Vary: Accept-Encoding, User-Agent  x-throttling-group: Heavy  X-Rate-Limit-Group: heavy  X-Rate-Limit-Limit: 10  X-Rate-Limit-Remaining: 9  X-Rate-Limit-Window: 60  X-AGW-Host: sjc11-c01-agw13.devtest.ringcentral.com  Content-Type: application/json; charset=UTF-8  Date: Fri, 21 Oct 2016 21:09:50 GMT  Set-Cookie: RCRoutingInfo=B:JjvG963zMhLp2i9ovcWFNFBA3Z0SlO9Db3kZ8SMmxrq2PPC09d0V6DyGF34WxjqZ; Path=/  Server: nginx/1.8.0    } System.Net.WebHeaderCollection
m_IsCacheFresh False Boolean
m_IsFromCache False Boolean
m_IsMutuallyAuthenticated False Boolean
m_IsVersionHttp11 True Boolean
m_IsWebSocketResponse False Boolean
m_MediaType Nothing String
m_propertiesDisposed False Boolean
m_StatusCode OK {200} System.Net.HttpStatusCode
m_StatusDescription "OK" String
+ m_Uri {https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log} System.Uri
m_UsesProxySemantics False Boolean
+ m_Verb {System.Net.KnownHttpVerb} System.Net.KnownHttpVerb
m_WebSocketConnectionStream Nothing System.IO.Stream
Method "GET" String
+ ProtocolVersion {1.1} System.Version
+ ResponseStream {System.Net.ConnectStream} System.IO.Stream
+ ResponseUri {https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log} System.Uri
Server "nginx/1.8.0" String
StatusCode OK {200} System.Net.HttpStatusCode
StatusDescription "OK" String
SupportsHeaders True Boolean
str_return Nothing String
+ URL {https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log} System.Uri
Photo of Yanmei

Yanmei

  • 396 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of VB

VB, Official Rep

  • 1,470 Points 1k badge 2x thumb
I just tested and there are no problems. Can you try again ?

If it has problems, can you give us more details with full HTTP Request and Response? 
Photo of Yanmei

Yanmei

  • 396 Points 250 badge 2x thumb

I tried it, still didn't work. return length is -1, Request is good because I can get Active Call,  for Any type of Call log, return length is -1 which is empty.

Dim URL As New Uri(WebUtility.HtmlEncode("https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log";))


'Dim URL As New Uri(WebUtility.HtmlEncode("https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log?&dateFrom=2...)


'Dim URL As New Uri(WebUtility.HtmlEncode("https://platform.devtest.ringcentral.com/restapi/v1.0/account/134091004/extension/134091004/call-log... = Voice&phoneNumber = 16503514555"))

Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb
Does the timeframe for the call logs you're requesting include a period which contains calls?
Photo of Yanmei

Yanmei

  • 396 Points 250 badge 2x thumb
yes, it did have call records. This morning I tried, it worked, I got call log response back and some call log records in my code. I don't know why it did not work last Friday.   any way, from this point, Please ignore it. thanks for help.
Photo of Yanmei

Yanmei

  • 396 Points 250 badge 2x thumb

Request:

Dim URL As New Uri(WebUtility.HtmlEncode("https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log";))

API_request.Method = "GET"

API_request.Headers("Authorization") = "Bearer " & Acc_Token

API_request.Accept = "application/json"

Response:

+  Me {REST_API.Form1, Text: Form1} REST_API.Form1
  _Stream Nothing System.IO.StreamReader
+  API_request {System.Net.HttpWebRequest} System.Net.HttpWebRequest
+  e {System.Windows.Forms.MouseEventArgs} System.EventArgs
-  response {System.Net.HttpWebResponse} System.Net.HttpWebResponse
  __identity Nothing Object
  CharacterSet "UTF-8" String
  ConnectionGroupName Nothing String
  ContentEncoding "" String
  ContentLength -1 Long
  ContentType "application/json; charset=UTF-8" String
+  Cookies {System.Net.CookieCollection} System.Net.CookieCollection
+  CoreResponseData {System.Net.CoreResponseData} System.Net.CoreResponseData
+  Headers {Transfer-Encoding: chunked  Connection: keep-alive  RCRequestId: 8ae9ca14-97d7-11e6-abc3-005056bb26b9  RoutingKey: SJC11P01PAS01  Content-Language: en-US  Vary: Accept-Encoding, User-Agent  x-throttling-group: Heavy  X-Rate-Limit-Group: heavy  X-Rate-Limit-Limit: 10  X-Rate-Limit-Remaining: 9  X-Rate-Limit-Window: 60  X-AGW-Host: sjc11-c01-agw11.devtest.ringcentral.com  Content-Type: application/json; charset=UTF-8  Date: Fri, 21 Oct 2016 21:44:28 GMT  Set-Cookie: RCRoutingInfo=B:JjvG963zMhLp2i9ovcWFNFBA3Z0SlO9Db3kZ8SMmxrrUKU0aO0VJmtfRX8zygttx; Path=/  Server: nginx/1.8.0    } System.Net.WebHeaderCollection
  Identity Nothing Object
  InternalSetFromCache Write Only Properties are not supported Boolean
  InternalSetIsCacheFresh Write Only Properties are not supported Boolean
  InternalSetIsMutuallyAuthenticated Write Only Properties are not supported Boolean
  IsCacheFresh False Boolean
  IsFromCache False Boolean
  IsMutuallyAuthenticated False Boolean
  IsWebSocketResponse False Boolean
  KeepAlive True Boolean
  LastModified #10/21/2016 4:44:33 PM# Date
  m_Certificate Nothing System.Security.Cryptography.X509Certificates.X509Certificate
  m_CharacterSet "UTF-8" String
  m_ConnectionGroupName Nothing String
+  m_ConnectStream {System.Net.ConnectStream} System.IO.Stream
  m_ContentLength -1 Long
+  m_cookies {System.Net.CookieCollection} System.Net.CookieCollection
+  m_CoreResponseData {System.Net.CoreResponseData} System.Net.CoreResponseData
  m_disposed False Boolean
+  m_HttpResponseHeaders {Transfer-Encoding: chunked  Connection: keep-alive  RCRequestId: 8ae9ca14-97d7-11e6-abc3-005056bb26b9  RoutingKey: SJC11P01PAS01  Content-Language: en-US  Vary: Accept-Encoding, User-Agent  x-throttling-group: Heavy  X-Rate-Limit-Group: heavy  X-Rate-Limit-Limit: 10  X-Rate-Limit-Remaining: 9  X-Rate-Limit-Window: 60  X-AGW-Host: sjc11-c01-agw11.devtest.ringcentral.com  Content-Type: application/json; charset=UTF-8  Date: Fri, 21 Oct 2016 21:44:28 GMT  Set-Cookie: RCRoutingInfo=B:JjvG963zMhLp2i9ovcWFNFBA3Z0SlO9Db3kZ8SMmxrrUKU0aO0VJmtfRX8zygttx; Path=/  Server: nginx/1.8.0    } System.Net.WebHeaderCollection
  m_IsCacheFresh False Boolean
  m_IsFromCache False Boolean
  m_IsMutuallyAuthenticated False Boolean
  m_IsVersionHttp11 True Boolean
  m_IsWebSocketResponse False Boolean
  m_MediaType Nothing String
  m_propertiesDisposed False Boolean
  m_StatusCode OK {200} System.Net.HttpStatusCode
  m_StatusDescription "OK" String
+  m_Uri {https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log} System.Uri
  m_UsesProxySemantics False Boolean
+  m_Verb {System.Net.KnownHttpVerb} System.Net.KnownHttpVerb
  m_WebSocketConnectionStream Nothing System.IO.Stream
  Method "GET" String
+  ProtocolVersion {1.1} System.Version
+  ResponseStream {System.Net.ConnectStream} System.IO.Stream
+  ResponseUri {https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log} System.Uri
  Server "nginx/1.8.0" String
  StatusCode OK {200} System.Net.HttpStatusCode
  StatusDescription "OK" String
  SupportsHeaders True Boolean
+  sender {System.Windows.Forms.Button, Text: Call Log} Object
  str_return Nothing String
+  URL {https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log} System.Uri