IP Library Granted Patent US 10,949,178
Granted Patent B1
US 10,949,178 · App. 16/714,145 · Granted Mar 16, 2021

Method and system for decomposing a global application programming interface (API) graph into an application-specific API subgraph

Inventor: Philip Edward Russell (San Diego, CA)
Assignee: INTUIT INC.
G06F8/427G06F8/447G06F8/60
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 10,949,178
App. No.
16/714,145
Granted
Mar 16, 2021
Kind
B1
Abstract

Certain aspects of the present disclosure provide techniques for generating application programming interface (API) code for an application. The method generally includes receiving information indicating a set of queries invoked within an application. A set of nodes in a graph projection of the API accessed by queries in the set of queries is identified by traversing the graph projection of the API for each query in the set of queries. A subgraph projection of the API including the identified set of nodes is identified, and code implementing operations associated with the identified set of nodes is generated from the generated subgraph projection of the API. The generated code is deployed for use with the application.

Claims (64)

1. A method for generating application programming interface (API) code for an application, comprising:

receiving information indicating a set of queries invoked within an application;

identifying a set of nodes in a graph projection of an API accessed by queries in the set of queries by traversing the graph projection of the API for each query in the set of queries;

generating a subgraph projection of the API including the identified set of nodes and edges connecting the identified set of nodes discovered by traversing the graph projection of the API for each query in the set of queries;

generating code implementing operations associated with the identified set of nodes from the generated subgraph projection of the API; and

deploying the generated code for use with the application.

2. The method of claim 1 , wherein receiving information indicating the set of queries invoked within the application comprises:

receiving source code implementing the application; and

parsing the source code to identify the set of queries invoked within the application.

3. The method of claim 1 , wherein:

the application comprises an API explorer; and

receiving information indicating the set of queries invoked within the application comprises:

receiving a request to view information about the API from a user within the API explorer, wherein the request causes the API explorer to invoke a specified query in the API;

determining a type of the user; and

based on the determined type of user, identifying queries commonly invoked within the API explorer by other users of the determined type of user.

4. The method of claim 1 , wherein generating the subgraph projection of the API comprises: building a spanning tree from the graph projection of the API including the identified set of nodes in the graph projection of the API.

5. The method of claim 1 , wherein the subgraph projection of the API is generated based on a maximum traversal depth identifying a maximum number of nodes below an identified node in the graph projection of the API to traverse.

6. The method of claim 1 , wherein:

identifying the set of nodes in the graph projection of the API comprises traversing the graph projection of the API until one or more predefined nodes are reached, and

the one or more predefined nodes comprise nodes in the graph projection of the API that are reached by a plurality of queries.

7. The method of claim 1 , further comprising:

generating an adjacency list from the generated subgraph; and

truncating the generated subgraph based on a number of adjacent nodes for each node in the identified set of nodes such that each node in the generated subgraph is adjacent to a threshold number of nodes.

8. The method of claim 1 , wherein the generated code comprises device-specific code including an interface for executing graph query requests over hypertext transfer protocol (HTTP).

9. The method of claim 1 , wherein the generated code includes data validation code based on data types and data constraints identified in the nodes of the generated subgraph.

10. A system, comprising:

a processor; and

a memory having instructions stored thereon which, when executed by the processor, performs an operation for generating application programming interface (API) code for an application, the operation comprising:

receiving information indicating a set of queries invoked within an application;

identifying a set of nodes in a graph projection of an API accessed by queries in the set of queries by traversing the graph projection of the API for each query in the set of queries;

generating a subgraph projection of the API including the identified set of nodes and edges connecting the identified set of nodes discovered by traversing the graph projection of the API for each query in the set of queries;

generating code implementing operations associated with the identified set of nodes from the generated subgraph projection of the API; and

deploying the generated code for use with the application.

11. The system of claim 10 , wherein receiving information indicating the set of queries invoked within the application comprises:

receiving source code implementing the application; and

parsing the source code to identify the set of queries invoked within the application.

12. The system of claim 10 , wherein:

the application comprises an API explorer; and

receiving information indicating the set of queries invoked within the application comprises:

receiving a request to view information about the API from a user within the API explorer, wherein the request causes the API explorer to invoke a specified query in the API;

determining a type of the user; and

based on the determined type of user, identifying queries commonly invoked within the API explorer by other users of the determined type of user.

13. The system of claim 10 , wherein generating the subgraph projection of the API comprises: building a spanning tree from the graph projection of the API including the identified set of nodes in the graph projection of the API.

14. The system of claim 10 , wherein the subgraph projection of the API is generated based on a maximum traversal depth identifying a maximum number of nodes below an identified node in the graph projection of the API to traverse.

15. The system of claim 10 , wherein:

identifying the set of nodes in the graph projection of the API comprises traversing the graph projection of the API until one or more predefined nodes are reached, and

the one or more predefined nodes comprise nodes in the graph projection of the API that are reached by a plurality of queries.

16. The system of claim 10 , wherein the operation further comprises:

generating an adjacency list from the generated subgraph; and

truncating the generated subgraph based on a number of adjacent nodes for each node in the identified set of nodes such that each node in the generated subgraph is adjacent to a threshold number of nodes.

17. The system of claim 10 , wherein the generated code comprises device-specific code including an interface for executing graph query requests over hypertext transfer protocol (HTTP).

18. The system of claim 10 , wherein the generated code includes data validation code based on data types and data constraints identified in the nodes of the generated subgraph.

19. A method for generating application programming interface (API) code for an application, comprising:

receiving information indicating a set of queries invoked within an application;

identifying a set of nodes in a graph projection of an API accessed by queries in the set of queries by traversing the graph projection of the API for each query in the set of queries;

generating a subgraph projection of the API including the identified set of nodes and edges connecting the identified set of nodes discovered by traversing the graph projection of the API for each query in the set of queries by:

building a subgraph as a spanning tree from the identified set of nodes,

traversing the graph projection of the API to add additional nodes to the subgraph according to a maximum traversal depth from each of the identified nodes, and

truncating the subgraph to remove references to objects referenced by nodes in the subgraph but not included in the subgraph;

generating code implementing operations associated with the identified set of nodes from the generated subgraph projection of the API; and

deploying the generated code for use with the application.

20. The method of claim 19 , wherein:

identifying the set of nodes in the graph projection of the API comprises traversing the graph projection of the API until one or more predefined nodes are reached, and

the one or more predefined nodes comprise nodes in the graph projection of the API that are reached by a plurality of queries.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 13, 2019
From: RUSSELL, PHILIP EDWARD
To: INTUIT INC.
Reel/Frame 051280/0221 →
Cited By (6)
US 12,204,646 US 12,299,038 US 12,354,172 US 12,461,800 US 12,498,993 US 12,536,058