List¶
GET /api/v1/field_cfg/list
Overview¶
Lists the custom field configurations of the current workspace and the visible built-in field configurations in pages.
Before You Begin and Usage Steps¶
Use the API Key of the target workspace. This configuration adds display aliases, descriptions, units, and categories to existing fields; it does not create collection fields, modify actual data types, or backfill historical data. Custom configurations with the same field source and exactly the same name (case-sensitive) cannot be duplicated; different sources may share the same name.
Search by name/alias keyword and read page by page. Custom fields are returned first, then appended with built-in fields that are not overridden by a custom configuration with the same source and the same name; each group is sorted by name separately, not globally merged. Leading and trailing spaces in search are trimmed, and % and _ in the database LIKE still have wildcard meanings. Accept-Language selects the display language: zh/en/zh-Hant/id/ja/ko; if omitted, the site default is used. Chinese searches name/Chinese alias, English searches name/English alias, and the other four languages also search the alias/description in the current language as well as the Chinese and English aliases. The list is not forcibly cached, and an empty page is a normal result. Search the two field groups separately first and then compute the override, so custom override entries that do not match search do not participate in hiding; to verify the complete override relationship, clear search first. coverInner is only a display hint, and rows with the same name from different sources may also carry true, so this key alone cannot be used to determine the result.
The list desc/alias is displayed with language fallback (zh→en, en→zh, zh-hant→zh→en, others→en→zh); the multilingual mappings retain their original values. Preserve the complete configuration before modification; built-in rows with sysField=1 are for reference only.
Request Headers¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| Accept-Language | string | Optional. Affects the display and search of the list, but does not change the saved multilingual mappings. Example: zhHow to get or fill in: Select a supported request language; if omitted, the site default language is used. |
|
| DF-API-KEY | string | Y | OpenAPI authentication credential of the workspace. Example: <DF-API-KEY>How to get or fill in: Obtain an OpenAPI Key with the required permissions from the API Key management of the target workspace. |
Query Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| search | string | Optional fuzzy search; this is not filtering by field source. Null allowed: False Example: hostHow to get or fill in: Enter an actual name or alias keyword; omit it or use an empty string to query all. |
|
| pageIndex | integer | Optional, defaults to 1, minimum 1. Null allowed: False $minValue: 1 Example: 1How to get or fill in: Set to 1 for the first request, and paginate using pageInfo.totalCount. |
|
| pageSize | integer | Optional, controller default 100, maximum 1000. Null allowed: False $minValue: 1 $maxValue: 1000 Example: 20How to get or fill in: Choose a value from 1 to 1000 according to client capacity. |
Additional Parameter Notes¶
Field management configuration priority: for the same source and the same name, custom overrides built-in. Details and modifications must use the configuration UUID; the actual collection field name is still name.
Request Example¶
curl --get 'https://openapi.truewatch.com/api/v1/field_cfg/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-urlencode search=host \
--data-urlencode pageIndex=1 \
--data-urlencode pageSize=20
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.data | array<object> | Field configurations of the current page: custom fields first, followed by built-in fields that are not overridden, each sorted by name. |
| content.declaration | object | Public declarations of the workspace. |
| content.data[].uuid | string | Field configuration UUID; use this value for subsequent operations, not the actual field name. |
| content.data[].name | string | Actual field name, case-sensitive. |
| content.data[].alias | string | Alias; the list displays it in the requested language, while details/create/modify retain the compatible field value. |
| content.data[].aliasEn | string | Compatible English alias; may fall back to Chinese. |
| content.data[].aliasI18n | object | Raw alias mappings in six languages; an empty language value does not necessarily mean the display is empty. |
| content.data[].desc | string | Description; the list displays it in the requested language, while other responses return the compatible field value. |
| content.data[].descEn | string | Compatible English description; may fall back to Chinese. |
| content.data[].descI18n | object | Raw description mappings in six languages. |
| content.data[].fieldType | string | Configured data type; does not change the actual collected field type. Historical built-in records may have values other than the new Body. |
| content.data[].fieldSource | string | Applicable source; an empty string indicates a general configuration. |
| content.data[].unit | string | Display unit; forced to be empty when saved with fieldType=string. |
| content.data[].sysField | integer | 1 for built-in, 0 for custom. Built-in configurations cannot be modified or deleted through this API. |
| content.data[].category | string | system for system fields, business for business fields, other for others; old records may be empty. |
| content.data[].creator | string | Creator identity; may be an API Key or a system identity. |
| content.data[].updator | string | Updater identity; an empty string if not yet updated. |
| content.data[].createAt | integer | Creation time, Unix seconds. |
| content.data[].updateAt | integer | Update time, Unix seconds; may be -1 if not yet updated. |
| content.data[].aliasI18n.zh | string | Raw zh alias; usually empty when not provided; the list display falls back by language. |
| content.data[].aliasI18n.en | string | Raw en alias; usually empty when not provided; the list display falls back by language. |
| content.data[].aliasI18n.zh-hant | string | Raw zh-hant alias; usually empty when not provided; the list display falls back by language. |
| content.data[].aliasI18n.id | string | Raw id alias; usually empty when not provided; the list display falls back by language. |
| content.data[].aliasI18n.ja | string | Raw ja alias; usually empty when not provided; the list display falls back by language. |
| content.data[].aliasI18n.ko | string | Raw ko alias; usually empty when not provided; the list display falls back by language. |
| content.data[].descI18n.zh | string | Raw zh description; usually empty when not provided; the list display falls back by language. |
| content.data[].descI18n.en | string | Raw en description; usually empty when not provided; the list display falls back by language. |
| content.data[].descI18n.zh-hant | string | Raw zh-hant description; usually empty when not provided; the list display falls back by language. |
| content.data[].descI18n.id | string | Raw id description; usually empty when not provided; the list display falls back by language. |
| content.data[].descI18n.ja | string | Raw ja description; usually empty when not provided; the list display falls back by language. |
| content.data[].descI18n.ko | string | Raw ko description; usually empty when not provided; the list display falls back by language. |
| content.data[].coverInner | boolean | Optional display hint; not sufficient on its own to prove overriding within the same source: only the name is recorded during calculation, so custom rows with the same name from another source may also carry true. Clear search and verify with fieldSource and name; other rows may not have this key. |
| content.data[].creatorInfo | object | Identity information; {} if not found; for system identities only some keys may be returned. |
| content.data[].creatorInfo.uuid | string | Identity UUID; subject to the actual response. |
| content.data[].creatorInfo.status | integer | Identity status; subject to the actual response. |
| content.data[].creatorInfo.wsAccountStatus | integer | Workspace member status; subject to the actual response. |
| content.data[].creatorInfo.username | string | Username or Key name; subject to the actual response. |
| content.data[].creatorInfo.name | string | Name; subject to the actual response. |
| content.data[].creatorInfo.email | string | Email or Key identifier, not guaranteed to be in email format; subject to the actual response. |
| content.data[].creatorInfo.mobile | string | Mobile number, may be empty; subject to the actual response. |
| content.data[].creatorInfo.countryCode | string | Country code, may be omitted; subject to the actual response. |
| content.data[].creatorInfo.iconUrl | string | Icon URL, may be omitted; subject to the actual response. |
| content.data[].creatorInfo.acntWsNickname | string | Workspace nickname, may be omitted; subject to the actual response. |
| content.data[].updatorInfo | object | Identity information; {} if not found; for system identities only some keys may be returned. |
| content.data[].updatorInfo.uuid | string | Identity UUID; subject to the actual response. |
| content.data[].updatorInfo.status | integer | Identity status; subject to the actual response. |
| content.data[].updatorInfo.wsAccountStatus | integer | Workspace member status; subject to the actual response. |
| content.data[].updatorInfo.username | string | Username or Key name; subject to the actual response. |
| content.data[].updatorInfo.name | string | Name; subject to the actual response. |
| content.data[].updatorInfo.email | string | Email or Key identifier, not guaranteed to be in email format; subject to the actual response. |
| content.data[].updatorInfo.mobile | string | Mobile number, may be empty; subject to the actual response. |
| content.data[].updatorInfo.countryCode | string | Country code, may be omitted; subject to the actual response. |
| content.data[].updatorInfo.iconUrl | string | Icon URL, may be omitted; subject to the actual response. |
| content.data[].updatorInfo.acntWsNickname | string | Workspace nickname, may be omitted; subject to the actual response. |
| pageInfo.pageIndex | integer | Current page, starting from 1. |
| pageInfo.pageSize | integer | Number of entries per page. |
| pageInfo.count | integer | Number of entries on the current page. |
| pageInfo.totalCount | integer | Total number of entries after merging and built-in overriding. |
{
"code": 200,
"content": {
"data": [
{
"uuid": "field_example",
"name": "host",
"alias": "主机",
"aliasEn": "Host",
"aliasI18n": {
"zh": "主机",
"en": "Host",
"zh-hant": "主機",
"id": "",
"ja": "",
"ko": ""
},
"desc": "主机名称",
"descEn": "Host name",
"descI18n": {
"zh": "主机名称",
"en": "Host name",
"zh-hant": "主機名稱",
"id": "",
"ja": "",
"ko": ""
},
"fieldType": "string",
"fieldSource": "logging",
"category": "business",
"unit": "",
"sysField": 0,
"creator": "wsak_example",
"updator": "",
"createAt": 1785427200,
"updateAt": -1,
"creatorInfo": {},
"updatorInfo": {}
}
],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE",
"pageInfo": {
"pageIndex": 1,
"pageSize": 20,
"count": 1,
"totalCount": 1
}
}
Error Responses¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Handling |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | An undeclared Query parameter is used or a parameter violates the rules | Parameter parsing failed | Check the Query parameter table and examples. |
| 500 | ft.InternalServerError | Query, identity enrichment, or response formatting failed | Internal error | Keep the traceId and retry; if it persists, contact the administrator. |