# US 2022/0035600 A1 · API Specification Generation

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

- Number: US 2022/0035600 A1
- Document ID: US20220035600A1
- Status: Published application
- Kind: A1
- Application number: 17/502,297
- Filed: 2021-10-15
- Published: 2022-02-03
- Earliest claimed: 2019-05-17
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Alex David Lester; Sibo Liu; Che Liu; Jared Scott Borner; Andrew Marsh Gardiner; Matthew Symonds; Kenneth Chan; Michael Christopher Yara; Terrence Li; Joy Aloysius Thomas; Sri Harsha Vardhan Reddy Chevuru; Tsenguun Tsogbadrakh
- Web page: https://patentgrep.com/patent/US20220035600A1

## CPC

- G06F 8/10: Requirements analysis; Specification techniques
- G06F 8/74: Reverse engineering; Extracting design information from source code
- G06F 9/54: Interprogram communication
- G06F 16/9027: {Trees}
- G06F 16/903: Querying (for retrieval from the web G06F16/953)
- G06F 2209/541: Client-server
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and systems that facilitate automatic generation of Application Programming Interface (API) specification from web traffic. Methods include obtaining a plurality of API requests and responses to the plurality of API requests. Methods include processing these API requests and responses to API requests to identify one or more attributes, such as, for example, variables, query parameters, response status codes, and response schemas. Methods include identifying variables using a tree data structure to represent resource paths. Methods include identifying query parameters based on resource items in resource paths. Methods include determining that the API call does not conform to the API specification by comparing one or more attributes of the API call with the attributes of the API specification.

## Claims

### Claim 1

(canceled)

### Claim 2

A method for generation of an application program interface (API) specification, comprising:
receiving API traffic communicated between one or more client devices and at least one backend system;
analyzing the API traffic to identify one or more attributes associated with the API traffic; and
generating the API specification based on the one or more attributes identified.

### Claim 3 (depends on 2)

The method of claim 2, comprising updating the API specification based on a change associated with the API traffic.

### Claim 4 (depends on 2)

The method of claim 2, wherein the one or more attributes comprise one or more of a resource path, a query parameter, or a response status code.

### Claim 5 (depends on 2)

The method of claim 2, wherein the API traffic comprises API requests and responses to the API requests.

### Claim 6 (depends on 5)

The method of claim 5, wherein analyzing comprises analyzing the API requests and responses to the API requests.

### Claim 7 (depends on 5)

The method of claim 5, comprising determining whether a subsequent API request complies with the API specification generated.

### Claim 8 (depends on 7)

The method of claim 7, wherein determining comprises comparing an attribute of the subsequent API request to the one or more attributes identified.

### Claim 9 (depends on 2)

The method of claim 2, wherein the API specification generated includes one or more of an API description, one or more operations, resources paths, one or more resource items, query parameters or response codes.

### Claim 10

A system for generating an application program interface (API) specification, comprising:
one or more memories storing program instructions; and
one or more processing devices coupled to the one or more memories, the program instructions causing the one or more processing devices to:
receive API traffic communicated between one or more client devices and at least one backend system;
analyze the API traffic to identify one or more attributes associated with the API traffic; and
generate the API specification based on the one or more attributes identified.

### Claim 11 (depends on 10)

The system of claim 10, comprising the program instructions causing the one or more processing devices to update the API specification based on a change associated with the API traffic.

### Claim 12 (depends on 10)

The system of claim 10, wherein the one or more attributes comprise one or more of a resource path, a query parameter, or a response status code.

### Claim 13 (depends on 10)

The system of claim 10, wherein the API traffic comprises API requests and responses to the API requests.

### Claim 14 (depends on 13)

The system of claim 13, comprising the program instructions causing the one or more processing devices to analyze the API requests and responses to the API requests.

### Claim 15 (depends on 13)

The system of claim 13, comprising the program instructions causing the one or more processing devices to determine whether a subsequent API request complies with the API specification generated.

### Claim 16 (depends on 15)

The system of claim 15, wherein comprising the program instructions causing the one or more processing devices to determine by comparing an attribute of the subsequent API request to the one or more attributes identified.

### Claim 17 (depends on 10)

The system of claim 10, wherein the API specification generated includes one or more of an API description, one or more operations, resources paths, one or more resource items, query parameters or response codes.
