NetNXT Logo
Data, AI & API Security

API Gateway

An API gateway is a service that sits in front of an organisation's APIs and acts as the single entry point for all API calls. It routes each request to the right backend service, checks authentication, enforces rate limits and logs activity. It simplifies API management and security but needs dedicated API security tools for deeper protection.

How does an API gateway work?

Modern applications are built from many small services, each with its own API. Without a gateway, every mobile app, website and partner would need to know where each service lives and how to call it. An API gateway puts one address in front of all of them.

A typical request flows like this:

  1. A mobile app, website or partner system sends a request to the gateway, for example to view an order.

  2. The gateway checks who is calling, usually with an API key or an OAuth token.

  3. It checks the caller hasn't exceeded their rate limit.

  4. It routes the request to the right backend service, or splits it across several services and combines the answers.

  5. It returns the response to the caller and logs the transaction for monitoring.

Core functions of an API gateway

Function

What it does

Routing

Sends each request to the right backend service

Authentication and authorisation

Verifies API keys, tokens or certificates before letting requests through

Rate limiting and throttling

Caps how many requests a caller can make, protecting services from overload and abuse

Request transformation

Converts formats and protocols, for example between REST and older SOAP services

Aggregation

Combines responses from several services into one reply

Caching

Stores frequent responses to reduce load and speed up replies

Monitoring and logging

Records traffic, errors and response times for operations and security teams

Popular API gateways include AWS API Gateway, Azure API Management, Google Apigee and Kong.

What an API gateway does for security

Because all API traffic passes through it, the gateway is a natural place to enforce security:

  • Central authentication: one place to require valid API keys, OAuth tokens or mutual TLS.

  • Encryption: enforces HTTPS for all API traffic.

  • Rate limiting: slows down brute force, scraping and some DDoS attacks.

  • Access rules: allow or block callers by IP address, region or client.

  • Basic validation: reject requests that don't match the expected format.

  • Audit trail: a single log of who called which API and when.

What an API gateway can't protect against

A gateway is necessary but not sufficient. Common gaps include:

  • APIs that bypass it: forgotten, test or undocumented "shadow" APIs, and service-to-service traffic inside the network, never pass through the gateway.

  • Business logic abuse: a logged-in user changing an ID in a request to view someone else's data (broken object level authorisation) looks like a valid call. It is the top risk in the OWASP API Security Top 10.

  • Sensitive data in responses: a gateway rarely checks what data an API sends back, so excessive data exposure goes unnoticed.

  • Injection attacks: threats such as SQL injection need deeper inspection by a WAF or API security tool.

  • Low-and-slow attacks: abuse spread across many accounts or IP addresses stays under rate limits.

Closing these gaps is the job of dedicated API security: discovering every API, understanding normal behaviour and detecting abuse in real time.

API Gateway vs WAF

AspectAPI GatewayWAF (Web Application Firewall)
Main purposeManage and route API trafficBlock attacks on web apps and APIs
Security focusWho can call an API, and how oftenMalicious content inside requests, such as SQL injection or cross-site scripting
Typical controlsAuthentication, rate limits, routing, loggingAttack signatures, bot protection, input inspection
Blind spotsMalicious payloads, business logic abuseBusiness logic abuse, API-specific context

Frequently asked questions

How NetNXT can help

Our AI & API Security service puts this into practice for your organisation.

AI & API Security

API security

API security is the practice of protecting application programming interfaces from attacks, misuse and data exposure. Because APIs connect apps, partners and cloud services to sensitive data, flaws such as broken authorisation or weak authentication can leak customer information. It combines API discovery, strong authentication, testing and runtime monitoring, guided by the OWASP API Security Top 10.

Data, AI & API SecurityRead more

SQL injection

SQL Injection

An attack that inserts malicious database commands into an application's input fields.

Threats & Attacks

OAuth

A standard that lets an app access resources on a user's behalf without seeing their password.

Identity & Access

WAF

Web Application Firewall

A firewall that filters web traffic to block attacks on web applications, such as SQL injection.

Data, AI & API Security

DDoS attack

Distributed Denial of Service

Flooding a website or network with traffic from many sources so it slows down or goes offline.

Threats & Attacks

OWASP API Top 10

A list of the ten most critical API security risks, published by the OWASP Foundation.

Data, AI & API Security