API management method and device, equipment, storage medium and program product

Through the API full life cycle management platform, API design tools and OpenAPI specification file management API life cycle are used to solve the problem of incomplete API management in the existing technology, standardization and security of API information are realized, and management efficiency and user experience are improved. .

CN119025148APending Publication Date: 2024-11-26CHINA MERCHANTS HLDG INT INFORMATION TECH COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411007401.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Existing API management tools and services lack a comprehensive platform to cover the management of the API's entire life cycle, resulting in inconvenience and inefficiency.

Method used

Through the API full life cycle management platform, use API design tools to obtain API information, convert it into OpenAPI specification files, parse files to obtain API description information, and publish it to the gateway, provide API documents and usage guides, and realize API package management and permission control .

Benefits of technology

It realizes the standardization and consistency of API information, saves developers time, provides clear API usage guides, simplifies the selection and use process of consumer end, and enhances the security and management efficiency of APIs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025148A_ABST
    Figure CN119025148A_ABST
Patent Text Reader

Abstract

The invention discloses an API management method and device, equipment, a storage medium and a program product, and relates to the technical field of software engineering.The method comprises the steps that API information is obtained through an application programming interface API design tool; converting the API information into an open application program interface (OpenAPI) specification file; analyzing the OpenAPI standard file to obtain API description information; and issuing the API function corresponding to the API description information to the corresponding gateway. According to the scheme, by using the OpenAPI standard file, standardization and consistency of API information are ensured, and use and integration of subsequent processes are facilitated; the API function corresponding to the API description information is published to the corresponding gateway to realize unified management of data, and API function access can be provided for the consumption end, so that the selection, test and integration process of the consumption end is simplified, and meanwhile, the safety and compliance of API use are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software engineering technology, and in particular to API management methods, devices, equipment, storage media, and program products. Background Art

[0002] In the current software development and IT service fields, API (Application Programming Interface) has become the key to communication and integration between different software systems. With the acceleration of digital transformation, enterprises and developers need to manage and use a large number of APIs efficiently and securely. However, the life cycle of APIs - from design, development, testing, deployment, operation to final offline - involves many complex and interdependent steps. The solutions on the current subscription platform often focus on a single link, such as API design and development tools, or API gateways and monitoring services, and lack a comprehensive platform to cover the management of the entire API life cycle. Summary of the invention

[0003] The main purpose of this application is to provide an API management method, device, equipment, storage medium and program product, aiming to solve the technical problem that existing API management tools and services are insufficient in covering the entire API life cycle management.

[0004] To achieve the above objectives, the present application proposes an API management method, which is applied to an API full lifecycle management platform and includes: Get API information through the API design tool; Convert the API information into an OpenAPI specification file; Parse the OpenAPI specification file to obtain API description information; Publish the API function corresponding to the API description information to the corresponding gateway In one embodiment, after publishing the API function corresponding to the API description information to the corresponding gateway, the method further includes: Generate corresponding API documentation based on API description information; According to the API documentation, obtain the usage guide of the API function; Receive an API access request sent by a consumer, and based on the API access request, confirm whether the consumer has API access rights; If so, a usage guide of the corresponding API function is sent to the consumer end according to the specific needs of the consumer end, so that the consumer end can use the corresponding API function according to the usage guide of the API function.

[0005] In one embodiment, before the step of providing the API function corresponding to the API description information to the consumer end, the method further includes: The API corresponding to the API description information is packaged into an API package and published to a subscription platform, so that consumers can subscribe to the corresponding API package on the subscription platform according to their needs.

[0006] In one embodiment, the step of confirming whether the consumer has API access rights based on the API access request includes: Determine whether the consumer has API access rights through the API package; If the consumer has API access rights, it means that the consumer has obtained the right to use the corresponding API functions.

[0007] In one embodiment, the step of determining whether the consumer has API access rights through the API package includes: If the consumer is identified as a user, user authentication is used to determine whether the user has subscribed to the corresponding API package; If the consumer end is identified as a software application that interacts with the API through a programming interface, then using the access key to determine whether the software application has subscribed to the corresponding API package; If the user terminal or the software application has subscribed to the corresponding API package, it means that the user terminal or the software application has the API access permission.

