GithubHelp home page GithubHelp logo

isabella232 / apidoor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from future-architect/apidoor

0.0 0.0 0.0 853 KB

apidoor is a framework that can be used to build a WebAPI platform

License: Apache License 2.0

Shell 0.22% JavaScript 1.07% Go 94.12% TypeScript 1.24% Makefile 0.57% HTML 0.22% PLpgSQL 0.83% Vue 1.26% Dockerfile 0.48%

apidoor's Introduction

logo

apidoor

apidoor is an OSS product that accelerates the construction of the API market.

日本語

🚧This project is Work in Progress🚧

What is apidoor for

You can use apidoor when

  • you want to open APIs for many users and have trouble to publish a list of API and an access token.

Features

  • Routing and access management of WebAPI
  • Auto publish of an API access token
  • Management of products
  • Check the usage situation of APIs

Getting Started

Prerequisites:

  • docker v20.10^
  • docker-compose v1.29^

Flow:

# Clone me
git clone https://github.com/future-architect/apidoor.git
cd apidoor

# Build all services
docker compose build \
  --build-arg http_proxy=${YOUR_PROXY} \
  --build-arg https_proxy=${YOUR_PROXY} \
  --build-arg proxy=${YOUR_PROXY} \
  --build-arg https-proxy=${YOUR_PROXY}

# Launch apidoor services
docker compose up -d

# Set your first API routing through management-api, and check apidoor works
# Case 1: original api
curl -X POST -H "Content-Type: application/json" \
-d '{"api_key": "key", "path": "test", "forward_url": "http://test-server:3333/welcome"}' localhost:3001/mgmt/routing

curl -H "Content-Type: application/json" -H "X-Apidoor-Authorization:key" localhost:3000/test
# welcome to apidoor!

# Case 2: external api using https scheme with query parameter
curl -X POST -H "Content-Type: application/json" \
-d '{"api_key": "key", "path": "github/search", "forward_url": "https://api.github.com/search/repositories"}'\
localhost:3001/mgmt/routing

curl -H "Content-Type: application/json" -H "X-Apidoor-Authorization:key" localhost:3000/github/search?q=apidoor
# <search result>

# Case 3: external api with access token
# You must generate your GitHub's access token allowing to access repo:status in advance
curl -X POST -H "Content-Type: application/json" \
-d '{"api_key": "key", "path": "github/user/repos", "forward_url": "https://api.github.com/user/repos"}' \
localhost:3001/mgmt/routing

curl -H "Content-Type: application/json" -H "X-Apidoor-Authorization:key" \
-H "Authorization: token <your GitHub's access token>" localhost:3000/github/user/repos
# <your repositories' status>

# Check log file is provided
cat ./log/log.csv

# You can also access Management Console
localhost:8080

Architecture

TODO

License

Apache 2

apidoor's People

Contributors

future-mano avatar future-shibukawa2747 avatar future-taga avatar gmidorii avatar keiichifujino avatar ma91n avatar okb-okb avatar saiton03 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.