RemoteFingerUnlock API Documentation
Remote Unlock API Documentation
Version: 1.0
This document is the official API reference for the Remote Unlock Module. It provides detailed information for all available endpoints, including authentication methods, request parameters, and expected response formats.
- Terms of Service: https://rfu.czqu.net
Disclaimer
The information provided by this [Website/Document/Service/Product] (hereinafter “the Service”) is for general informational purposes only. All information is provided in good faith, however, we make no representation or warranty of any kind, express or implied, regarding the accuracy, adequacy, validity, reliability, availability, or completeness of any information on the Service.
Under no circumstance shall we have any liability to you for any loss or damage of any kind incurred as a result of the use of the Service or reliance on any information provided on the Service. Your use of the Service and your reliance on any information on the Service is solely at your own risk.
The Service may contain (or you may be sent through the Service) links to other websites or content belonging to or originating from third parties. Such external links are not investigated, monitored, or checked for accuracy, adequacy, validity, reliability, availability, or completeness by us.
The content provided by this Service does not constitute professional advice of any kind (including but not limited to legal, financial, medical, or other professional advice). All content is for informational purposes only. Before taking any action based upon such information, we strongly encourage you to consult with the appropriate professionals. We do not provide any kind of professional advice.
Quick Start
Base URL
The base URL for all API requests is as follows:
1 | http://localhost:2091/api/v1 |
Or:
1 | https://localhost:2091/api/v1 |
The SSL certificate is auto-generated on startup.
Authentication
Most endpoints in this API require authentication via an API key. Please include the Authorization
field in the HTTP request header.
- Type:
apiKey
- Header Field Name:
Authorization
- Format:
Authorization: Bearer <YOUR_API_KEY>
Note:
<YOUR_API_KEY>
needs to be replaced with the actual authentication token you obtained upon login or from the system configuration. All endpoints that require authentication must carry this header, otherwise, a401 Unauthorized
error will be returned.
Common Response Format
All API responses follow a unified data structure to facilitate standardized client-side processing.
1 | { |
code
: A status code.0
usually indicates success, while other non-zero values represent different types of errors.msg
: A brief description of the response, such as “success” or a specific error message.data
: The actual data payload returned, which can be an object, an array, or null.request_id
: A unique identifier for this request, which can be used for troubleshooting.
API Endpoint Details
PC Control
POST /control-pc/{action}/
Controls the computer to perform a specified action, such as shutdown, standby, or lock.
- Authentication: ✅Required
- Description: Controls the computer based on the
action
parameter. Theshutdown
andstandby
actions can also include a delay time.
Path Parameters
Parameter Name | Type | Required | Enum Values | Description |
---|---|---|---|---|
action | string | Yes | shutdown , standby , lock | The type of action to perform. Respectively: shutdown, standby, lock. |
Query Parameters
Parameter Name | Type | Required | Description |
---|---|---|---|
delay | string | Yes | The delay time in seconds before execution. Only valid when action is shutdown or standby . |
shutdown_type | string | No | The type of shutdown. Only effective when action=shutdown . For example, it can be specified as “force” or “hybrid” (see below for available values). |
shutdown_type | Description |
---|---|
0 | No operation |
General | |
1 | Log off the current user |
2 | Force close all applications and shut down |
3 | Force close all applications and restart |
Windows Only | |
4 | Shut down but do not power off |
5 | Restart the computer |
6 | Force close all applications |
7 | Shut down and power off |
8 | Restart applications |
9 | Hybrid shutdown |
10 | Force close applications, shut down, and power off |
11 | Restart the computer and restart applications |
12 | Force close applications, restart, and restart applications |
13 | Shut down without powering off, then restart applications after shutdown |
14 | Hybrid shutdown and force close applications |
15 | Hybrid shutdown and restart applications |
16 | Hybrid shutdown, force close applications, and restart applications |
Responses
200 OK
: The command was sent successfully.400 Bad Request
: Invalid action type (action
is not in the enum list).500 Internal Server Error
: Failed to execute the action, possibly due to insufficient permissions or other system errors.
System
GET /info
Gets basic information about the software, such as its version.
- Authentication: ✅Required
Responses
200 OK
: Successfully retrieved information.500 Internal Server Error
: Internal server error.
GET /info/check_update
Checks if there are any available updates for the system.
- Authentication: ✅Required
- Description: Returns details of the latest available update, including the version number, update URL, and release notes.
Query Parameters
Parameter Name | Type | Required | Default Value | Description |
---|---|---|---|---|
lang | string | No | en | Specifies the language for the update information. |
Responses
200 OK
: Successfully retrieved update information.500 Internal Server Error
: Internal server error.
GET /info/language
Gets the currently configured system language.
- Authentication: ❌Not Required
Responses
200 OK
: Successfully retrieved the language setting.500 Internal Server Error
: Internal server error.
PATCH /info/language
Sets the system language.
- Authentication: ❌Not Required
Query Parameters
Parameter Name | Type | Required | Default Value | Description |
---|---|---|---|---|
lang | string | No | en | The target language to set. |
Responses
200 OK
: Language successfully set.500 Internal Server Error
: Internal server error.
GET /logs/{module}
Gets a real-time stream of system logs.
- Authentication: ✅Required
- Description: This endpoint establishes a long-lived connection to push system logs in real-time. The connection will remain open until closed by the client or an error occurs.
Path Parameters
Parameter Name | Type | Required | Description |
---|---|---|---|
module | string | Yes | Specifies which module’s logs to retrieve. In this document, the value must be service . |
Responses
200 OK
: Starts pushing the log stream (Content-Type: text/event-stream
).400 Bad Request
: An invalid module was specified.500 Internal Server Error
: Internal server error, e.g., the log buffer is unavailable.
Power Saving
POST /power-saving
Enables, disables, or sets power-saving mode to auto.
- Authentication: ✅Required
- Description: This function first writes the setting to the database. If the write is successful, it then applies the setting to the system. The value in the database will be updated even if the system application fails.
Query Parameters
Parameter Name | Type | Required | Default Value | Description |
---|---|---|---|---|
mode | string | No | auto | Power saving mode. Possible values are enable , disable , or auto . |
Responses
200 OK
: Power saving mode set successfully.400 Bad Request
: Invalid request parameters.500 Internal Server Error
: Internal server error.
GET /power-saving/status
Gets the current status of the power-saving mode.
- Authentication: ✅Required
Responses
200 OK
: Successfully retrieved the power-saving mode status.500 Internal Server Error
: Internal server error.
Network Interfaces
GET /interface
Gets a list of active network interfaces.
- Authentication: ✅Required
- Description: Returns a list of all active network interfaces on the current device, based on the specified IP version (IPv4 or IPv6).
Query Parameters
Parameter Name | Type | Required | Default Value | Enum Values | Description |
---|---|---|---|---|---|
type | string | No | 4 | 4 , 6 | IP protocol version. 4 for IPv4, 6 for IPv6. |
Responses
200 OK
: Successfully returned the list of network interfaces.400 Bad Request
: Incorrect request parameters.500 Internal Server Error
: Internal server error.
GET /interface/{ip}
Gets the MAC address corresponding to an IP address.
- Authentication: ✅Required
Path Parameters
Parameter Name | Type | Required | Description |
---|---|---|---|
ip | string | Yes | The IP address to query. |
Responses
200 OK
: Successfully retrieved the MAC address.400 Bad Request
: Invalid request format (e.g., invalid IP address).500 Internal Server Error
: Internal server error.
GET /interface/{ip}/all
Gets complete interface information for an IP address.
- Authentication: ✅Required
Path Parameters
Parameter Name | Type | Required | Description |
---|---|---|---|
ip | string | Yes | The IP address to query. |
Responses
200 OK
: Successfully retrieved interface information.400 Bad Request
: Invalid request format.500 Internal Server Error
: Internal server error.
User Authentication & Operations
POST /login
User login.
- Authentication: ✅Required (This might refer to basic client authentication to exchange for a longer-lived token)
- Description: Authenticates using a username and password. On success, it returns a JWT (JSON Web Token) to be used for subsequent authenticated API requests.
Request Body
1 | { |
- Schema:
LoginRequest
Responses
200 OK
: Authentication successful. Thedata
field of the response will contain the JWT Token.400 Bad Request
: Invalid request parameters (e.g., empty username or password).500 Internal Server Error
: Internal server error.
POST /unlock
Unlock your computer.
- Authentication: ❌Not Required
- Description: Sends the computer’s username and password to perform the unlock operation.
Request Body
1 | { |
- Schema:
PcUserInfo
Responses
200 OK
: Unlock successful.400 Bad Request
: Invalid request format.500 Internal Server Error
: Internal error (e.g., incorrect username or password, unlock failed).
Miscellaneous
GET /ping
Service health check (Ping).
- Authentication: ❌Not Required
- Description: Used to check if the service is running correctly, or the status of specific sub-services (like WebSocket).
Query Parameters
Parameter Name | Type | Required | Enum Values | Description |
---|---|---|---|---|
type | string | No | ws , pairing | The type of probe. ws might be for testing the WebSocket service, pairing for the pairing service. |
Responses
200 OK
: Service is OK.500 Internal Server Error
: Service is not available.
Data Models (Definitions)
LoginRequest
The credentials object used for user login.
Field Name | Type | Required | Description |
---|---|---|---|
username | string | Yes | Username |
password | string | Yes | Password |
PcUserInfo
The user information object used to unlock the computer.
Field Name | Type | Required | Description |
---|---|---|---|
username | string | No | The computer’s username |
password | string | No | The computer’s login password |
ResponseData
The common data structure for all API responses.
Field Name | Type | Description |
---|---|---|
code | integer | Business status code, 0 indicates success |
data | object | The actual returned data |
msg | string | A message providing details |
request_id | string | The unique ID for this request |