A cloud API unified management method and device

Through the unified management method of the cloud API, the problem of chaos in API management in the cloud era is solved, centralized management of API interfaces and collaboration between different roles is realized, and management efficiency and availability are improved.

CN111638902BActive Publication Date: 2025-03-25BEIJING QIHOOD TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910157652.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-01
Publication Date
2025-03-25
Estimated Expiration
2039-03-01

AI Technical Summary

Technical Problem

In the cloud era, the management of server-side development APIs is relatively chaotic and the lack of a unified standardized platform for management, which leads to difficulties in cross-team development and the inability to achieve high availability and version management.

Method used

Provide a cloud-based API unified management method, by determining the API interfaces of multiple project servers to be managed uniformly, obtaining user roles related to different service projects, and assigning corresponding API interface management permissions to each user role. When logging in, determine the role based on user information and display the API interface information with administrative permissions.

Benefits of technology

It realizes centralized and unified management of API interfaces on different projects, so that users of different roles can directly display their API interface information with management permissions, and improves the efficiency and collaboration capabilities of API management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111638902B_ABST
    Figure CN111638902B_ABST
Patent Text Reader

Abstract

The present invention provides a cloud-based API unified management method and device, the method comprising: determining the API interfaces of multiple project service ends to be uniformly managed in the cloud, wherein different project service ends are applied to different service projects; obtaining user roles respectively related to different service projects, and assigning API interface management rights of the project service end corresponding to the service project related to each user role; when receiving a login operation of any user, obtaining user information of any user based on the login operation, and determining the role of any user based on the user information; obtaining interface information of the API interface that any user has management authority for based on the role of any user, and displaying the obtained interface information of the API interface. Therefore, the scheme of the embodiment of the present invention can effectively realize the centralized and unified management of the API interfaces of different project service ends by assigning different API interface management rights to users with different roles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a cloud API unified management method and device. Background Art

[0002] In the current cloud era, the management of server-side development APIs (Application Programming Interfaces) is rather chaotic, and sometimes difficult for cross-team development. Usually, the management of each project's API is managed by each project itself, without a unified and standardized platform for unified management, and without mutual collaboration, information sharing, effective high availability, and management of version and other information. Summary of the invention

[0003] In view of the above problems, the present invention is proposed to provide a cloud-based API unified management method and device that overcomes the above problems or at least partially solves the above problems.

[0004] According to one aspect of the present invention, a cloud API unified management method is provided, comprising:

[0005] Determine the API interfaces of multiple project servers to be uniformly managed in the cloud, wherein the different project servers are applied to different service projects;

[0006] Obtain user roles related to different service projects, and assign API interface management permissions of the project server corresponding to the relevant service project to each user role;

[0007] When receiving a login operation of any user, obtaining user information of any user based on the login operation, and determining a role of the any user according to the user information;

[0008] According to the role of the arbitrary user, the interface information of the API interface that the arbitrary user has management authority is obtained, and the obtained interface information of the API interface is displayed.

[0009] Optionally, determine the API interfaces of multiple project servers to be managed uniformly in the cloud, including:

[0010] Identify multiple project servers in the cloud that need to be managed uniformly;

[0011] The interface information of the corresponding API interface is obtained for each project server, and the API interface of each project server is determined based on the interface information of the API interface.

[0012] Optionally, after allocating the API interface management authority of the project server corresponding to the relevant service project to each user role, it also includes:

[0013] A first correspondence is established between each user role, its corresponding API interface management authority, and interface information of the API interface for which it has management authority, and the first correspondence is added to the preset authority list.

[0014] Optionally, after allocating the API interface management authority of the project server corresponding to the relevant service project to each user role, it also includes:

[0015] Receiving a sharing request for at least one API interface, wherein the sharing request carries a user role of the at least one API interface to be shared;

[0016] The user role to which the at least one API interface is shared is parsed from the received sharing request, and management authority of the at least one API interface is allocated to the shared user role.

[0017] Optionally, after allocating management rights of the at least one API interface to the shared user role, the method further includes:

[0018] Searching the preset permission list for a user role to share the API interface;

[0019] If so, the interface information of the API interface with management authority and the corresponding API interface management authority in the preset authority list that establishes a first correspondence with the user role of the shared API interface are updated;

[0020] If not, a second correspondence is established between the user role of the shared API interface, the management authority of the shared API interface, and the interface information of the shared API interface, and the second correspondence is added to the preset authority list.

