Skip to content

Modify



POST /api/v1/field_cfg/{field_uuid}/modify

Overview

Modify the custom field configuration and multilingual display in the current workspace.

Prerequisites and Usage Steps

Use the API Key of the target workspace. This configuration adds a display alias, description, unit, and category to an existing field; it does not create a collection field, change the actual data type, or backfill historical data. Custom configurations with the same field source and an identically cased name cannot be duplicated; different sources may use the same name.

A modification must fully specify name, fieldType, fieldSource, category, and unit; these configuration items are overwritten. Multilingual data for alias/desc is merged: languages not submitted are retained, and the display may fall back after an explicit empty value. Only valid custom records in the current workspace are allowed; built-in records cannot be modified.

The cache is cleared after the write is committed; if the database write succeeds but cache clearing fails, a 500 may still be returned. On failure, first verify through the list/details whether the record was created or modified instead of rebuilding it directly; the same-name concurrency protection may reject temporarily. After success, read back to confirm the configuration; refresh of the data query display depends on the corresponding cache and query path.

Route Parameters

Parameter Type Required Description
field_uuid string Y UUID of a valid field configuration in the current workspace. Built-in configurations usually belong to the system workspace; being visible in the list does not mean the details can be read in the current workspace.
Example: field_example
How to obtain or fill in: Read the uuid of the target row with sysField=0 from the field list; do not use the field name.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or fill in: Obtain from the API Key management of the target workspace an OpenAPI Key that has permission for this operation.

Body Parameters

Parameter Type Required Description
aliasI18n.zh string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example: 主机
How to obtain or fill in: Enter the zh display text; omit this key when this language does not need to be modified.
aliasI18n.en string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example: Host
How to obtain or fill in: Enter the en display text; omit this key when this language does not need to be modified.
aliasI18n.zh-hant string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example:
How to obtain or fill in: Enter the zh-hant display text; omit this key when this language does not need to be modified.
aliasI18n.id string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example:
How to obtain or fill in: Enter the id display text; omit this key when this language does not need to be modified.
aliasI18n.ja string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example:
How to obtain or fill in: Enter the ja display text; omit this key when this language does not need to be modified.
aliasI18n.ko string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example:
How to obtain or fill in: Enter the ko display text; omit this key when this language does not need to be modified.
descI18n.zh string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example: 主机
How to obtain or fill in: Enter the zh display text; omit this key when this language does not need to be modified.
descI18n.en string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example: Host
How to obtain or fill in: Enter the en display text; omit this key when this language does not need to be modified.
descI18n.zh-hant string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example:
How to obtain or fill in: Enter the zh-hant display text; omit this key when this language does not need to be modified.
descI18n.id string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example:
How to obtain or fill in: Enter the id display text; omit this key when this language does not need to be modified.
descI18n.ja string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example:
How to obtain or fill in: Enter the ja display text; omit this key when this language does not need to be modified.
descI18n.ko string or null Updates only this language; an empty string or null clears the original value for this language, and the actual display may still fall back to other languages.
Example:
How to obtain or fill in: Enter the ko display text; omit this key when this language does not need to be modified.
name string Y Required, non-empty, up to 256 characters, case-sensitive. Creation rejects names containing characters in the basic Chinese character range; modification does not perform the same Chinese character check, but it is recommended to keep the real non-Chinese field name.
Allow null: False
Allow empty string: False
Maximum length: 256
Example: host
How to obtain or fill in: Enter the real collection field name; first check the configuration with the same source and name in the field list.
alias string Required for creation; can be omitted on modification to retain existing languages; when submitted it must be non-empty and at most 256 characters. In the same request, aliasI18n.zh takes precedence.
Allow null: False
Allow empty string: False
Maximum length: 256
Example: 主机
How to obtain or fill in: Enter the Chinese alias displayed in the console; put English and other languages in aliasI18n.
aliasI18n object Optional object; unknown language keys are ignored, values should be strings, and null is converted to an empty string. Only the submitted languages are merged, other languages are retained; for compatibility, alias/aliasEn fall back to each other as zh/en.
Allow null: False
Example: {"en": "Host"}
How to obtain or fill in: Fill in according to the actually supported languages, and submit only the languages to be updated.
unit string Optional, up to 256 characters, defaults to an empty string; omitting it on modification clears it, and for fieldType=string it is cleared regardless of the value passed. This endpoint does not perform the InvalidUnit business validation.
Allow null: False
Maximum length: 256
Allow empty string: True
Example:
How to obtain or fill in: Select a valid display unit identifier according to Unit Description; enter an empty string for string.
fieldType string Optional in the declaration but always submitting it explicitly is recommended; when omitted on creation, an empty string is saved, while omitting it on modification returns 500. When the value is string, unit is forced to empty; for other types the passed unit is used; legacy number/time/percent cannot be submitted directly as enumerations of the current write API.
Allow null: False
Allow empty string: True
Optional values: ['text', 'int', 'float', 'boolean', 'string', 'long']
Example: string
How to obtain or fill in: Choose text/int/float/boolean/string/long according to the actual field.
category string Optional; defaults to system when omitted. Omitting it on modification also resets it to system rather than retaining the original category.
Allow null: False
Allow empty string: False
Optional values: ['system', 'business', 'other']
Example: business
How to obtain or fill in: Choose system/business/other according to the purpose.
fieldSource string Optional; defaults to an empty string. Supports lineage/logging/object/custom_object/keyevent/tracing/rum/security/network/billing and empty values. Omitting it on modification changes the source to a general source instead of retaining the old value.
Allow null: False
Allow empty string: True
Optional values: ['lineage', 'logging', 'object', 'custom_object', 'keyevent', 'tracing', 'rum', 'security', 'network', 'billing']
Example: logging
How to obtain or fill in: Choose according to the target data category; for general fields, explicitly enter an empty string.
desc string Optional, up to 3000 characters, an empty string is allowed; omitting it on modification retains the old language values, and an explicit descI18n.zh takes precedence.
Allow null: False
Allow empty string: True
Maximum length: 3000
Example: 主机名称
How to obtain or fill in: Enter the business meaning/acquisition method of the field; put other languages in descI18n.
descI18n object Optional object; language merging/clearing/fallback works the same as aliasI18n; OpenAPI does not accept a separate descEn parameter; enter the English description in the en key of this object.
Allow null: False
Example: {"en": "Host name"}
How to obtain or fill in: Submit descriptions to be added, updated, or cleared by language code.
coverInner boolean Optional boolean. The legacy confirmation branch is deprecated: false does not prevent creating a custom field with the same name and does not return need_confirm. The list is still overridden by the custom field instead of the built-in one, but the built-in record is not modified.
Allow null: False
Example: false
How to obtain or fill in: It can be omitted in the current implementation; after writing, check the override through coverInner in the list.

