IP Library Granted Patent US 12,470,568
Granted Patent B2
US 12,470,568 · App. 18/650,045 · Granted Nov 11, 2025

Tree-based learning of application programming interface specification

Inventors: Liron Levin (Kefar Sava, IL); Isaac Schnitzer (Ra'anana, IL); Elad Shuster (Petach Tikva, IL); Pavel Novik (Ashdod, IL)
Assignee: Palo Alto Networks, Inc.
H04L63/1408G06F16/9027H04L67/133H04L69/22
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,470,568
App. No.
18/650,045
Granted
Nov 11, 2025
Kind
B2
Abstract

A cybersecurity appliance monitoring application traffic to a web application programming interface (API) dynamically updates tree structures for the web API using the application traffic. An API tree generator generates batches of API trees from paths indicated in the application traffic. An API tree merger/pruner updates the generated batches of API trees with various merging, pruning, compacting, and malicious detection operations on the generated batches of API trees. The cybersecurity appliance implements the updated API trees with an API agent that filters the application traffic prior to processing by the web API.

Claims (52)

1 . A method comprising:

dynamically updating application programming interface (API) trees while filtering application traffic with the API trees, wherein dynamically updating the API trees while filtering application traffic with the API trees comprises,

based on detecting a first API request in application traffic, extracting a first path from the first API request, wherein the first path corresponds to one or more resources corresponding to an API;

determining whether the first path from the first API request corresponds to a second path in a first tree for the API, wherein the first tree comprises at least one of common paths and common nodes in a first plurality of API requests of the application traffic;

based on determining that the first path from the first API request does not correspond to the second path in the first tree for the API, filtering the first API request from the application traffic; and

updating the first tree for the API based on a second plurality of API requests detected in the application traffic including the first API request, wherein updating the first tree for the API comprises removing at least one of malicious nodes and malicious paths from the first tree.

2 . The method of claim 1 , further comprising, based on determining that the first path from the first API request corresponds to the second path in the first tree, communicating a query indicated in the first API request to the one or more resources managed by the API.

3 . The method of claim 1 , wherein the first plurality of API requests of the application traffic comprise API requests filtered according to one or more security policies.

4 . The method of claim 1 , wherein determining that the first path from the first API request corresponds to the second path in the first tree for the API comprises, at each node in a traversal of the first tree, verifying whether the node matches a corresponding node in the first path.

5 . The method of claim 1 , wherein the at least one of common paths and common nodes in the first plurality of API requests comprise paths and nodes in a plurality of trees that were merged into the first tree.

6 . The method of claim 5 , wherein updating the first tree for the API comprises:

detecting the at least one of malicious nodes and malicious paths; and

pruning the at least one of malicious nodes and malicious paths prior to merging the plurality of trees.

7 . The method of claim 1 , wherein updating the first tree for the API comprises:

determining that query results from communicating the second plurality of API requests in the application traffic to corresponding resources are responsive;

storing the second plurality of API requests in local memory; and

updating the first tree based on paths in the second plurality of API requests.

8 . A non-transitory machine-readable medium having program code stored thereon that is executable by a computing device, the program code comprising instructions to:

dynamically update application programming interface (API) trees while filtering application traffic with the API trees, wherein the instructions to dynamically update the API trees while filtering traffic with the API trees comprise instructions to,

based on detecting a first API request in application traffic, extract a first path from the first API request, wherein the first path corresponds to one or more resources managed by an API;

traverse a first tree for the API to determine whether the first path from the first API request matches a second path of the first tree, wherein the first tree comprises at least one of common paths and common nodes in a first plurality of API requests of the application traffic;

based on determining that the first path from the first API request does not match the second path in the first tree for the API, filter the first API request from the application traffic; and

update the first tree for the API based on a second plurality of API requests detected in the application traffic including the first API request, wherein updating the first tree for the API comprises removing at least one of malicious nodes and malicious paths from the first tree.

9 . The non-transitory machine-readable medium of claim 8 , wherein the program code further comprises instructions to, based on determining that the first path from the first API request matches the second path in the first tree, communicate a query indicated in the first API request to the one or more resources managed by the API.

10 . The non-transitory machine-readable medium of claim 8 , wherein the first plurality of API requests of the application traffic comprise API requests filtered according to one or more security policies.

11 . The non-transitory machine-readable medium of claim 8 , wherein the at least one of common paths and common nodes in the first plurality of API requests comprise paths and nodes in a plurality of trees that were merged into the first tree.

12 . The non-transitory machine-readable medium of claim 11 , wherein the instructions to update the first tree for the API comprise instructions to:

detect the at least one of malicious nodes and malicious paths; and

prune the at least one of malicious nodes and malicious paths prior to merging the plurality of trees.

13 . The non-transitory machine-readable medium of claim 8 , wherein the instructions to update the first tree for the API comprise instructions to:

determine that query results from communicating the second plurality of API requests in the application traffic to corresponding resources are responsive;

store the second plurality of API requests in local memory; and

update the first tree based on paths in the second plurality of API requests.

14 . The non-transitory machine-readable medium of claim 9 , wherein the instructions to traverse the first tree for the API to determine whether the first path from the first API request matches the second path of the first tree comprise instructions to, at each node or representative node in a traversal of the first tree, determine whether the node or representative node matches a corresponding node in the first path.

15 . An apparatus comprising:

a processor; and

a non-transitory machine-readable medium having instructions stored thereon that are executable by the processor to cause the apparatus to:

dynamically update application programming interface (API) trees while filtering application traffic with the API trees, wherein the instructions to dynamically update the API trees while filtering traffic with the API trees comprise instructions executable by the processor to cause the apparatus to,

based on detecting a first API request in application traffic, extract a first path from a first API request, wherein the first path corresponds to one or more resources managed by an API;

traverse a first tree for the API to determine whether the first path from the first API request matches a second path of the first tree, wherein the first tree comprises at least one of compacted trees and merged trees, wherein the at least one of compacted trees and merged trees comprise at least one of common paths and common nodes in a first plurality of API requests of the application traffic;

based on determining that the first path from the first API request does not match the second path in the first tree for the API, filter the first API request from the application traffic; and

update the first tree for the API based on a second plurality of API requests detected in the application traffic including the first API request, wherein updating the first tree for the API comprises removing at least one of malicious nodes and malicious paths from the first tree.

16 . The apparatus of claim 15 , wherein the machine-readable medium further has stored thereon instructions executable by the processor to cause the apparatus to, based on determining that the first path from the first API request matches the second path in the first tree, communicate a query indicated in the first API request to the one or more resources managed by the API.

17 . The apparatus of claim 15 , wherein the first plurality of API requests of the application traffic comprise API requests filtered according to one or more security policies.

18 . The apparatus of claim 15 , wherein the instructions to update the first tree for the API comprise instructions executable by the processor to cause the apparatus to:

detect the at least one of malicious nodes and malicious paths; and

prune the at least one of malicious nodes and malicious paths from the at least one of compacted trees and merged trees.

19 . The apparatus of claim 15 , wherein the instructions to update the first tree for the API comprise instructions executable by the processor to cause the apparatus to:

determine that query results from communicating the second plurality of API requests in the application traffic to corresponding resources are responsive;

store the second plurality of API requests in local memory; and

update the first tree based on paths in the second plurality of API requests.

20 . The apparatus of claim 15 , wherein the instructions to traverse the first tree for the API to determine whether the first path from the first API request matches the second path of the first tree comprise instructions executable by the processor to cause the apparatus to, at each node or representative node in a traversal of the first tree, determine whether the node or representative node matches a corresponding node in the first path.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 7, 2024
From: LEVIN, LIRON; SCHNITZER, ISAAC; SHUSTER, ELAD; NOVIK, PAVEL
To: PALO ALTO NETWORKS, INC.
Reel/Frame 067335/0411 →
Continuity (2)
Continuation 17443316 · Jul 23, 2021
Related Publication 20240291829A1 · Aug 29, 2024
References Cited (20)
US 9667704B1 · Sonawane · 2017 [cited by applicant]
US 10873618B1 · Mittal et al. · 2020 [cited by applicant]
US 20160337388A1 · Hu et al. · 2016 [cited by applicant]
US 20170134407A1 · Mason · 2017 [cited by applicant]
US 20170359237A1 · Hao et al. · 2017 [cited by applicant]
US 20180115578A1 · Subbarayan · 2018 [cited by examiner]
US 20180196643A1 · Dolby et al. · 2018 [cited by applicant]
US 20180227315A1 · Taneja · 2018 [cited by applicant]
US 20180338015A1 · Wang et al. · 2018 [cited by applicant]
US 20200364033A1 · Lester et al. · 2020 [cited by applicant]
US 20210173728A1 · Treadway · 2021 [cited by applicant]
US 20210211486A1 · Mittal et al. · 2021 [cited by applicant]
US 20220109692A1 · Hebert · 2022 [cited by examiner]
US 20230034914A1 · Dong · 2023 [cited by examiner]
CN 106713318A · 2017 [cited by applicant]
WO 2021141656A1 · 2021 [cited by applicant]
EP Application No. 22186521.5, Extended European Search Report mailed Dec. 19, 2022, 8 pages. [cited by applicant]
Bae, et al., “SAFEWAPI: Web API Misuse Detector for Web Applications”, ACM, FSE 2014: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, Nov. 11, 2014, pp. 507-517. [cited by applicant]
Suter, et al., “Inferring Web API Descriptions from Usage Data”, IEEE, 2015 Third IEEE Workshop on Hot Topics in Web Systems and Technologies, Conference date Nov. 12-13, 2015, Washington, DC, Jan. 7, 2016, pp. 7-12. [cited by applicant]
Wittern, et al., “Statically Checking Web API Requests in JavaScript”, ACM, ICSE '17: Proceedings of the 39th International Conference on Software Engineering, May 20, 2017, pp. 244-254. [cited by applicant]