Home > OS >  What is your suggestion for defining this VOIP web-service?
What is your suggestion for defining this VOIP web-service?

Time:01-12

How do you name such a method?

Inputs:
  called number
  call date
Output:
  caller number
  call datetime
  call duration
  call status

And how to design web-service routes according to best practices?

For example:
/getCallsToOn?calledNumber=&callDate=
or
/get/calls/to/{calledNumber}/{callDate}

CodePudding user response:

I implemented it this way:

/get/calls?calledNumber=&callDate=

So, i decided to serve all VOIP read requests in /get and all CDR requests in /get/calls. It can be extended further by adding more filter parameters such as fromDate, toDate, callerNumber, ... .

  •  Tags:  
  • Related