[0008] In one embodiment, the step of parsing the OpenAPI specification file to obtain API description information includes: Get the OpenAPI protocol format contained in the API information through the global ID; The OpenAPI protocol format is parsed to obtain the necessary path and request header information of the API.

[0009] In addition, to achieve the above purpose, the present application also proposes an API management device, the API management device comprising: An acquisition module, used to acquire API information through an application programming interface API design tool; A conversion module, used to convert the API information into an open application program interface OpenAPI specification file; A parsing module, used to parse the OpenAPI specification file to obtain API description information; The publishing module is used to publish the API function corresponding to the API description information to the corresponding gateway.

[0010] In addition, to achieve the above objectives, the present application also proposes an API management device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the API management method described above.

[0011] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the API management method described above are implemented.

[0012] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the API management method described above are implemented.

[0013] The embodiments of the present application propose an API management method, apparatus, device, storage medium and program product, which obtains API information through an application programming interface (API) design tool; converts the API information into an open application programming interface (OpenAPI) specification file; parses the OpenAPI specification file to obtain API description information; publishes the API function corresponding to the API description information to the corresponding gateway, and provides the API function corresponding to the API description information to the consumer. This solution ensures the standardization and consistency of API information by using OpenAPI specification files, which facilitates the use and integration of subsequent processes; automatic document generation based on unified API information not only saves developers' time, but also provides consumers with a clear and consistent API usage guide. It provides flexible package management, which facilitates developers to package and price API services according to their needs, while also simplifying the selection and use process on the consumer side. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0016] Figure 1 A flowchart of the first embodiment of the API management method of this application is provided; Figure 2A flowchart of the second embodiment of the API management method of this application is provided; Figure 3 A brief flowchart of the API management method provided in Example 1 and Example 2 of the present application; Figure 4 This is a schematic diagram of the module structure of the API management device according to an embodiment of the present application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the API management method in the embodiment of the present application.

[0017] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0018] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0019] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0020] The main solution of the embodiment of the present application is: obtain API information through an application programming interface (API) design tool; convert the API information into an open application programming interface (OpenAPI) specification file; parse the OpenAPI specification file to obtain API description information; publish the API function corresponding to the API description information to the corresponding gateway.

[0021] In the current software development and IT service fields, API (Application Programming Interface) has become the key to communication and integration between different software systems. With the acceleration of digital transformation, enterprises and developers need to manage and use a large number of APIs efficiently and securely. However, the life cycle of APIs - from design, development, testing, deployment, operation to final offline - involves many complex and interdependent steps. The solutions on the current subscription platform often focus on a single link, such as API design and development tools, or API gateways and monitoring services, and lack a comprehensive platform to cover the management of the entire API life cycle.

[0022] It can be seen from the above embodiments that this application ensures the standardization and consistency of API information by using the OpenAPI protocol, which facilitates the use and integration of subsequent processes; automatic document generation based on unified API information not only saves developers' time, but also provides consumers with a clear and consistent API usage guide. Through the data collection of the gateway, real-time monitoring and analysis of API usage is achieved, providing data support for performance optimization and business decisions. Providing flexible package management makes it convenient for developers to package and price API services according to their needs, while also simplifying the selection and use process on the consumer side.

[0023] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes a mobile phone as an example to illustrate this embodiment and the following embodiments.

[0024] Based on this, the present application embodiment provides an API management method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the API management method of this application.

[0025] In this embodiment, the API management method includes steps S10 to S40: Step S10, obtaining API information through an application programming interface API design tool; It should be noted that the method of the embodiment of the present application is applied to API Space (API full life cycle management platform), which is mainly responsible for integrating API involvement, development, testing, release, operation and offline links to achieve seamless connection of processes and unified management of data.

[0026] In addition, it should be noted that API design tools are software tools used to create, design and document APIs. They help developers define the behavior, structure and interaction mode of the API; API information includes paths, request parameters, responses and other information.

[0027] In this embodiment, first, using an API design tool to obtain API information generally includes defining the structure, parameters, request and response formats of the API, and adding necessary comments and documents. This information will eventually be exported as a specification file, such as an OpenAPI .yaml or .json file, which can be read by other development tools to automatically generate documents, test codes, and client libraries. Step S20, converting the API information into an open application interface OpenAPI specification file; It should be further explained that the OpenAPI (OpenAPI Specification) protocol format is a standard format for defining and describing RESTful APIs. It uses JSON or YAML format to describe the API interface, path, request parameters, response data and other information so that developers and tools can better understand and use the API.

