Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Technology Update

API Management
●●mance and health analytics
●●Automate management and integrate
●●using REST API

Solution at MyGov ●●Provision API Management and scale


●●it on demand

Components
Publish, manage, secure and analyze APIs in ●●MyGov API Gateway
minutes ●●MyGov API Dashboard

Technology Brief
Edited by
MOHAN DAS VISWAM API Gateway on MyGov is an open source
solution that is fast, scalable and modern.
good Application Program- Basically, it is an implementation of
The API Management Solution ming Interface (API) gateway that sits in front of APIs and acts
management system
deployed at MyGov facilitates provides a simple yet robust
as a single point of entry for a defined
group of micro-services or APIs. In
the connection of data and platform for creating, anno- addition to accommodating direct requests,
tating and publishing APIs. it is also being used to invoke multiple
business functions. MyGov It also simplifies the process of finding, back-end services and aggregate results.
understanding and using APIs, along
uses Tyk as its API Gateway with the processes and services behind Gateway performs the Authentication,
them. Such an API Management Solution Security, Traffic Control, Caching,
and API Dashboard. facilitates the connection of data and Logging, Analytics, Monitoring and much
business functions so that organizations more. It can run completely independent-
can enable access to applications via ly, requiring only MongoDB and Redis to
mobile, cloud, and on-premise environ- be effective, and it can scale horizontally.
ments. MyGov uses Tyk as its API Gate-
way and API Dashboard. Important Features of Gateway
●●Quotas and rate limiting
Manage All your APIs at
One Place ●●Authentication
ALKA MISHRA
●●Expose all APIs behind a single IP ●●On-the-fly transforms
Deputy Director General
amishra@nic.in ●●and domain ●●Caching
●●View near real-time usage, perfor- ●●Logging

DURGA PRASAD Onboarding Definition &


MISRA (Dev Portal) Publication
Sr. Technical Director
dpmisra@nic.in

Analytics to
Assess Value
API Security
NARENDER of APIs Management
KUMAR JAIN
Scientist-D
nk.jain@nic.in

Ongoing Traffic
Monitoring & Management
Maintenance (API Gateway)

RAVI KUMAR
Scientist-C Fig. 1: API Management Life Cycle
ravi.k@nic.in

34 informatics.nic.in | October 2019


of the application. Rather than having to
invoke specific services, clients simply
talk to the gateway.
●●The API Gateway provides each
client with a specific API. This reduces
Client the number of round trips between the
client and application.
●●It also simplifies the client code.
Rate-Limiting Authentication Transformations
Drawbacks
●●It is yet another highly available
Caching Logging ....and More component that must be developed,
deployed and managed.
●●There is also a risk that the API Gate-
MYGov API Gateway way becomes a development bottleneck.
Developers must update the API Gate-
way in order to expose each micro-ser-
vice endpoints.
API API API
●●It is important that the process for
API API updating the API Gateway be as
Public Private Public lightweight as possible. Otherwise,
Partner Partner developers will be forced to wait in line
in order to update the gateway.
Fig. 2: API Gateway Components of MyGov
How to Configure an API?
●●Virtual endpoints managing the installation as well as clear Creating an API Endpoint - It consists
and granular analytics. of Base and Advance Configuration to
●●Notifications and events create any API Endpoint.
Important features of
The Gateway is Capable of: Dashboard Base Configuration - Define the API
●●Managing session objects. Name, API Slug, Target URL (having
●●Design endpoints with a GUI
provision of Round Robin Load Balanc-
●●Managing and listing policies. ●●Interrogate API usage with powerful ing), Policies (assign the policy), Service
●●Managing and listing API definitions. ●●analytics Discovery and Authentication Mode
(choose one of the modes i.e., Token/
●●Hot reloading a cluster configuration ●●Unify API management
HMAC/ Oauth2.0/ Keyless) to create a
●●(configuration changes can be pushed ●●A user- friendly GUI new API Endpoint.
●●without any downtime).
●●OAuth client creation. Benefits Advance Configuration - Define the
●●It encapsulates the internal structure version, designer (to manage processes
API Dashboard on MyGov is used for
creating, publishing, maintaining, moni- Average usage over time
toring, and securing REST APIs at any Start: 28/4/2015 End: 20/5/2015 Version: All Day
scale. It provides maximized scalability Day Month Year Day Month Year API Version

and reliability by offloading API Govern- Success (hts) Errors (hts) Average upstream latency (ms)
ance to the edge. It is the visual Graphical 140

User Interface (GUI) and analytics 120


100
platform for managing the APIs.
80
60
Dashboard allows to maintain, manage, 40
promote and protect the APIs quickly 20
and easily, using the open source 0
gateway combined with a sleek user Apr 28 00:00 Apr 30 14:20 May 02 21:53 May 05 05:26 May 07 13:00 May 09 20:33 May 12 04:06 May 14 11:40 May 16 19:13 May 20 00:00

interface control panel. It provides an Fig. 3: API Dashboard Activity


easy-to-use management interface for

October 2019 | informatics.nic.in 35


specific endpoints by default, it will
proxy all requests), cache options, Error breakdown Most popular endpoints
CORS, batch requests, segment tags,
white listed IPs and WebHooks. Path Visits Errors
/get 439 138
Uptime Tests - Enabling this option will /post 48 3
cause gateway to check the target URL
/ 1 1
against hosts in the uptime tests for
downtime. This should only be used with /beep 1 1
round-robin load balancing. /postme 1 0

