CN110007950A - A kind of management method of application programming interfaces, device and server - Google Patents
A kind of management method of application programming interfaces, device and server Download PDFInfo
- Publication number
- CN110007950A CN110007950A CN201910284800.3A CN201910284800A CN110007950A CN 110007950 A CN110007950 A CN 110007950A CN 201910284800 A CN201910284800 A CN 201910284800A CN 110007950 A CN110007950 A CN 110007950A
- Authority
- CN
- China
- Prior art keywords
- client
- api
- request
- request message
- target
- 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.)
- Pending
Links
- 238000007726 management method Methods 0.000 title claims abstract description 25
- 239000000126 substance Substances 0.000 claims abstract description 58
- 238000000034 method Methods 0.000 claims abstract description 22
- 238000013475 authorization Methods 0.000 claims description 51
- 230000002452 interceptive effect Effects 0.000 claims description 39
- 230000003993 interaction Effects 0.000 claims description 21
- 238000012545 processing Methods 0.000 claims description 15
- 230000001360 synchronised effect Effects 0.000 claims description 11
- 230000005540 biological transmission Effects 0.000 claims description 7
- 238000004458 analytical method Methods 0.000 claims description 6
- 235000013399 edible fruits Nutrition 0.000 claims description 2
- 230000008878 coupling Effects 0.000 abstract description 7
- 238000010168 coupling process Methods 0.000 abstract description 7
- 238000005859 coupling reaction Methods 0.000 abstract description 7
- 230000033772 system development Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 16
- 230000006399 behavior Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 230000018109 developmental process Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 238000012423 maintenance Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000009434 installation Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- PEDCQBHIVMGVHV-UHFFFAOYSA-N Glycerine Chemical compound OCC(O)CO PEDCQBHIVMGVHV-UHFFFAOYSA-N 0.000 description 1
- 238000013070 change management Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
- 239000011800 void material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
Abstract
The embodiment of the present application provides management method, device and the server of a kind of application programming interfaces.Wherein this method comprises: obtaining the request message that client is sent, the request message includes the identity information of client and the API of client request;The request message is verified according to pre-set client configuration information;If the request message is verified, substance parameter needed for requesting the target API is generated;The substance parameter is sent to the target API, so that the target API generates request results data according to the substance parameter.Thus, the technical solution of the application is managed collectively and configures to API, and focus on request behavior of the client to API, to which the program of client need to be only adapted to for server-side, therefore, software system development efficiency is improved, the coupling of software systems is reduced, improves the request efficiency of API.
Description
Technical field
This application involves technical field of information processing more particularly to the method, apparatus and service of a kind of application programming interfaces
Device.
Background technique
Application programming interfaces (application programming interface, API), also known as application programming connects
Mouth, is computer operating system or program library is supplied to the code that application call uses, and main purpose is allowed using journey
Sequence developer be able to call one group of subroutine function, and regardless of the bottom source code of subroutine function how, understand son
The details of program function internal work mechanism.Good API design can make the function responsibility of software systems obtain classifying rationally,
Interdepending between software systems each section is reduced, the maintainability and scalability of software systems are improved.
In the extensive Internet enterprises of some business, developer safeguards and uses a large amount of API, these API meetings
It is refined by one or more client calls, and as the business of enterprise is divided the work and is cooperated, to improve program development effect
Rate.But as the quantity of API is increasing, under current calling and way to manage to API, some problems also show
Out.For example, Fig. 1 is the calling and management framework figure of a kind of API of the prior art, and in framework shown in fig. 1, client pair
Each API is individually called, and is not carried out the centralized management to API, leads to that the quantity of the duplicate API of function is more, software
System coupling is high, such as each API is separately provided in the common function such as log recording, monitoring and current limliting, reduces software
The efficiency of system;In addition, managing concentratedly due to not realizing to API, API lacks entrance, the data lattice returned after API is called
Formula is also varied, causes developer to have to be directed to the exploitation that each API carries out software systems suitability, consumes big
The time cost of amount.
As it can be seen that the efficiency that the prior art manages API is lower in the software development scene that maintenance there are a large amount of API, reduce
The development efficiency of software systems.
Summary of the invention
The embodiment of the present application provides management method, device and the server of a kind of application programming interfaces, existing to solve
Technology reduces software system development since the efficiency managed API is lower in the software development scene that maintenance has a large amount of API
The problem of efficiency.
In a first aspect, the embodiment of the present application provides a kind of management method of application programming interfaces, comprising:
The request message that client is sent is obtained, the request message includes the identity information and client request of client
Destination application interface (application programming interface, API);
The request message is verified according to pre-set client configuration information;
If the request message is verified, substance parameter needed for requesting the target API is generated;
The substance parameter is sent to the target API, so that the target API is asked according to substance parameter generation
Seek result data.
Second aspect, the embodiment of the present application provide a kind of managing device of application programming interfaces, comprising:
Receiving module, for obtaining the request message of client transmission, the request message includes that the identity of client is believed
The target API of breath and client request;
Processing module, for being verified according to pre-set client configuration information to the request message;
The processing module is verified if being also used to the request message, is generated needed for requesting the target API
Substance parameter;
Sending module, for the substance parameter to be sent to the target API, so that the target API is according to
Substance parameter generates request results data.
The third aspect, the embodiment of the present application provide a kind of server, comprising:
Transceiver, for obtaining the request message of client transmission, the request message includes the identity information of client
With the target API of client request;
Processor, for being verified according to pre-set client configuration information to the request message;
The processor is verified if being also used to the request message, generates reality needed for requesting the target API
Body parameter;
The transceiver is also used to for the substance parameter to be sent to the target API so that the target API according to
The substance parameter generates request results data.
From the above technical scheme, the embodiment of the present application provides a kind of management method of application programming interfaces, device
And server.Wherein this method comprises: obtaining the request message that client is sent, the request message includes the identity of client
The API of information and client request;The request message is verified according to pre-set client configuration information;If
The request message is verified, and generates substance parameter needed for requesting the target API;The substance parameter is sent to institute
Target API is stated, so that the target API generates request results data according to the substance parameter.The technical side of the application as a result,
Case is managed collectively and is configured to API, and focuses on request behavior of the client to API, thus the program of client
It need to be only adapted to for server-side, this improves software system development efficiency, reduce the coupling of software systems, mention
The high request efficiency of API.
Detailed description of the invention
In order to illustrate more clearly of the technical solution of the application, letter will be made to attached drawing needed in the embodiment below
Singly introduce, it should be apparent that, for those of ordinary skills, without any creative labor,
It is also possible to obtain other drawings based on these drawings.
Fig. 1 is the calling and management framework figure of a kind of API of the prior art;
Fig. 2 is provided by the present application a kind of for managing the software system architecture schematic diagram of application programming interfaces;
Fig. 3 is a kind of flow chart of the management method of application programming interfaces provided by the embodiments of the present application;
Fig. 4 is a kind of flow chart of the management method step S102 of application programming interfaces provided by the embodiments of the present application;
Fig. 5 is the schematic diagram of synchronous interaction mode provided by the embodiments of the present application;
Fig. 6 is the schematic diagram of asynchronous interactive mode provided by the embodiments of the present application;
Fig. 7 is a kind of page schematic diagram of visualized management client configuration information provided by the embodiments of the present application;
Fig. 8 is a kind of page schematic diagram of visualized management API configuration information provided by the embodiments of the present application;
Fig. 9 is a kind of schematic diagram of the managing device of application programming interfaces provided by the embodiments of the present application;
Figure 10 is the schematic diagram of the managing device of another application programming interfaces provided by the embodiments of the present application;
Figure 11 is a kind of schematic diagram of server provided by the embodiments of the present application.
Specific embodiment
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality
The attached drawing in example is applied, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described implementation
Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common
The application protection all should belong in technical staff's every other embodiment obtained without making creative work
Range.
The embodiment of the present application provides the method, apparatus and server of a kind of application programming interfaces, to solve the prior art
In the software development scene that maintenance there are a large amount of API, since the coupling of API is higher, cause the efficiency managed API lower,
The problem of to reduce software system development efficiency.
Here is the present processes embodiment.
Fig. 2 is provided by the present application a kind of for managing the software system architecture schematic diagram of application programming interfaces.
As shown in Fig. 2, the software system architecture includes client, server-side and multiple API.
Wherein, client refers to enough calling and consumes the application entity of API;Client can by individual developer or
Person enterprise development person exploitation, for example, multipad, mobile phone A pp, and based on HTML5 exploitation software function or
Service etc..It is easily understood that the client of the embodiment of the present application for example may operate in mobile phone, PC, server, void
In the user equipmenies such as quasi- real world devices, wearable device or autopilot facility.
Server-side for example may operate in server, be applied to as the middleware of client and API client and
Request on API, for management client to API, comprising: monitor client is to the request behavior of API, record log and right
The API of application request carries out current limliting etc..
Fig. 3 is a kind of flow chart of the management method of application programming interfaces provided by the embodiments of the present application.
Based on Fig. 2 shows software system architecture, a kind of manager of application programming interfaces provided by the embodiments of the present application
Method can be applied to server-side, as shown in figure 3, this method may comprise steps of:
Step S101, obtain client send request message, the request message include client identity information and
The destination application interface (application programming interface, API) of client request.
Specifically, operation has the user equipment of client and operation to have the server of server-side to pass through cable network and wireless
Network establishes connection, and client generates request message and is sent to server-side by the network between user equipment and server.Visitor
The request message at family end can be executes what specific operation generated according to user on the user equipment of operation client, can also be with
It is that client is generated according to preset configuration and rules of order.
The identity information of client refers to the information for being used to uniquely determine client identity of client and server-side agreement,
Such as: application program ID, IP address, hardware ID or account information etc..In addition, client is in order to obtain the request knot of target API
Fruit data can also carry all kinds of parameters that request results data are generated for target API in request message.
Step S102 verifies the request message according to pre-set client configuration information.
Server-side preserves client configuration information according to the setting of user, these client configuration informations may include
Identity information, authorization API list and request flow rate upper limit of each authorization API of authorized client etc..
The identity information and target API carried in server-side analysis request message, determines the identity carried in request message
Information whether be the authorized client recorded in client configuration information identity information, determine the target carried in request message
Whether API is authorization API to be recorded in client configuration information, and whether exceed request to the request of target API according to client
Flow rate upper limit etc., wherein the request flow rate upper limit can be the request number of times upper limit, such as: the daily request number of times upper limit, per hour
Request number of times upper limit etc..
Step S103 generates substance parameter needed for requesting the target API if the request message is verified.
If server-side determines that client is authorized client in step s 102, the target API of client request is to award
API is weighed, and without departing from request flow rate upper limit, then server-side can determine that request message is verified, and disappear according to request
Breath and client configuration information generate the substance parameter that request results data are generated for target API.
If server-side determines that client is not authorized client in step s 102, server determines that request message is tested
Card does not pass through, and server-side will verify unsanctioned result notice to client.
If server-side determines that client is authorized client in step s 102, but the target API of client request is not
It is authorization API, then server determines that request message verifying does not pass through, and server-side will verify unsanctioned result notice to client
End.
If server-side determines that client is authorized client in step s 102, the target API of client request is to award
API is weighed, but client has exceeded request flow rate upper limit to the request of target API, then server determines request message verifying not
Pass through, server-side will verify unsanctioned result notice to client.
The substance parameter is sent to the target API by step S104, so that the target API is according to the entity
Parameter generates request results data.
In order to realize that substance parameter is sent to target API by server-side, server-side record has API configuration information, API configuration
Information can be by user configuration, the uniform resource locator (uniform including each authorization API
Resourcelocator, URL) address, the data interactive mode of each authorization API and client, the data interaction side
Formula includes synchronous interaction mode and asynchronous interactive mode;When the data interactive mode is asynchronous interactive mode, the authorization
API and the client pass through asynchronous service queue progress data interaction.
According to the instruction of API configuration information, the data interactive mode of API and client includes synchronous interaction mode and asynchronous
Interactive mode, wherein synchronous interaction mode can be applied to the feelings that client needs to obtain the request results data of API in real time
Condition, it is more that asynchronous interactive mode can be applied to API processing business logic time-consuming, and client does not need to obtain API in real time
Request results data the case where.
Fig. 4 is a kind of flow chart of the management method step S102 of application programming interfaces provided by the embodiments of the present application.
As shown in figure 4, in one embodiment, step S102 may comprise steps of:
Step S201, according to the identity information of the identity information of client and authorized client, analyze client whether be
Authorized client.If the identity information of client is identical with the identity information of authorized client, client is authorization client
End;If the identity information of client is different with the identity information of authorized client, client is not authorized client
Step S202 determines institute according to the corresponding authorization API list of client if client is authorized client
State whether target API is the authorization API.If target API is located in authorization API list, target API is authorization API, such as
Fruit target API is not located in authorization API list, then target API is not authorization API.
Step S203, if the target API is the authorization API, request stream of the analysis client to the target API
Whether amount exceeds the request flow rate upper limit.For example, the request flow rate upper limit is the daily request number of times upper limit, if client is worked as
Day is greater than the daily request number of times upper limit to the request number of times of target API, then it is assumed that exceeds the request flow rate upper limit.
Step S204, if client is to the request flow of the target API without departing from the request flow rate upper limit, institute
Request message is stated to be verified.
S201- step S204 realizes the verifying to client identity to server-side through the above steps as a result, to client
The verifying of API permission, and the verifying of the flow control to client request API are requested, is asked so as to the API to client
Ask effective management of behavior.
Fig. 5 is the schematic diagram of synchronous interaction mode provided by the embodiments of the present application.
As shown in figure 5, server-side obtains the URL for the target API for including in API configuration information in synchronous interaction mode
Address, and substance parameter is sent directly to the address URL;After target API receives the substance parameter of server-side transmission, according to
Substance parameter generates corresponding request results data, and request results data are directly returned to server-side;Server-side receives
After the request results data that target API is returned, request results data are sent to client, to complete client and target
The data exchange process of API.
Fig. 6 is the schematic diagram of asynchronous interactive mode provided by the embodiments of the present application.
, will also be including the Notify Address of request results data in the request message of client in asynchronous interactive mode, it should
Notify Address for example can be IP address or the address URL of client etc..As shown in fig. 6, if server-side is configured according to API
Information determines that the data interaction between client and target API uses asynchronous interactive mode, then identity of the server-side in client
After being verified, the notice that authentication is passed through returns to client, and request message is sent to asynchronous service queue, should
Asynchronous service queue can be the message queue (message queue, MQ) of server-side maintenance, and asynchronous service queue is according to request
The sequencing of message in the queue handles request message, specifically includes: the corresponding substance parameter of request message is sent to mesh
API is marked, receives the request results data that target API is returned according to substance parameter, and provide in request message by client
Notify Address request results data are sent to client.
In addition, server-side can also be by the request data of user terminal and target API as a kind of selectable embodiment
The request results data of return are sent to the data center connecting with server-side, such as: Mysql database, to realize to visitor
Monitoring, record and the analysis of the data interaction behavior of family end and API.
As a kind of selectable embodiment, user can be by visual mode of operation to client configuration information
It is managed, such as: the operations such as increase, modification and deletion are executed to client configuration information.
Fig. 7 is a kind of page schematic diagram of visualized management client configuration information provided by the embodiments of the present application.
Illustratively, in the page shown in Fig. 7, the identity information of client can be filled in " title " column, such as: application
Program ID, IP address, hardware ID or account information etc..
Illustratively, all API for configuration are listed in " authorization API " corresponding table in Fig. 7, each API is accounted for
According to a line of table, every a line may include following parameter:
Whether " open-minded ", user can be configuring client by way of choosing the Option Box of (multiselect) " whether open-minded "
Authorization API;
" API project ", specifically can be API Name;
" project brief " can be the function introduction etc. to API;
" the setting day upper limit ", value is nonnegative integer, and client, which can be arranged, in user herein requests daily on the number of API
Limit, if setting value is 0, then it represents that request number of times is not limited, when request number of times of the client to API is more than maximum number of times
When, server-side does not reprocess the request message of client.
It should be added that the particular content shown in Fig. 7 is only used as its of visualized management client configuration information
In an exemplary embodiment, rather than whole embodiments, those skilled in the art are visual shown in the embodiment of the present application
Other embodiments can also be obtained on the basis of the technical solution and design of change management client configuration information, these embodiments
Without departing from the protection scope of the embodiment of the present application.
As a kind of selectable embodiment, user can by visual mode of operation to API configuration information into
Row management, such as: the operations such as increase, modification and deletion are executed to API configuration information.
Fig. 8 is a kind of page schematic diagram of visualized management API configuration information provided by the embodiments of the present application.
Illustratively, include the following contents in the page shown in Fig. 8:
API Name;
Route Distinguisher can splice to obtain with the initial of API Name;
Project status, including enable and disable two options;
Interface status name: the corresponding state for provisioning API identifies, such as status;
Interface IP address: for the address URL of provisioning API, such as http address;
Interface requests mode: for the request method of provisioning API, such as GET request or POST request;
It is whether asynchronous: for configuring the data interactive mode of client and API, including " synchronization " and " asynchronous " two choosings
?;
Queue name: the name keys for the asynchronous service queue that provisioning API uses.
It should be added that the particular content shown in Fig. 8 is only used as wherein the one of visualized management API configuration information
A exemplary embodiment, rather than whole embodiments, those skilled in the art are in the visualization pipe shown in the embodiment of the present application
Other embodiments can also be obtained on the basis of the technical solution and design of reason API configuration information, these embodiments do not have
Protection scope beyond the embodiment of the present application.
As a kind of selectable embodiment, server-side can recorde the request message of client and asking for API return
Result data is sought, and is analyzed according to called situation of the data of record to API, the performance of API is tested and supervised
Control;In addition, the data that server-side can also record are counted, the request success rate, day request amount, moon request amount of API are obtained
Etc. information, for subsequent API optimization reference frame is provided.
From the above technical scheme, the embodiment of the present application provides a kind of management method of application programming interfaces, the party
Method can be applied to server-side, comprising: obtain the request message that client is sent, the request message includes that the identity of client is believed
The API of breath and client request;The request message is verified according to pre-set client configuration information;If institute
It states request message to be verified, generates substance parameter needed for requesting the target API;The substance parameter is sent to described
Target API, so that the target API generates request results data according to the substance parameter.According to the above method, server-side pair
API is managed collectively and is configured, and focuses on request behavior of the client to API, so that the program of client only needs
It is adapted to for server-side, this improves software system development efficiency, reduce the coupling of software systems, improve
The request efficiency of API.
Here is the Installation practice of the application, provides a kind of managing device of application programming interfaces, and the device is available
In executing the present processes embodiment, undocumented technical detail please refers to the present processes implementation in the Installation practice
Example.
Fig. 9 is a kind of schematic diagram of the managing device of application programming interfaces provided by the embodiments of the present application.
As shown in figure 9, the device includes:
Receiving module 301, for obtaining the request message of client transmission, the request message includes the identity of client
The target API of information and client request;
Processing module 302, for being verified according to pre-set client configuration information to the request message;
The processing module 302 is verified if being also used to the request message, is generated and is requested the target API institute
The substance parameter needed;
Sending module 303, for the substance parameter to be sent to the target API, so that the target API is according to institute
It states substance parameter and generates request results data.
Figure 10 is the schematic diagram of the managing device of another application programming interfaces provided by the embodiments of the present application.
Optionally, the device is as shown in Figure 10, further includes: memory module 304, for storing the client with confidence
Breath, the client configuration information include asking for the identity information of authorized client, authorization API list and each authorization API
Seek flow rate upper limit.
Optionally, the processing module 302, for being believed according to the identity information of client and the identity of authorized client
Breath, whether analysis client is authorized client;The processing module 302, if being also used to client is authorized client, root
Determine whether the target API is the authorization API according to the corresponding authorization API list of client;The processing module
302, if being also used to the target API is the authorization API, analysis client to the request flow of the target API whether
Beyond the request flow rate upper limit;The processing module 302, if being also used to client to the request flow of the target API
Without departing from the request flow rate upper limit, then the request message is verified.
The managing device of the application programming interfaces asks client by realizing the verifying to client identity as a result,
The verifying of API permission, and the verifying of the flow control to client request API are asked, so as to the API request to client
Effective management of behavior.
Optionally, the memory module 304, is also used to store API configuration information, and the API configuration information includes each
The uniform resource position mark URL address of the authorization API, the data interactive mode of each authorization API and client are described
Data interactive mode includes synchronous interaction mode and asynchronous interactive mode;When the data interactive mode is asynchronous interactive mode
When, the authorization API and the client pass through asynchronous service queue progress data interaction.
Optionally, the sending module 303, for according to the API configuration information, the substance parameter to be directly transmitted
To the address URL of the target API;The receiving module 301 is joined for receiving the target API according to the entity
The request results data that number returns;The sending module 303 is also used to the request results data being sent to client.
Optionally, the sending module 303, for sending the asynchronous service queue for the request message;It is described
Asynchronous service queue is used to that the substance parameter to be sent to the target API according to the request message, and described in reception
The request results data that target API is returned according to the substance parameter, and the request results data are sent to client.
From the above technical scheme, the embodiment of the present application provides a kind of managing device of application programming interfaces, is used for:
The request message that client is sent is obtained, the request message includes the identity information of client and the API of client request;Root
The request message is verified according to pre-set client configuration information;It is raw if the request message is verified
At substance parameter needed for requesting the target API;The substance parameter is sent to the target API, so that the target
API generates request results data according to the substance parameter.The managing device is managed collectively and is configured to API as a result, and
And request behavior of the client to API is focused on, so that the program of client need to be only adapted to for server-side, therefore,
Software system development efficiency is improved, the coupling of software systems is reduced, improves the request efficiency of API.
Here is the hardware embodiment of the application, provides a kind of server, which can be used for executing the application's
Embodiment of the method, undocumented technical detail please refers to the present processes embodiment in the Installation practice.
Figure 11 is a kind of schematic diagram of server provided by the embodiments of the present application.
As shown in figure 11, which includes:
Transceiver 401, for obtaining the request message of client transmission, the request message includes that the identity of client is believed
The target API of breath and client request;
Processor 402, for being verified according to pre-set client configuration information to the request message;
The processor 402 is verified if being also used to the request message, is generated needed for requesting the target API
Substance parameter;
The transceiver 401 is also used to for the substance parameter to be sent to the target API, so that the target API root
Request results data are generated according to the substance parameter.
Optionally, the server further include: memory 403, for storing the client configuration information, the client
The request flow rate upper limit of identity information of the configuration information comprising authorized client, authorization API list and each authorization API;Institute
Memory 403 is stated, is also used to store API configuration information, the API configuration information includes the unified money of each authorization API
Source Locator URL address, the data interactive mode of each authorization API and client, the data interactive mode include same
Walk interactive mode and asynchronous interactive mode;When the data interactive mode be asynchronous interactive mode when, the authorization API with it is described
Client carries out data interaction by asynchronous service queue.
From the above technical scheme, the embodiment of the present application provides a kind of server, is used for: obtaining what client was sent
Request message, the request message include the identity information of client and the API of client request;According to pre-set client
End configuration information verifies the request message;If the request message is verified, generates and request the target API
Required substance parameter;The substance parameter is sent to the target API, so that the target API joins according to the entity
Number generates request results data.Server is managed collectively and is configured to API as a result, and focuses on client to API
Request behavior, so that the program of client need to be only adapted to for server-side, this improves software system development effects
Rate reduces the coupling of software systems, improves the request efficiency of API.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims.
Claims (15)
1. a kind of management method of application programming interfaces characterized by comprising
The request message that client is sent is obtained, the request message includes the identity information of client and the mesh of client request
It marks application programming interfaces (application programming interface, API);
The request message is verified according to pre-set client configuration information;
If the request message is verified, substance parameter needed for requesting the target API is generated;
The substance parameter is sent to the target API, so that the target API generates request knot according to the substance parameter
Fruit data.
2. the method according to claim 1, wherein
The client configuration information includes identity information, authorization API list and each authorization API of authorized client
Request flow rate upper limit.
3. according to the method described in claim 2, it is characterized in that, it is described according to pre-set client configuration information to institute
Request message is stated to be verified, comprising:
According to the identity information of the identity information of client and authorized client, analyze whether client is authorized client;
If client is authorized client, whether the target API is determined according to the corresponding authorization API list of client
For the authorization API;
If the target API is the authorization API, whether analysis client exceeds institute to the request flow of the target API
State request flow rate upper limit;
If client is to the request flow of the target API without departing from the request flow rate upper limit, the request message is tested
Card passes through.
4. according to the method described in claim 2, it is characterized by further comprising: API configuration information, the API configuration information packet
Include the uniform resource position mark URL address of each authorization API, the data interaction side of each authorization API and client
Formula, the data interactive mode include synchronous interaction mode and asynchronous interactive mode;When the data interactive mode is asynchronous friendship
When mutual mode, the authorization API and the client pass through asynchronous service queue progress data interaction.
5. according to the method described in claim 4, it is characterized in that, when the interactive mode be synchronous interaction mode when, it is described
Substance parameter is sent to the target API, so that the target API generates request results data according to the substance parameter,
Include:
According to the API configuration information, the substance parameter is sent directly to the address URL of the target API.
6. according to the method described in claim 5, it is characterized by further comprising:
The request results data that the target API is returned according to the substance parameter are received, and the request results data are sent out
Give client.
7. according to the method described in claim 4, it is characterized in that, when the interactive mode be asynchronous interactive mode when, it is described
Substance parameter is sent to the target API, so that the target API generates request results data according to the substance parameter,
Include:
The asynchronous service queue is sent by the request message;The asynchronous service queue is used for according to the request message
The substance parameter is sent to the target API, and receives the request that the target API is returned according to the substance parameter
Result data, and the request results data are sent to client.
8. a kind of managing device of application programming interfaces characterized by comprising
Receiving module, for obtain client transmission request message, the request message include client identity information and
The target API of client request;
Processing module, for being verified according to pre-set client configuration information to the request message;
The processing module is verified if being also used to the request message, generates entity needed for requesting the target API
Parameter;
Sending module, for the substance parameter to be sent to the target API, so that the target API is according to the entity
Parameter generates request results data.
9. device according to claim 8, which is characterized in that further include:
Memory module, for storing the client configuration information, the client configuration information includes the body of authorized client
The request flow rate upper limit of part information, authorization API list and each authorization API.
10. device according to claim 9, which is characterized in that
The processing module, for according to the identity information of client and the identity information of authorized client, analyzing client to be
No is authorized client;
The processing module, if being also used to client is authorized client, according to the corresponding authorization API list of client
Determine whether the target API is the authorization API;
The processing module analyzes client to the target API's if being also used to the target API is the authorization API
Whether request flow exceeds the request flow rate upper limit;
The processing module, if being also used to client to the request flow of the target API without departing from the request flow
Limit, then the request message is verified.
11. device according to claim 9, which is characterized in that
The memory module, is also used to store API configuration information, and the API configuration information includes the system of each authorization API
One Resource Locator URL address, the data interactive mode of each authorization API and client, the data interactive mode packet
Include synchronous interaction mode and asynchronous interactive mode;When the data interactive mode be asynchronous interactive mode when, the authorization API with
The client carries out data interaction by asynchronous service queue.
12. device according to claim 11, which is characterized in that
The sending module, for according to the API configuration information, the substance parameter to be sent directly to the target API
The address URL;
The receiving module, the request results data returned for receiving the target API according to the substance parameter;
The sending module is also used to the request results data being sent to client.
13. device according to claim 11, which is characterized in that
The sending module, for sending the asynchronous service queue for the request message;The asynchronous service queue is used
In the substance parameter is sent to the target API according to the request message, and the target API is received according to
The request results data that substance parameter returns, and the request results data are sent to client.
14. a kind of server characterized by comprising
Transceiver, for obtaining the request message of client transmission, the request message includes identity information and the visitor of client
The target API of family end request;
Processor, for being verified according to pre-set client configuration information to the request message;
The processor is verified if being also used to the request message, is generated entity needed for requesting the target API and is joined
Number;
The transceiver is also used to for the substance parameter to be sent to the target API, so that the target API is according to
Substance parameter generates request results data.
15. server according to claim 14, which is characterized in that further include:
Memory, for storing the client configuration information, the client configuration information includes the identity of authorized client
The request flow rate upper limit of information, authorization API list and each authorization API;
The memory, is also used to store API configuration information, and the API configuration information includes the unification of each authorization API
Resource Locator URL address, the data interactive mode of each authorization API and client, the data interactive mode include
Synchronous interaction mode and asynchronous interactive mode;When the data interactive mode is asynchronous interactive mode, the authorization API and institute
It states client and data interaction is carried out by asynchronous service queue.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910284800.3A CN110007950A (en) | 2019-04-10 | 2019-04-10 | A kind of management method of application programming interfaces, device and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910284800.3A CN110007950A (en) | 2019-04-10 | 2019-04-10 | A kind of management method of application programming interfaces, device and server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110007950A true CN110007950A (en) | 2019-07-12 |
Family
ID=67170802
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910284800.3A Pending CN110007950A (en) | 2019-04-10 | 2019-04-10 | A kind of management method of application programming interfaces, device and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110007950A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111858273A (en) * | 2020-07-02 | 2020-10-30 | 五八有限公司 | Display method and device for processing logs |
CN111988186A (en) * | 2020-09-02 | 2020-11-24 | 深圳壹账通智能科技有限公司 | Configuration synchronization method and related device |
CN112069437A (en) * | 2020-08-13 | 2020-12-11 | 北京达佳互联信息技术有限公司 | Webpage request processing method and device, electronic equipment and storage medium |
CN112398792A (en) * | 2019-08-15 | 2021-02-23 | 奇安信安全技术(珠海)有限公司 | Login protection method, client, central control management equipment and storage medium |
CN113766030A (en) * | 2021-09-13 | 2021-12-07 | 城云科技(中国)有限公司 | Automatic parameter entering method and device for interface constant parameters |
CN114928608A (en) * | 2022-04-21 | 2022-08-19 | 北京达佳互联信息技术有限公司 | Multimedia resource processing method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002015029A1 (en) * | 2000-08-14 | 2002-02-21 | I2 Technologies, Inc. | Network application program interface facilitating communication in a distributed network environment |
CN103699824A (en) * | 2014-01-13 | 2014-04-02 | 浪潮(北京)电子信息产业有限公司 | Method, system and client for calling REST (Representational State Transfer) API (Application Program Interface) |
CN107046482A (en) * | 2017-04-25 | 2017-08-15 | 厦门集微科技有限公司 | The management method and device of a kind of API service |
CN108830099A (en) * | 2018-05-04 | 2018-11-16 | 平安科技(深圳)有限公司 | Call verification method, device, computer equipment and the storage medium of api interface |
CN109510846A (en) * | 2017-09-14 | 2019-03-22 | 北京金山云网络技术有限公司 | API Calls system, method, apparatus, electronic equipment and storage medium |
-
2019
- 2019-04-10 CN CN201910284800.3A patent/CN110007950A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002015029A1 (en) * | 2000-08-14 | 2002-02-21 | I2 Technologies, Inc. | Network application program interface facilitating communication in a distributed network environment |
CN103699824A (en) * | 2014-01-13 | 2014-04-02 | 浪潮(北京)电子信息产业有限公司 | Method, system and client for calling REST (Representational State Transfer) API (Application Program Interface) |
CN107046482A (en) * | 2017-04-25 | 2017-08-15 | 厦门集微科技有限公司 | The management method and device of a kind of API service |
CN109510846A (en) * | 2017-09-14 | 2019-03-22 | 北京金山云网络技术有限公司 | API Calls system, method, apparatus, electronic equipment and storage medium |
CN108830099A (en) * | 2018-05-04 | 2018-11-16 | 平安科技(深圳)有限公司 | Call verification method, device, computer equipment and the storage medium of api interface |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112398792A (en) * | 2019-08-15 | 2021-02-23 | 奇安信安全技术(珠海)有限公司 | Login protection method, client, central control management equipment and storage medium |
CN112398792B (en) * | 2019-08-15 | 2022-07-05 | 奇安信安全技术(珠海)有限公司 | Login protection method, client, central control management equipment and storage medium |
CN111858273A (en) * | 2020-07-02 | 2020-10-30 | 五八有限公司 | Display method and device for processing logs |
CN112069437A (en) * | 2020-08-13 | 2020-12-11 | 北京达佳互联信息技术有限公司 | Webpage request processing method and device, electronic equipment and storage medium |
CN112069437B (en) * | 2020-08-13 | 2024-02-06 | 北京达佳互联信息技术有限公司 | Webpage request processing method and device, electronic equipment and storage medium |
CN111988186A (en) * | 2020-09-02 | 2020-11-24 | 深圳壹账通智能科技有限公司 | Configuration synchronization method and related device |
CN111988186B (en) * | 2020-09-02 | 2023-04-11 | 深圳壹账通智能科技有限公司 | Configuration synchronization method and related device |
CN113766030A (en) * | 2021-09-13 | 2021-12-07 | 城云科技(中国)有限公司 | Automatic parameter entering method and device for interface constant parameters |
CN114928608A (en) * | 2022-04-21 | 2022-08-19 | 北京达佳互联信息技术有限公司 | Multimedia resource processing method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110007950A (en) | A kind of management method of application programming interfaces, device and server | |
US7133906B2 (en) | System and method for remotely configuring testing laboratories | |
CN109478266A (en) | For the resource allocation of database supply | |
US9378030B2 (en) | Method and apparatus for interactive mobile device guidance | |
US8843618B2 (en) | Cloud service information overlay | |
CN110310034A (en) | A kind of service orchestration applied to SaaS, business flow processing method and apparatus | |
CN107040416B (en) | Virtual data center visual management method based on Cairngorm framework | |
CN104246741A (en) | Orchestrating hybrid cloud services | |
US20060242276A1 (en) | System and method for remotely configuring testing laboratories | |
US20140075034A1 (en) | Customizable model for throttling and prioritizing orders in a cloud environment | |
CN105917690A (en) | System, method, and computer program for preserving service continuity in network function virtualization (NFV) based communication network | |
CN107193669A (en) | The system and design method of maintenance interface based on mixed cloud or large-scale cluster | |
CN108696400A (en) | network monitoring method and device | |
CN110209984A (en) | Information interacting method, electronic equipment and computer-readable medium | |
CN110062041A (en) | A kind of method and device of the IOT equipment changing based on block chain | |
CN113568970A (en) | Application service data management method, device, equipment and storage medium | |
CN103155530A (en) | Web-telco convergence comprising downloading script commands to user terminals | |
CN113626002A (en) | Service execution method and device | |
US20130159460A1 (en) | Harnessing naturally occurring characteristics of social networks | |
CN115622732A (en) | Multi-application-based application authority control method and system, electronic device and medium | |
CN112016280B (en) | File editing method and device and computer readable medium | |
Khue et al. | Design and implementation of MEAN stack-based scalable real-time Digital Signage System | |
CN112000378A (en) | VR equipment management method and system | |
CN111953801A (en) | Remote control method and device for robot, electronic equipment and storage medium | |
US20230318935A1 (en) | Cell-based architecture for an extensibility platform |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190712 |
|
RJ01 | Rejection of invention patent application after publication |