Method and device for generating application programming interface list

By analyzing API source code and traffic, and combining headless browser technology to generate API lists, the labor-intensive and real-time problems of API list management in the existing technology are solved, and automated and real-time update API management is realized, which improves the API security and development efficiency.

CN119065661APending Publication Date: 2024-12-03F5 NETWORKS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410696760.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-05-31
Filing Date
2024-05-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing API inventory management method is labor-intensive, time-consuming and prone to human errors, and cannot capture the dynamic features of the API in real time or provide a comprehensive view of the API panoramic view.

Method used

By obtaining the source code associated with the software application, analyzing the source code and API traffic, identifying API endpoints, and combining them into a single data structure to generate an API manifest, including crawling client-side code and JavaScript-related information using a headless browser. , monitor data deviation and mark or stop transmission of bias data.

Benefits of technology

It realizes automated and real-time update API inventory management, reduces manual errors, provides a single unified view of the API panoramic view, and improves API security and development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065661A_ABST
    Figure CN119065661A_ABST
Patent Text Reader

Abstract

A method, system, non-transitory computer readable medium, and communication system for generating an application programming interface (API) list. The method includes obtaining source code associated with the software application and analyzing the source code to identify one or more first API endpoints in the software application. The method also includes obtaining API traffic between the server running the software application and the client device, and analyzing the API traffic to identify one or more second API endpoints in the software application. If so, the method includes generating an API manifest by combining the identified one or more first API endpoints and one or more second API endpoints into a single data structure.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to U.S. Provisional Patent Application No. 63 / 505,110 filed on May 31, 2023, the contents of which are incorporated herein by reference in their entirety. Technical Field

[0003] The present application relates to application programming interfaces (APIs), and more particularly to generating a manifest of API endpoints. Background Art

[0004] An API is a set of rules and protocols that allow different software applications to communicate with each other by defining how requests and responses are formatted. APIs are an integral part of modern software development, enabling communication between different software components and services. Ensuring the security of APIs is critical because unauthorized access or misuse can lead to serious consequences, including data breaches and service outages. A key aspect of API security is maintaining an accurate, up-to-date inventory of all APIs in a system, particularly API endpoints. An API endpoint is a specific point within an API where a client can send requests and receive responses, typically represented by a unique combination of an HTTP method (e.g., GET, POST, PUT, DELETE) and a Uniform Resource Locator (URL) path.

[0005] Existing methods of API inventory management (e.g., finding API endpoints) are often labor-intensive, time-consuming, and prone to human error, resulting in incomplete or outdated API inventories. In addition, they may not adequately capture the dynamic nature of APIs in real time or provide a comprehensive view of the API landscape. Summary of the invention

[0006] The present disclosure relates to a method and device related to generating an API endpoint list that overcomes or at least alleviates the above problems. Related non-transitory computer-readable media and network communication systems are also disclosed.

[0007] According to one aspect, a method for generating an API manifest is provided. The method includes obtaining source code associated with a software application. The method also includes analyzing the source code to identify one or more first API endpoints in the software application. The method also includes obtaining API traffic between a server and a client device running the software application, and analyzing the API traffic to identify one or more second API endpoints in the software application. The method includes generating an API manifest by combining one or more first API endpoints and one or more second API endpoints into a single data structure.

[0008] In some embodiments, the method further comprises executing a headless browser to crawl information associated with the client-side code and JavaScript on the server, and analyzing the information associated with the client-side code and JavaScript to identify one or more third API endpoints in the software application. Generating the API manifest comprises combining the one or more first API endpoints, the one or more second API endpoints, and the one or more third API endpoints into a single data structure.

[0009] In some embodiments, API traffic includes at least one of a request or a response between one or more client devices and a server running a software application.

[0010] In some embodiments, the API traffic is real-time traffic.

[0011] In some embodiments, the method also includes monitoring data output by an API endpoint included in the API manifest to identify deviation data from the output data, and marking the deviation data or stopping transmission of the deviation data, wherein the deviation data is data that deviates from a predetermined threshold of reference data.

[0012] In some embodiments, the single data structure is a hierarchical data structure.

[0013] In some embodiments, combining the identified API endpoints into a single data structure includes comparing the identified API endpoints to identify matching API endpoints; and merging the matching API endpoints in a hierarchical data structure.

[0014] In some embodiments, comparing the identified API endpoints to identify a matching API endpoint includes using at least one of a "find_match" function or a "compare_tree" function.

[0015] In some embodiments, merging the matching API endpoints in the hierarchical data structure includes using a "reduce_matches" function to reduce the number of matches for a given API endpoint by comparing identified matching request entities and updating the hierarchical data structure accordingly.

[0016] According to another aspect, a system is provided, the system comprising a memory and a processor, the memory comprising programming instructions stored in the memory, the processor being configured to be able to execute the programming instructions stored in the memory to obtain source code associated with a software application, and analyze the source code to identify one or more first API endpoints in the software application. The processor is also configured to obtain API traffic between a server and a client device running the software application, and analyze the API traffic to identify one or more second API endpoints in the software application. The processor is also configured to generate an API manifest by combining the identified one or more first API endpoints and the one or more second API endpoints into a single data structure.

[0017] According to another aspect, a non-transitory computer-readable medium is provided on which instructions executable by a processor are stored to obtain source code associated with a software application and analyze the source code to identify one or more first API endpoints in the software application. The processor is also configured to obtain API traffic between a server running the software application and a client device, and analyze the API traffic to identify one or more second API endpoints in the software application. The processor is also configured to generate an API manifest by combining the identified one or more first API endpoints and the one or more second API endpoints into a single data structure.

[0018] According to another aspect, a communication system is provided, the communication system including a management system, a server or a client device, the communication system including a memory and a processor, the memory including programming instructions stored thereon, the processor being configured to be able to execute the stored programming instructions to obtain source code associated with a software application, and to analyze the source code to identify one or more first API endpoints in the software application. The processor is also configured to obtain API traffic between a server and a client device running the software application, and to analyze the API traffic to identify one or more second API endpoints in the software application. The processor is also configured to generate an API manifest by combining one or more first API endpoints and one or more second API endpoints into a single data structure.

[0019] These and other aspects of the present application will become more apparent from the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The foregoing and other aspects of the present disclosure may be better understood when the following detailed description is read in conjunction with the accompanying drawings. For the purpose of illustrating the technology, specific examples are shown in the accompanying drawings, however, it should be understood that the examples of the technology are not limited to the specific tools disclosed. The accompanying drawings include the following figures:

[0021] Figure 1A schematic diagram showing an API management system in a communication system according to a first embodiment of the present disclosure is shown;

[0022] Figure 2 An operation flow chart of the API management system according to the first embodiment is shown;

[0023] Figure 3 An example hierarchical data structure is shown;

[0024] Figure 4 An example architecture diagram of the API management system of the first embodiment is shown;

[0025] Figure 5 shows an operation flow chart of an API management system according to a variation of the first embodiment;

[0026] Figure 6 Another example hierarchical data structure is shown;

[0027] Figure 7 A schematic diagram showing an API management system in a communication system according to a second embodiment of the present disclosure is shown;

[0028] Figure 8 A schematic diagram of an API management system according to a third embodiment of the present disclosure is shown;

[0029] Fig. 9 shows an operation flow chart of the API management system according to the second embodiment; and

[0030] Fig.10 A schematic diagram of a computing system according to an embodiment is shown. DETAILED DESCRIPTION

[0031] The present disclosure can be more easily understood by referring to the detailed description of the following exemplary examples. Before disclosing and describing the exemplary embodiments and examples of the methods, devices and systems according to the present disclosure, it should be understood that the embodiments are not limited to those described in the present disclosure. Many modifications and changes therein are obvious to those skilled in the art and are still within the scope of the present disclosure. It should also be understood that the terms used herein are only used to describe specific embodiments and are not restrictive. Some embodiments of the disclosed technology will be described more fully below with reference to the accompanying drawings. However, the disclosed technology can be implemented in many different forms and should not be construed as being limited to the embodiments set forth therein.

