Local Library Data Interface

Note: The local library data interface is independent of the client and operates completely separately. It is a standalone logging system. The recorded data can be viewed on the “Operation Log > Local Library Data” page and can also be queried using the API. This feature helps script authors and users in logging custom data, or can serve as a simple local database.

Paginated Query of Log List

POST: /extralog/list

// Example of request body
{
  "page": 0,
  "page_size": 10,
  "search_key": "",
  "search_value": "",
  "order_by": "desc"
}
  • Parameter Details

Parameter
Type
Required
Description

page

int

Yes

Page number, starting from 0

page_size

int

Yes

Number of records per page, default is 10

search_key

string

Yes

Search field, specific fields refer to the add interface

search_value

string

Yes

Search value for the field, performs fuzzy search based on this value

order_by

string

No

Sorting parameter, default is by id, options: desc or asc | asc

Add Log

POST: /extralog/add

// Example of request body
{
  "log_key": "666",
  "log_name": "i am name",
  "log_value": "de333f",
  "log_type": "Browser",
  "log_desc": "i am a desc",
  "log_remark": "remark",
  "log_extra_info": "Custom info content, can store serialized structured data like stringified JSON"
}
  • Parameter Details

Parameter
Type
Required
Description

log_name

string

Yes

Custom name name

log_key

string

Yes

Custom key, allows the user to generate a unique key for each record, making it easier to use

log_type

string

Yes

Custom type, logs can be categorized for easier searching

log_value

string

Yes

Custom value, can be used for storing values or other data

log_desc

string

No

Custom description desc

log_remark

string

No

Custom remark remark

log_extra_info

string

No

Custom info content, can store serialized structured data like stringified JSON

Update Log

The update interface fields are the same as the add interface. You must include the id field, and only the fields that need to be modified should be provided. There is no need to pass all fields.

// Example of request body
{
  "id": 122,
  "log_name": "I'm log name"
}
  • Parameter Details

Parameter
Type
Required
Description

id

int

Yes

Record ID

...

string

No

Other fields are the same as in the Add Log section

Delete Log

POST: /extralog/delete

// Example of request body
{
  "id": 12
}

Get Log Details

POST: /extralog/detail

// Example of request body
{
  "id": 12,
  "name": "dsds"
}

```
// 返回详情数据示例
{
  "success": true,
  "data": {
    "id": 8,
    "log_username": "username",
    "log_userid": "3dsd3dsdd3dsdsdssds3dsssddsdsd",
    "created_time": "2024-07-03 10:11:32",
    "log_name": "i am name",
    "log_key": "33",
    "log_type": "Browser",
    "log_value": "Log value",
    "log_desc": "i am a desc",
    "log_remark": "remark",
    "log_extra_info": "0.0"
}
}

Clear All Log Records (No Parameters)

Warning: This interface will clear all local log data. This action cannot be undone, so use it with caution.

POST: /extralog/clear

Last updated