Modify¶
POST /api/v1/field_cfg/{field_uuid}/modify
Overview¶
Modify field management
Route Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
field_uuid | string | Y | Field UUID |
Body Request Parameters¶
Parameter Name | Type | Required | Description |
---|---|---|---|
name | string | Y | Field name. Within the same field source (fieldSource), the field name must be unique. Allow null: False Allow empty string: False Max length: 256 |
alias | string | Y | Field alias Allow null: False Allow empty string: False Max length: 256 |
unit | string | Unit information. If fieldType is string, the unit will be set to empty. Allow null: False Max length: 256 Allow empty string: True |
|
fieldType | string | Field type Example: time Allow null: False Allow empty string: True Optional values: ['int', 'float', 'boolean', 'string', 'long'] |
|
fieldSource | string | Field source Example: time Allow null: False Allow empty string: True Optional values: ['logging', 'object', 'custom_object', 'keyevent', 'tracing', 'rum', 'security', 'network', 'billing'] |
|
desc | string | Field description Example: Host name Allow null: False Allow empty string: True Max length: 3000 |
|
coverInner | boolean | Whether to overwrite when the field name is the same as a system built-in field. true for overwrite, false for not overwrite. Example: True Allow null: False |
Parameter Additional Notes¶
Parameter description: Refer to the add interface
Request Example¶
curl 'https://openapi.truewatch.com/api/v1/field_cfg/field_0f95016f7254494da088d878ce586477/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: zh' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"name":"test_load","alias":"as_load","fieldType":"int","desc":"modify_test","fieldSource":"","unit":"custom/[\"time\",\"ns\"]","coverInner":false}' \
--compressed
Response¶
{"code":200,"content":{"alias":"as_load","aliasEn":"","createAt":1735628856,"creator":"wsak_73a0ad39c352477a9417f633670a0908","declaration":{"business":"","organization":"default_private_organization"},"deleteAt":-1,"desc":"modify_test","descEn":"","fieldSource":"","fieldType":"int","id":1791,"name":"test_load","status":0,"sysField":0,"unit":"custom/[\\"time\\",\\"ns\\"]","updateAt":1735635730.899186,"updator":"wsak_73a0ad39c352477a9417f633670a0908","uuid":"field_0f95016f7254494da088d878ce586477","workspaceUUID":"wksp_05adf2282d0d47f8b79e70547e939617"},"errorCode":"","message":"","success":true,"traceId":"TRACE-D11D56A9-BC80-48D4-903C-550D248204BD"}