IP Library Granted Patent US 12,645,512
Granted Patent B1
US 12,645,512 · App. 18/090,324 · Granted Jun 2, 2026

Evaluation and validation of application programming interface requests and responses for microservices applications

Inventors: Guilherme Salazar (Goiânia, BR); Thijs Schreijer (Hengelo, NL)
Assignee: KONG INC.
G06F9/543G06F21/64
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,645,512
App. No.
18/090,324
Granted
Jun 2, 2026
Kind
B1
Abstract

A method for evaluating and validating requests before they reach one or more services in a microservice application, each service being an application program interface (API) performing a piecemeal function of an overall application function, including receiving an API message and comparing the body thereof to a schema; based on that comparison either forwarding the message on as normal in the event of a successful comparison and generating an error message when the comparison fails. In some embodiments, the schema implements Open API Specification Validation.

Claims (39)

1 . A method of evaluating and validating a request to a service of a plurality of services that form a microservices architecture application, each of the plurality of services being an application program interface (API) performing a piecemeal function of an overall application function, the method being implemented in a service extension, and the method comprising:

receiving, from a client, the request comprising a request body, wherein the request is intercepted before reaching the service;

retrieving a configuration of the service extension, the configuration comprising an identifier for the service, a Boolean flag indicative of the service extension being enabled or disabled, a specification of a reference schema, an identifier of a validator that is configured to generate a Boolean result, and a set of parameters for the validator;

generating, by the validator identified in the configuration and using the set of parameters for the validator, the Boolean result indicative of a schema of the request body being identical to the reference schema associated with a configuration of the service extension, wherein generating the Boolean result comprises comparing a type of each parameter of the request body to a type of each corresponding parameter in the reference schema;

and

upon a determination that the Boolean result is false, transmitting, to the client, a message indicative of an error in the request, wherein the request is prevented from reaching the service.

2 . The method of claim 1 , wherein the schema of the request body comprises a first set of parameters, wherein the reference schema comprises a second set of parameters, and wherein generating the Boolean result comprises:

comparing a type of each parameter of the first set of parameters to the type of each corresponding parameter in the second set of parameters.

3 . The method of claim 1 , wherein the service extension is a plugin.

4 . The method of claim 1 , wherein the service extension is a browser extension.

5 . The method of claim 1 , wherein the validator is a Kong schema validator or a validator compliant with a schema definition language for describing a structure and validation constraints of data objects.

6 . The method of claim 1 , wherein the Boolean result is further indicative of a value of a parameter of the schema of the request body being semantically identical to a value of a corresponding parameter of the reference schema.

7 . A system comprising:

one or more processors;

a memory including instructions, that when executed by the one or more processors, cause implementation of a microservice architecture application comprising a plurality of services that interact to perform an overall application function, each of the plurality of services being an application program interface (API) performing a piecemeal function of the overall application function; and

execution of the instructions by the one or more processors further cause the implementation of a plugin,

wherein the plugin is enabled for an object associated with the microservice architecture application, and wherein the plugin is configured to:

receive a message comprising a message body, wherein the message is intercepted before reaching a service of the plurality of services,

retrieve a configuration of the plugin, the configuration comprising an identifier for the service, a Boolean flag indicative of the plugin being enabled or disabled, a specification of a reference schema, an identifier of a validator that is configured to generate a Boolean result, and a set of parameters for the validator;

generate, by the validator identified in the configuration and using the set of parameters for the validator, the Boolean result indicative of a schema of the message body being identical to the reference schema associated with the configuration of the plugin, wherein generating the Boolean result comprises comparing a type of each parameter of the message body to a type of each corresponding parameter in the reference schema; and

transmit, upon a determination that the Boolean result is false, an error message indicative of an error in the message body, wherein the message is prevented from reaching the service.

8 . The system of claim 7 , wherein the object is a service of the plurality of services, a route object associated with the service, or a consumer object that is a user of the service.

9 . The system of claim 7 , wherein the message is a request to a service of the plurality of services or a response from the service.

10 . The system of claim 7 , wherein the schema of the message body comprises a first set of parameters, wherein the reference schema comprises a second set of parameters, and wherein generating said forwarding and transmitting further comprises:

comparing a type of each parameter of the first set of parameters to the type of each corresponding parameter in the second set of parameters.

11 . The system of claim 7 , wherein the plugin is a browser extension.

12 . The system of claim 7 , wherein the validator is a Kong schema validator or a validator compliant with a schema definition language for describing a structure and validation constraints of data objects.

13 . The system of claim 7 , wherein the Boolean result is further indicative of a value of a parameter of the schema of the message body being semantically identical to a value of a corresponding parameter of the reference schema.

14 . A method comprising:

linking an application program interface (API) gateway to a microservice architecture application including a plurality of services that interact to perform an overall application function, each of the plurality of services being an API performing a piecemeal function of the overall application function;

installing a plugin at the API gateway that evaluates messages received at the API gateway, wherein the plugin is enabled for an object associated with the microservice architecture application;

receiving a message at the plugin comprising a message body, wherein the message is intercepted at the API gateway before reaching a service of the plurality of services;

retrieving a configuration of the plugin, the configuration comprising an identifier for the service, a Boolean flag indicative of the plugin being enabled or disabled, a specification of a reference schema, an identifier of a validator that is configured to generate a Boolean result, and a set of parameters for the validator;

generating, by the validator identified in the configuration and using the set of parameters for the validator, the Boolean result indicative of a schema of the message body being identical to the reference schema associated with the configuration of the plugin, wherein generating the Boolean result comprises comparing a type of each parameter of the message body to a type of each corresponding parameter in the reference schema;

transmitting, upon a determination that the Boolean result is false, an error message indicative of an error in the message body, wherein the message is prevented from reaching the service.

15 . The method of claim 14 , wherein the schema of the message body comprises a first set of parameters, wherein the reference schema comprises a second set of parameters, and wherein generating said forwarding and transmitting further comprises:

comparing a type of each parameter of the first set of parameters to the type of each corresponding parameter in the second set of parameters.

16 . The method of claim 14 , wherein the plugin is a browser extension.

17 . The method of claim 14 , wherein the message is a request to a service of the plurality of services or a response from the service.

Assignments (1)
SECURITY INTEREST Recorded Feb 28, 2025
From: KONG INC.
To: HSBC VENTURES USA INC.
Reel/Frame 070372/0963 →
References Cited (7)
US 20050198154A1 · Xie · 2005 [cited by examiner]
US 20090307143A1 · Reistad · 2009 [cited by examiner]
US 20170041296A1 · Ford · 2017 [cited by examiner]
US 20180373663A1 · Shanley · 2018 [cited by examiner]
US 20190297071A1 · Canavor · 2019 [cited by examiner]
Gadge et al.; “Microservice Architecture: API Gateway Considerations”; Aug. 2017; GlobalLogic Organisations; pp. 1-13 (Year: 2017). [cited by examiner]
Zhao et al.; “Management of API Gateway Based on Microservice Architecture”; 2018; Journal of Physics: Conference Series, vol. 1087, No. 3; IOP Publishing; pp. 1-8. (Year: 2018). [cited by examiner]