[0021] Optionally, obtaining user information of any user based on the login operation, and determining the role of the any user according to the user information includes:

[0022] Based on the login operation, obtain the cookie information corresponding to the arbitrary user and the user information of the arbitrary user;

[0023] The role of the arbitrary user is determined according to the user information.

[0024] Optionally, the user information of any user includes:

[0025] At least one of the login account, user ID, and project department of any user, wherein different project departments are responsible for different service projects.

[0026] Optionally, the API management permissions of users of different roles on the project server include at least one of the following:

[0027] API interface viewing permission, editing permission, sharing request permission, backup permission, testing permission, and version modification permission.

[0028] According to another aspect of the present invention, a cloud API unified management device is provided, comprising:

[0029] A determination module, adapted to determine API interfaces of multiple project servers to be uniformly managed in the cloud, wherein the different project servers are applied to different service projects;

[0030] The allocation module is suitable for obtaining user roles related to different service projects and allocating API interface management rights of the project server corresponding to the service project related to each user role;

[0031] an acquisition module, adapted to, when receiving a login operation of any user, acquire user information of any user based on the login operation, and determine a role of the any user according to the user information;

[0032] The display module is adapted to obtain the interface information of the API interface for which the arbitrary user has management authority according to the role of the arbitrary user, and to display the obtained interface information of the API interface.

[0033] Optionally, the determination module is further adapted to:

[0034] Identify multiple project servers in the cloud that need to be managed uniformly;

[0035] The interface information of the corresponding API interface is obtained for each project server, and the API interface of each project server is determined based on the interface information of the API interface.

[0036] Optionally, it also includes:

[0037] The first adding module is suitable for establishing a first corresponding relationship between each user role, its corresponding API interface management permission, and the interface information of the API interface with management permission after the allocation module assigns the API interface management permission of the project server corresponding to the relevant service project to each user role, and adding the first corresponding relationship to the preset permission list.

[0038] Optionally, a sharing module is also included, suitable for:

[0039] After the allocation module allocates the API interface management authority of the project server corresponding to the service project related to each user role, receiving a sharing request for at least one API interface, wherein the sharing request carries the user role to which the at least one API interface is shared;

[0040] The user role to which the at least one API interface is shared is parsed from the received sharing request, and management authority of the at least one API interface is allocated to the shared user role.

[0041] Optionally, it also includes:

[0042] a search module, adapted to search from the preset permission list whether there is a user role with the shared API interface after the sharing module assigns the management permission of the at least one API interface to the shared user role;

[0043] an updating module adapted to update the interface information of the API interface with management authority and the corresponding API interface management authority in the preset authority list, if the search module finds the user role of the shared API interface from the preset authority list;

[0044] The second adding module is suitable for establishing a second corresponding relationship between the user role of the shared API interface, the management authority of the shared API interface, and the interface information of the shared API interface if the search module fails to find the user role of the shared API interface from the preset permission list, and adding the second corresponding relationship to the preset permission list.

[0045] Optionally, the acquisition module is further adapted to:

[0046] Based on the login operation, obtain the cookie information corresponding to the arbitrary user and the user information of the arbitrary user;

[0047] The role of the arbitrary user is determined according to the user information.

[0048] Optionally, the user information of any user includes:

[0049] At least one of the login account, user ID, and project department of any user, wherein different project departments are responsible for different service projects and are applied to different service projects.

[0050] Optionally, the API management permissions of users of different roles on the project server include at least one of the following:

[0051] API interface viewing permission, editing permission, sharing request permission, backup permission, testing permission, and version modification permission.

[0052] According to another aspect of the present invention, a computer storage medium is provided, wherein the computer storage medium stores a computer program code, and when the computer program code runs on a computing device, the computing device executes the cloud API unified management method in any of the above embodiments.

[0053] According to another aspect of the present invention, a computing device is provided, comprising: a processor; a memory storing computer program code; when the computer program code is executed by the processor, the computing device executes the cloud API unified management method in any of the above embodiments.

