IP Library › Granted Patent US 11,409,585
Granted Patent B2
US 11,409,585 · App. 15/929,878 · Granted Aug 9, 2022

Automatic code generation for API mashups

Inventors: Lei Liu (San Jose, CA); Wei-Peng Chen (Fremont, CA)
Assignee: FUJITSU LIMITED
G06F9/547G06F8/30G06F16/955
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 11,409,585
App. No.
15/929,878
Granted
Aug 9, 2022
Kind
B2
Abstract

According to an aspect of an embodiment, operations include receiving a first input corresponding to a selection of one or more Application Programming Interface (API)-based trigger options associated with one or more electronic trigger events. The operations further include receiving a second input corresponding to a selection of one or more trigger rules which are applicable on event data associated with the one or more electronic trigger events and receiving a third input corresponding to a selection of one or more API-based actions. The operations further include constructing an API mashup template based on the first input, the second input, and the third input and generating an API mashup code based on the constructed API mashup template. The API mashup code is configured to be computer-executable on a runtime system.

Claims (86)

1. A method, comprising:

receiving a first input corresponding to a selection of one or more Application Programming Interface (API)-based trigger options associated with one or more electronic trigger events;

receiving a second input corresponding to a selection of one or more trigger rules which are applicable on event data associated with the one or more electronic trigger events;

receiving a third input corresponding to a selection of one or more API-based actions to be performed based on whether the event data satisfies the one or more trigger rules;

constructing, based on the received first input, the received second input, and the received third input, an API mashup template; and

generating, based on the constructed API mashup template, an API mashup code configured to be computer-executable on a runtime system.

2. The method according to claim 1 , wherein the constructed API mashup template comprises:

a unique mashup identifier,

one or more computer-executable trigger codes associated with the one or more API-based trigger options,

a first set of input parameters for the one or more computer-executable trigger codes,

the one or more trigger rules comprising a rule operator and a rule pattern for the event data,

one or more computer-executable action codes associated with the one or more API-based actions, and

a second set of input parameters for the one or more computer-executable action codes.

3. The method according to claim 1 , further comprising:

receiving a fourth input corresponding to a selection of a first event detection mechanism for the one or more electronic trigger events from among a set of event detection mechanisms;

constructing the API mashup template further based on the received fourth input; and

generating, based on the constructed API mashup template, the API mashup code to include a first computer-executable code for execution of the first event detection mechanism on the runtime system.

4. The method according to claim 3 , wherein the first event detection mechanism is one of a webhook-based event detection mechanism or a polling-based event detection mechanism.

5. The method according to claim 1 , wherein the API mashup code comprises:

one or more computer-executable trigger codes associated with the one or more API-based trigger options,

one or more computer-executable rule codes associated with the one or more trigger rules, and

one or more computer-executable action codes associated with the one or more API-based actions.

6. The method according to claim 5 , wherein the generating the API mashup code comprises:

retrieving, from an API specification file, information comprising an API host address, API endpoints, and endpoint parameters for an API associated with a first API-based trigger option of the one or more API-based trigger options; and

generating a computer-executable trigger code of the one or more computer-executable trigger codes based on the retrieved information and a trigger code template.

7. The method according to claim 5 , wherein the generating the API mashup code comprises:

retrieving, from an API specification file, information comprising an API host address, API endpoints, and endpoint parameters for an API associated with a first API-based action of the one or more API-based actions; and

generating a computer-executable action code of the one or more computer-executable action codes based on the retrieved information and an action code template.

8. The method according to claim 5 , further comprising executing the API mashup code on the runtime system, wherein the execution comprises:

executing the one or more computer-executable trigger codes to receive the event data associated with the one or more electronic trigger events from an event source;

executing the one or more computer-executable rule codes to generate a trigger response based on a determination that the received event data satisfies the one or more trigger rules; and

executing the one or more computer-executable action codes based on the generated trigger response.

9. The method according to claim 1 , further comprising:

configuring a webhook-based event detection mechanism on an API resource server that is associated with the one or more electronic trigger events based on configuration information comprising a payload Uniform Resource Locator (URL) associated with the runtime system,

wherein the API resource server executes a computer-executable code for the webhook-based event detection mechanism for:

detecting the one or more electronic trigger events, and

transmitting the event data associated with the detected one or more electronic trigger events to the runtime system; and

receiving the event data associated with the one or more electronic trigger events from the API resource server.

10. The method according to claim 1 , further comprising executing a computer-executable code for a polling-based event detection mechanism on the runtime system by:

periodically calling a first API endpoint of an API provider associated with the one or more electronic trigger events by periodically executing a computer-executable trigger code included in the generated API mashup code;

receiving a set of API call responses from the first API endpoint based on the call; and

