Extending object-schema-based application programming interfaces (APIs) is described. According to one embodiment, a method generally includes receiving, from a user, a schema defining an extension to the API and a reference to a parent node in a graph projection of the API. An API system updates the graph projection of the API to include a node representing the extension and navigable path to the node representing the extension. The API system processes a request from the user by traversing through the updated graph projection of the API, the request representing the navigable path to the node representing the extension.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A method for extending an object schema-based application programming interface (API), comprising: receiving, from a user, a schema defining an extension to the API and a reference to a parent node in a graph projection of the API, wherein the graph projection of the API comprises a number of navigable paths, each navigable path representing a function exposed by the API, wherein: the extension defines one or more functions to be added to the API, and the one or more functions to be added depend on data associated with the parent node in the graph projection of the API; updating the graph projection of the API to include nodes representing the one or more junctions defined in the extension and a navigable path to the nodes representing the one or more junctions defined in the extension; receiving a request from the user to invoke a specified function of the one or more functions defined in the extension and included as a node in the updated graph projection of the API; traversing through the updated graph projection of the API to identify a navigable path through the undated graph projection of the API from a root node of the updated graph projection of the API to a node representing the specified function; generating an API call comprising a plurality of subqueries to process the request, wherein each subquery of the plurality of subqueries is associated with a node in the identified navigable path; executing, the plurality of subqueries to obtain a result based on an order in which nodes associated with the plurality of subqueries are positioned in the navigable path; and returning the result in response to receiving the request.
2. The method of claim 1 , further comprising verifying that the schema defines a valid extension to the API based at least in part on whether the navigable path comprises a continuous path in the graph projection of the API from a root node of the graph projection of the API to the node representing the extension.
3. The method of claim 2 , wherein verifying that the schema defines a valid extension comprises determining that a parent node of the extension is an existing node in the graph projection of the API.
4. The method of claim 1 , wherein the schema comprises a parseable markup file.
5. The method of claim 1 , wherein the schema includes a resource locator indicating an address of one or more servers hosting the extension to the API.
6. The method of claim 1 , wherein the schema includes an indication that a predefined group of users is allowed to interact with the extension.
7. The method of claim 6 , wherein the schema further includes information defining authentication procedures to allow the predefined group of users to interact with the extension.
8. The method of claim 1 , wherein updating the graph projection of the API to include the extension comprises generating a node associated with the extension and setting the node to depend from a parent node identified in the schema.
9. A system, comprising: a processor; and a memory comprising instructions which, when executed by the processor, performs an operation for extending an object schema-based application programming interface (API), the operation comprising: receiving, from a user, a schema defining an extension to the API and a reference to a parent node in a graph projection of the API, wherein the graph projection of the API comprises a number of navigable paths, each navigable path representing a function exposed by the API, wherein: the extension defines one or more functions to be added to the API, and the one or more functions to be added depend on data associated with the parent node in the graph projection of the API; updating the graph projection of the API to include nodes representing the one or more junctions defined in the extension and a navigable path to the nodes representing the one or more functions defined in tire extension; receiving a request from the user to invoke a specified function of the one or more functions defined in the extension and included as a node in the updated graph projection of the API; traversing through the updated graph projection of the API to identify a navigable path through the undated graph projection of the API from a root node of the updated graph projection of the API to a node representing the specified function, generating an API call comprising a plurality of subqueries to process the request, wherein each subquery of the plurality of subqueries is associated with a node in the identified navigable path; executing the plurality of subqueries to obtain a result based on an order in which nodes associated with the plurality of subqueries are positioned in the navigable path; and returning the result in response to receiving the request.
10. The system of claim 9 , wherein the operation further comprises verifying that the schema defines a valid extension to the API based at least in part on whether the navigable path comprises a continuous path in the graph projection of the API from a root node of the graph projection of the API to the node representing the extension.
11. The system of claim 9 , wherein the schema includes a resource locator indicating an address of one or more servers hosting the extension to the API.
12. The system of claim 9 , wherein the schema includes an indication that a predefined group of users is allowed to interact with the extension.
13. The system of claim 12 , wherein the schema further includes information defining authentication procedures to allow the predefined group of users to interact with the extension.
14. The system of claim 9 , wherein updating the graph projection of the API to include the extension comprises generating a node associated with the extension and setting the node to depend from a parent node identified in the schema.
15. A non-transitory computer-readable medium comprising instruction which, when executed on a processor, performs an operation for extending an object schema-based application programming interface (API), the operation comprising: receiving, from a user, a schema defining an extension to the API and a reference to a parent node in a graph projection of the API, wherein the graph projection of the API comprises a number of navigable paths, each navigable path representing a function exposed by the API, wherein: the extension defines one or more functions to be added to the API, and the one or more functions to be added depend on data associated with the parent node in the graph projection of the API; updating the graph projection of the API to include nodes representing the one or more functions defined in the extension and a navigable path to the nodes representing the one or more functions defined in the extension; receiving a request from the user to invoke a specified function of the one or more functions defined in the extension and included as a node in the updated graph projection of the API; traversing through the updated graph projection of the API to identify a navigable path through the updated graph projection of the API from a root node of the updated graph projection of the API to a node representing the specified function; generating an API call comprising a plurality of subqueries to process the request, wherein each subquery of the plurality of subqueries is associated with a node in the identified navigable path; executing the plurality of subqueries to obtain a result based on an order in which nodes associated with the plurality of subqueries are positioned in the navigable path; and returning the result to response to receiving the request.
16. The non-transitory computer-readable medium of claim 15 , wherein the operation further comprises verifying that the schema defines a valid extension to the API based at least in part on whether the navigable path comprises a continuous path in the graph projection of the API from a root node of the graph projection of the API to the node representing the extension.
17. The non-transitory computer-readable medium of claim 15 , wherein the schema includes a resource locator indicating an address of one or more servers hosting the extension to the API.
18. The non-transitory computer-readable medium of claim 15 , wherein the schema includes an indication that a predefined group of users is allowed to interact with the extension.
19. The non-transitory computer-readable medium of claim 18 , wherein the schema further includes information defining authentication procedures to allow the predefined group of users to interact with the extension.
20. The non-transitory computer-readable medium of claim 15 , wherein updating the graph projection of the API to include the extension comprises generating a node associated with the extension and setting the node to depend from a parent node identified in the definition schema.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
October 26, 2017
December 15, 2020
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.