0.7.4 • Published 4 years ago

simpleapimanagement v0.7.4

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

Simple API Management Node.js middleware

Simple API Management Logo Simple API Management Logo

Installation

This is a Node.js module available through the npm registry.

$ npm install simpleapimanagement

Usage

const simpleAPIManagement = require('simpleapimanagement');

var options = {
  apiKey: 'add your API key here',
  rateLimits: false, // default
  metrics: true, // default
  // [OPTIONAL] 
  exclude: ['authorization'] 
  // [OPTIONAL]
  // identifier can be used to apply rate limits for specific attributes like ip or user
  identifier: function (req, res) { 
    if (req.user) {
      return req.user.id;
    }
    return undefined;
  },
};

app.use(simpleAPIManagement(options));
OptionUse
apiKeyrequired: true Get your API key from our app https://app.simpleapimanagement.com. Your API key will be displayed after signign up and creating an API.
rateLimitsdefault: false If true, configured rate limits will be checked. For more information please see: https://simpleapimanagement.com/ratelimits
metricsdefault: true By default, we send metics to our service. Metrics consists of various informations like the path, method, statusCode, request, response. This information is used to aggregate your APIs metrics. For more information please see: https://simpleapimanagement.com/metrics
excludeoptional An array of keys from your API requests and responses headers as well as bodies that you wish to exclude from sending to Simple API Management. We recommend to exclude any sensitive information.
0.7.4

4 years ago

0.7.3

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago