https://github.com/brettt89/incapsula-php
Incapsula APIv1 Client for PHP
https://github.com/brettt89/incapsula-php
api api-client api-client-php imperva incapsula incapsula-api php php7
Last synced: 4 months ago
JSON representation
Incapsula APIv1 Client for PHP
- Host: GitHub
- URL: https://github.com/brettt89/incapsula-php
- Owner: brettt89
- License: mit
- Created: 2020-06-13T05:41:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-23T08:46:01.000Z (almost 5 years ago)
- Last Synced: 2025-02-06T09:16:13.012Z (5 months ago)
- Topics: api, api-client, api-client-php, imperva, incapsula, incapsula-api, php, php7
- Language: PHP
- Homepage:
- Size: 180 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Incapsula SDK (v1 API Binding for PHP 7)
[](https://github.com/brettt89/incapsula-php)
[](https://codecov.io/gh/brettt89/incapsula-php)## Installation
The recommended way to install this package is via the Packagist Dependency Manager ([brettt89/incapsula-api-php](https://packagist.org/packages/brettt89/incapsula-api-php)).
```bash
$ composer require brettt89/incapsula-api-php
```## Incapsula API version 1
The Incapsula API can be found [here](https://docs.imperva.com/bundle/cloud-application-security/page/api/api.htm).
Each API call is provided via a similarly named function within various classes in the **IncapsulaAPI** namespace:- [x] [Account](https://docs.imperva.com/bundle/cloud-application-security/page/api/accounts-api.htm)
- [x] [Sites](https://docs.imperva.com/bundle/cloud-application-security/page/api/sites-api.htm)
- [x] [DDoS Protection](https://docs.imperva.com/bundle/cloud-application-security/page/api/ddos-for-networks.htm)
- [ ] [Traffic Statistics and Details](https://docs.imperva.com/bundle/cloud-application-security/page/api/traffic-api.htm)
- [ ] [Login Protect](https://docs.imperva.com/bundle/cloud-application-security/page/api/login-protect-api.htm)
- [ ] [Integration API](https://docs.imperva.com/bundle/cloud-application-security/page/api/integration-api.htm)
- [ ] [Infrastructure Protection Test Alerts](https://docs.imperva.com/bundle/cloud-application-security/page/api/network-ddos-api.htm)Note that this repository is currently under development, additional endpoints are being actively added.
## Getting Started
```php
$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));
```## Contributions
Please submit any contributions as a pull request to the `master` branch.