# US 2026/0099389 A1 · Automated operators for construction of declarative interfaces from imperative interfaces

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0099389 A1
- Document ID: US20260099389A1
- Status: Published application
- Kind: A1
- Application number: 18/905,847
- Filed: 2024-10-03
- Published: 2026-04-09
- Earliest claimed: 2024-10-03
- Assignees: Red Hat, Inc.
- Applicants: Red Hat, Inc.
- Inventors: Brian Gallagher; Michal Dariusz Stokluska
- Web page: https://patentgrep.com/patent/US20260099389A1

## CPC

- G06F 8/51: Source to source
- G06F 9/541: {via adapters, e.g. between incompatible applications}
- G06F 8/73: Program documentation
- G06F 9/54: Interprogram communication
- G06F 9/547: {Remote procedure calls [RPC]; Web services}
- G06F 2209/541: Client-server
- G06F 2209/542: Intercept
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A Custom Resource (CR) is generated within a code repository of a legacy application based on intercepted Application Programming Interface (API) calls to an imperative API of the legacy application. The intercepted API calls relate to a particular type of entity. The CR is defined by a Custom Resource Definition (CRD) associated with the particular type of entity. The CR is one of a plurality of CRs of the code repository that collectively define a correct state of the legacy application. Responsive to a difference between a current state of the legacy application and the correct state of the legacy application, an automated operator makes an imperative API call to the imperative API of the legacy application that modifies the current state of the legacy application to match the correct state of the legacy application.

## Claims

### Claim 1

A method comprising:
generating, by a computing system comprising one or more processor devices, a Custom Resource (CR) within a code repository of a legacy application based on intercepted Application Programming Interface (API) calls to an imperative API of the legacy application, wherein the intercepted API calls relate to a particular type of entity, wherein the CR is defined by a Custom Resource Definition (CRD) associated with the particular type of entity, and wherein the CR is one of a plurality of CRs of the code repository that collectively define a correct state of the legacy application; and
responsive to a difference between a current state of the legacy application and the correct state of the legacy application, making, by an automated operator implemented by the computing system, an imperative API call to the imperative API of the legacy application that modifies the current state of the legacy application to match the correct state of the legacy application.

### Claim 2 (depends on 1)

The method of claim 1, wherein the plurality of CRs is defined by a plurality of CRDs comprising the CRD.

### Claim 3 (depends on 2)

The method of claim 2, wherein, prior to generating the CR within the code repository of the legacy application, the method comprises:
intercepting, by the computing system, the intercepted API calls to the imperative API, wherein the intercepted API calls comprise one or more imperative API calls, the one or more imperative API calls indicative of requests to at least one of:
add a new entity of the particular type of entity;
modify a characteristic of an existing entity of the particular type of entity; or
remove the existing entity of the particular type of entity.

### Claim 4 (depends on 3)

The method of claim 3, wherein, prior to intercepting the intercepted API calls, the method comprises:
obtaining, by the computing system, API specification information for the imperative API of the legacy application, wherein the API specification information defines behavior of the imperative API; and
generating, by the computing system, the plurality of CRDs based on the API specification information.

### Claim 5 (depends on 4)

The method of claim 4, wherein, prior to making the imperative API call, the method comprises:
identifying, by the automated operator implemented by the computing system, the difference between the current state of the legacy application and the correct state of the legacy application.

### Claim 6 (depends on 5)

The method of claim 5, wherein intercepting the intercepted API calls to the imperative API comprises:
intercepting, by the computing system, a first imperative API call of the one or more imperative API calls, the first imperative API call indicative of a request to add the new entity of the particular type of entity; and
wherein identifying the difference between the current state of the legacy application and the correct state of the legacy application comprises:
determining, by the automated operator implemented by the computing system, that the current state of the legacy application comprises a first quantity of entities of the particular type of entity associated with the CRD; and
determining, by the automated operator implemented by the computing system, that the first quantity of entities of the particular type of entity is less than a second quantity of CRs within the code repository that are defined by the CRD.

### Claim 7 (depends on 4)

The method of claim 4, wherein the generating the plurality of CRDs based on the API specification information further comprises:
generating, by the computing system, a unit of software instructions that, when executed, implements the automated operator, wherein the unit of software instructions is based on the plurality of CRDs; and
executing, by the computing system, the unit of software instructions to implement the automated operator.

### Claim 8 (depends on 4)

The method of claim 4, wherein generating the plurality of CRDs based on the API specification information comprises:
processing, by the computing system, the API specification information with a machine-learned language model to obtain the plurality of CRDs.

### Claim 9 (depends on 4)

The method of claim 4, wherein generating the plurality of CRDs based on the API specification information further comprises:
based on the API specification information, generating, by the computing system, call mapping information that indicates one or more types of imperative API calls to make when a particular type of difference is identified between the current state of the legacy application and the correct state of the legacy application; and
wherein making the one or more imperative API calls to the imperative API of the legacy application comprises:
selecting, by the computing system, the one or more imperative API calls based on the call mapping information.

### Claim 10 (depends on 4)

