Skip to content

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 page
  • data.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

ParameterTypeRequiredDescription
pageintegerNoPage number, default 1
page_sizeintegerNoPage size, default 10, max 20
search_keystringNoFuzzy keyword matching title, note, and number
numberstringNoExact form number, e.g. D32

Notes:

  • search_key and number can be used alone or together.
  • When both are sent, the server applies combined filters.
  • Pagination is page-based; use data.page.current_page vs data.page.last_page to 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

PathTypeDescription
codeintegerPlatform code; 0 is success
messagestringMessage; often empty on success
dataobjectBusiness wrapper
data.versionstringPayload version, currently v1
data.listarrayForm list
data.pageobjectPagination info

data.list item fields

FieldTypeDescription
idintegerForm ID
namestringForm name
typeintegerForm type code
type_textstringForm type label
numberstringForm number (unique per org, e.g. D32)
notestringForm note
created_atintegerCreated at (Unix seconds)
created_at_isostringCreated at formatted, e.g. 2025-02-27 10:38:01(UTC+08:00)
updated_atintegerUpdated at (Unix seconds)
updated_at_isostringUpdated at formatted
active_atintegerLast active time (Unix seconds; 0 if none)
active_at_isostringActive time formatted; often "" when absent
projectobject|nullProject (partition); null if not linked

data.list[].project fields

When data.list[].project is not null:

FieldTypeDescription
idintegerProject ID
namestringProject name
numberstringProject number

data.page object

FieldTypeDescription
current_pageintegerCurrent page
last_pageintegerLast page index
per_pageintegerPage size
totalintegerTotal form count

Pagination

ScenarioDescription
First requestpage may be omitted; defaults to 1
Next pageIncrement page and call again
More pages?Compare current_page to last_page
Empty pagelist 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": ""
}
FieldTypeDescription
codeintegerHTTP or platform error status
error_codeintegerBusiness error code
messagestringError summary
message_detailstringDetail; may be empty

Full error codes: Error codes.