[0054] In an embodiment of the present invention, the API interfaces of multiple project service ends to be uniformly managed in the cloud are first determined, and then the user roles respectively related to different service projects are obtained, and the API interface management rights of the project service end corresponding to the relevant service projects are assigned to each user role. Usually, the API interface management rights assigned to different user roles are also different. After receiving a login operation from any user, the user information of any user can be obtained based on the login operation, and the role of any user can be determined based on the user information, and then the interface information of the API interface corresponding to the API interface management rights previously assigned to the user can be obtained based on the role of any user, and the interface information of the obtained API interface can be displayed. Thus, the scheme of the embodiment of the present invention is adopted to assign different API interface management rights to users of different roles, so that after users of different roles log in their account information, the interface information of the API interface with management rights can be directly displayed to users of different roles, thereby effectively realizing the centralized and unified management of the API interfaces of different project service ends. Further, it can also be convenient to adjust the API interface management rights of the corresponding user roles in the future, so that users of the corresponding roles can communicate and share projects more conveniently for multiple different service projects with mutual cooperation.

[0055] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below.

[0056] Based on the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will become more aware of the above and other objects, advantages and features of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0058] Figure 1 A schematic diagram of the process of a unified cloud API management method according to an embodiment of the present invention is shown;

[0059] Figure 2 A schematic diagram showing a process flow of a method for unified management of cloud APIs according to another embodiment of the present invention is shown;

[0060] Figure 3 A schematic diagram of the structure of a cloud API unified management device according to an embodiment of the present invention is shown;

[0061] Figure 4 A schematic diagram of the structure of a cloud API unified management device according to another embodiment of the present invention is shown. DETAILED DESCRIPTION

[0062] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0063] In order to solve the above technical problems, an embodiment of the present invention provides a cloud-based API unified management method. Figure 1 FIG. 1 is a flow chart showing a method for unified management of cloud APIs according to an embodiment of the present invention. Figure 1 The method at least includes steps S102 to S108.

[0064] Step S102, determining the API interfaces of multiple project servers to be uniformly managed in the cloud, wherein different project servers are applied to different service projects.

[0065] Step S104, obtaining user roles respectively related to different service projects, and allocating API interface management authority of the project server corresponding to the service project related to each user role.

[0066] Step S106, when a login operation of any user is received, user information of any user is obtained based on the login operation, and a role of any user is determined according to the user information.

[0067] Step S108, obtaining the interface information of the API interface that any user has management authority over according to the role of any user, and displaying the obtained interface information of the API interface.

[0068] The solution of the embodiment of the present invention allocates different API interface management permissions to users of different roles, so that after users of different roles log in their account information, the interface information of the API interfaces that they have management permissions can be directly displayed to users of different roles, thereby effectively realizing centralized and unified management of API interfaces of different project service ends. Furthermore, it is also convenient to adjust the API interface management permissions of the corresponding user roles in the future, so that users of the corresponding roles can more conveniently communicate and share projects for multiple different service projects with mutual cooperation relationships.

[0069] Referring to step S102 above, in one embodiment of the present invention, when determining the API interfaces of multiple project servers to be uniformly managed in the cloud, the multiple project servers to be uniformly managed in the cloud can be determined first, and then, for each project server, the interface information of the corresponding API interface is obtained, and the API interface of each project server is determined based on the interface information of the API interface. In this embodiment, the interface information of the API interface may include information such as the API interface address, which is not specifically limited here.

[0070] For example, the cloud contains four project servers. If the API interfaces of these four project servers need to be managed in a unified manner, it is necessary to first clarify what the four project servers are. Assume that these four project servers are the Mobile Guardian project server, the Cleaning Master project server, the Mobile Assistant project server, and the Commercialization project server. Then, obtain the interface information of the API interface corresponding to each project server, and determine the API interface of each project server based on the interface information of the API interface. For example, it is finally determined that the Mobile Guardian project server has 90 API interfaces, the Cleaning Master project server has 80 API interfaces, the Mobile Assistant project server has 70 API interfaces, and the Commercialization project server has 50 API interfaces.

[0071] In one embodiment of the present invention, in order to improve the management efficiency of user management rights, after the management rights of the API interface are assigned to different user roles, a first correspondence can be established between each user role, the API interface management rights corresponding to each user role, and the interface information of the API interface for which each user role has management rights, and the established first correspondence is added to the preset permission list. Through the permission list, the management rights of the API interface of different user roles can be clearly and clearly viewed.