[0032] In the following description, many specific details are set forth. However, it should be understood that examples of the technology of the present disclosure can be implemented without these specific details. In other cases, in order not to obscure the understanding of this specification, well-known components, structures and techniques are not shown in detail. References to "implementation", "example", "some examples", etc. indicate that the implementation of the technology of the present disclosure described in this way may include specific features, structures or characteristics, but not every implementation must include the specific features, structures or characteristics. In addition, the repeated use of the phrase "in some examples" does not necessarily refer to the same implementation, although it may be the case. In addition, it should be understood that the specific features, structures or characteristics described in different examples, implementations, etc. can be further combined in various ways and implemented in one or more implementations.

[0033] To aid in the discussion, a number of definitions of terms used in this specification are provided.

[0034] An API is a set of rules and protocols that allow different software applications to communicate with each other by defining how requests and responses are formatted.

[0035] API documentation is written material that provides information about the functionality, usage, and expected behavior of an API, including details about one or more endpoints, parameters, data types, and error handling.

[0036] Source code is human-readable instructions written in a programming language that define the functionality of a software program or application.

[0037] API traffic is the flow of requests and / or responses between clients and servers that utilize an API during the operation of a software application or system.

[0038] An API endpoint is a specific point or location within an API where clients can send requests and receive responses, typically represented by a unique combination of an HTTP method (e.g., GET, POST, PUT, DELETE) and a URL path.

[0039] A hierarchical data structure is a data organization method that arranges data into a tree-like structure consisting of nodes connected by edges, where each node has a parent node and one or more child nodes.

[0040] Query parameters are key-value pairs appended to the URL in an API request that provide additional information or filtering options for the requested data.

[0041] Body parameters are key-value pairs included in the body of an API request, and are typically used to submit data to be processed or stored by the API.

[0042] A node is a single element within a hierarchical data structure that represents a specific level or fragment of an API path.

[0043] A leaf node is a node in a hierarchical data structure that does not have any child nodes and represents the endpoint of a branch in the tree.

[0044] An API inventory is a record of API endpoints and their associated metadata within a software application or system.

[0045] The technical solutions in the embodiments of the present disclosure will be described below with reference to the accompanying drawings.

[0046] Embodiments of the present invention generally relate to API security, and more specifically, to systems and methods for generating and maintaining API inventories using a fusion unit that combines API documentation from source code and analysis of real-time API traffic, and corresponding non-transitory computer-readable media for the systems and methods.

[0047] Figure 1 The API management system 110 in the communication system 100 according to the first embodiment is shown. The communication system 100 includes the API management system 110, a server 120, first to third client devices 131-133, and a network 140.

[0048] The first through third client devices 131-133 are capable of communicating with the server 120 through the network. In addition, the API management system 110 is capable of communicating with the server 120 through the network 140. In this embodiment, the API management system 110 is accessible to all outgoing communications from the server 120.

[0049] Each of the first to third client devices 131-133 includes at least one processor (not shown) and a communication unit (not shown). In this embodiment, the processor is configured to control the communication unit to request and receive data from the server 120 through the API at the server 120, so as to perform the above-mentioned communication with the server 120. In this embodiment, each of the first to third client devices 131-133 has a communication interface (hereinafter referred to as the communication interface). Fig.10 The form of the computing system 300 is discussed, but this is merely an example of a suitable form of the first through third client devices 131 - 133 .

[0050] The server 120 includes at least a processor (not shown), a communication unit (not shown), and a memory (not shown). In this embodiment, the memory stores a software application that can be executed by the processor and is configured by source code. In addition, the memory stores data that can be output through the API of the software application. In this embodiment, the data is video data. However, the embodiment is not limited in this regard, and any other type of data (e.g., music, documents, personal data, etc.) can be output alternatively in other embodiments or variations of this embodiment.

[0051] The processor of the server 120 is configured to receive a data request from one or more of the first to third client devices 131-133 via a communication unit through an API, retrieve the requested data from a memory, and send the requested data to one or more of the first to third client devices 131-133 so as to communicate with the above-mentioned first to third client devices 131-133.

[0052] The server 120 is configured to run a software application configured by source code. The software application includes at least one API that allows the first to third client devices 131-133 to send and / or request data to the server 120. This discussion will focus on the first to third client devices 131-133 requesting data from the server 120, but is equally applicable to the first to third client devices 131-133 sending data to the server 120. This communication (in either direction) may be referred to as "traffic" or "API traffic."

[0053] In this embodiment, the server 120 has the following reference Fig.10 The form of computing system 300 is discussed, but this is merely an example of a suitable form.

[0054] In this embodiment, the processor of the server 120 is further configured to control the communication unit to transmit the source code to the API management system 110 via the network 140. In addition, the processor of the server 120 is configured to control the communication unit to transmit a copy of all API traffic between the server 120 and the first to third client devices 131-133 to the API management system 110.

[0055] The API management system 110 includes a communication unit 111 , a code analysis unit 112 , a traffic analysis unit 113 , and a fusion unit 114 .

[0056] The communication unit 111 is configured to communicate with the server 120 via the network 140 to receive source code of the software application stored on the server 120 and to receive a copy of all API traffic between the server 120 and the first to third client devices 131 - 133 transmitted to the API management system 110 .

[0057] The code analysis unit 112 is configured to analyze the source code to identify one or more first API endpoints in the software application. In this embodiment, the code analysis unit 112 includes a source code parser and an endpoint extraction module for identifying and extracting one or more API endpoints from the source code.

[0058] As an example of source code analysis, in .NET, API endpoints are typically defined in controller classes, with HTTP method attributes such as [HttpGet], [HttpPost], and route attributes such as [route]. Analysis of the abstract syntax tree can also be used to identify classes that inherit from ControllerBase or ApiController, which typically indicate API controllers. In frameworks like Spring and JAX-RS, APIs are defined using annotations. For example, in Spring, @RestController and @RequestMapping (or @GetMapping, @PostMapping, etc.) are used to define the API. In Python, API endpoints are typically defined as functions. For example, in Flask, the app.route() decorator is used to define routes. In Django, urlpatterns in the urls.py file define routes.

[0059] For each of these examples, analysis of the abstract syntax tree (AST) can also be used for API enumeration and analysis. By traversing the AST and finding definition nodes corresponding to API endpoints (such as functions decorated with certain annotations or attributes), the APIs in the code base can be enumerated.

[0060] However, it should be understood that these are only examples, and the principles of the source code analysis can also be applied to other frameworks. However, the embodiment is not limited in this regard, and any other suitable configuration of the code analysis unit 112 can be used in variations of this embodiment.

[0061] The traffic analysis unit 113 is configured to analyze the API traffic to identify one or more second API endpoints in the software application. In this embodiment, the traffic analysis unit 113 includes a traffic inspection module and an endpoint extraction module for identifying and extracting the AI ​​endpoints. However, the embodiment is not limited in this regard, and any other suitable configuration of the traffic analysis unit 113 may be used in variations of this embodiment.

[0062] By analyzing API requests and responses, and optionally aggregating metadata about the traffic, the API endpoints used in the API requests and responses may be identified.

[0063] The fusion unit 114 is configured to generate an API manifest by combining the identified first API endpoint and the second API endpoint into a single data structure. In this embodiment, the single data structure is a hierarchical data structure, in which data is arranged in a tree structure consisting of nodes connected by edges, in which each node has a parent node and one or more child nodes. This will refer to Figure 2 and 3Further discussion.

