PHP Wrapper for Kong API Gateway - Microservices Management Layer, delivering high performance and reliability.
Currently supported Kong version: 0.11
.
Supported services:
- Api
- Certificate
- Consumer
- Plugin
- Sni
- Target
- Upstream
Requires at least PHP 5.6.
This library can be installed with composer:
composer require smalot/kong-api
$factory = new \Smalot\Kong\ServiceFactory();
/** @var \Smalot\Kong\Services\Api $service */
$service = $factory->get('api');
$response = $service->create(
[
'name' => $name,
'uris' => '/ping',
'upstream_url' => 'http://ping/',
]
);
$api = $response->json();
var_dump($api);