[0028] When the API design is completed, the API design tool will convert the API information into a general OpenAPI specification file and publish the converted OpenAPI specification file to the development environment.

[0029] Specifically, based on the obtained API information, write an OpenAPI specification file, and define the necessary paths of the API in the OpenAPI specification file, including the path URL, request method, request parameters, etc. And order the request and response structure for each API path, including the type, format, mandatory, etc. of the request parameters, as well as the structure of the response data, status code, sample data, etc.

[0030] And references and components can be used in the OpenAPI specification to improve the reusability and maintainability of the specification, such as defining parameters, response patterns, etc., and referencing them where needed.

[0031] Through the above steps, converting the API into the OpenAPI protocol format can provide a data basis for the subsequent generation of API documents, and can help improve the comprehensibility, maintainability and scalability of the API, and promote the standardization and documentation of the API.

[0032] Step S30, parsing the OpenAPI specification file to obtain API description information; It should be noted that the API description information includes the necessary API path, request header and other information.

[0033] In a feasible implementation manner, step S30 includes steps S31-S32: Step S31, obtaining the OpenAPI protocol format contained in the API information through the global ID; It should be noted that the global ID can uniquely identify a specific API.

[0034] Get the global ID of the required API from the API information, and search for the OpenAPI specification file published to the specified environment based on the obtained global ID to obtain the OpenAPI protocol format file corresponding to the global ID. Step S32, parse the OpenApi protocol format to obtain the necessary path and request header information of the API.

[0035] First, you need to read and parse the OpenAPI specification file, and obtain the API description information from the OpenAPI specification file, including necessary paths, request headers, and other information. Among them, you can traverse the path definition part in the specification file to obtain the information of each API path, including the URL of the path, request method (GET, POST, etc.), request parameters, response data, and other contents. For each API path, extract the request header information, including the name, type, description, and other contents of the request header.

[0036] Finally, the obtained API path and request header information are integrated together to form the necessary information set of the API.

[0037] Step S40: publishing the API function corresponding to the API description information to the corresponding gateway.

[0038] After parsing the OpenAPI specification file and obtaining the relevant API description information, the API corresponding to the API description information is published to the gateway. The gateway can not only monitor and analyze the API usage in real time, but also provide corresponding API functions for the consumer end.

[0039] In a feasible implementation manner, after step S40, steps S41 to S44 are further included: Step S41, generating corresponding API documents based on the API description information; It should be noted that API documentation refers to documents that contain detailed descriptions and instructions about the API. These descriptions and instructions usually include information such as the API's functions, paths, request parameters, response data, error codes, usage examples, etc., to help developers and consumers understand and correctly use the API.

[0040] Specifically, API description information is obtained from the gateway, key information in the API description information is extracted using an API document generation tool, and the corresponding API document is generated. The generated API document can also be formatted to improve the readability and user experience of the document.

[0041] Step S42, obtaining a usage guide for the API function according to the API document; Based on the content in the API documentation, compile a guide to using the API functions, including guidance on how to call the API, pass parameters, process responses, etc.

[0042] By automatically generating API documentation, it not only saves developers’ time, but also provides consumers with a clear and consistent API usage guide.

[0043] Step S43, receiving an API access request sent by the consumer, and confirming whether the consumer has API access rights based on the API access request; When the API lifecycle management platform receives an API request from a consumer, it will parse the incoming API access request through the gateway and extract key information from the request, such as the authentication information in the request header, the requested URI, the method type, and any additional request parameters. It will then perform identity authentication based on the parsed information to verify whether the consumer has the authority to access the corresponding API.

[0044] Step S44: If yes, then according to the specific needs of the consumer, a usage guide of the corresponding API function is sent to the consumer, so that the consumer can use the corresponding API function according to the usage guide of the API function.

[0045] Once it is confirmed that the consumer has permission to access the API, the consumer's specific needs and usage scenarios are collected first to determine the consumer's needs and expectations for API functions.

