API low-code development: Interface Master, a product framework for developing, managing and providing interfaces

Table of contents

1. Introduction

2. “Utensils” have their uses 

3. "Three major" platform/system user manuals

⭐️1. API interface system manual⭐️

Access online interface

Online interface document list

Interface document details page

Search interface

⭐️2. Platform open platform manual⭐️

Visit the open platform

Register and log in to your developer account

Create app

View interface permissions

Call development interface

Get interface access token

Compare three ways to obtain tokens:

Call open interface

⭐️3. Admin management background manual⭐️

Visit the management backend Edit

Log in to the management background

Use the management backend

Account management

Application management

Interface management (permissions, design, testing)

Material library

Configuration management

Scheduled Tasks

Database management

statistics

Management background permission allocation

Open platform permission allocation

4. Summary


1. Introduction

  • PhalApi Pro is the professional version of the PhalApi open source interface framework . Based on the mainstream PHP+MySQL, it can be used to develop interface systems, build open platforms, and effectively manage developers, applications, interfaces and permissions. Through open platforms, resources can be quickly integrated, and with the help of Internet technologies such as SaaS services, Serverless, cloud services, big data, and open interfaces, end customers, developers, partners, suppliers, and enterprises can be connected to form a closed business loop.

  • The professional version includes three subsystems: API interface system, Platform open platform and Admin management background, which can be quickly used for interface development management and open platform construction.

  • Interface Master (5 in 1), including: OpenAPI interface system, Docs online interface documentation, Platform open platform, Admin management background Wiki technical documentation.

2. “Utensils” have their uses 

PhalApi Pro interface master is a set of product frameworks, software source codes and solutions for developing, managing and providing interfaces. Can be used to quickly build your: OpenAPI, API open platform, data platform, PaaS platform, SaaS software, etc.

It is developed based on the front-end and back-end separation technology stack. The back-end uses the PHP development language and PhalApi open source interface framework, and the front-end uses Vue and iView. The characteristics of Interface Master are: lower technical requirements, faster deployment (visual installation), wider application scenarios, and the ability to immediately open API interfaces and share data, which can reduce the project development cycle by more than 30+ days.

3. "Three major" platform/system user manuals

⭐️1. API interface system manual⭐️

Including all API interfaces, online interface codes can be automatically generated, and comprehensive and flexible interface permissions can be assigned. Developed based on PhalApi 2.x, using the classic LNMP architecture, it can also be deployed and run on Apache and Windows systems. Back-end development engineers are responsible for development and provide API interfaces for developers and clients to use.

All interfaces can be browsed through the online interface documentation. After logging in, the administrator can view all internal interfaces.

Access online interface

Online interface document list

Interface document details page

After filling in the interface parameters, you can perform online interface testing:

Search interface

You can search for interfaces, fuzzy matching interface names and interface descriptions, and interface English names.

⭐️2. Platform open platform manual⭐️

It is provided for developers of the platform to perform operations such as application management and viewing interface permissions. Developed based on iView Admin, it adopts front-end and back-end separation technology solutions.

The main usage process for novice developers is:

Visit the open platform

Register and log in to your developer account

Enter the developer registration page, fill in the registration information as prompted, then submit and log in.

Create app

Enter [Application Management]-[My Application]-[Create New Application], fill in the relevant information as required, confirm the submission, and then wait for the administrator's review.

Fill in application information:

After creating a new application, wait for administrator review.

View the app key:

After the application is approved, you can view the application's interface permissions.

View interface permissions

After the administrator assigns interface permissions, the required open interface API can be called.

Call development interface

Before developers call open interfaces, they need to register a developer account, create a new application and wait for approval by the administrator, and can only call interfaces with assigned permissions.

Get interface access token

First, developers need to create a new access token based on the applied app_key and app_secret. You can use the interface App.Auth.ApplyToken  to apply for an access token interface.

The interface operation guide is as follows. Enter the online interface document and select [App.Auth.ApplyToken].

Enter the app_key and secret key of the application to obtain the token:

After the application is successful, the interface will return the access_token access token and expire_at validity time.

{
    "ret": 200,
    "data": {
        "access_token": "访问令牌",
        "expire_at": 1580442248
    },
    "msg": ""
}

Compare three ways to obtain tokens:

