Get form list
Returns the forms visible to the current account. Supports fuzzy search via search_key on form title, note, and number, and exact lookup via number.
The response has two main parts:
data.list: forms on the current pagedata.page: pagination state to detect whether another page exists
Request example
python
import requests
url = "https://open.cli.im/api/v2/rpc/record/getFormList"
data = {
"page": 1,
"page_size": 10,
"search_key": "设备",
"number": "D32"
}
headers = {
"Authorization": "Bearer <your API Key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=data, headers=headers)
print(response.text)bash
curl -X POST 'https://open.cli.im/api/v2/rpc/record/getFormList' \
-H 'Authorization: Bearer <your API Key>' \
-H 'Content-Type: application/json' \
-d '{"page":1,"page_size":10,"search_key":"设备","number":"D32"}'Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number, default 1 |
page_size | integer | No | Page size, default 10, max 20 |
search_key | string | No | Fuzzy keyword matching title, note, and number |
number | string | No | Exact form number, e.g. D32 |
Notes:
search_keyandnumbercan be used alone or together.- When both are sent, the server applies combined filters.
- Pagination is page-based; use
data.page.current_pagevsdata.page.last_pageto decide if more pages exist.
Request body example
json
{
"page": 1,
"page_size": 10,
"search_key": "设备",
"number": "D32"
}Full response example
json
{
"code": 0,
"message": "",
"data": {
"version": "v1",
"list": [
{
"id": 122507,
"name": "设备巡检",
"type": 0,
"type_text": "普通表单",
"number": "D32",
"note": "每日设备巡检记录",
"created_at": 1740623881,
"created_at_iso": "2025-02-27 10:38:01(UTC+08:00)",
"updated_at": 1740710281,
"updated_at_iso": "2025-02-28 10:38:01(UTC+08:00)",
"active_at": 1740796681,
"active_at_iso": "2025-03-01 10:38:01(UTC+08:00)",
"project": {
"id": 1104,
"name": "小米园区",
"number": "F1"
}
},
{
"id": 122508,
"name": "安全检查",
"type": 0,
"type_text": "普通表单",
"number": "D62",
"note": "",
"created_at": 1740710281,
"created_at_iso": "2025-02-28 10:38:01(UTC+08:00)",
"updated_at": 1740710281,
"updated_at_iso": "2025-02-28 10:38:01(UTC+08:00)",
"active_at": 0,
"active_at_iso": "",
"project": null
}
],
"page": {
"current_page": 1,
"last_page": 3,
"per_page": 10,
"total": 42
}
}
}Response overview
| Path | Type | Description |
|---|---|---|
code | integer | Platform code; 0 is success |
message | string | Message; often empty on success |
data | object | Business wrapper |
data.version | string | Payload version, currently v1 |
data.list | array | Form list |
data.page | object | Pagination info |
data.list item fields
| Field | Type | Description |
|---|---|---|
id | integer | Form ID |
name | string | Form name |
type | integer | Form type code |
type_text | string | Form type label |
number | string | Form number (unique per org, e.g. D32) |
note | string | Form note |
created_at | integer | Created at (Unix seconds) |
created_at_iso | string | Created at formatted, e.g. 2025-02-27 10:38:01(UTC+08:00) |
updated_at | integer | Updated at (Unix seconds) |
updated_at_iso | string | Updated at formatted |
active_at | integer | Last active time (Unix seconds; 0 if none) |
active_at_iso | string | Active time formatted; often "" when absent |
project | object|null | Project (partition); null if not linked |
data.list[].project fields
When data.list[].project is not null:
| Field | Type | Description |
|---|---|---|
id | integer | Project ID |
name | string | Project name |
number | string | Project number |
data.page object
| Field | Type | Description |
|---|---|---|
current_page | integer | Current page |
last_page | integer | Last page index |
per_page | integer | Page size |
total | integer | Total form count |
Pagination
| Scenario | Description |
|---|---|
| First request | page may be omitted; defaults to 1 |
| Next page | Increment page and call again |
| More pages? | Compare current_page to last_page |
| Empty page | list is []; total may be 0 |
When data.page.current_page >= data.page.last_page, you are usually on the last page.
Empty list example
json
{
"code": 0,
"message": "",
"data": {
"version": "v1",
"list": [],
"page": {
"current_page": 1,
"last_page": 1,
"per_page": 10,
"total": 0
}
}
}Error response
On failure the response is non-success and may include:
json
{
"code": 400,
"error_code": 100300,
"message": "System error",
"message_detail": ""
}| Field | Type | Description |
|---|---|---|
code | integer | HTTP or platform error status |
error_code | integer | Business error code |
message | string | Error summary |
message_detail | string | Detail; may be empty |
Full error codes: Error codes.