Tracking of User Activity - API Requests

We have a requirement to extend user tracking to be able to track API requests. We need to track who, when, which url and in case of data page also number of rows.