Creating an API Key - A key can be


created and the access permissions can Bad Request Unauthorized Rate limit exceeded Forbidden
be set up for a specific key. Multiple
settings can be enabled including quota Fig. 4: API Dashboard Activity
settings, rate limits and access rules for
specific API versions. It is running in security options that can be applied to an ●●Quota for a user.
hashed key mode. This means that keys API key. It acts as a template that can
available on the system may not be listed, override individual sections of an API Creating WebHooks - WebHooks are a
since keys have been encrypted. If the key (or identity) in Tyk. For example, if great way to let external applications
API key details are known, it is still 10,000 API keys were issued, how would know about the status of a user, an API or
possible to edit, delete and modify API it be ensured that all 10,000 users an event that has occurred in the Tyk
keys. received an upgraded quota or accessed a gateway. New WebHooks can be created
new API that was published? here and re-used in API Definitions.
Defining Policies - Policies are a way to They can be assigned to different events
enforce a standard set of rate limits, All 10,000 keys could be modified manu- such as quota violations and rate-limiting
quotas and access rules on a set of keys. ally, or a policy could be applied to each violations.
When used in conjunction with the of those keys when they are created, and
portal, developers who enroll for API then the policy is modified once. A WebHook that can be reused across
access will be given a key that is attached API definitions can be set up. WebHooks
to a specific policy. The policy settings Policies can set: support custom headers and can be
are refreshed every time a key attempts deployed using GET, POST, PUT,
access, meaning that updating a policy ●●Access lists for API and versions.
DELETE and PATCH HTTP verbs.
will have an effect across any keys that ●●Access lists for method and path
are attached to it.
●●(granular control). Summary
Security policy incorporates several ●●Rate limit for a user. For most micro-services based applica-
tions, it makes sense to implement an
API Management Solution, which acts as
a single entry point into a system. The
TYK API Gateway API Gateway is responsible for request
routing, composition and protocol trans-
lation. It provides each of the applica-
Internet TYK API Gateway
tion’s clients with a custom API. The
Origin Services API Gateway can also mask failures in
Load
Balancer the backend services by returning cached
or default data.
TYK API Gateway

For further information, please contact:


TYK Dashboard/ ALKA MISHRA
portal Redis
Load Deputy Director General
Balancer Open Data, Web & Cloud Technology Group
A4B4, 3rd Floor
NIC HQ, A-Block, CGO Complex
NEW DELHI - 110003
MongoDB TYK Pump
Email: amishra@nic.in
Fig.5: Overall Architecture of API Gateway and Dashboard Phone: 011-24305395

36 informatics.nic.in | October 2019

You might also like