[0064] The network 140 in this embodiment is the Internet. However, the embodiments of the present invention are not limited thereto, and any suitable communication technology may be used. Figure 1 A single network is shown in FIG. 1 , but the embodiments of the present invention are not limited thereto. For example, in other embodiments, the first to third client devices 131 - 133 may communicate with the server 120 via a first network (e.g., the Internet), and the API management system 110 communicates with the server 120 via a second network (e.g., a local area network).

[0065] In this particular embodiment, for ease of illustration, Figure 1 Each device in the embodiment is shown as a single entity. However, it should be understood that in other embodiments, the functionality of each device may be split onto more than one device. In other words, in general, Figure 1 Each device in can be a single device or a distributed device.

[0066] The API management system 110 of the communication system 100 is capable of generating and managing a list of API endpoints of software applications running in the server 120 .

[0067] Figure 2 An operation flow chart of the API management system 110 according to the first embodiment is shown. Figure 3 An example hierarchical data structure is shown. Reference will now be made to Figure 2 Flowchart and Figure 3 The operation of the API management system 110 is discussed with examples.

[0068] At step S1, the API management system 110 obtains source code associated with the software application. In this embodiment, the API management system 110 receives the source code from the server 120 through the network 140 via the communication unit 111. However, the embodiment is not limited thereto, and any other suitable method of obtaining source code may be used.

[0069] At step S2 , the code analysis unit 112 of the API management system 110 analyzes the source code to identify one or more first API endpoints in the software application.

[0070] At step S3, the communication unit 111 of the API management system 110 obtains API traffic between the server 120 running the software application and one or more of the first to third client devices 131-133. API traffic is a flow of requests and responses between the client devices 131-133 and the server 120, which use the API during the execution of the software application. In this embodiment, the API management system 110 receives traffic from the server 120 via the communication unit 111 through the network 140. In other words, the server 120 sends a copy of all communications between it and any client device to the API management system 110. However, the embodiment is not limited thereto, and any other suitable method of obtaining API traffic may be used.

[0071] Thus, during execution of the software application, one or more requests and responses between the client devices 131 - 133 and the server 120 using the API are generated, and the server 120 provides a copy of these requests and responses to the API management system 110 .

[0072] At step S4, the traffic analysis unit 113 of the API management system 110 analyzes the API traffic to identify one or more second API endpoints in the software application. Thus, the traffic analysis unit 113 analyzes the requests and responses obtained between the client devices 131-133 and the server 120 to identify any endpoints in the API revealed by these requests and responses.

[0073] At step S5, the fusion unit 114 of the API management unit 110 generates an API manifest by combining the identified first API endpoint and the identified second API endpoint into a single data structure. In this embodiment, the single data structure is a hierarchical data structure, in which the API endpoints are arranged in a tree structure consisting of nodes connected by edges, wherein each node has a parent node and one or more child nodes. The hierarchical data structure includes nodes representing different levels of API paths and their relationships, as well as visual representations of the endpoints. In this embodiment, the following algorithm is used to obtain the hierarchical data structure:

[0074] foreachhostintrafficinspectionscan:

[0075] createeinhostendpoints:

[0076] insertendpointtohosttree

[0077] foreachendpointsincodeanalysisscan:

[0078] foreachtreeinhosttrees:

[0079] iftreecontainsmatchesfortheendpoint

[0080] reducematcheswithendpoint foreachtreeinhosttrees:

[0081] traversetreewhilemergingendpointsmetadataundersamenode

[0082] printthemergedendpoint

[0083] (For each host in the traffic inspection scan:

[0084] Create an endpoint in the host:

[0085] Inserting an endpoint into the hosts tree

[0086] For each endpoint in the code analysis scan:

[0087] For each tree in the host tree:

[0088] If the tree contains a match for the endpoint

[0089] Reduce the number of matches to the endpoint

[0090] For each tree in the host tree:

[0091] Traversing the tree when merging endpoint metadata under the same node

[0092] Print merged endpoints)

[0093] In other words, this involves a breadth-first search (BFS) traversal when merging the endpoints' data. In this embodiment, this involves requesting enrichment information, such as category information, field and element counts, field ranges, possible responses, and authentication information.

[0094] Class information refers to the type of data or structure used or returned by the API. For example, if the API returns JavaScript Object Notation (JSON) objects representing users, then the "User" class may have fields like "id", "username", and "email". Class information can also include methods to operate on these fields.

[0095] Field and element counts refer to the number of fields in the data structures used by the API. For example, if the API returns a JSON object representing a user, the fields might be "id", "username", "email", etc. The count is the total number of these fields, which helps understand complexity.

[0096] A field range is the possible or typical values ​​a field has. For example, an "id" field could be a number between 1 and 1000, a "username" could be a string between 1 and 20 alphanumeric characters, etc.

[0097] Possible responses are different types of responses that an API endpoint can return. For example, this can include different HTTP status codes, such as 200 (200 OK) for a successful request or 404 (404 Not Found) for a not found error.

[0098] Authentication information is how the API handles authentication and authorization. For example, the API might require you to include a certain header with your API key in every request, or it might use OAuth or some other method. Understanding how to authenticate an API can determine how you use it.

[0099] Although the specific functionality and enrichment information described above are discussed herein, the embodiments are not limited in this regard, and any other suitable functionality may be used to organize the identified endpoints into a hierarchical data structure in variations of the embodiments.

[0100] Now refer to Figure 3 Examples of these steps are discussed, especially examples of the hierarchical data structure in step S5. Specifically, Figure 3 The final hierarchical data structure for this example is shown.

[0101] In this example, at steps S1-S2, the API management system 110 obtains the source code and analyzes it to identify the following API endpoints:

[0102] GET https: / / api.com / v1 / users / bob

[0103] POST https: / / api.com / v1 / users

[0104] Furthermore, in this example, at steps S3-S4, the API management system 110 obtains the API traffic and analyzes it to identify the following API endpoints:

[0105] GET https: / / api.com / v1 / users / john

[0106] GET https: / / api.com / v1 / cars / users

[0107] In this example, at step S5 , the fusion unit 114 analyzes and compares the four identified API endpoints to classify them into a single hierarchical data structure.

[0108] Specifically, the fusion unit 114 determines that the top-level node of the "POST https: / / api.com / v1 / users" endpoint is "POST". Since no other identified endpoint includes this top-level node, the path of this endpoint is not shared with any other identified endpoints, so the data structure must include this endpoint with its own unique path (see Figure 3 on the right side of the ).

[0109] In contrast, the fusion unit 114 determines that all the other three identified endpoints share not only the top node ("GET"), but also the next two nodes ("api" and "v1"). Therefore, the fusion unit 114 determines that the portion of the path for all three identified endpoints can be shared (see Figure 3 ).

[0110] When looking at the lower nodes, the fusion unit 114 determines that, after node v1, the endpoint "GET https: / / api.com / v1 / cars / users" does not share its next node ("cars") with any other endpoint because the next node for the other two endpoints is "users", not "cars". Therefore, the data structure must include the remainder of this endpoint and its own unique path (see Figure 3 bottom middle part of the image).

[0111] For the other two identified endpoints ("GET https: / / api.com / v1 / users / bob" and "GET https: / / api.com / v1 / users / john"), the fusion unit 114 determines that the next node ("users") is also shared and can be provided as a common node for the two identified endpoints within a single data structure. Next, the "bob" and "john" endpoints are provided separately (because they are different from each other).

[0112] Through this method, the four identified endpoints can be combined into a valid logical data structure. In particular, it can be seen that the endpoints bob 22, john 23, users 24 and users 25 are organized within the hierarchical data structure, where bob 22 and john 23 share the node users 21. Therefore, although all identified endpoints include the "users" node, through this method, the fusion unit 114 is able to determine that this does not necessarily mean that their paths can be fused because these endpoints have different higher nodes.