[0072] Referring to step S104 above, in one embodiment of the present invention, the management rights of users of different roles to the API interface of the project server may include at least one of the following: viewing rights, editing rights, permission to make sharing requests, backup rights, testing rights, version modification rights, etc. of the API interface. Among them, on the basis that the user has management rights to certain API interfaces, viewing rights mean that the user can view the interface information of the API interface, editing rights mean that the user can modify, delete information and other editing operations on the interface information of the API interface, making sharing request rights means that the user can make a request to share the API interface with other user roles, and the permission sharing of the API interface is described in detail later, backup rights mean that the user can back up the interface information of the API interface, testing rights mean that the user can perform corresponding tests on the API interface, and version modification rights mean that the user can modify the version of the API interface. Of course, management rights may also include other specific rights, which are not specifically limited in the embodiment of the present invention.

[0073] In this embodiment, usually, different user roles have different numbers of API interfaces that they have management rights over. For example, user role A is a developer of the Mobile Guard project, and user role B is a tester of the Mobile Guard project. Then user role A has management rights over 80 API interfaces on the Mobile Guard project server, while user role B only has management rights over 30 API interfaces on the Mobile Guard project server. For another example, user role C is the boss of a company, so user role C has management rights over all API interfaces on the project server.

[0074] Among them, for the same API interface, the type of management permission of the user role may also be different. For example, for the 30 API interfaces of the Mobile Guardian project server, both user role A and user role B have management permissions. However, user role A's management permissions for these API interfaces include viewing permissions, editing permissions, permission to make sharing requests, and backup permissions for the API interfaces, while user role B's management permissions for these API interfaces only include viewing permissions and testing permissions.

[0075] Referring to step S106 above, in one embodiment of the present invention, the user information of any user obtained based on the login operation may include the cookie information corresponding to any user. Usually, when a user uses his account to log in to a system or website, the user ID, password, user browsing history, stay time, user identity and other information of the account are recorded in the cookie information. After obtaining the cookie information corresponding to any user, the cookie information is also used to perform SSO (SingleSign On) to further obtain relevant information of the user, such as the project department to which the user belongs, the user's position and other user information. Therefore, the user information of any user can be analyzed based on the cookie information, and the role of any user can be finally determined. The user information in the embodiment of the present invention may include at least one of the user's login account, user ID, project department to which the user belongs, and user position. Usually, different project departments are responsible for different service projects.

[0076] In this embodiment, the user's role can be directly determined based on the user information. For example, if the user's department in the parsed user information is "Mobile Guard Project R&D Department", it can be known that the user's role may be a developer of the Mobile Guard project. For another example, if the user's department in the parsed user information is "Mobile Assistant Project Testing Department", it can be known that the user's role may be a tester of the Mobile Assistant project.

[0077] The embodiment of the present invention provides another cloud API unified management method. Figure 2 FIG. 2 shows a flow chart of a method for unified management of cloud APIs according to another embodiment of the present invention. Figure 2 The method at least includes steps S202 to S212.

[0078] Step S202, determining the API interfaces of multiple project servers to be uniformly managed in the cloud, wherein different project servers are applied to different service projects.

[0079] Step S204, obtaining user roles respectively related to different service projects, and allocating API interface management rights of the project server corresponding to the service project related to each user role.

[0080] Step S206: receiving a sharing request for at least one API interface, wherein the sharing request carries a user role with which the at least one API interface is shared.

[0081] Step S208: parse the received sharing request to obtain the user role to which the at least one API interface is shared, and assign management authority of the at least one API interface to the shared user role.

[0082] In this step, for example, the sharing request is for 20 API interfaces in the Mobile Guardian project server. If it is analyzed from the sharing request that the user role of the shared object is a R&D personnel of the Cleaning Master service project, then the management authority of the 20 API interfaces in the Mobile Guardian project server can be directly allocated to the R&D personnel of the Cleaning Master service project. Furthermore, after the R&D personnel of the Cleaning Master service project log in to the platform, the API interface information displayed to them will also include the interface information of the 20 shared API interfaces.

[0083] Step S210, when a login operation of any user is received, user information of any user is obtained based on the login operation, and a role of any user is determined according to the user information.

[0084] In this step, the method of the present invention can be applied to a cloud-based unified API management platform, so any user can perform corresponding login operations through the unified management platform, and then the unified management platform obtains user information of any user based on the login operation, and determines the role of any user based on the user information.

[0085] Step S212, obtaining the interface information of the API interface that any user has management authority over according to the role of any user, and displaying the obtained interface information of the API interface.

[0086] In one embodiment of the present invention, if the first correspondence between each user role, the API interface management authority corresponding to each user role, and the interface information of the API interface for which each user role has management authority is saved in a preset permission list, then after executing step S208, the content of the permission list can also be updated based on the shared API interface management authority. The update introduced here includes the following two methods.

