Fusio

Open Source API Management

Fusio is an open source API management platform which helps to build and manage REST APIs. Fusio provides all tools to quickly build an API from different data sources yet it is possible to create complete customized responses.

Overview

Fusio provides a simple and intuitive backend to control and manage your API. The following screenshots give you a first insight how Fusio works.

Development

Fusio provides a deploy mechanism where you only have to describe the capabilities of each API endpoint in simple yaml files. Through this you can save your Fusio configuration at any VCS and you are able to deploy your API on any system. All other aspects of the API lifecycle are managed by Fusio, so you can concentrate on building the actual business logic of your API.

# Routes
routes:
  "/todo": !include resources/routes/todo/collection.yaml 
  "/todo/:todo_id": !include resources/routes/todo/entity.yaml

# Schemas
schema:
  Todo: !include resources/schema/todo/entity.json 
  Todo-Collection: !include resources/schema/todo/collection.json
  Message: !include resources/schema/message.json

# Connections
connection:
  Default-Connection:
    class: Fusio\Adapter\Sql\Connection\SqlAdvanced 
    config:
      url: "sqlite:///${dir.cache}/todo-app.db"
version: 1
methods:
  GET:
    public: true
    responses: 
      200: Todo-Collection
      500: Message
    action: "App\\Todo\\Action\\Collection" 
  POST:
    public: false
    request: Todo
    responses: 
      201: Message
      500: Message
    action: "App\\Todo\\Action\\Insert"
<?php

namespace App\Todo\Action;

use Fusio\Engine\ActionAbstract;
use Fusio\Engine\ContextInterface;
use Fusio\Engine\ParametersInterface;
use Fusio\Engine\RequestInterface;

class Collection extends ActionAbstract
{
    public function handle(RequestInterface $request, ParametersInterface $configuration, ContextInterface $context)
    {
        /** @var \Doctrine\DBAL\Connection $connection */
        $connection = $this->connector->getConnection('Default-Connection'); 

        $count   = $connection->fetchColumn('SELECT COUNT(*) FROM app_todo');
        $entries = $connection->fetchAll('SELECT * FROM app_todo WHERE status = 1 ORDER BY insertDate DESC LIMIT 16');

        return $this->response->build(200, [], [
            'totalResults' => $count,
            'entry' => $entries,
        ]);
    }
}

{
  "type": "object",
  "title": "todo",
  "properties": {
    "id": {
      "type": "integer"
    },
    "status": {
      "type": "integer"
    },
    "title": {
      "type": "string",
      "minLength": 3,
      "maxLength": 32
    },
    "insertDate": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": ["title"]
}

Features

Once the API is deployed Fusio provides the following features out of the box:

build

API management

Fusio provides a powerful backend app to control and monitor your API.

assessment

Developer portal

Fusio provides a developer portal app where developer can register to use your API.

book

Documentation

Fusio provides a documentation app which shows all available API endpoints.

monetization_on

Monetization

Fusio provides a simple payment system to charge for specific routes.

account_box

OAuth2 authorization

App developer can obtain an access token to access non-public API endpoints.

swap_horiz

Rate limiting

Fusio provides a way to rate limit requests based on the user or app.

cloud_queue

Schema generation

Fusio provides an endpoint to automatically generate OAI and RAML specifications.

device_hub

Subscription support

Fusio contains a subscription layer which helps to build pub/sub for your API.

label_outline

SDK generation

Fusio can automatically generate a client SDK for your API based on the defined schema.