[0046] Then, according to the specific needs of the consumer, find the corresponding API function usage guide in the gateway and send it to the consumer to help them understand and use the API function. The usage guide can be sent through email, document sharing platform, API portal, etc.

[0047] Furthermore, before executing step S40, step S401 is also included: Step S401, packaging the API corresponding to the API description information into an API package, and publishing the API package to a subscription platform, so that the consumer can subscribe to the corresponding API package on the subscription platform according to demand.

[0048] In order to enable consumers to subscribe to the corresponding API packages according to their needs and improve the consumer experience, developers can also package the required API description information, functions and services into a complete API package. And it is necessary to ensure that the API package contains clear function descriptions, pricing information and subscription options.

[0049] Then upload the packaged API package to the relevant subscription platform, and upload detailed documentation and instructions of the API package, provide a clear subscription process and options, so that consumers can choose the appropriate API package according to their needs.

[0050] Once a consumer subscribes to an API package, they have access to the API features in the gateway. And as the consumer's usage changes, their API package may also be adjusted accordingly. For example, if a consumer frequently reaches their package limit, they may need to upgrade to a higher-level package to meet higher demand.

[0051] Furthermore, before executing step S401, steps S4010 to S4011 are also included: Step S4010, judging whether the consumer has API access rights through the API package; When a consumer tries to call an API function, the API gateway checks the consumer's authentication credentials, that is, checks whether the consumer has purchased an API package, and retrieves the corresponding API package information from the database or configuration.

[0052] If the consumer has not subscribed to an API package or the package does not include the requested API access permissions, access will be denied and an error code (such as 403 Forbidden) may be returned to the consumer.

[0053] Step S4011: If the consumer has API access rights, it means that the consumer has obtained the right to use the corresponding API function.

[0054] If it is determined in step S4010 that the consumer has appropriate permissions, the system will allow the consumer to access the API function requested by the API.

[0055] Consumers can use the API functionality in the gateway in accordance with the terms of their plan. This may mean accessing certain data endpoints, performing certain types of queries, or calling certain API methods.

[0056] Through the above-mentioned embodiment method, by using the OpenAPI protocol, the standardization and consistency of API information is ensured, which is convenient for the use and integration of subsequent processes; automatic document generation based on unified API information not only saves developers' time, but also provides consumers with a clear and consistent API usage guide; through the permission control of the API package, unauthorized access is prevented, ensuring that only authorized consumers can access specific API functions to protect the security of the systems and data connected to the API; providing flexible package management, which facilitates developers to package and price API services according to needs, and also simplifies the selection and use process of consumers. Through the data collection of the gateway, real-time monitoring and analysis of API usage is achieved, providing data support for performance optimization and business decision-making.

[0057] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , step S4010 also includes steps A1 to A3: Step A1: if the consumer end is identified as a user end, user authentication is used to determine whether the user end has subscribed to the corresponding API package; When a request is sent to the API lifecycle management platform, the API lifecycle management platform will identify the initiator of the request. If the request initiator is the user end, that is, the access request is directly initiated by the front-end interface operated by a human user to the API lifecycle management platform, the API lifecycle management platform will check through the gateway whether the user has subscribed to a package to access the required API functions. API packages may include different access levels or restrictions, such as the number of calls, data volume limits, or access to specific functions. If it is determined that the user has subscribed to the appropriate API package, then they will be granted access to the API function.

[0058] Step A2: If the consumer end is identified as a software application that interacts with the API through a programming interface, the access key is used to determine whether the software application has subscribed to the corresponding API package; For requests initiated by software applications, access control of the API lifecycle management platform is usually based on AK (Access Key) and SK (Secret Key) authentication.

[0059] When a software application wants to access the API function of the gateway, it includes the Access Key in the HTTP request header and signs the request with the Secret Key. The signing process is usually done by combining certain key elements of the request (such as method, path, query parameters, etc.) with the Secret Key to generate a signature string through a hash algorithm.

[0060] After receiving the request, the API lifecycle management platform will recalculate the signature using the same algorithm and the requester's SecretKey and compare it with the signature in the request. If the two signatures match, the API server considers the request to be valid and grants access rights.

[0061] In step A3, if it is determined that the user terminal or the software application has subscribed to the corresponding API package, it means that the user terminal or the software application has the API access right.