[0113] It can be seen that through Figure 2 This method (by Figure 3 As shown in the above example, the API management system 110 can identify the API endpoints of a given software application in different ways. The API management system 110 can combine two valid result lists or API endpoints identified in different ways into a single data structure. That is, the identified one or more first API endpoints and the identified one or more second API endpoints share a single data structure. In addition, by referring to Figure 3 Implementing a hierarchical data structure in the manner discussed may organize the data structure in an efficient and usable manner. However, the embodiment is not limited to the use of a hierarchical structure, and other single data structures may be used instead in variations of the embodiment.

[0114] Only four API endpoints are discussed Figure 3 , where two are identified in the source code and two are identified in the traffic analysis. However, it should be understood that this is for ease of explanation only. Actual implementations of the disclosed embodiments may involve the identification of a much larger number of API endpoints, which are in turn merged into a single data structure. For example, in an implementation where many applications run on the same server, hundreds of endpoints may be identified for the server.

[0115] Figure 4 An example architecture diagram of the API management system 110 is shown. Figure 4 As shown, there is a data flow from the server side to the API management system side, including server traffic (ie, the API traffic discussed above) and source code of the software application including the API (ie, the source code discussed above).

[0116] On the API management system side, data is received at the communication unit 111 and then appropriately fed to the traffic analysis unit 113 and the code analysis unit 112. In other words, the source code is fed to the code analysis unit 112 and the API traffic is fed to the traffic analysis unit 113.

[0117] Once the API endpoints are identified within the traffic inspection layer and the code analysis layer by the traffic analysis unit 113 and the code analysis unit 112, respectively, the API specifications (i.e., API endpoints) are fed to the fusion unit 114 in the manifest layer so that the identified endpoints are "fused" into a single data structure, as discussed above.

[0118] As discussed above, the API management communication system 100 is capable of generating an API list in the form of a single data structure based on the source code of the software application on the server 120 and the API traffic between the server 120 and the first to third client devices 131-133. In the example, the API management system 110 is capable of automatically generating the list. In other words, the embodiment provides a system and method for generating and maintaining an API list using a fusion unit 114 that combines API documentation from source code and analysis of real-time API traffic. The fusion unit 114 serves as the basis for a complete and automatically updated API list. Therefore, this can provide a single unified view of the server's API panorama, thereby simplifying management tasks and reducing the time and effort required to monitor and maintain APIs. This can improve the efficiency and productivity of development and operations teams.

[0119] Since the fusion unit 114 is used to combine the API documentation of the source code and the real-time API traffic analysis, the fusion unit 114 can generate a complete and up-to-date API list. This comprehensive list helps to better understand and manage the API landscape of the server 120, which is crucial for maintaining application performance, security and compliance.

[0120] In other words, the ability of the fusion unit to merge information from source code and API traffic results in more accurate and comprehensive API documentation (i.e., enhanced API documentation). Such improved documentation can facilitate better communication between team members developing software applications, promote understanding of API functionality, and support more efficient development and integration efforts. Thus, the actions of the API management system 110 including the fusion unit 114 can reduce the need for manual effort to maintain and update API inventories.

[0121] Furthermore, by maintaining a complete and accurate API inventory, the API management system 110 allows users / organizations associated with the server 120 to effectively identify and address potential security risks. The fusion unit 114 facilitates the detection of unauthorized or unexpected endpoints, allowing for timely remediation of potential vulnerabilities and improving overall API security.

[0122] In this embodiment, the API traffic is real-time traffic (i.e., the server 120 sends the API traffic to the API management system 110 in real time). In this way, the API management communication system 100 continuously analyzes the API traffic and updates the API list with any newly identified endpoints in real time. The API list is automatically updated by the fusion unit 114 when changes are detected in the source code or the real-time API traffic, which ensures that the list remains up-to-date and reduces the possibility of outdated or lost information that may cause security vulnerabilities or performance issues. In this embodiment, the source code is also "live" code. In other words, the server 120 sends the source code (or information about source code updates) to the API management system 110 in real time (i.e., the source code is sent every time it is updated, or at least the updated portion is sent). In this way, the API management communication system 100 continuously analyzes the source code and updates the API list with any newly identified endpoints in real time.

[0123] However, the embodiments are not limited in this regard. For example, in a variation of this embodiment, API traffic is instead sent to the API management system periodically (e.g., once an hour, once a day, or once a week). Although such variations do not allow the API list to be updated in real time in the same manner as real-time traffic, they still allow the API endpoints to be identified in a timely manner. For example, in a variation of this embodiment, the source code is only sent once or periodically, rather than in real time. Although such variations do not allow the API list to be updated in real time, they can still be used to identify endpoints in a software application until a specific point in time. In other words, although the use of real-time source code and real-time updating of the API list ensures the most useful and up-to-date API list, a useful API list can still be generated based on a set of source code. The API management system is only able to generate an API list at a specific point in time, and cannot continuously update it after that point in time.

[0124] Although Figure 2 Steps S1-S5 are discussed in a particular order, but it should be understood that this is purely for ease of explanation and the order may be changed. For example, steps S3-S4 may be performed before or in parallel with steps S1-S2.

[0125] As mentioned above, in this embodiment, both the API traffic and the source code are "live", which means that whenever there are updates (e.g., when new API traffic is sent / received or when the source code is updated), the API management system 110 receives them in real time. Figure 2The steps of the flowchart are repeated as needed. For example, each time new source code is received, steps S1-S2 and S5 are executed to update the API list (i.e., update the existing API list). Each time new API traffic is received, steps S3-S4 and S5 are executed to update the API list (i.e., update the existing API list). In this regard, it should be understood that each time new source code and / or API traffic is received, steps S1-S2 and S5 can be repeated as needed. Figure 2 The relevant steps of the flowchart.

[0126] In a variation of this embodiment, the API management system 110 includes a display unit that displays the generated API list. In another variation, the API management system 110 transmits the generated API list to the server 120 for display. In another variation, the API management system transmits the generated API list to another device (e.g., a user's PC) for display. Likewise, in any of these variations, the API list can be displayed to a user (e.g., a developer of a software application) to allow the user to view the identified endpoints to determine whether any changes need to be made to the source code to shut down any independent endpoints (e.g., endpoints that were previously shadow or zombie endpoints that the user is not aware of).

[0127] In conjunction with or separate from the display of the API manifest, in some variations of the embodiments, the API management system 110 can control the data flow output by the API endpoints included in the API manifest to identify abnormal data activity and send a command to the server to pause or stop the transmission of the abnormal data flow. For example, upon identifying a previously unknown API endpoint (e.g., a shadow or zombie endpoint), the API management system can send a command to the server to pause any data flow from the endpoint until the API management system 110 or the server 120 receives user confirmation to allow data flow from the endpoint. In another example, the API management system 110 can monitor the data flow from a specific identified endpoint and send a command to the server 120 to pause the data flow if the output data is of a predetermined type (e.g., personal information).

[0128] For example, by analyzing API requests and responses, and aggregating metadata about that traffic, a baseline (e.g., a reference) of "normal" traffic can be established for traffic to and from a particular API and endpoint, as well as identifying deviations from that baseline and potential attacks on the API endpoint. Predetermined thresholds can be set, and deviations exceeding the predetermined thresholds can indicate the presence of abnormal data as described above.

[0129] In this embodiment, the first to third client devices 131-133 are all PCs. However, the embodiments of the present disclosure are not limited thereto. In other embodiments, the client device can be any type of electronic device (e.g., a smart phone, a laptop, a tablet computer, etc.) capable of communicating with the server 120.

[0130] Although the present embodiment discusses the example that three client devices 131-133 can communicate with the server 120 in the communication system 100, it should be understood that this is only for ease of explanation. It should be understood that in the actual implementation of the disclosed embodiment, there may be many such devices. In addition, in other embodiments, there may be less than three client devices (e.g., one client device) connected to the network 140.

[0131] Similarly, although the present embodiment is discussed using a single server 120 as an example, it should be understood that this is for ease of explanation only. It should be understood that actual implementations of embodiments of the present disclosure may include a single API management system 110 that generates API manifests for multiple servers (or for multiple software applications running on a single server or multiple servers). In other words, the API management system 110 and associated methods are scalable, allowing the API management system 110 to handle a large number of APIs and endpoints. This scalable design ensures that the API management system 110 remains a valuable tool as the API landscape evolves.

[0132] Furthermore, in variations of the discussed embodiments, the fusion unit 114 may be customized to the specific needs and requirements of a particular user or organization, providing flexibility and adaptability in different environments and use cases.

[0133] Although in the embodiments, the server 120 and the API management system 110 are discussed as separate devices / systems, it should be understood that the embodiments are not limited in this regard. In other words, in other embodiments, the functionality of the API management system 110 and the server 120 can be combined into a single device. However, by providing the functionality of the API management system 110 in a separate, stand-alone device / system, user convenience can be provided. In particular, the API management system 110 can be implemented in any existing system in which a server communicates with a client device, possibly with minimal adaptability (with respect to transmitting source code and API traffic from the server to the API management system).

[0134] Furthermore, although in the discussed embodiment, the API management system 110 is described as including a single communication unit 111, the embodiments are not limited in this respect. In other embodiments, separate communication units may be provided in the API management system for receiving source code and traffic analysis. Furthermore, although the embodiment has been discussed in terms of the server 120 sending source code and API traffic to the API management system 110, the embodiments are not limited thereto. For example, in other embodiments, source code associated with a server's software application may be received from different devices (e.g., a user's laptop, other servers, etc.).

[0135] Although the embodiment has been discussed with reference to an API management system 110 including a plurality of separate processing types of units (code analysis unit 112, traffic analysis unit 113, fusion unit 114, etc.), it should be understood that this is purely for ease of explanation. In actual implementation of this embodiment, the API management system may be implemented in any computing system or network traffic management system including a communication unit, a processor unit, and a memory (see, for example, Fig.10 and its discussion).

[0136] In some embodiments, the generated API manifest can take the form of an API document and then be automatically used for API testing in a lower environment or production, such as by performing simulated attacks on identified endpoints. In some embodiments, such simulated attacks can be performed by an API management system.

[0137] Figure 5 A flowchart showing the operation of the API management system 110 according to a variation of the first embodiment discussed above is shown. Figure 6 Shown with Figure 3 Reference will now be made to an exemplary resulting hierarchical data structure associated with the hierarchical structure of Figure 5 Flowchart and Figure 6 The operation of the API management system 110 is discussed with examples.

[0138] In this variation, in addition to organizing the identified endpoints into a hierarchical data structure, the fusion unit 114 of the API management system 110 is also configured to reduce the number of nodes included in the hierarchical data structure while ensuring that the hierarchical data structure still retains the acquired endpoint information. This will be discussed in detail below.

[0139] Figure 5 The flowchart starts from step S21, wherein the API management system 110 executes Figure 2 Flowchart of steps S1 to S5. Figure 2 Steps S1 to S5 have been discussed in detail, and for the sake of brevity, repeated discussion will be omitted herein. These steps produce a hierarchical data structure (e.g., Figure 3hierarchical data structure).

[0140] At step S22, the fusion unit 114 of the API management communication system 110 selects a specific endpoint from the hierarchical data structure. There is no particular limitation on which endpoint is selected or how the endpoint is selected. Figure 3 An example of an endpoint for bob 22 (that is, GET https: / / api.com / v1 / users / bob).

[0141] At step S23, the fusion unit 114 of the API management communication system 110 determines the common form of the endpoint. Figure 3 In the example of the bob 22 endpoint (ie, GET https: / / api.com / v1 / users / bob), the fusion unit 114 may determine the general form as GET users / {username}.

[0142] At step S24, the fusion unit 114 of the API management system 110 searches for an endpoint that matches the general form. In this embodiment, the search is performed using the "find_match" function and the "compare_tree" function, as shown below:

[0143] find_match(endpoint):

[0144] current_node=root.get_child(endpoint.method)

[0145] segments=split endpointpathto segments

[0146] nodes=current_node.get_nodes_by_value(segments.pop())

[0147] matches = empty list

[0148] for eachnode innodes:

[0149] extendmatches with compare_tree(node,segments,endpoint)

[0150] returnmatches

[0151] compare_tree(node,segments,endpoint):

[0152] ifsegments is empty:

[0153] returnmatching endpoint fromnode.endpoints

[0154] ifnode is not aleaf:

[0155] segments = segments.pop()

[0156] matches=emptylist

[0157] foreach childnode.get_matching)children(segment):

