smalot/kong-api

PHP Wrapper for Kong API Gateway - Microservices Management Layer, delivering high performance and reliability.

v0.4 2017-10-04 17:41 UTC

This package is not auto-updated.

Last update: 2024-12-18 03:48:31 UTC


README

PHP Wrapper for Kong API Gateway - Microservices Management Layer, delivering high performance and reliability.

Build Status Current Version composer.lock

Total Downloads Monthly Downloads Daily Downloads

Compatibility

Currently supported Kong version: 0.11.

Supported services:

  • Api
  • Certificate
  • Consumer
  • Plugin
  • Sni
  • Target
  • Upstream

Requires at least PHP 5.6.

Install

This library can be installed with composer:

composer require smalot/kong-api

Usage

$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);