[0062] Once the user or software application has confirmed that they have subscribed to the corresponding API package, the gateway will confirm that they have the necessary access rights. This means that the user or software application can access the API's functions and services in accordance with the terms of their package.

[0063] Through the above-mentioned embodiment method, the security and controllability of the API are enhanced, that is, the efficient, safe and compliant use of access to API functions is guaranteed regardless of whether it is in a human-computer interaction scenario or a machine-computer interaction scenario.

[0064] For example, in order to help understand the implementation process of the API management method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3 A brief flowchart of an API management method is provided, specifically: In this embodiment, through integration, automation, intelligence and security enhancement, a comprehensive API life cycle management platform - API Space is provided to improve the efficiency, security and user experience of API management.

[0065] The API full life cycle management platform adopts a microservice architecture, integrating API design, development, testing, release, operation and offline operations into a unified platform to achieve seamless process connection and unified data management.

[0066] In the API lifecycle management platform, the main modules are: Service management module: mainly responsible for API design, configuration, testing and other functions.

[0067] Environment management module: mainly responsible for the environment configuration corresponding to the API to be released, the implementation of specific API release capabilities, the management of released APIs, and the generation of API documents.

[0068] Package management module: mainly responsible for packaging the published APIs into packages for sale, and at the same time counting and managing the API traffic, usage frequency, etc.

[0069] Tenant management module: mainly responsible for multi-tenant registration, login and resource isolation.

[0070] Permission management module: mainly responsible for API access permission control.

[0071] It should be noted that when building an API full life cycle management platform, the general OpenAPI protocol is used to connect various modules in series to break down information silos. In this way, users only need to enter API information once when creating it, and can use it directly in subsequent processes, avoiding the trouble caused by secondary input.

[0072] The following uses the entire life cycle of a single API as a scenario to explain in more detail: API developers can design APIs in the service management module using API design tools to obtain API information. The design tool will convert the API information into an OpenAPI specification file.

[0073] Then, the API is published to the specified environment. The environment management module obtains the corresponding API information through the global ID, parses the OpenAPI specification file, obtains the API description information, including but not limited to the necessary path, request header and other information, and then publishes it to the corresponding API gateway.

[0074] At the same time, the API is packaged into a package and published to the subscription platform for consumers to subscribe. In addition, the permission management module determines whether the consumer has obtained the API usage permission by identifying whether the consumer has subscribed to the package. Among them, the human-computer interaction API uses user authentication, and the machine-computer interaction API uses AK / SK authentication.

[0075] In order to facilitate consumers to check how to use API functions, in this embodiment, an API document is generated based on the OpenAPI specification file, and a clear and consistent guide to using the API functions is provided to consumers based on the API document.

[0076] After the consumer subscribes to the corresponding API package in the subscription platform, once a request is made to the gateway to access the API function, the gateway will first identify whether the consumer has API access rights. If so, the gateway will send the relevant API function usage guide to the consumer based on the request, and the consumer can call the API function based on the usage guide.

[0077] Through the above-mentioned implementation methods, the API full life cycle management platform provides a unified platform to manage the entire life cycle of the API, from design, development, testing, deployment to operation and offline. This integrated approach greatly improves efficiency and reduces the need to switch between different tools and services. It also introduces automated deployment and testing processes, as well as AI-based API design assistance and performance optimization suggestions, which significantly improves development speed and quality. At the same time, the security and real-time monitoring functions of the API are strengthened, and the latest security standards and protocols are adopted to ensure the security of the API and data. It also provides more user-friendly and developer-friendly interfaces and tools, lowers the threshold for use, and improves the user experience. By integrating data analysis tools, it is possible to collect API usage data, provide in-depth analysis and optimization suggestions, and help improve API design and enhance user experience.

[0078] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the API management method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0079] This application also provides an API management device, please refer to Figure 4 , the API management device comprises: The acquisition module 10 is used to acquire API information through an application programming interface API design tool; A conversion module 20, configured to convert the API information into an open application program interface OpenAPI specification file; A parsing module 30, used to parse the OpenAPI specification file to obtain API description information; The publishing module 40 is used to publish the API function corresponding to the API description information to the corresponding gateway.