[0158] extendmatches with compare_tree(child,segments,endpoint)

[0159] returnmatches

[0160] return empty list

[0161] As can be seen, the “find_match” function searches the data structure for a node corresponding to the path segment of the selected API endpoint, while the “compare_tree” function traverses the data structure to find matching endpoints.

[0162] Consider an example where the "find_match" and "compare_tree" functions are applied to the example discussed above of GET users / {username} with the fragment users{username}. Within the "find_match" function, both the user21 node and the user24 node are initially identified as matches (see line 3 of the "find_match" function). However, when the users24 node is tested using the "compare_tree" function, it is determined that it does not have any child nodes and therefore does not match the lookup path that requires another node that may correspond to "{username}".

[0163] In contrast, when the user21 node is tested using the "compare_tree" function, it does have child nodes (bob22 and john23) that match the lookup path. Therefore, it is determined that both the bob22 endpoint (i.e., GET https: / / api.com / v1 / users / bob) and the john23 endpoint (i.e., GET https: / / api.com / v1 / users / john) match GET users / {username}.

[0164] There are multiple reasons why the users25 node is not recognized as a match, since it is not a GET form and it does not have any child nodes corresponding to "{username}".

[0165] At step S25, the fusion unit 114 merges the matching endpoints in the hierarchical data structure. In this embodiment, the search is performed using the "reduce_matches" function as follows:

[0166]

[0167] As can be seen, the "reduce_matches" function reduces the number of matches for a given endpoint by comparing the request entities for identified matches. The request entity includes query parameters and body parameters. If every parameter in request A is included in request B, and vice versa, then the requests are considered to match. The "reduce_matches" function updates the hierarchical data structure accordingly.

[0168] When this "reduce_matches" function is applied in the example discussed above, the matching bob22 endpoint (ie, GET https: / / api.com / v1 / users / bob) and the matching john23 endpoint (ie, GET https: / / api.com / v1 / users / john) are thereby reduced, with both endpoint nodes being replaced by a single endpoint node of the form {username}.

[0169] In particular, see Figure 6 , where the bob 22 node and the john 23 node are replaced by a single {username} 26 node representing both endpoints. In other words, the two matching bob and john nodes are removed in a "backtracking" process, where each matching node path is removed from the tree and then a "new" path "users / {username}" is built into the tree replacing the found matches.