interface application app_key application key Member login account Member login password Remark
App.Auth.ApplyToken need need unnecessary unnecessary uid can be specified
App.Auth.UserLogin unnecessary unnecessary need need App_key can be specified
App.Auth.AppUserLogin need need need need Automatically bind uid and app_key

Call open interface

Next, you can access other open interfaces based on the access_token access token.

It should be noted that if some open interfaces require member login, the developer should use the App.User.UserLogin member login interface to generate an access token with member login status based on the member login account, password and app_key.

Warm reminder: If the open interface needs to detect the member login status, the developer application needs to call the App.User.UserLogin member login interface to generate an access token.

⭐️3. Admin management background manual⭐️

Provided to administrators for comprehensive daily management. Developed based on iView Admin, it adopts front-end and back-end separation technology solutions.

Visit the management backend 

Log in to the management background

To open the management background, you first need to log in as an administrator. The login interface is as follows:

The administrator account password is set by the user during the installation wizard. If you forget your administrator account, you can check the member database table; if you forget your password, you need to reinstall it.

Use the management backend

After entering the management background, you can see a background homepage similar to the following:

For other functional modules, just follow the interface guidance.

The following is a brief introduction to the functions of the management backend. The latest interface shall be subject to the latest version.

Account management

Manage and view all accounts, including those of administrators, developers and members, and manage accounts, such as changing passwords, modifying information, and creating accounts.

Application management

Client applications can be managed, such as reviewing developer applications, viewing application information, limiting the number of application interface calls, disabling or restoring, etc.

Interface management (permissions, design, testing)

It can allocate and manage interface permissions (permission allocation), perform visual interface design (interface development), and implement automated black-box testing of interfaces (interface testing).

Interface permissions:
Assign interface permissions to the developer role:

Create interface authorization rules:

Interface design: You can generate and save interface code online, create database tables, and generate corresponding CURD universal data interfaces.

Automatically generated API code example: 

Interface test:

Material library

Manage uploaded images and documents:

Configuration management

Dynamic configuration:

Scheduled Tasks

To schedule tasks regularly, you need to add crontab configuration and start background tasks.

Through crontab -e, add the following scheduled tasks:

# PhalApi Pro 计划任务
*/1 * * * * php /path/to/phalapi-pro/bin/run_task.php > /dev/null

Database management

It can count the database capacity and visualize the statistics intuitively.

You can also view the real-time database process to know what queries and operations are currently taking place.

statistics

Interface statistics:

Registration statistics and login statistics:

Management background permission allocation

Click [Permissions]-[Management Background Permission Assignment] to assign permissions to the administrator for the functional operations of the management background.

Warm reminder: Only super administrators have the authority to assign permissions.

Add a new operation. If there is a new menu, you can add a new operation and then assign permissions.

Among them, the URI link is the page path of the management background. It does not require a domain name. It does not need /admin/to correspond to the path behind the page.

Assign management backend menu operation permissions to the administrator role:

Warm reminder: The super administrator has all the permissions to manage the backend and does not need to be assigned.

You can also assign management backend menu permissions to individual account IDs:

Open platform permission allocation

Permissions can be assigned to developers for open platform operations.

Warm reminder: Only super administrators have the authority to assign permissions.

Add a new operation. If there is a new menu, you can add a new operation and then assign permissions.

Assign the menu operation permissions of the open platform to the developer role:

Warm reminder: Administrators (including ordinary administrators, super administrators, and newly added custom administrators) have all permissions on the open platform and do not need to be assigned.

It is also possible to individually assign the operating permissions of the open platform to individual developer account IDs.

4. Summary


Interface Master has complete functions and powerful performance. The only drawback is that the professional version is not cheap.

Of course, Interface Master also has free open source frameworks:

Address: https://github.com/phalapi/phalapi.git

In short,

If you are a front-end developer and need to use API interfaces to develop your own applications or implement your own business, but do not want to suffer from complex backends, databases, servers, operation and maintenance, interface development, etc., you can directly use Guochuang Cloud YesApi's zero Code development platform and free API interface.

If you are a PHP developer and need to develop API interfaces for your own front-end, you can use the PhalApi open source interface framework to quickly develop your own API interfaces based on PHP language.

If you are a project leader, product manager or technical TL, and you need to open API interfaces for external developers, customers or other companies to use, you can use Interface Master to quickly deploy your own OpenAPI and open platform.

Guess you like

Origin blog.csdn.net/flyTie/article/details/126109693