[0087] Method 1: If the user role of the shared API interface is found in the preset permission list, the interface information of the API interface with management authority and the corresponding API interface management authority that establishes a first correspondence with the user role of the shared API interface in the preset permission list will be updated. For example, if user role A is shared with management authority of 3 API interfaces, and user role A is saved in the permission list, then the interface information of the 3 shared API interfaces and the management authority of the 3 API interfaces can be added to the permission list for user role A.

[0088] Method 2: If the user role of the shared API interface is not found in the preset permission list, then it is necessary to establish a second correspondence between the user role of the shared API interface, the management permissions of the shared API interface, and the interface information of the shared API interface, so as to add the second correspondence to the preset permission list.

[0089] Therefore, sharing the management authority of the API interface with different user roles can effectively increase the communication and connection between different user roles in service projects, and facilitate different user roles to collaborate on the data, content, and information in the API interface of the same project server.

[0090] Based on the same inventive concept, an embodiment of the present invention also provides a cloud-based API unified management device. Figure 3 FIG. 1 shows a schematic diagram of the structure of a cloud API unified management device according to an embodiment of the present invention. Figure 3 The cloud API unified management device 300 includes a determination module 310 , an allocation module 320 , an acquisition module 330 and a display module 340 .

[0091] The functions of the components or devices of the cloud API unified management device 300 according to an embodiment of the present invention and the connection relationship between the components are now introduced:

[0092] The determination module 310 is adapted to determine the API interfaces of multiple project servers to be uniformly managed in the cloud, wherein different project servers are applied to different service projects;

[0093] The allocation module 320 is coupled to the determination module 310 and is adapted to obtain user roles respectively related to different service projects and allocate API interface management rights of the project server corresponding to the service project related to each user role;

[0094] The acquisition module 330 is coupled to the allocation module 320 and is adapted to, when receiving a login operation of any user, acquire user information of any user based on the login operation and determine a role of any user according to the user information;

[0095] The display module 340 is coupled with the acquisition module 330 and is adapted to acquire the interface information of the API interface for which any user has management authority according to the role of any user, and to display the acquired interface information of the API interface.

[0096] In one embodiment of the present invention, the determination module 310 is also suitable for determining multiple project server terminals to be uniformly managed in the cloud, obtaining the interface information of the corresponding API interface for each project server terminal, and determining the API interface of each project server terminal based on the interface information of the API interface.

[0097] In an embodiment of the present invention, the acquisition module 330 is further adapted to acquire cookie information corresponding to any user and user information of any user based on a login operation, and determine the role of any user according to the user information.

[0098] In one embodiment of the present invention, the user information of any user includes at least one of the user's login account, user ID, project department to which the user belongs, etc., wherein different project departments are responsible for different service projects and are applied to different service projects.

[0099] In one embodiment of the present invention, the API interface management permissions of users of different roles on the project server include at least one of the following: API interface viewing permissions, editing permissions, sharing request permissions, backup permissions, testing permissions, version modification permissions, etc.

[0100] The embodiment of the present invention also provides another cloud-based API unified management device. Figure 4 FIG. 1 shows a schematic diagram of the structure of a cloud API unified management device according to an embodiment of the present invention. Figure 4 In addition to the determination module 310, the allocation module 320, the acquisition module 330, and the display module 340, the cloud-based API unified management device 300 also includes a first adding module 350, a sharing module 360, a search module 370, an update module 380, and a second adding module 390.

[0101] The first adding module 350 is coupled with the allocation module 320, and is suitable for establishing a first corresponding relationship between each user role, its corresponding API interface management permission, and the interface information of the API interface with management permission, and adding the first corresponding relationship to the preset permission list after the allocation module 320 allocates the API interface management permission of the project server corresponding to the relevant service project to each user role.

[0102] The sharing module 360 ​​is coupled to the allocation module 320 and is suitable for receiving a sharing request for at least one API interface after the allocation module 320 allocates the API interface management authority of the project server corresponding to the relevant service project to each user role, wherein the sharing request carries the user role with which the at least one API interface is shared, and then, parsing the user role with which the at least one API interface is shared from the received sharing request, and allocating the management authority of at least one API interface to the shared user role.

[0103] The search module 370 is coupled to the sharing module 360 ​​and is adapted to search the preset permission list for the user role whose API interface is shared after the sharing module 360 ​​assigns at least one API interface management permission to the shared user role.