The method of claim 4, wherein generating the plurality of CRDs based on the API specification information further comprises:
obtaining, by the computing system, application state data from an existing data store for the legacy application;
determining, by the computing system, that the current state of the legacy application comprises a plurality of existing entities of a first type of entity associated with a first CRD of the plurality of CRDs; and
for each existing entity of the plurality of existing entities of the first type of entity, generating, by the computing system, a particular CR of the plurality of CRs within the code repository of the legacy application based on the first CRD, wherein the particular CR represents the existing entity within the current state of the legacy application, and wherein the particular CR is defined by the first CRD.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
receiving, by the automated operator implemented by the computing system, a declarative API call for the legacy application, wherein the declarative API call defines a desired state of the legacy application different than the current state of the legacy application;
generating, by the computing system, one or more additional CRs for the legacy application within the code repository to modify the correct state of the legacy application to match the desired state of the legacy application; and
making, by the automated operator implemented by the computing system, one or more additional imperative API calls to the imperative API of the legacy application that modify the current state of the legacy application to match the desired state of the legacy application.

### Claim 12 (depends on 11)

The method of claim 11, wherein making the one or more additional imperative API calls for the imperative API of the legacy application comprises:
identifying, by the automated operator implemented by the computing system, a new difference between the current state of the legacy application and the correct state of the legacy application; and
responsive to identifying the new difference, generating, by the automated operator implemented by the computing system, the one or more additional imperative API calls to the imperative API of the legacy application that modify the current state of the legacy application to match the desired state of the legacy application.

### Claim 13

A computing system comprising:
one or more processor devices to:
generate a Custom Resource (CR) within a code repository of a legacy application based on intercepted API calls to an imperative API of the legacy application, wherein the intercepted Application Programming Interface (API) calls relate to a particular type of entity, wherein the CR is defined by a Custom Resource Definition (CRD) associated with the particular type of entity, and wherein the CR is one of a plurality of CRs of the code repository that collectively define a correct state of the legacy application; and
responsive to a difference between a current state of the legacy application and the correct state of the legacy application, make, by an automated operator implemented by the computing system, an imperative API call to the imperative API of the legacy application that modifies the current state of the legacy application to match the correct state of the legacy application.

### Claim 14 (depends on 13)

The computing system of claim 13, wherein the plurality of CRs is defined by a plurality of CRDs comprising the CRD.

### Claim 15 (depends on 14)

The computing system of claim 14, wherein, prior to generating the CR within the code repository of the legacy application, the one or more processor devices are to:
intercept the intercepted API calls to the imperative API, wherein the intercepted API calls comprise one or more imperative API calls, the one or more imperative API calls indicative of requests to at least one of:
add a new entity of the particular type of entity;
modify a characteristic of an existing entity of the particular type of entity; or
remove the existing entity of the particular type of entity.

### Claim 16 (depends on 15)

The computing system of claim 15, wherein, prior to intercepting the intercepted API calls, the one or more processor devices are to:
obtain API specification information for the imperative API of the legacy application, wherein the API specification information defines behavior of the imperative API; and
generate the plurality of CRDs based on the API specification information.

### Claim 17 (depends on 16)

The computing system of claim 16, wherein, prior to making the imperative API call, the one or more processor devices are to:
identify, by the automated operator implemented by the computing system, the difference between the current state of the legacy application and the correct state of the legacy application.

### Claim 18 (depends on 17)

The computing system of claim 17, wherein, to intercept the intercepted API calls to the imperative API, the one or more processor devices are to:
intercept a first imperative API call of the one or more imperative API calls, the first imperative API call indicative of a request to add the new entity of the particular type of entity; and
wherein, to identify the difference between the current state of the legacy application and the correct state of the legacy application, the one or more processor devices are to:
determine, by the automated operator implemented by the computing system, that the current state of the legacy application comprises a first quantity of entities of the particular type of entity associated with the CRD; and
determine, by the automated operator implemented by the computing system, that the first quantity of entities of the particular type of entity is less than a second quantity of CRs within the code repository that are defined by the CRD.

### Claim 19 (depends on 16)

The computing system of claim 16, wherein, to generate the plurality of CRDs based on the API specification information, the one or more processor devices are further to:
generate a unit of software instructions that, when executed, implements the automated operator, wherein the unit of software instructions is based on the plurality of CRDs; and
execute the unit of software instructions to implement the automated operator.

### Claim 20

A non-transitory computer-readable storage medium that includes executable instructions to cause one or more processor devices to:
generate a Custom Resource (CR) within a code repository of a legacy application based on intercepted API calls to an imperative Application Programming Interface (API) of the legacy application, wherein the intercepted API calls relate to a particular type of entity, wherein the CR is defined by a Custom Resource Definition (CRD) associated with the particular type of entity, and wherein the CR is one of a plurality of CRs of the code repository that collectively define a correct state of the legacy application; and
responsive to a difference between a current state of the legacy application and the correct state of the legacy application, make, by an automated operator implemented by the one or more processor devices, an imperative API call to the imperative API of the legacy application that modifies the current state of the legacy application to match the correct state of the legacy application.