[0080] The API management device provided by this application adopts the API management method in the above embodiment, which can solve the technical problem that the existing API management tools and services are insufficient in covering the entire API life cycle management. Compared with the prior art, the beneficial effects of the API management device provided by this application are the same as the beneficial effects of the API management method provided by the above embodiment, and the other technical features in the API management device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0081] The present application provides an API management device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the API management method in the above-mentioned embodiment one.

[0082] Reference below Figure 5 , which shows a schematic diagram of the structure of an API management device suitable for implementing the embodiment of the present application. The API management device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5The API management device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0083] like Figure 5 As shown, the API management device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the API management device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the API management device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an API management device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0084] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0085] The API management device provided by this application adopts the API management method in the above embodiment, which can solve the technical problem that the existing API management tools and services are insufficient in covering the entire API life cycle management. Compared with the prior art, the beneficial effects of the API management device provided by this application are the same as the beneficial effects of the API management method provided by the above embodiment, and the other technical features in the API management device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0086] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0087] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0088] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the API management method in the above-mentioned embodiment.

[0089] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0090] The computer-readable storage medium may be included in the API management device; or may exist independently without being assembled into the API management device.

[0091] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the API management device, the API management device: obtains API information through an application programming interface API design tool; converts the API information into an open application programming interface OpenAPI specification file; parses the OpenAPI specification file to obtain API description information; and publishes the API function corresponding to the API description information to the corresponding gateway.

[0092] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0093] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0094] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0095] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned API management method, and can solve the technical problem that the existing API management tools and services are insufficient in covering the entire API life cycle management. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the API management method provided in the above-mentioned embodiment, and will not be repeated here.

[0096] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned API management method when executed by a processor.

[0097] The computer program product provided by this application can solve the technical problem that existing API management tools and services are insufficient in covering the entire API life cycle management. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the API management method provided in the above embodiment, which will not be repeated here.

[0098] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. An API management method, characterized in that: The method is applied to an API full lifecycle management platform, and the method includes: Get API information through the API design tool; Convert the API information into an OpenAPI specification file; Parse the OpenAPI specification file to obtain API description information; The API function corresponding to the API description information is published to the corresponding gateway.

2. The method according to claim 1, characterized in that After the step of publishing the API function corresponding to the API description information to the corresponding gateway, the method further includes: Generate corresponding API documentation based on API description information; According to the API documentation, obtain the usage guide of the API function; Receive an API access request sent by a consumer, and based on the API access request, confirm whether the consumer has API access rights; If so, a usage guide of the corresponding API function is sent to the consumer end according to the specific needs of the consumer end, so that the consumer end can use the corresponding API function according to the usage guide of the API function.

3. The method according to claim 1, characterized in that Before the step of providing the API function corresponding to the API description information to the consumer end, the method further includes: The API corresponding to the API description information is packaged into an API package, and the API package is published to a subscription platform, so that consumers can subscribe to the corresponding API package on the subscription platform according to their needs.

4. The method according to any one of claims 2 to 3, characterized in that: The step of confirming whether the consumer has API access rights based on the API access request includes: Determine whether the consumer has API access rights through the API package; If the consumer has API access rights, it means that the consumer has obtained the right to use the corresponding API functions.

5. The method according to claim 4, characterized in that The step of determining whether the consumer has API access rights through the API package includes: If the consumer is identified as a user, user authentication is used to determine whether the user has subscribed to the corresponding API package; If the consumer end is identified as a software application that interacts with the API through a programming interface, then using the access key to determine whether the software application has subscribed to the corresponding API package; If it is determined that the user terminal or the software application has subscribed to the corresponding API package, it means that the user terminal or the software application has the API access permission.

6. The method according to claim 1, characterized in that The step of parsing the OpenAPI specification file to obtain API description information includes: Get the OpenAPI protocol format contained in the API information through the global ID; The OpenAPI protocol format is parsed to obtain the necessary path and request header information of the API.

7. An API management device, characterized in that: The API management device includes: An acquisition module, used to acquire API information through an application programming interface API design tool; A conversion module, used to convert the API information into an open application program interface OpenAPI specification file; A parsing module, used to parse the OpenAPI specification file to obtain API description information; The publishing module is used to publish the API function corresponding to the API description information to the corresponding gateway.

8. An API management device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the API management method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the API management method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the API management method according to any one of claims 1 to 6 are implemented.