01

From time to time, some research and development partners have complained to me that many enterprises will directly purchase and use third-party open apis due to human and financial constraints or lack of demand. As a result,

For one thing, since open projects are not tailor-made, it takes a lot of time to search for the right interface. Secondly, in this cooperation mode, API providers usually only provide the call permission and an interface document, and the interface data can only be manually copied to the debugging tool one by one, which is time-consuming and laborious.

Based on the above two pain points, the solution I recommend to you is a project called API Hub.

GitHub also has open APIs such as public APIs, but only does data collection work, and interface debugging tools only provide debugging functions, but few of both.

The innovation of API Hub lies in that it not only summarizes popular open API interfaces, but also provides a series of debugging, mock, test and other functions. Developers can directly compare and select the appropriate API on the API Hub, and then directly initiate debugging in the API Hub. The whole process is completed in one go, saving time and effort.

So the IDEA of an API Hub is a good one, and worth a little space.

02

API Hub is a relatively independent module of domestic API management tool Apifox.

Apifox supports API document management, API debugging, API Mock, API automated testing, is a back-end, front-end, testing can be used to one-stop interface management platform, so its official website written slogan is Apifox=Swagger+Postman+Mock+Jmeter.

API Hub includes popular API open projects of major domestic manufacturers, such as enterprise wechat API, Kuaishou open API and Douyin open API, which are still being included. On the other hand, it relies on Apifox and provides debugging, mocking, and so on to open apis.

Convenience is visible to developers who want access to open projects:

  1. For specific requirements, developers can quickly search API projects with similar functions in the API Hub for comparison, and select the API that best matches their projects and requirements to improve screening efficiency
  2. Developers can initiate debugging directly from the API Hub
  3. In the API Hub, the interface and the document are one and the same, and you can view the interface description and function directly
  4. Open projects in the API Hub can also mock without configuration to meet the need for exception scenario debugging.

So let me show you how to use it.

03

Most open projects require you to apply for call permission first. For some open apis, you can apply directly on the official website according to its prompts to obtain the equivalent value of APIkey and client_secret. Some require the enterprise to go through the purchase process, for those who want to practice can find the former, for enterprise developers can hand over the latter to the business.

Once you have the call permission, you can start debugging. In the API Hub, you can view the interface documentation directly, or go directly to the project to initiate debugging.

You can view the details of an interface document and debug the interface:

You can also directly enter the debugging interface of the project:

Project Debugging interface

04 API debugging

Apifox is as good as Postman — it does all the things Postman does. It also supports visual assertions, database connections, external functions and scripts, multiple languages, environment variable Settings, and more.

Multiple authentication modes are supported:The front and back operations support a variety of auxiliary functions:A. Support visual assertion, easy to judge whether there is a problem with returned data in the scenario of multiple interface calls and complex parameters;

B. Support the extraction of variables to save in the project global variables, can achieve data transfer between interfaces

C. Support linked database, you can directly use enterprise business data for debugging, debugging results more real

D. Support custom scripts to meet the specific needs of various types of developers, in addition to support calls to Java, Python, PHP and other 130 programming languages written by external programs;

Of course, this ensures that the computer has Java, Python, NodeJS, etc., installed to run the program.

05 API mock

The front-end interface often needs to be exception compatible for some back-end exception return scenarios, but the open API debugging support for such exception scenarios is insufficient. You can use the API Mock functionality provided by Apifox. Use the mock service directly when debugging. When you set parameters like body/ Query to a value in advanced mock-new expectations, the interface returns the specific data you need

The expectation of a successful save is displayedSenior mockOn TAB, you can directly use the quick debugging function to debug the front-end interfaceThe mock function provided by Apifox is very powerful. It has built-in mock rules for common business data such as email and ID card. You can directly select the mock rules to mock out highly realistic business data.

If your project data has a specific data type, you can customize your own mock rules. In the project Setting-Mock Settings, you can use wildcards or regular expressions to construct the data you need to debug.

06 For open project work providers

If you are an open project provider, you can also apply to submit your open API project to the API Hub for operation and maintenance.

Apifox is currently in a period of rapid growth, and once the number of users increases to a certain level in the future, it will bring considerable exposure to open projects in API Hub.

In addition, Apifox interface and documentation are integrated, and modification of the documentation and interface can be synchronized to all developers who call the open API in real time, eliminating the need for a lot of communication and notification of project interface upgrades or iterations.

In addition, the visual interface design interface of Apifox is very simple and easy to operate. If developers want to design interfaces in Apifox, writing documentation, learning cost is very low.

For old projects that want to be migrated to Apifox for maintenance, you can directly import swagger, Postman and other project data in project Settings — Data Import.

08 download

Apifox client API Hub is an independent module, can be used after downloading and installing Apifox:There is also a web version of API Hub, but the web version does not currently support mock services, so the client experience is better.

Client download address:www.apifox.cn/?utm_source…API Hub url:www.apifox.cn/apihub/?utm…