A very simple interface to track API calls.

1.2.13 2019-10-29 15:48 UTC

This package is auto-updated.

Last update: 2024-01-29 03:24:37 UTC



A very simple interface to track API calls.

cAPIpture is used in various Silktide API client libraries with a simple goal of collecting data.

There is no implementation here but this data could be used for various purposes including billing, usage reporting etc.

Getting started

Install from composer

composer require silkitde/capiture

Trait usage

There is an optional trait which can make life slightly easier by setting up the scaffolding.

Don't forget to set your implementation through the setApiUsageTracker() method.


use Silktide\Capiture\ApiUsageTracker;

class ApiClient
    use ApiUsageTracker;
    public function makeRequest()
        $this->trackApiUsage('my-api','', true, ['additional' => 'optional-metrics']);