[0170] From this example, we can see that Figure 5The method is used to simplify the hierarchical data structure, merging nodes to reduce the number of nodes while ensuring that the hierarchical data structure accurately represents all identified endpoints. Although the endpoints determined to be matched are not exactly the same (i.e., they share nodes), the nodes at the bottom level (e.g., Figure 6 In other words, many different endpoints can be determined to match and merged in the hierarchical data structure.

[0171] Although the "find_matches", "compare_tree", and "reduce_matches" functions discussed above are used as discussed above, the embodiments are not limited thereto. It should be understood that the same principles can be applied to different specific functions. Thus, in other embodiments, any other suitable function can be used instead to find matching endpoints and then merge these endpoints.

[0172] Figure 7 FIG. 1 shows an API management system 110' in a communication system 100' according to a second embodiment. The communication system 100' includes the API management system 110', a server 120', first to third client devices 131'-133', and a network 140'. The components and functions of the communication system 100' are similar to those of FIG. Figure 1 The components and functions of the communication system 100 are substantially the same, and for the sake of brevity, repeated discussions will be omitted herein. Only the differences will be discussed.

[0173] exist Figure 7 In the communication system 100', Figure 1 Unlike the communication system 100 of FIG. 1 , the API management system 110′ is located between the client devices 131′-133′ and the server 120′ connected via the network 140′. Therefore, instead of the server 120′ communicating directly with the client devices 131′-133′ via the network 140′, all API traffic (i.e., the data flow of requests and responses) passes through the API management system 110′.

[0174] In this embodiment, the API management system 110' receives source code from the server 120' and receives API traffic (because all API traffic is transmitted through the API management system 110') to generate an API list. Figure 1 The communication system 100 is generated in the same manner as discussed above.

[0175] In addition, in this embodiment, the API management communication system 100' is arranged to control the data flow output by the API endpoints included in the API manifest to identify abnormal data activity and pause the abnormal data flow. For example, upon identifying a previously unknown API endpoint (e.g., a shadow or zombie endpoint), the API management communication system 100' can pause any data flow from the endpoint until the API management system 110' receives user confirmation that data flow from the endpoint is allowed. In another example, the API management communication system 100' can monitor the data flow from a specific identified endpoint and pause the flow if the output data is of a predetermined type (e.g., personal information).

[0176] While the API management communication system 100' may also be used to flag or pause suspicious data activity (e.g., by sending a message to the server 120' via the network 140' to pause the flow of data), the API management system 110' has the following advantage: by acting as an intermediary between the servers 120' and 131'-133', the API management system 110' itself can pause the flow of data received from the server 120' to the client devices 131'-133' (e.g., by dropping, stopping, or not outputting the data).

[0177] Although the above embodiments have been discussed with reference to an API management system including only two API endpoint identification units (i.e., code analysis unit 112 and traffic analysis unit 113), the embodiments are not limited to this number. An example embodiment will now be described with an API management system including three API endpoint identification units, wherein the fusion unit generates / updates an API list by combining the identified endpoints from all three endpoint identification units.

[0178] Figure 8 FIG. 2 is a schematic diagram of an API management system 210 according to a third embodiment of the present invention. The API management system 210 is configured in a communication or network traffic management system including a server and one or more client devices. In this embodiment, the API management system 210 is configured to replace Figure 1 The API management system 110 .

[0179] API management system 210 and Figure 1 The API management system 110 shown is basically the same, but with the addition of an API crawler unit 215. Specifically, the API management system 210 includes a communication unit 211, a code analysis unit 212, a traffic analysis unit 213, a fusion unit 214, and an API crawler unit 215. The communication unit 211, the code analysis unit 212, the traffic analysis unit 213, and the fusion unit 214 are Figure 1The communication unit 111, the code analysis unit 112, the traffic analysis unit 113, and the fusion unit 114 are substantially the same, and repeated discussion thereof will be omitted. In other words, only the differences will be discussed.

[0180] The API crawler unit 215 is configured to execute a headless browser to crawl information about or associated with the client-side code and JavaScript on the server. The API crawler unit 215 analyzes the crawl information associated with the client-side code and JavaScript to identify one or more third API endpoints in the software application. In this embodiment, the API crawler unit 215 executes a headless browser, scans the domain and subdomains of the server, and further enumerates the client-side JavaScript to obtain additional APIs and API endpoints.

[0181] In this embodiment, the headless browser is based on the "Beautiful Soup" Python library. The headless browser is configured to find and track network requests made by client-side JavaScript, thereby being able to discover the APIs and endpoints used by the web application.

[0182] In this embodiment, the API crawler unit 215 uses the "Requests-HTML" tool to load the page, processes all JavaScript into HTML, and then uses Beautiful Soup to find and print information about or associated with the API (i.e., the API endpoint). Specifically, the following algorithm is used:

[0183] frombs4 importBeautifulSoup

[0184] fromrequests_html import HTMLSession

[0185] deffind_endpoints(url):

[0186] session = HTMLSession()

[0187] response = session.get(url)

[0188] #Run JavaScript code onwebpage

[0189] response.html.render()

[0190] soup=BeautifulSoup(response.html.html,'html.parser')

[0191] for script in soup.find_all('script'):

[0192] if 'api' in script.text:

[0193] print(script.text)

[0194] find_endpoints('https: / / www.example.com')

[0195] However, it should be understood that the embodiments are not limited to this particular example. For example, although this example uses "Requests-HTML", other embodiments may implement an algorithm that utilizes Selenium to achieve this purpose.

[0196] More generally, it should be understood that embodiments are not limited to any particular method of executing a headless browser to crawl information associated with client-side code and JavaScript on a server and then analyzing the information associated with the client-side code and JavaScript to identify one or more third API endpoints in a software application. For example, there are a variety of tools that can be used for this purpose (e.g., Selenium, Pypetteer, HTML-Requests, etc.).

[0197] The fusion unit 214 is configured to generate an API manifest by combining the identified first API endpoint, the second API endpoint, and the third API endpoint into a single data structure. In other words, compared to the fusion unit 114 of the first embodiment, the fusion unit 214 of the third embodiment also merges the identified third API endpoint into a single data structure. The fusion unit 214 combines these endpoints into a single data structure in the same manner as described above, and repeated discussion thereof will be omitted herein.

[0198] In this particular embodiment, for ease of illustration, Figure 8 Each device or unit in the embodiment is shown as a single entity. However, it should be understood that in other embodiments, the functionality of each device or unit may be divided into more than one device or unit. In other words, in general, Figure 8 Each unit in can be a single unit or a distributed unit. The API management system 210 can generate and manage a list of API endpoints of software applications running in the server by identifying API endpoints using the code analysis unit 212, the traffic analysis unit 213, and the fusion unit 214. In other words, generally speaking, Figure 8Each unit in the API management system 210 may be a single unit or a distributed unit. The API management system 210 may generate and manage a list of API endpoints of software applications operating in a server by identifying API endpoints using the code analysis unit 212, the traffic analysis unit 213, and the fusion unit 214.

[0199] Fig. 9 FIG. 2 shows an operation flow chart of the API management system 210 according to another embodiment.

[0200] At step S31 , the API management system 210 obtains source code associated with the software application.

[0201] At step S32 , the code analysis unit 212 of the API management system 210 analyzes the source code to identify one or more first API endpoints in the software application.

[0202] At step S33 , the communication unit 211 of the API management system 210 obtains API traffic between a server running a software application and one or more client devices.

[0203] At step S34 , the traffic analysis unit 214 of the API management system 210 analyzes the API traffic to identify one or more second API endpoints in the software application.

[0204] Steps S31 to S34 are performed in the same manner as Figure 2 Steps S1 to S4 are substantially the same and will not be discussed again here for the sake of brevity.

[0205] At step S35, the API crawler unit 215 executes a headless browser to crawl information about client-side code and JavaScript on the server. Then at step S36, the API crawler unit 215 analyzes the information about client-side code and JavaScript to identify one or more third API endpoints in the software application.

[0206] As discussed above, in this embodiment, these steps involve the API crawler unit 215, which loads the page using the "Requests-HTML" tool, processes all JavaScript into HTML, and then uses the Beautiful Soup tool to find and print information about the API endpoint (i.e., the identified "third API endpoint").

[0207] At step S37, the fusion unit 214 of the API management unit 210 generates an API manifest by combining the identified first API endpoint, the identified second API endpoint, and the identified third API endpoint into a single data structure. Figure 2Step S5 is performed in substantially the same manner, except that the fusion unit 214 also merges the identified third API endpoints into a single data structure. The fusion unit 214 combines these endpoints into a single data structure in the same manner as described above, and repeated discussion thereof will be omitted herein.

[0208] By including an API crawler 215 in the third embodiment, the API management system 210 is able to identify Figure 1 The API management system 110 supports more API endpoints while continuing to ensure that all identified endpoints can be combined into a single data structure (e.g., a hierarchical data structure) in an effective manner, further ensuring the awareness and security of the API in the software application.

[0209] It should be understood that all implementation details, modifications and variations discussed in the above embodiments are also applicable to the Fig. 9 For the sake of brevity, repeated discussion of this will be omitted herein. As an example, Figure 5 The method is also applicable to this embodiment (where Figure 5 Step S21 will involve executing Fig. 9 Steps S31 to S37 instead of Figure 2 Steps S1 to S5).

[0210] In short, anywhere an API management system (eg, API management system 110 or API management system 110 ′) is discussed in this specification, the API management system may be replaced with API management system 210 .

[0211] Various examples are described herein in conjunction with software applications. It should be understood that, in order to implement the techniques described in this disclosure, there is no limit to the number of software applications to be analyzed and thus generate an API list. Similarly, the software application claimed may be a part or component of another software application. Multiple software applications or parts of software applications may be appropriately analyzed in parallel, sequentially, or simultaneously using the operations described herein. The identified API endpoints of different parts of the software application or different software applications may then be combined into the same or different data structures as needed.

[0212] Fig.10 FIG. 3 is a schematic diagram of a computing system 300 according to an embodiment. Specifically, Fig.10 A schematic diagram of a computing system 300 configured to perform any of the methods discussed herein is shown. For the sake of brevity, a detailed description thereof is omitted herein.

[0213] like Fig.10As shown, the computing system 300 includes a processing unit or processor 310, a memory 320, and a communication unit 330. The processing unit 310, the memory 320, and the communication unit 330 can be connected via a bus system 340. The memory 320 is configured to store programs, instructions, or codes. The processing unit 310 is configured to execute programs, instructions, or codes stored in the memory 320 to complete the operations of various units or steps discussed herein. For example, the steps and operations discussed herein (e.g., obtaining source code and obtaining API traffic) can be performed or implemented by the processor 310 via the communication unit 330. The communication unit 330 can be a transceiver or other suitable interface to implement the related operations discussed herein. The communication unit 330 can also include a user interface, which can include a human-machine interface device and / or a graphical user interface (GUI). For example, the processor 310 can include one or more central processing units (CPUs) or a general-purpose processor with one or more processing cores, although other types of processors can also be used.

[0214] Thus, in those embodiments, the memory 320 is configured to store a computer program executable in the processing unit 310 , and the processing unit 310 is configured to execute the computer program to perform steps and / or operations in any method discussed herein.

[0215] The memory 320 may store programmed non-transitory computer readable instructions for one or more aspects of the techniques described and illustrated herein, but some or all of the programmed instructions may be stored elsewhere. Various different types of memory storage devices may be used as the memory 320, such as random access memory (RAM), read-only memory (ROM), hard disk drive (HDD), solid state drive, flash memory, erasable programmable read-only memory (EPROM), or other computer readable media (e.g., a disk or optical disk (e.g., compact disk read-only memory (CD-ROM))) that is read and written by a magnetic, optical, or other machine readable medium coupled to the processor 310. Thus, the memory 320 may store applications that may include computer executable instructions that, when executed by the computing system 300, cause the computing system 300 to perform actions or operations, such as sending, receiving, or otherwise processing messages, and performing other actions or operations described and illustrated below with reference to the accompanying drawings. Applications may be implemented as units, modules, components, instances, or engines of other applications and / or operating system extensions, plug-ins, and the like. The application may be executed within or as a virtual machine or virtual server managed in a cloud-based computing environment without relying on one or more specific physical network devices.

[0216] The methods, units, devices, systems, processes, and appropriate circuits and logic described herein may be implemented in many different ways and in many different combinations of hardware, software, firmware, or a combination thereof. For example, all or part of the embodiments may be a circuit including an instruction processor, such as a central processing unit (CPU), a microcontroller, or a microprocessor; or implemented as an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a field programmable gate array (FPGA); or implemented as a circuit including discrete logic or other circuit components, including analog circuit components, digital circuit components, or both or any combination thereof. For example, the circuit may include discrete interconnected hardware components, or may be combined on a single integrated circuit die, distributed among multiple integrated circuit dies, or implemented in a multi-chip module (MCM) of multiple integrated circuit dies in a common package.

[0217] Thus, the circuit may store or access instructions for execution, or may implement its functionality solely in hardware. The instructions may be stored in a tangible storage medium (e.g., memory 320) other than a transient signal. A product such as a computer program product may include a storage medium and instructions stored in or on the medium, and when executed by circuits in a device, the instructions may cause the device to implement any of the processes described above or shown in the accompanying drawings.

[0218] The embodiments discussed herein may be distributed. For example, the circuit may include multiple different system components, such as multiple processors and memories, and may span multiple distributed processing systems. Parameters, databases, and other data structures may be stored and managed separately, may be merged into a single memory or database, may be logically and physically organized in many different ways, and may be implemented in many different ways. Example embodiments include linked lists, program variables, hash tables, arrays, records (e.g., database records), objects, and implicit storage mechanisms. Instructions may form parts of a single program (e.g., subroutines or other code segments), may form multiple separate programs, may be distributed across multiple memories and processors, and may be implemented in many different ways. Example embodiments include stand-alone programs, and as part of a library, such as a shared library such as a dynamic link library (DLL). For example, the library may contain shared data and one or more shared programs, which include instructions for performing any processing described above or shown in the accompanying drawings when executed by the circuit.

[0219] It should be understood that although the API management system is generally discussed herein as including various units, such as the code analysis unit 112, the traffic analysis unit 113, and the fusion unit 114, it should be understood that this is for ease of understanding. The methods disclosed herein may be performed by any computing device or system having appropriate functionality, such as Fig.10 computing system.

[0220] The API management system can be implemented as a single device or distributed devices. The API management system can be any suitable computing device (e.g., kubernetes pods, routers, servers, PCs, tablets, laptops, etc.).

[0221] The server discussed herein may be any single or distributed device suitable for storing data and capable of sending the data over a network. For example, a server may act as a data repository. Any suitable network may be used.

[0222] The term "unit" (and other similar terms such as module, submodule) can refer to computing software, firmware, hardware and / or various combinations thereof. However, at least the unit cannot be interpreted as software that is not implemented on hardware, firmware, or software recorded on a non-transient processor-readable and recordable storage medium. In fact, "unit" is interpreted as including at least some physical non-transient hardware, such as a part of a processor, circuit or computer. Two different units can share the same physical hardware (for example, two different units can use the same processor and network interface). The units described herein can be combined, integrated, separated and / or copied to support various applications. In addition, the functions performed in a specific unit described herein can be performed in one or more other units and / or by one or more other devices, rather than in a specific unit The function performed or in addition to the function performed in a specific unit. In addition, these units can be implemented across multiple devices and / or other components that are local or remote to each other. In addition, a unit can be moved from one device and added to another device, and / or can be included in two devices. These units can be implemented with software stored in a memory or a non-transient computer-readable medium. The software stored in the memory or medium can be run on a processor or circuit (such as ASIC, PLA, DSP, FPGA or any other integrated circuit) capable of executing computer instructions or computer codes. These units can also be implemented in hardware using processors or circuits on the same or different integrated circuits.

[0223] It is understood that the functions of each component discussed may be combined in a manner different from that discussed in the foregoing description. For example, in some embodiments, the functions of more than one device or system discussed may be merged into a single device. In other embodiments, the functions of at least one of the devices (or components of devices) discussed may be divided into multiple separate (or distributed) devices (or multiple separate components within a device or system). Therefore, any "device" discussed herein may be implemented as a system, and any "system" discussed herein may be implemented as a device.

[0224] The embodiments of the present invention may also provide a computer-readable medium having computer-executable instructions to enable one or more processors of a computing device or system to execute the method of any embodiment of the present invention.

[0225] Examples of computer readable media include volatile and nonvolatile media, removable and non-removable media, including but not limited to solid-state memory, removable disks, hard drives, magnetic media, and optical disks. In general, computer readable media include any type of media suitable for storing, encoding, or carrying a series of instructions that can be executed by one or more computers to perform any one or more of the processes and features described herein.

[0226] Conditional language such as "may" is often used to indicate that features / steps are used in a particular embodiment, but alternative embodiments may include alternative features or omit these features entirely.

[0227] In addition, the method steps are not limited to the specific order described, and it should be understood that these steps can be combined in any other suitable order. In some embodiments, this may result in some method steps being performed in parallel. In addition, in some embodiments, specific method steps may also be omitted completely.

[0228] As described above, the embodiment provides an API management system and method for generating and maintaining an API list by combining API documentation of source code and real-time API traffic analysis. The API management system is the basis for a complete and automatically updated API list.

[0229] Although certain embodiments have been discussed, it should be understood that these embodiments are intended to illustrate the overall teachings of the present invention and that various modifications may be made without departing from the scope of the present invention. The scope of the present disclosure should be interpreted in accordance with the following claims and their equivalents.

[0230] Numerous further variations and modifications will be apparent to those skilled in the art upon reference to the foregoing illustrative embodiments, which are given by way of example only and are not intended to limit the scope of the disclosure, which is determined by the appended claims.

Claims

1. A method for generating an application programming interface (API) list in a system, the method being implemented by the system including a management system, a client device or a server, the method comprising: obtaining source code associated with the software application; analyzing the source code to identify one or more first API endpoints in the software application; obtaining API traffic between the server running the software application and the client device; analyzing the API traffic to identify one or more second API endpoints in the software application; as well as An API manifest is generated by combining the one or more first API endpoints and the one or more second API endpoints into a single data structure.

2. The method according to claim 1, further comprising: executing a headless browser to crawl information associated with the client-side code and JavaScript on the server; as well as analyzing the information associated with the client-side code and the JavaScript to identify one or more third API endpoints in the software application, Wherein, generating the API manifest includes combining the one or more first API endpoints, the one or more second API endpoints, and the one or more third API endpoints into the single data structure.

3. The method according to claim 1 or 2, further comprising: monitoring data output by an API endpoint included in the API manifest to identify deviation data from the output data, wherein the deviation data is data that deviates from reference data by a predetermined threshold; and The deviation data is marked or the transmission of the deviation data is stopped.

4. The method according to any one of claims 1 to 3, wherein: The single data structure is a hierarchical data structure.

5. The method according to claim 4, wherein: Combining the one or more first API endpoints and the one or more second API endpoints into the single data structure comprises: comparing the identified API endpoints to identify a matching API endpoint; and The matching API endpoints are merged in the hierarchical data structure.

6. A system comprising a memory and a processor, the memory comprising programmed instructions stored in the memory, the processor being configured to execute the programmed instructions stored in the memory to: obtaining source code associated with the software application; analyzing the source code to identify one or more first API endpoints in the software application; Obtaining API traffic between a server running the software application and a client device; analyzing the API traffic to identify one or more second API endpoints in the software application; as well as An API manifest is generated by combining the one or more first API endpoints and the one or more second API endpoints into a single data structure.

7. The system according to claim 6, wherein: The processor is further configured to: executing a headless browser to crawl information associated with the client-side code and JavaScript on the server; as well as analyzing the information associated with the client-side code and the JavaScript to identify one or more third API endpoints in the software application, Wherein, generating the API manifest includes combining the one or more first API endpoints, the one or more second API endpoints, and the one or more third API endpoints into the single data structure.

8. The system according to claim 6 or 7, wherein: The processor is further configured to: monitoring data output by an API endpoint included in the API manifest to identify deviation data from the output data, wherein the deviation data is data that deviates from reference data by a predetermined threshold; and The deviation data is marked or the transmission of the deviation data is stopped.

9. The system according to any one of claims 6 to 8, wherein: The single data structure is a hierarchical data structure.

10. The system according to claim 9, wherein: Combining the one or more first API endpoints and the one or more second API endpoints into the single data structure comprises: comparing the identified API endpoints to identify a matching API endpoint; and The matching API endpoints are merged in the hierarchical data structure.

11. A non-transitory computer readable medium having stored thereon instructions executable by a processor, the instructions being capable of: obtaining source code associated with the software application; analyzing the source code to identify one or more first API endpoints in the software application; Obtaining API traffic between a server running the software application and a client device; analyzing the API traffic to identify one or more second API endpoints in the software application; as well as An API manifest is generated by combining the one or more first API endpoints and the one or more second API endpoints into a single data structure.

12. The non-transitory computer readable medium of claim 11, wherein: The instructions may be executed by the processor to: executing a headless browser to crawl information associated with the client-side code and JavaScript on the server; as well as analyzing the information associated with the client-side code and the JavaScript to identify one or more third API endpoints in the software application, Wherein, generating the API manifest includes combining the one or more first API endpoints, the one or more second API endpoints, and the one or more third API endpoints into the single data structure.

13. The non-transitory computer readable medium according to claim 11 or 12, wherein: The instructions may also be executed by the processor to: monitoring data output by an API endpoint included in the API manifest to identify deviation data from the output data, wherein the deviation data is data that deviates from reference data by a predetermined threshold; and The deviation data is marked or the transmission of the deviation data is stopped.

14. The non-transitory computer readable medium according to any one of claims 11 to 13, wherein: The single data structure is a hierarchical data structure.

15. The non-transitory computer readable medium of claim 14, wherein: Combining the one or more first API endpoints and the one or more second API endpoints into the single data structure comprises: comparing the identified API endpoints to identify a matching API endpoint; and The matching API endpoints are merged in the hierarchical data structure.

16. A communication system, comprising a management system, a server or a client device, the communication system comprising a memory and a processor, the memory comprising programming instructions stored thereon, the processor being configured to be able to execute the stored programming instructions to: obtaining source code associated with the software application; analyzing the source code to identify one or more first API endpoints in the software application; obtaining API traffic between the server running the software application and the client device; analyzing the API traffic to identify one or more second API endpoints in the software application; as well as An API manifest is generated by combining the one or more first API endpoints and the one or more second API endpoints into a single data structure.

17. The communication system according to claim 16, wherein: The processor is further configured to: executing a headless browser to crawl information associated with the client-side code and JavaScript on the server; as well as analyzing the information associated with the client-side code and the JavaScript to identify one or more third API endpoints in the software application, Wherein, generating the API manifest includes combining the one or more first API endpoints, the one or more second API endpoints, and the one or more third API endpoints into a single data structure.

18. The communication system according to claim 16 or 17, wherein: The processor is further configured to: monitoring data output by an API endpoint included in the API manifest to identify deviation data from the output data, wherein the deviation data is data that deviates from reference data by a predetermined threshold; and The deviation data is marked or the transmission of the deviation data is stopped.

19. The communication system according to any one of claims 16 to 18, wherein: The single data structure is a hierarchical data structure.

20. The communication system according to claim 19, wherein: Combining the one or more first API endpoints and the one or more second API endpoints into the single data structure comprises: comparing the identified API endpoints to identify a matching API endpoint; and The matching API endpoints are merged in the hierarchical data structure.