CN110083384A - Application programming interface creation method and device - Google Patents

Application programming interface creation method and device Download PDF

Info

Publication number
CN110083384A
CN110083384A CN201910218143.2A CN201910218143A CN110083384A CN 110083384 A CN110083384 A CN 110083384A CN 201910218143 A CN201910218143 A CN 201910218143A CN 110083384 A CN110083384 A CN 110083384A
Authority
CN
China
Prior art keywords
interface
configuration parameter
application programming
information
debugging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910218143.2A
Other languages
Chinese (zh)
Other versions
CN110083384B (en
Inventor
宋天喜
郝文斌
丁忠伟
张磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Saiante Technology Service Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN201910218143.2A priority Critical patent/CN110083384B/en
Publication of CN110083384A publication Critical patent/CN110083384A/en
Application granted granted Critical
Publication of CN110083384B publication Critical patent/CN110083384B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

This application involves the exploitation auxiliary tool fields in research and development management, and in particular to a kind of application programming interface creation method and device.It, can be according to requests data reading library table metadata after method includes: receiving interface request to create;It then generates interface configuration parameter and selects information, and interface configuration parameter selection information is pushed to user terminal, corresponding application programming interface is then generated according to the interface configuration parameter of client feeds back.In the scheme of the application, user terminal, which only needs to confirm interface message, can generate corresponding interface, interface is generated by self-service mode, enhance automation, the intelligent level of process of application development, the exploitation of new demand business function is reduced simultaneously, can be with time saving and energy saving resource-saving, and the reliability and stability of interface creation are promoted, reduce the scale of program development system.

Description

Application programming interface creation method and device
Technical field
This application involves field of computer technology, more particularly to a kind of application programming interface creation method, device, Computer equipment and storage medium.
Background technique
API (Application Programming Interface, application programming interface) is some pre-defined Function, it is therefore an objective to provide application program and developer based on certain software or hardware be able to access one group of routine ability, and It is not necessarily to access source code again, or understands the details of internal work mechanism.
Currently, be to carry out logic development in advance according to business demand on the market about the creation of api interface and publication, Then completion is issued by hand on API gateway.
This mode is current main way, be can be applied under any scene, but workload is huge, if business demand It constantly proposes, needs constantly to be developed and issued, take time and effort cost source.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of simple and easy application programming interface creation Method, apparatus, computer equipment and storage medium.
A kind of application programming interface creation method, which comprises
Receiving interface request to create, the interface request to create include application programming interface corresponding database table Location;
According to the interface request to create reading database table metadata, determined according to the database table metadata default Querying condition and default output data generate interface configuration parameter according to determining preset query condition and default output data Information is selected, interface configuration parameter selection information is pushed into user terminal;
Receive the interface configuration parameter that user terminal selects information to return according to the interface configuration parameter;
Corresponding application programming interface is generated according to the interface configuration parameter.
In one of the embodiments, it is described according to the interface configuration parameter generate corresponding application programming interface it Before, further includes:
The interface configuration parameter is audited;
When audit passes through, into the step of generating corresponding application programming interface according to the interface configuration parameter;
When auditing obstructed out-of-date, generation error prompt information, returns and be pushed to interface configuration parameter selection information The step of user terminal.
In one of the embodiments, it is described to the interface configuration parameter carry out audit specifically include:
The availability of the corresponding application programming interface of the interface configuration parameter is scored;
When the availability is scored above or is equal to preset threshold, determine that audit passes through, when availability scoring is small When preset threshold, determine that audit does not pass through.
It is described in one of the embodiments, that corresponding application programming interface tool is generated according to the interface configuration parameter Body includes:
According to the interface configuration information obtain interface data table information, query condition information, output data information and Interface signing messages;
Corresponding interface is generated according to the interface data table information, query condition information and output data information, according to The interface signing messages encrypts the corresponding interface.
In one of the embodiments, it is described according to the interface configuration parameter generate corresponding application programming interface it Afterwards, further includes:
Receiving interface debugging instruction carries out interface according to application programming interface of the interface debugging instruction to generation Debugging.
The receiving interface debugging instruction in one of the embodiments, is instructed according to the interface debugging to generation Application programming interface carries out interface debugging and specifically includes:
Receiving interface debugging instruction, the interface debugging instruction includes debugging request parameter and default return parameters;
Debugging request parameter is sent to the application programming interface;
The debugging return parameters for obtaining application programming interface, when the debugging return parameters and the default return are joined When number is identical, determine that the application programming interface is available;When the debugging return parameters and the default return parameters not When identical, the application programming interface, and the step of returning to receiving interface debugging instruction are adjusted according to debugging return parameters.
In one of the embodiments, it is described according to the interface configuration parameter generate corresponding application programming interface it Afterwards, further includes:
Issue the application programming interface generated.
A kind of application programming interface creating device, comprising:
Request module is used for receiving interface request to create, and the interface request to create includes that application programming connects The corresponding database table address of mouth;
Data-pushing module is used for according to the interface request to create reading database table metadata, according to the data Library table metadata determines preset query condition and default output data, exports number according to determining preset query condition and presetting Information is selected according to interface configuration parameter is generated, interface configuration parameter selection information is pushed to user terminal;
Data reception module is configured for receiving user terminal according to the interface that the interface configuration parameter selects information to return Parameter;
Interface generation module, for generating corresponding application programming interface according to the interface configuration parameter.
A kind of computer equipment, including memory and processor, memory are stored with computer program, and processor executes meter It is performed the steps of when calculation machine program
Receiving interface request to create, the interface request to create include application programming interface corresponding database table Location;
According to the interface request to create reading database table metadata, determined according to the database table metadata default Querying condition and default output data generate interface configuration according to the preset query condition and the default output data Interface configuration parameter selection information is pushed to user terminal by parameter selection information;
Receive the interface configuration parameter that user terminal selects information to return according to the interface configuration parameter;
Corresponding application programming interface is generated according to the interface configuration parameter.
A kind of computer readable storage medium is stored thereon with computer program, when computer program is executed by processor It performs the steps of
Receiving interface request to create, the interface request to create include application programming interface corresponding database table Location;
According to the interface request to create reading database table metadata, determined according to the database table metadata default Querying condition and default output data generate interface configuration according to the preset query condition and the default output data Interface configuration parameter selection information is pushed to user terminal by parameter selection information;
Receive the interface configuration parameter that user terminal selects information to return according to the interface configuration parameter;
Corresponding application programming interface is generated according to the interface configuration parameter.
Above-mentioned interface creation method, device, computer equipment and storage medium can after obtaining interface request to create According to requests data reading library table metadata;It then generates interface configuration parameter and selects information, and by the interface configuration parameter Selection information is pushed to user terminal, then generates corresponding application programming according to the interface configuration parameter of client feeds back and connects Mouthful.In the scheme of the application, user terminal, which only needs to confirm interface message, can generate corresponding interface, by self-service Mode generate interface, enhance automation, the intelligent level of process of application development, while reducing new demand business function It can develop, can be with time saving and energy saving resource-saving, and the reliability and stability of interface creation are promoted, reduce the rule of program development system Mould.
Detailed description of the invention
Fig. 1 is the applied environment figure of interface creation method in one embodiment;
Fig. 2 is the flow diagram of interface creation method in one embodiment;
Fig. 3 is the flow diagram of interface creation method in another embodiment;
Fig. 4 is the sub-process schematic diagram of the step S720 of Fig. 3 in one embodiment;
Fig. 5 is the flow diagram of interface creation method in further embodiment;
Fig. 6 is the structural block diagram of interface creating device in one embodiment;
Fig. 7 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
Application programming interface creation method provided by the present application, can be applied in application environment as shown in Figure 1, Wherein, the user terminal 102 where user is communicated by network with server, and server 104 obtains user terminal by network The 102 interface requests to create submitted, after server 104 receives interface request to create, interface request to create reading database list cell Data determine preset query condition and default output data according to database table metadata, according to preset query condition and Default output data generates interface configuration parameter and selects information, and interface configuration parameter selection information is pushed to user terminal 102, and The interface configuration parameter that user terminal 102 is fed back is obtained, corresponding interface is generated according to interface configuration parameter.User terminal 102 can with but It is not limited to various personal computers, laptop, smart phone, tablet computer.
As shown in Fig. 2, the application programming interface creation method of the application in one of the embodiments, Ke Yitong Server realization is crossed, specifically includes the following steps:
S200, received server-side interface request to create, interface request to create include that application programming interface is corresponding Database table address.
Interface in scheme refers specifically to API, i.e. application programming interface.API specifically can be some fixed in advance The function of justice, it is therefore an objective to application program and the developer ability that one group of routine of access is able to based on certain software or hardware are provided, And it is not necessarily to access source code, or understand the details of internal work mechanism.Interface request to create can come from user terminal, and user terminal is Refer to the port for initiating interface creation, user terminal can send request to server to create corresponding API.Interface request to create is Refer to the request for wishing that creation api interface is realized by server, interface request to create can specifically include user terminal and wish to build Other phases of the information of table in the database of the corresponding database table address of vertical api interface application programming interface and connection Close information.
Firstly the need of interface request to create is obtained, could start to create corresponding API.
S400, server end are true according to database table metadata according to interface request to create reading database table metadata Determine preset query condition and default output data, interface configuration ginseng is generated according to preset query condition and default output data Interface configuration parameter selection information is pushed to user terminal by number selection information.
Metadata is the data about data.In Database Systems, metadata can help database administrator sum number Their data of concern are easily found according to the developer in warehouse;Metadata is the knot for describing data in data warehouse It can be divided into two classes: technology metadata and data service metadata by the difference of purposes by the data of structure and method for building up.User's connects Mouth request to create is corresponding with database table metadata, i.e., interface can connect table in corresponding database.Preset query condition is Refer to the field that the inquiry request that user terminal may be initiated by the interface is included, presets output data and preset query condition pair It answers, refers to the corresponding output data of these querying conditions.Server can be raw according to default output data and preset query condition Information is selected at interface configuration parameter and sends it to user terminal.
After obtaining interface request to create, server can parse interface request to create, obtain database wherein included The information of interior table, then according to the information reading database table metadata of table in these databases.According to database table metadata It generates interface configuration parameter and selects information, and pushed to user terminal
S600 receives the interface configuration parameter that user terminal selects information to return according to interface configuration parameter;
Interface configuration parameter refer to user terminal to interface configuration parameter selection information confirm after and approve letter Breath, user terminal can select information to generate interface message confirmation interface according to the interface configuration parameter of server, and interface is pushed away It send to user, obtains the interface configuration parameter of user's confirmation, the interface configuration parameter after then will confirm that is sent to server end. Interface message confirmation interface refers to the interface comprising numerous information to be confirmed, includes some information to user's confirmation, These information to be confirmed include the relevant information for the database table metadata that interface is connected, including database table metadata Address and title etc., the interface related querying condition generated according to read database table metadata and output information etc. Data.
User can confirm that the information to be confirmed on interface carries out the property chosen and determines to interface message by user terminal, i.e., only The condition needed is selected to create corresponding interface, wherein choosing the querying condition and output information phase being primarily referred to as to interface The data of pass are chosen, and will then choose the interface message confirmation interface finished and feed back to server end, and server end can be with Interface configuration parameter is extracted from the selection in interface message confirmation interface to interface configuration parameter selection information from user terminal.
S800, server end generate corresponding application programming interface according to interface configuration parameter.
Corresponding application programming interface refers to the interface configuration parameter with user interface request to create and user feedback Corresponding interface can generate user institute according to interface configuration parameter after obtaining the interface configuration parameter from client feeds back The corresponding interface needed.The mode for generating interface can be determined according to selected language in one of the embodiments, such as Create API by Java language, then it can be by way of dynamic language or the mode of reflection creates corresponding interface.
Above-mentioned interface creation method, server end, can be according to requests data reading libraries after obtaining interface request to create Table metadata;It then generates interface configuration parameter and selects information, and interface configuration parameter selection information is pushed to user terminal, Corresponding application programming interface is then generated according to the interface configuration parameter of client feeds back.In the scheme of the application, user End, which only needs to confirm interface message, can generate corresponding interface, and interface is generated by self-service mode, enhance The automation of process of application development, intelligent level, while the exploitation of new demand business function is reduced, it can time saving and energy saving province Resource, and the reliability and stability of interface creation are promoted, reduce the scale of program development system.
As shown in figure 3, in one of the embodiments, after S600, further includes:
S720, server end audit interface configuration parameter;
When audit passes through, S800 is entered step;
It is obstructed out-of-date when auditing, S740, generation error prompt information are entered step, while returning and selecting interface configuration parameter Select the step of information is pushed to user terminal.
The interface configuration information that synthetic user is submitted possibly can not meet the specification of application programming interface, i.e., can not give birth to At corresponding interface or the interface of generation and unavailable, so needing to audit the interface configuration information of client feeds back, sentence Breaking, whether it can be used.Interface can be directly generated when passing through audit, otherwise prompt user terminal information errors, and return interface The step of configuration parameter selection information is pushed to user terminal can effectively improve generation by carrying out audit to interface configuration parameter The success rate of interface.
As shown in figure 4, S720 includes: in one of the embodiments,
S721 obtains the availability scoring of the corresponding application programming interface of interface configuration information.
S723 determines that audit passes through when availability is scored above or is equal to preset threshold, when availability scoring is less than pre- If when threshold value, determining that audit does not pass through
The interface configuration information of client feeds back and the format of standard configuration information can be compared, obtain interface Availability scoring, the mark that the availability scoring of interface prestores in the interface configuration information and server for describing client feeds back The gap of quasi- configuration information can judge the availability of interface by the comparison of every configuration information, with standard configuration Closer, the corresponding scoring of the interface is higher, may determine that whether interface can be used by interface availability scoring.By to interface Configuration information, which carries out audit, can effectively improve the success rate for generating interface.It is examined in one of the embodiments, by default After nuclear model, further include the steps that manual examination and verification, examination personnel can be to the interface confirmation message audited by machine It is audited, step S800 can just only be entered by machine audit and manual examination and verification.
S800 is specifically included in one of the embodiments:
Interface data table information, query condition information, output data information and interface are obtained according to interface configuration information Signing messages.
Corresponding interface is generated according to interface data table information, query condition information and output data information, according to interface Signing messages encrypts corresponding interface.
Server end extracts interface data table information wherein included from interface configuration information, and query condition information is defeated Data information and interface signing messages out inquire item then according to the interface data table information of wherein interface data table information Part information and output data information establish corresponding api function, generate a corresponding interface, are then based on interface configuration information The interface is encrypted in the interface signing messages of middle user's confirmation.Since application programming interfaces are generally required to public network Network is opened, so there is certain safety requirements to interface, interface needs to have anti-spoof attack, anti-tamper attack, anti-heavy Put the functions such as attack and the leakage of anti-data information.So need according to interface signature to the application programming interface of generation into Row encryption, to ensure the security performance of interface.The specific available user terminal of interface signature is submitted in one of the embodiments, Multiple parameters, be then corresponding array by model parameter, and sequence is iterated to array according to dictionary, after then sorting Array element to rely on be character string, salt figure encryption then is carried out to character string, obtains corresponding interface signature.
As shown in figure 5, in one of the embodiments, after S800, further includes:
S900, received server-side interface debugging instruction connect the application programming of generation according to interface debugging instruction Mouth carries out interface debugging.
After obtaining corresponding application programming interface, it is also necessary to debugged to interface to ensure that corresponding interface can With and interface the data link such as interface data table information, query condition information and output data information it is whether correct, connect Whether mouth signature can be verified.Corresponding interface by debugging is usable interface, can be distributed to corresponding API gateway for visitor Family end is called, and then needs to readjust the related data of interface without the corresponding interface that passes through, it is ensured that interface is available and data Link is correct.
Interface debugging instruction specifically includes corresponding interface progress interface debugging in one of the embodiments: server End receives interface debugging instruction, and interface debugging instruction includes debugging request parameter and default return parameters;To application programming Interface sends debugging request parameter;The debugging return parameters for obtaining application programming interface when debugging return parameters and are preset When return parameters are identical, determine that application programming interface is available;When debugging return parameters and default return parameters are not identical, Application programming interface, and the step of returning to receiving interface debugging instruction are adjusted according to debugging return parameters.
Interface debugging instruction, which refers to, is used to indicate the instruction that server end carries out the corresponding interface test, connects accordingly generating After mouthful, server end can send corresponding interface and complete information to user terminal, and user terminal can then be debugged with transmission interface to be referred to It enables to server end, interface debugging instruction contains preset debugging request parameter and debugging request parameter is corresponding default Return parameters, debugging request parameter refer to the parameter for inputting the interface, and default return parameters then refer to that this connects according to preset rules The parameter that mouth should return can determine the data-link of the interface by comparing default return parameters and actual debugging return parameters Whether road is correct, so that it is determined that the actual availability of the interface.
In one of the embodiments, after S800, further includes: issue the application programming interface of generation.
Application programming interface can be distributed to API gateway, it is the unique of system that API gateway, which is a server, Entrance.From the point of view of Object-Oriented Design, it is similar with skin mode.API gateway encapsulates internal system framework, is each Client provides the API of a customization.It may also have other responsibilities, such as authentication, monitoring, load balancing, caching, ask Ask fragment and management, steady-error coefficient processing.The core element of API gateway mode is that all clients and consumption terminal all pass through Unified gateway accessing micro services handle all non-traffic functions in gateway layer.In general, gateway is also to provide REST/HTTP Access API.Server-side is registered by API-GW and management service.It api interface is published to API gateway is just able to achieve API and connect The correlation function of mouth.
User wants to set up an application programming interface in one of the embodiments, then pass through user terminal to Server end sends an interface request to create, received server-side interface request to create;Server end is asked according to interface creation Reading database table metadata is sought, preset query condition and default output data are determined according to database table metadata, according to It determines that preset query condition and default output data generate interface configuration parameter selection information, interface configuration parameter is selected to believe Breath pushes to user terminal;User terminal selects information to generate interface message confirmation interface according to interface configuration parameter, and interface is pushed away User is given, and the interface configuration parameter after user is confirmed is sent to server end;Received server-side user terminal is according to connecing The interface configuration parameter of mouth validation of information interface feedback;Obtain the available of the corresponding application programming interface of interface configuration parameter Property scoring;When availability is scored above or is equal to preset threshold, determine that audit passes through, when availability scoring is less than preset threshold When, determine that audit does not pass through.When audit passes through, corresponding application program is generated according to interface configuration parameter into server end and is compiled The step of journey interface;When auditing obstructed out-of-date, generation error prompt information, returns and be pushed to interface configuration parameter selection information The step of user terminal.According to interface configuration information obtain interface data table information, query condition information, output data information and Interface signing messages;Corresponding interface is generated according to interface data table information, query condition information and output data information, according to Interface signing messages encrypts corresponding interface.Issue the application programming interface generated.Received server-side interface tune Examination instruction, interface debugging instruction include debugging request parameter and default return parameters;It sends and debugs to application programming interface Required parameter;The debugging return parameters for obtaining application programming interface, when debugging return parameters are identical as default return parameters When, determine that application programming interface is available;When debugging return parameters and default return parameters are not identical, returned according to debugging Parameter adjusts application programming interface, and the step of returning to receiving interface debugging instruction.
It should be understood that although each step in the flow chart of Fig. 2-5 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-5 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
As shown in fig. 6, a kind of application programming interface creating device, comprising:
Request module 200 is used for receiving interface request to create, and interface request to create includes application programming interface Corresponding database table address;
Data-pushing module 400 is used for according to interface request to create reading database table metadata, according to database list cell Data determine preset query condition and default output data, are generated according to determining preset query condition and default output data Interface configuration parameter selects information, and interface configuration parameter selection information is pushed to user terminal;
Data reception module 600 is configured for receiving user terminal according to the interface that interface configuration parameter selects information to return Parameter;
Interface generation module 800, for generating corresponding application programming interface according to interface configuration parameter.
Server end further includes interface message auditing module, interface message auditing module pair in one of the embodiments, Interface configuration parameter is audited;When audit passes through, executes into interface generation module 270 and generated according to interface configuration parameter The step of corresponding application programming interface;When obstructed out-of-date, the generation error prompt information of audit, returned data pushing module 230 execute the step of interface configuration parameter selection information is pushed to user terminal.
Interface message auditing module is specifically used for obtaining the corresponding application of interface configuration parameter in one of the embodiments, The availability of Program Interfaces scores;When availability is scored above or is equal to preset threshold, determine that audit passes through, when available Property scoring be less than preset threshold when, determine audit does not pass through.
Interface generation module 270 is specifically used in one of the embodiments: obtaining number of ports according to interface configuration information According to table information, query condition information, output data information and interface signing messages;According to interface data table information, inquiry item Part information and output data information generate corresponding interface, are encrypted according to interface signing messages to corresponding interface.
Server end further includes interface debugging module in one of the embodiments, is used for receiving interface debugging instruction, root Interface debugging is carried out according to application programming interface of the interface debugging instruction to generation.
Received server-side interface debugging instructs in one of the embodiments, is instructed according to interface debugging to generation Application programming interface carries out interface debugging and specifically includes: interface debugging module receiving interface debugging instruction, interface debugging refer to Enable includes debugging request parameter and default return parameters;Debugging request parameter is sent to application programming interface;Obtain application The debugging return parameters of Program Interfaces determine that application program is compiled when debugging return parameters are identical as default return parameters Journey interface is available;When debugging return parameters and default return parameters are not identical, application program is adjusted according to debugging return parameters Programming interface, and the step of returning to receiving interface debugging instruction.
Server end further includes interface release module in one of the embodiments: for issuing the application program generated Programming interface.
Specific restriction about application programming interface creating device may refer to above for interface creation method Restriction, details are not described herein.Modules in above-mentioned application programming interface creating device can be fully or partially through Software, hardware and combinations thereof are realized.Above-mentioned each module can be embedded in the form of hardware or independently of the place in computer equipment It manages in device, can also be stored in a software form in the memory in computer equipment, in order to which processor calls execution or more The corresponding operation of modules.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 7.The computer equipment includes processor, memory and the network interface connected by system bus. Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory of the computer equipment includes non-easy The property lost storage medium, built-in storage.The non-volatile memory medium is stored with operating system and computer program.The built-in storage Operation for operating system and computer program in non-volatile memory medium provides environment.The network of the computer equipment connects Mouth with external terminal by network connection for being communicated.It is a kind of using journey to realize when the computer program is executed by processor Sequence programming interface creation method.
It will be understood by those skilled in the art that structure shown in Fig. 7, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory Computer program, the processor perform the steps of when executing computer program
Receiving interface request to create, interface request to create include the corresponding database table address of application programming interface;
According to interface request to create reading database table metadata, preset query condition is determined according to database table metadata And default output data, interface configuration parameter selection letter is generated according to determining preset query condition and default output data Interface configuration parameter selection information is pushed to user terminal by breath;
Receive the interface configuration parameter that user terminal selects information feedback according to interface configuration parameter;
Corresponding application programming interface is generated according to interface configuration parameter.
In one embodiment, processor execute computer program when also perform the steps of to interface configuration parameter into Row audit;When audit passes through, into the step of generating corresponding application programming interface according to interface configuration parameter;Work as audit Obstructed out-of-date, generation error prompt information returns to the step of interface configuration parameter selection information is pushed to user terminal.
In one embodiment, acquisition interface configuration parameter is also performed the steps of when processor executes computer program The availability of corresponding application programming interface scores;When availability is scored above or is equal to preset threshold, audit is determined Pass through, when availability scoring is less than preset threshold, determines that audit does not pass through.
In one embodiment, it also performs the steps of when processor executes computer program according to interface configuration information Obtain interface data table information, query condition information, output data information and interface signing messages;Believed according to interface data table Breath, query condition information and output data information generate corresponding interface, are added according to interface signing messages to corresponding interface It is close.
In one embodiment, receiving interface debugging instruction is also performed the steps of when processor executes computer program, Interface debugging is carried out according to application programming interface of the interface debugging instruction to generation.
In one embodiment, receiving interface debugging instruction is also performed the steps of when processor executes computer program, Interface debugging instruction includes debugging request parameter and default return parameters;Debugging request ginseng is sent to application programming interface Number;The debugging return parameters for obtaining application programming interface determine when debugging return parameters are identical as default return parameters Application programming interface is available;When debugging return parameters and default return parameters are not identical, according to debugging return parameters tune Whole application programming interface, and the step of returning to receiving interface debugging instruction.
In one embodiment, the application journey that publication generates also is performed the steps of when processor executes computer program Sequence programming interface.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
Receiving interface request to create, interface request to create include the corresponding database table address of application programming interface;
According to interface request to create reading database table metadata, preset query condition is determined according to database table metadata And default output data, interface configuration parameter selection letter is generated according to determining preset query condition and default output data Interface configuration parameter selection information is pushed to user terminal by breath;
Receive the interface configuration parameter that user terminal selects information feedback according to interface configuration parameter;
Corresponding application programming interface is generated according to interface configuration parameter.
In one embodiment, it also performs the steps of when computer program is executed by processor to interface configuration parameter It is audited;When audit passes through, into the step of generating corresponding application programming interface according to interface configuration parameter;When careful Core is obstructed out-of-date, generation error prompt information, returns to the step of interface configuration parameter selection information is pushed to user terminal.
In one embodiment, it is also performed the steps of when computer program is executed by processor and will acquire interface configuration The availability of the corresponding application programming interface of parameter scores;When availability is scored above or is equal to preset threshold, determine Audit passes through, and when availability scoring is less than preset threshold, determines that audit does not pass through.
In one embodiment, it is also performed the steps of when computer program is executed by processor according to interface with confidence Breath obtains interface data table information, query condition information, output data information and interface signing messages;According to interface data table Information, query condition information and output data information generate corresponding interface, are carried out according to interface signing messages to corresponding interface Encryption.
In one embodiment, receiving interface debugging is also performed the steps of when computer program is executed by processor to refer to It enables, interface debugging is carried out according to application programming interface of the interface debugging instruction to generation.
In one embodiment, receiving interface debugging is also performed the steps of when computer program is executed by processor to refer to It enables, interface debugging instruction includes debugging request parameter and default return parameters;Debugging request is sent to application programming interface Parameter;The debugging return parameters for obtaining application programming interface are sentenced when debugging return parameters are identical as default return parameters It is available to determine application programming interface;When debugging return parameters and default return parameters are not identical, according to debugging return parameters Adjust application programming interface, and the step of returning to receiving interface debugging instruction.
In one embodiment, the application that publication generates also is performed the steps of when computer program is executed by processor Program Interfaces.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Instruct relevant hardware to complete by computer program, computer program to can be stored in a non-volatile computer readable It takes in storage medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, this Shen Please provided by any reference used in each embodiment to memory, storage, database or other media, may each comprise Non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
Above embodiments only express the several embodiments of the application, and the description thereof is more specific and detailed, but can not Therefore it is construed as limiting the scope of the patent.It should be pointed out that for those of ordinary skill in the art, Under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the protection scope of the application. Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of application programming interface creation method, which comprises
Receiving interface request to create, the interface request to create include the corresponding database table address of application programming interface;
According to the interface request to create reading database table metadata, default inquiry is determined according to the database table metadata Condition and default output data generate interface configuration parameter according to the preset query condition and the default output data Information is selected, interface configuration parameter selection information is pushed into user terminal;
Receive the interface configuration parameter that user terminal selects information to return according to the interface configuration parameter;
Corresponding application programming interface is generated according to the interface configuration parameter.
2. the method according to claim 1, wherein described generate corresponding application according to the interface configuration parameter Before Program Interfaces, further includes:
The interface configuration parameter is audited;
When audit passes through, into the step of generating corresponding application programming interface according to the interface configuration parameter;
When auditing obstructed out-of-date, generation error prompt information, returns and interface configuration parameter selection information is pushed to user The step of end.
3. according to the method described in claim 2, it is characterized in that, described carry out the interface configuration parameter to audit specific packet It includes:
Obtain the availability scoring of the corresponding application programming interface of the interface configuration parameter;
When the availability is scored above or is equal to preset threshold, determine that audit passes through, when availability scoring is less than pre- If when threshold value, determining that audit does not pass through.
4. the method according to claim 1, wherein described generate corresponding application according to the interface configuration parameter Program Interfaces specifically include:
Interface data table information, query condition information, output data information and interface are obtained according to the interface configuration information Signing messages;
Corresponding interface is generated according to the interface data table information, query condition information and output data information, according to described Interface signing messages encrypts the corresponding interface.
5. the method according to claim 1, wherein described generate corresponding application according to the interface configuration parameter After Program Interfaces, further includes:
Receiving interface debugging instruction carries out interface tune according to application programming interface of the interface debugging instruction to generation Examination.
6. according to the method described in claim 5, it is characterized in that, the receiving interface debugging instruction, according to the interface tune Examination instruction carries out interface debugging receiving interface debugging instruction to the application programming interface of generation and specifically includes:
Receiving interface debugging instruction, the interface debugging instruction includes debugging request parameter and default return parameters;
Debugging request parameter is sent to the application programming interface;
The debugging return parameters for obtaining application programming interface, when the debugging return parameters and the default return parameters phase Meanwhile determining that the application programming interface is available;When the debugging return parameters and the default return parameters are not identical When, the application programming interface, and the step of returning to receiving interface debugging instruction are adjusted according to debugging return parameters.
7. the method according to claim 1, wherein described generate corresponding application according to the interface configuration parameter Receiving interface debugging instruction after Program Interfaces, further includes:
Issue the application programming interface generated.
8. a kind of application programming interface creating device characterized by comprising
Request module is used for receiving interface request to create, and the interface request to create includes application programming interface pair The database table address answered;
Data-pushing module is used for according to the interface request to create reading database table metadata, according to the database table Metadata determines preset query condition and default output data, according to the preset query condition and the default output number Information is selected according to interface configuration parameter is generated, interface configuration parameter selection information is pushed into user terminal;
Data reception module, the interface configuration ginseng for selecting information to return according to the interface configuration parameter for receiving user terminal Number;
Interface generation module, for generating corresponding application programming interface according to the interface configuration parameter.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In, the processor realized when executing the computer program claim 1 to 7 to any one of the method the step of.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
CN201910218143.2A 2019-03-21 2019-03-21 Application programming interface creating method and device Active CN110083384B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910218143.2A CN110083384B (en) 2019-03-21 2019-03-21 Application programming interface creating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910218143.2A CN110083384B (en) 2019-03-21 2019-03-21 Application programming interface creating method and device

Publications (2)

Publication Number Publication Date
CN110083384A true CN110083384A (en) 2019-08-02
CN110083384B CN110083384B (en) 2020-09-15

Family

ID=67413444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910218143.2A Active CN110083384B (en) 2019-03-21 2019-03-21 Application programming interface creating method and device

Country Status (1)

Country Link
CN (1) CN110083384B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111652687A (en) * 2020-06-08 2020-09-11 上海敬贤信息科技有限公司 Online technical demand obtaining method
CN112685021A (en) * 2020-12-28 2021-04-20 平安普惠企业管理有限公司 API (application program interface) generating method and device, computer equipment and storage medium
CN112837019A (en) * 2021-03-05 2021-05-25 上海中通吉网络技术有限公司 Express delivery track data pushing method, device and equipment
CN112947984A (en) * 2020-09-29 2021-06-11 深圳市明源云科技有限公司 Application program development method and device
CN113766030A (en) * 2021-09-13 2021-12-07 城云科技(中国)有限公司 Automatic parameter entering method and device for interface constant parameters

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122247A (en) * 2011-03-17 2011-07-13 深圳市同洲软件有限公司 Automatic code generating system and method
CN108108162A (en) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 Application programming interface generation method and device
CN108121606A (en) * 2016-11-26 2018-06-05 上海壹账通金融科技有限公司 The method and device of coded data generation based on joint debugging interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122247A (en) * 2011-03-17 2011-07-13 深圳市同洲软件有限公司 Automatic code generating system and method
CN108108162A (en) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 Application programming interface generation method and device
CN108121606A (en) * 2016-11-26 2018-06-05 上海壹账通金融科技有限公司 The method and device of coded data generation based on joint debugging interface

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111652687A (en) * 2020-06-08 2020-09-11 上海敬贤信息科技有限公司 Online technical demand obtaining method
CN112947984A (en) * 2020-09-29 2021-06-11 深圳市明源云科技有限公司 Application program development method and device
CN112947984B (en) * 2020-09-29 2024-05-14 深圳市明源云科技有限公司 Application program development method and device
CN112685021A (en) * 2020-12-28 2021-04-20 平安普惠企业管理有限公司 API (application program interface) generating method and device, computer equipment and storage medium
CN112837019A (en) * 2021-03-05 2021-05-25 上海中通吉网络技术有限公司 Express delivery track data pushing method, device and equipment
CN113766030A (en) * 2021-09-13 2021-12-07 城云科技(中国)有限公司 Automatic parameter entering method and device for interface constant parameters

Also Published As

Publication number Publication date
CN110083384B (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN110083384A (en) Application programming interface creation method and device
CN110495132B (en) System and method for generating, uploading and executing code blocks within distributed network nodes
US20200092298A1 (en) Avoiding user session misclassification using configuration and activity fingerprints
US8898764B2 (en) Authenticating user through web extension using token based authentication scheme
CN100385398C (en) Application generator
CN108701309A (en) A kind of distributed user profile authentication system for security of e-commerce transactions
WO2020192141A1 (en) Method and device for simulating interface, computer apparatus, and storage medium
CN109190353B (en) Method and computing device for automatically generating certificate document
WO2022095518A1 (en) Automatic interface test method and apparatus, and computer device and storage medium
CN112165448B (en) Service processing method, device, system, computer equipment and storage medium
CN109816364A (en) Transaction data processing method, device, computer equipment and storage medium
CN111563365A (en) Test standard work order modification information processing method and device and computer equipment
CN110109712A (en) Service Component loading method, device, computer equipment and storage medium
US20230308290A1 (en) Data sharing method and electronic device
CN112070608A (en) Information processing method, information processing apparatus, information processing medium, and electronic device
CN112364049A (en) Data synchronization script generation method, system, terminal and storage medium
CN109118291A (en) User authen method, device and computer equipment in advertisement tasks popularization
US11531984B2 (en) Method and device facilitating expansion of primary payment instruments
CN111209061A (en) Method and device for filling in user information, computer equipment and storage medium
CN109769010A (en) Method, apparatus, equipment and storage medium based on SDK access CloudStack server
CN112434094B (en) Database connection method and device based on encryption algorithm and computer equipment
CN109614789A (en) A kind of verification method and equipment of terminal device
CN114428661A (en) Mirror image management method and device
CN108667919A (en) Data processing method, device, computer equipment and storage medium
CN113806815A (en) File signing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210129

Address after: 518066 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Patentee after: Shenzhen saiante Technology Service Co.,Ltd.

Address before: 1-34 / F, Qianhai free trade building, 3048 Xinghai Avenue, Mawan, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Patentee before: Ping An International Smart City Technology Co.,Ltd.