The recommended way to install this package is via the Packagist Dependency Manager (brettt89/incapsula-api-php).
$ composer require brettt89/incapsula-api-php
The Incapsula API can be found here. Each API call is provided via a similarly named function within various classes in the IncapsulaAPI namespace:
- Account
- Sites
- DDoS Protection
- Traffic Statistics and Details
- Login Protect
- Integration API
- Infrastructure Protection Test Alerts
Note that this repository is currently under development, additional endpoints are being actively added.
$key = new IncapsulaAPI\Auth\ApiKey('Api-ID', 'Api-Key');
$adapter = new IncapsulaAPI\Adapter\Guzzle($key);
$account = new IncapsulaAPI\Endpoint\Account($adapter);
$account_id = 123456;
print_r($account->getSites($account_id));
Please submit any contributions as a pull request to the master
branch.