Graph Query Language Wrapper for REST API Translation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing APIs, such as REST APIs, often require clients to receive unneeded data and chain multiple requests to achieve desired results, leading to inefficiencies and complexity, and changes to APIs can cause client misbehavior or malfunctions, while graph query languages allow for precise data specification but require significant implementation and maintenance efforts from providers.

Innovation Solution

The system autonomously generates a schema for graph query language wrappers that translate queries into requests against existing APIs, using a sanitation map to align raw data formats with sanitized formats, enabling efficient data retrieval and reducing client code complexity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If REST APIs are used for data retrieval, then clients can access data through standardized interfaces, but clients receive unneeded data and must chain multiple requests leading to inefficiency and complexity

Engineering Contradiction:
Improvedata retrieval efficiencyVSAvoidclient code complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces a graph query language wrapper as an intermediary layer between the client and the REST API. This wrapper automatically translates graph queries into optimized sequences of API requests, eliminating the need for clients to manually chain multiple requests. The wrapper handles data filtering and aggregation, so clients receive only the needed data without unnecessary fields, thereby improving efficiency while reducing client code complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system segments the data retrieval process into distinct components: the graph query language for specifying data needs, the wrapper for translation and optimization, and the underlying REST API for execution. This segmentation allows each component to specialize in its function, with the wrapper acting as an intelligent mediator that breaks down complex data retrieval tasks into optimized API calls, reducing both inefficiency and client-side complexity.

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If graph query languages are implemented to allow precise data specification, then data retrieval precision is improved, but significant implementation and maintenance efforts are required from providers

Engineering Contradiction:
Improvedata specification precisionVSAvoidimplementation and maintenance effort
Core Design Contradiction:
Measurement precisionVSEase of manufacture

Solution Approach 1:

The graph query language wrapper is designed to be self-generating through autonomous code generation from existing API specifications. The system automatically analyzes the REST API structure and generates the corresponding graph query language wrapper code, including the sanitation map for data format conversion. This self-service approach eliminates the need for manual implementation and reduces maintenance efforts, as the wrapper adapts automatically when the underlying API changes.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary analysis of the REST API specification to automatically generate the graph query language wrapper before any actual data retrieval operations. By pre-generating the wrapper code and sanitation maps from API documentation, the system eliminates the need for manual implementation work. The preliminary generation ensures the wrapper is ready to provide precise data specification capabilities immediately, without requiring ongoing manual maintenance.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If APIs are changed to improve functionality, then new capabilities are added, but client code may become misbehaved or malfunction

Engineering Contradiction:
ImproveAPI functionalityVSAvoidclient code stability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The graph query language wrapper serves as a stable intermediary layer that isolates clients from API changes. When the underlying REST API changes to add new capabilities, the wrapper automatically adapts by regenerating its translation logic from the updated API specification. Clients continue to use the same graph query language interface without modification, while the wrapper handles all adaptations to the changed API, thereby maintaining client code stability while enabling API versatility.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary regeneration of the graph query language wrapper whenever API changes occur. By automatically regenerating the wrapper code and sanitation maps from updated API specifications before deploying changes, the system ensures that the intermediary layer is prepared to handle new API capabilities. This preliminary action prevents client code breakage, as the wrapper absorbs all changes and presents a stable interface to clients throughout the transition.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11188529B2Autonomous generation of a graph query language interface on top of an application programming interface
Publication Date: 2021.11.30 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11188529B2 patent drawing
  • US11188529B2 patent drawing
  • US11188529B2 patent drawing

AI summary

Techniques regarding autonomously generating one or more graph query language schemas are provided. For example, one or more embodiments described herein can comprise a system, which can comprise a memory that can store computer executable components. The system can also comprise a processor, operably coupled to the memory, and that can execute the computer executable components stored in the memory. The computer executable components can comprise an interface component, operatively coupled to the processor, that can generate a schema for a graph query language wrapper that can translate a query to a request against a target application programming interface. The schema can comprise a sanitation map that can delineate a relation between a raw data format expected by the target application programming interface and a sanitized data format exposed by the graph query language wrapper.