Additional Parameter Notes

For unit information, see Unit Description. Currently no need_confirm confirmation is required; coverInner does not control the list override.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/field_cfg/field_example/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"host","alias":"主机","aliasI18n":{"en":"Host"},"fieldType":"string","fieldSource":"logging","category":"business","unit":"","desc":"主机名称","descI18n":{"en":"Host name"},"coverInner":false}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content.id integer Record number; not used for API addressing.
content.workspaceUUID string Workspace the configuration belongs to; built-in configurations belong to the system workspace.
content.status integer Record status: 0 for normal, 3 for soft-deleted; this detail only returns valid records belonging to the current workspace.
content.deleteAt integer Deletion time in Unix seconds; -1 if not deleted.
content.declaration object Common declarations for the current calling workspace.
content.uuid string Field configuration UUID; use this value in subsequent operations, not the actual field name.
content.name string Actual field name; case-sensitive.
content.alias string Alias; the list displays it according to the request language, while detail/create/modify responses retain the compatibility field value.
content.aliasEn string Compatibility English alias, which may fall back to Chinese.
content.aliasI18n object Raw alias mapping for the six languages; an empty language value does not mean the display is necessarily empty.
content.desc string Description; the list displays it according to the request language, while other responses return the compatibility field value.
content.descEn string Compatibility English description, which may fall back to Chinese.
content.descI18n object Raw description mapping for the six languages.
content.fieldType string Configured data type; does not change the actual collection field type. Legacy built-in records may have values outside the creation Body.
content.fieldSource string Applicable source; an empty string indicates a general configuration.
content.unit string Display unit; forced to empty when fieldType=string is saved.
content.sysField integer 1 for built-in, 0 for custom. Built-in configurations cannot be modified/deleted through this API.
content.category string system for system fields, business for business fields, other for others; legacy records may be empty.
content.creator string Creation identity, which can be an API Key or a system identity.
content.updator string Update identity; an empty string if not yet updated.
content.createAt integer Creation time in Unix seconds.
content.updateAt integer Update time in Unix seconds; may be -1 if not yet updated.
content.aliasI18n.zh string Raw alias for the zh language, usually empty when not provided; the list display falls back by language.
content.aliasI18n.en string Raw alias for the en language, usually empty when not provided; the list display falls back by language.
content.aliasI18n.zh-hant string Raw alias for the zh-hant language, usually empty when not provided; the list display falls back by language.
content.aliasI18n.id string Raw alias for the id language, usually empty when not provided; the list display falls back by language.
content.aliasI18n.ja string Raw alias for the ja language, usually empty when not provided; the list display falls back by language.
content.aliasI18n.ko string Raw alias for the ko language, usually empty when not provided; the list display falls back by language.
content.descI18n.zh string Raw description for the zh language, usually empty when not provided; the list display falls back by language.
content.descI18n.en string Raw description for the en language, usually empty when not provided; the list display falls back by language.
content.descI18n.zh-hant string Raw description for the zh-hant language, usually empty when not provided; the list display falls back by language.
content.descI18n.id string Raw description for the id language, usually empty when not provided; the list display falls back by language.
content.descI18n.ja string Raw description for the ja language, usually empty when not provided; the list display falls back by language.
content.descI18n.ko string Raw description for the ko language, usually empty when not provided; the list display falls back by language.
{
  "code": 200,
  "content": {
    "id": 10,
    "uuid": "field_example",
    "workspaceUUID": "wksp_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,
    "status": 0,
    "creator": "wsak_example",
    "updator": "",
    "createAt": 1785427200,
    "updateAt": -1,
    "deleteAt": -1,
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

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 A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Verify the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Request JSON format error Fix the JSON according to content.reason, line, and column.
400 ft.FieldCustomNameRepeat A custom configuration with the same name and source already exists in the same workspace, or a concurrent create/modify was rejected This custom field name already exists: {} First look up existing records by source and name to avoid concurrent same-name submissions; after confirming the result, decide whether to modify or rename.
500 ft.InternalServerError Storage, cache, or response assembly failed; a modification without fieldType may also trigger an unhandled exception Internal error Submit a valid fieldType explicitly when modifying; for other failures, retain the traceId. When a write request fails, read back to verify first to avoid blind rebuilding.
400 ft.FieldNotFound The UUID does not belong to the current workspace, or the record does not exist or has been deleted The specified field was not found Obtain the custom configuration UUID from the field list of the current workspace; do not operate using a system workspace UUID.
406 ft.NotSupportedModify The target valid record is marked as a system built-in field Modifying system built-in fields is not allowed Only modify custom fields; if the display needs to be adjusted, create a custom configuration with the same source and name.

Feedback

Is this page helpful?