Reactive Interaction Gateway

Reactive Interaction Gateway

  • User Documentation
  • Source Documentation
  • GitHub

›Advanced Guides

Getting Started

  • Intro
  • Tutorial
  • Examples
  • FAQ

Main Concepts

  • Architecture
  • Features
  • Event Format
  • Publishing Events
  • Receiving Events
  • Forwarding Requests
  • User Authorization
  • Distributed Tracing

Advanced Guides

  • API Gateway Management
  • API Gateway Synchronization
  • Avro
  • JWT Blacklisting
  • Azure Event Hubs

RIG in Production

  • Operator's Guide
  • API Documentation
  • Phoenix LiveDashboard
  • Prometheus Metrics
  • HTTPS
  • Scaling

Hacking the Source

  • Developer's Guide

API Gateway Management

RIG offers an API for creating, changing, and removing API endpoint definitions at runtime. Changes caused by calling the API on one RIG node will automatically get distributed among the cluster, so all nodes share the same configuration without having to sync anything manually. Check out the API Gateway Synchronization to learn more.

Swagger

Easiest way how to work with internal REST API is via Swagger.

NOTE: API running on port 4010 is intended to be internal and thus not publicly exposed without any authorization -- to prevent malicious actions.

docker run -p 4000:4000 -p 4010:4010 accenture/reactive-interaction-gateway

## Notice the "Schemes" field to select between http and https
# Visit http://localhost:4010/swagger-ui

You'll right away see list of all internal APIs.

Create new API

POST /v2/apis

{
  "id": "new-service",
  "name": "new-service",
  "auth_type": "jwt",
  "auth": {
    "use_header": true,
    "header_name": "Authorization",
    "use_query": false,
    "query_name": ""
  },
  "versioned": false,
  "version_data": {
    "default": {
      "endpoints": [
        {
          "id": "post-auth-register",
          "path_regex": "/auth/register",
          "method": "POST",
          "secured": false
        }
      ]
    }
  },
  "proxy": {
    "use_env": true,
    "target_url": "AUTH_HOST",
    "port": 6666
  }
}

Read list of APIs

GET /v2/apis

This is also way how to check if your APIs were loaded properly.

Read detail of specific API

GET /v2/apis/:api_id

Update API

PUT /v2/apis/:api_id

{
  "id": "new-service",
  "name": "new-service",
  "auth_type": "jwt",
  "auth": {
    "use_header": true,
    "header_name": "Authorization",
    "use_query": false,
    "query_name": ""
  },
  "versioned": false,
  "version_data": {
    "default": {
      "endpoints": [
        {
          "id": "post-auth-register",
          "path_regex": "/auth/register",
          "method": "POST",
          "secured": false
        }
      ]
    }
  },
  "proxy": {
    "use_env": true,
    "target_url": "AUTH_HOST",
    "port": 6666
  }
}

Delete API

DELETE /v2/apis/:api_id

← Distributed TracingAPI Gateway Synchronization →
  • Swagger
  • Create new API
  • Read list of APIs
  • Read detail of specific API
  • Update API
  • Delete API
Docs
IntroGetting Started
Community
User ShowcaseSlackStack Overflow@KevnBadr
More
Star RIG on GitHub
Copyright © 2021 Accenture