[0104] The update module 380 is coupled to the search module 370 and is adapted to update the interface information of the API interface with management authority and the corresponding API interface management authority in the preset authority list, if the search module 370 finds the user role of the shared API interface from the preset authority list;

[0105] The second adding module 390 is coupled to the searching module 370 and is suitable for establishing a second corresponding relationship between the user role of the shared API interface, the management authority of the shared API interface, and the interface information of the shared API interface if the searching module 370 fails to find the user role of the shared API interface from the preset permission list, and adding the second corresponding relationship to the preset permission list.

[0106] According to another aspect of the present invention, a computer storage medium is provided, which stores computer program code. When the computer program code runs on a computing device, the computing device executes the cloud API unified management method in any of the above embodiments.

[0107] According to another aspect of the present invention, there is also provided a computing device, comprising: a processor; a memory storing computer program code; when the computer program code is executed by the processor, the computing device executes the cloud API unified management method in any of the above embodiments.

[0108] According to any one of the above preferred embodiments or a combination of multiple preferred embodiments, the embodiments of the present invention can achieve the following beneficial effects:

[0109] In an embodiment of the present invention, the API interfaces of multiple project service ends to be uniformly managed in the cloud are first determined, and then the user roles respectively related to different service projects are obtained, and the API interface management rights of the project service end corresponding to the relevant service projects are assigned to each user role. Usually, the API interface management rights assigned to different user roles are also different. After receiving a login operation from any user, the user information of any user can be obtained based on the login operation, and the role of any user can be determined based on the user information, and then the interface information of the API interface corresponding to the API interface management rights previously assigned to the user can be obtained based on the role of any user, and the interface information of the obtained API interface can be displayed. Thus, the scheme of the embodiment of the present invention is adopted to assign different API interface management rights to users of different roles, so that after users of different roles log in their account information, the interface information of the API interface with management rights can be directly displayed to users of different roles, thereby effectively realizing the centralized and unified management of the API interfaces of different project service ends. Further, it can also be convenient to adjust the API interface management rights of the corresponding user roles in the future, so that users of the corresponding roles can communicate and share projects more conveniently for multiple different service projects with mutual cooperation.

[0110] Those skilled in the art can clearly understand that the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they are not further described here.

[0111] In addition, the functional units in various embodiments of the present invention may be physically independent of each other, or two or more functional units may be integrated together, or all functional units may be integrated into one processing unit. The above integrated functional units may be implemented in the form of hardware, or in the form of software or firmware.

