How to track the number of requests sent by users of web services or APIs?

How many requests were sent, or how many times did the user request data from a particular web service? I want to track the count of records such as Google Analytics.

Suppose I created a web service as shown below.

function myWebServices() {
  $data = array();
  $data['usersInfo'] = 'lorem Ipsum';
  $data['status'] = '1';
  return json_encode($data);
}

I sent the URL of this web service to my sellers, they got access to this function and got the data. But I also want to track the supplier’s request how many times they sent.

Is there a way to track this as google analytics?

+4
source share

Source: https://habr.com/ru/post/1621389/


All Articles