detecting an electronic trigger event of the one or more electronic trigger events based on a comparison between a first call response in the received set of call responses and a second call response in the received set of call responses.

11. The method according to claim 10 , further comprising:

determining, from the first call response and the second call response received after the first call response, a first differentiation key of a set of differentiable keys;

detecting the electronic trigger event of the one or more electronic trigger events as a new electronic trigger event based on a determination that a value of the determined first differentiation key in the first call response is different from a value of the determined first differentiation key in the second call response; and

selecting the second call response as the event data.

12. A non-transitory computer-readable storage medium configured to store instructions that, in response to being executed, causes a system to perform operations, the operations comprising:

receiving a first input corresponding to a selection of one or more Application Programming Interface (API)-based trigger options associated with one or more electronic trigger events;

receiving a second input corresponding to a selection of one or more trigger rules which are applicable on event data associated with the one or more electronic trigger events;

receiving a third input corresponding to a selection of one or more API-based actions to be performed based on whether the event data satisfies the one or more trigger rules;

constructing, based on the received first input, the received second input, and the received third input, an API mashup template; and

generating, based on the constructed API mashup template, an API mashup code configured to be computer-executable on a runtime system.

13. The non-transitory computer-readable storage medium according to claim 12 , wherein the constructed API mashup template comprises:

a unique mashup identifier,

one or more computer-executable trigger codes associated with the one or more API-based trigger options,

a first set of input parameters for the one or more computer-executable trigger codes,

the one or more trigger rules comprising a rule operator and a rule pattern for the event data,

one or more computer-executable action codes associated with the one or more API-based actions, and

a second set of input parameters for the one or more computer-executable action codes.

14. The non-transitory computer-readable storage medium according to claim 12 , wherein the operations further comprises:

receiving a fourth input corresponding to a selection of a first event detection mechanism for the one or more electronic trigger events from among a set of event detection mechanisms;

constructing the API mashup template further based on the received fourth input; and

generating, based on the constructed API mashup template, the API mashup code to include a first computer-executable code for execution of the first event detection mechanism on the runtime system.

15. The non-transitory computer-readable storage medium according to claim 14 , wherein the first event detection mechanism is one of a webhook-based event detection mechanism or a polling-based event detection mechanism.

16. The non-transitory computer-readable storage medium according to claim 12 , wherein the API mashup code comprises:

one or more computer-executable trigger codes associated with the one or more API-based trigger options,

one or more computer-executable rule codes associated with the one or more trigger rules, and

one or more computer-executable action codes associated with the one or more API-based actions.

17. The non-transitory computer-readable storage medium according to claim 16 , wherein the operations further comprises:

retrieving, from an API specification file, information comprising API endpoints and endpoint parameters for an API associated with a first API-based trigger option of the one or more API-based trigger options; and

generating a computer-executable trigger code of the one or more computer-executable trigger codes based on the retrieved information and a trigger code template.

18. The non-transitory computer-readable storage medium according to claim 16 , wherein the generating the API mashup code comprises:

retrieving, from an API specification file, information comprising API endpoints and endpoint parameters for an API associated with a first API-based action of the one or more API-based actions; and

generating a computer-executable action code of the one or more computer-executable action codes based on the retrieved information and an action code template.

19. The non-transitory computer-readable storage medium, according to claim 16 , wherein the operations further comprises executing the API mashup code on the runtime system, the execution comprising:

executing the one or more computer-executable trigger codes to receive the event data associated with the one or more electronic trigger events from an event source;

executing the one or more computer-executable rule codes to generate a trigger response based on a determination that the received event data satisfies the one or more trigger rules; and

executing the one or more computer-executable action codes based on the generated trigger response.

20. A system, comprising:

a processor communicatively coupled to a runtime system, wherein the processor is configured to:

receive a first input corresponding to a selection of one or more Application Programming Interface (API)-based trigger options associated with one or more electronic trigger events;

receive a second input corresponding to a selection of one or more trigger rules which are applicable on event data associated with the one or more electronic trigger events;

receive a third input corresponding to a selection of one or more API-based actions to be performed based on whether the event data satisfies the one or more trigger rules;

construct, based on the received first input, the received second input, and the received third input, an API mashup template;

generate, based on the constructed API mashup template, an API mashup code configured to be computer-executable on the runtime system and

configure a webhook-based event detection mechanism on an API resource server that is associated with the one or more electronic timer events based on configuration information comprising a payload Uniform Resource Locator (URL) associated with the runtime system.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 28, 2020
From: LIU, LEI; CHEN, WEI-PENG
To: FUJITSU LIMITED
Reel/Frame 052774/0422 →
Continuity (1)
Related Publication 20210373984A1 · Dec 2, 2021