[0112] Those skilled in the art can understand that if the integrated functional unit is implemented in the form of software and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can essentially or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, which includes a number of instructions to enable a computing device (such as a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention when running the instructions. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes.

[0113] Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware associated with program instructions (such as a computing device such as a personal computer, a server, or a network device), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of a computing device, the computing device executes all or part of the steps of the methods described in the embodiments of the present invention.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that within the spirit and principles of the present invention, the technical solutions described in the aforementioned embodiments can still be modified, or some or all of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate from the protection scope of the present invention.

Claims

1. A cloud API unified management method, comprising: Determine API interfaces of multiple project servers to be uniformly managed in the cloud, wherein the multiple project servers are applied to different service projects; Obtain user roles related to different service projects, and assign API interface management permissions of the project server corresponding to the relevant service project to each user role; When receiving a login operation of any user, obtaining user information of any user based on the login operation, and determining a role of the any user according to the user information; Obtaining interface information of the API interface that the arbitrary user has management authority over according to the role of the arbitrary user, and displaying the obtained interface information of the API interface; After allocating the API interface management authority of the project server corresponding to the relevant service project to each user role, it also includes: Receiving a sharing request for at least one API interface, wherein the sharing request carries a user role of the at least one API interface to be shared; The user role to which the at least one API interface is shared is parsed from the received sharing request, and management authority of the at least one API interface is allocated to the shared user role.

2. The method according to claim 1, wherein: Determine the API interfaces of multiple project servers in the cloud to be managed uniformly, including: Identify multiple project servers in the cloud that need to be managed uniformly; The interface information of the corresponding API interface is obtained for each project server, and the API interface of each project server is determined based on the interface information of the API interface.

3. The method according to claim 1 or 2, wherein: After assigning each user role the API interface management rights for the project server corresponding to its related service project, it also includes: A first correspondence is established between each user role, its corresponding API interface management authority, and interface information of the API interface for which it has management authority, and the first correspondence is added to the preset authority list.

4. The method according to claim 1, wherein: After allocating management rights of the at least one API interface to the shared user role, the method further includes: Search the preset permission list to see if there is a user role for the shared API interface; If so, the interface information of the API interface with management authority and the corresponding API interface management authority in the preset authority list that establishes a first correspondence with the user role of the shared API interface are updated; If not, a second correspondence is established between the user role of the shared API interface, the management authority of the shared API interface, and the interface information of the shared API interface, and the second correspondence is added to the preset authority list.

5. The method according to claim 1 or 2, wherein: Acquiring user information of any user based on the login operation, and determining the role of the any user according to the user information, including: Based on the login operation, obtain the cookie information corresponding to the arbitrary user and the user information of the arbitrary user; The role of the arbitrary user is determined according to the user information.

6. The method according to claim 1 or 2, wherein: The user information of any user includes: At least one of the login account, user ID, and project department of any user, wherein different project departments are responsible for different service projects.

7. The method according to claim 1 or 2, wherein: The management permissions of the project server API interface for users of different roles include at least one of the following: API interface viewing permission, editing permission, sharing request permission, backup permission, and testing permission.

8. A cloud API unified management device, comprising: A determination module, adapted to determine API interfaces of multiple project servers to be uniformly managed in the cloud, wherein the multiple project servers are applied to different service projects; The allocation module is suitable for obtaining user roles related to different service projects and allocating API interface management rights of the project server corresponding to the service project related to each user role; an acquisition module, adapted to, when receiving a login operation of any user, acquire user information of any user based on the login operation, and determine a role of the any user according to the user information; A display module, adapted to obtain, according to the role of the arbitrary user, the interface information of the API interface for which the arbitrary user has management authority, and to display the obtained interface information of the API interface; The sharing module is adapted to receive a sharing request for at least one API interface after the allocation module allocates the API interface management authority of the project server corresponding to the service project related to each user role, wherein the sharing request carries the user role to which the at least one API interface is shared; The user role to which the at least one API interface is shared is parsed from the received sharing request, and management authority of the at least one API interface is allocated to the shared user role.

9. The device according to claim 8, wherein: The determination module is further adapted to: Identify multiple project servers in the cloud that need to be managed uniformly; The interface information of the corresponding API interface is obtained for each project server, and the API interface of each project server is determined based on the interface information of the API interface.

10. The device according to claim 8 or 9, wherein: Also includes: The first adding module is suitable for establishing a first corresponding relationship between each user role, its corresponding API interface management permission, and the interface information of the API interface with management permission after the allocation module assigns the API interface management permission of the project server corresponding to the relevant service project to each user role, and adding the first corresponding relationship to the preset permission list.

11. The device according to claim 8, wherein: Also includes: a search module, adapted to search from a preset permission list whether there is a user role with the shared API interface after the sharing module assigns the management permission of the at least one API interface to the shared user role; an updating module adapted to update the interface information of the API interface with management authority and the corresponding API interface management authority in the preset authority list, if the search module finds the user role of the shared API interface from the preset authority list; The second adding module is suitable for establishing a second corresponding relationship between the user role of the shared API interface, the management authority of the shared API interface, and the interface information of the shared API interface if the search module fails to find the user role of the shared API interface from the preset permission list, and adding the second corresponding relationship to the preset permission list.

12. The device according to claim 8 or 9, wherein: The acquisition module is also adapted to: Based on the login operation, obtain the cookie information corresponding to the arbitrary user and the user information of the arbitrary user; The role of the arbitrary user is determined according to the user information.

13. The device according to claim 8 or 9, wherein: The user information of any user includes: At least one of the login account, user ID, and project department of any user, wherein different project departments are responsible for different service projects and are applied to different service projects.

14. The device according to claim 8 or 9, wherein: The management permissions of the project server API interface for users of different roles include at least one of the following: API interface viewing permission, editing permission, sharing request permission, backup permission, testing permission, and version modification permission.

15. A computer storage medium storing a computer program code, wherein when the computer program code is executed on a computing device, the computing device is caused to execute the cloud-based unified API management method according to any one of claims 1 to 7.

16. A computing device comprising: processor; a memory storing computer program code; When the computer program code is executed by the processor, it causes the computing device to execute the cloud-based unified API management method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Online service interface management method and device

    CN108205558A