Modify¶
POST /api/v1/pipeline/{pl_uuid}/modify
Overview¶
Modify the Pipeline configuration as a whole while retaining history.
Before calling and usage steps¶
Read the details first as a backup, then submit with the current configVersion and the complete set of writable fields. This entry replaces everything: if source, extend, asDefault, enableByLogBackup, testData, or dataType is omitted, it becomes an empty array/object, 0, an empty string, line_protocol, or another default; the original status is retained. Only actual configuration changes archive the original version and increment it; saving an identical configuration creates no new version. The source in the modify response is only a diff summary of relationship updates and may include removed sources while omitting the preserved intersection; it cannot replace the final source obtained by calling get again.
By default, a conflict first returns HTTP 200 with a non-empty content.confirm and no normal entity; only after manual confirmation does it retry with the same configuration and isForce=true. Forced replacement also downgrades the original default to non-default and archives it.
Saving synchronously validates syntax and updates the configuration/version; whether actual collection or central processing takes effect depends on subsequent configuration retrieval and the data flow; historical data is not reprocessed, and parse sample results are not returned. Back up the details before modifying; after an error or timeout, read back the current version first, then retry.
Route parameters¶
| Parameter name | Type | Required | Description |
|---|---|---|---|
| pl_uuid | string | Y | UUID of the Pipeline in the current workspace, which is distinct from the historical UUID, name, or numeric id. Example: pl_exampleHow to obtain or fill in: get the uuid from the Pipeline list. |
Request headers¶
| Parameter name | 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 an OpenAPI Key with the required operation permission from API Key management in the target workspace. |
Body request parameters¶
| Parameter name | Type | Required | Description |
|---|---|---|---|
| source[*] | string | A non-empty string is recommended; array items are not strictly validated one by one; do not mix unrelated data domains. Example: nginxHow to obtain or fill in: a single real source identifier, or a wildcard pattern supported by the collection side. |
|
| extend.appID[*] | string | A non-empty string is recommended. Example: appid_exampleHow to obtain or fill in: obtain a single appId from the application configuration. |
|
| extend.measurement[*] | string | A non-empty string is recommended. Example: viewHow to obtain or fill in: the original name of the real measurement. |
|
| name | string | Y | Required, maximum 256 count units (ASCII/half-width katakana counts as 1, other characters as 2); letters, digits, underscores, Chinese characters U+4e00..9fa5, and hyphens are allowed; a non-empty value is recommended. Duplicates are not allowed within the same category, even if local/central differ or the old item is disabled. This is not the input log source. Allow null: False Maximum length: 256 $notSearchRegExp: [^a-zA-Z0-9_\u4e00-\u9fa5-]+ Example: production_parserHow to obtain or fill in: a user-defined file name for the business; first check the non-deleted names in the same category from the Pipeline list. |
| type | string | Y | Required, local/central; for Synthetic Testing (dialtesting), create/modify supports only central. The workspace plan may restrict central. Modifying replaces the original run type. Allow null: False Available values: ['local', 'central'] Example: localHow to obtain or fill in: choose local for processing by the local collector, and central for platform central processing; verify the actual data entry point. |
| source | array | Optional, defaults to []; omitting it on modify removes all source relationships. Sources containing * or ? do not participate in the exact uniqueness conflict check, and runtime behavior for all matches is not guaranteed; normal exact sources cannot be occupied by another non-deleted Pipeline within the same category/type. For rum/llm create/modify, this array is ignored and extend.appID and measurement are used instead. Allow null: False Example: ["nginx"]How to obtain or fill in: take the value from the source or source selector of the corresponding collected data, not the Pipeline name; for logs, refer to the real log source. |
|
| content | string | Y | Required base64 string; after decoding, create must be non-empty. The full decoded script must satisfy both a UI character count ≤1048576 and UTF-8 bytes ≤1048576; BMP non-ASCII counts as 2 and supplementary characters as 4. Exceeding either limit returns ft.ContextExceedLimit. Saving compiles synchronously without samples and checks references to enabled scripts in the same category; success does not mean the real data debugging passed or that the change has taken effect. Allow null: False Example: YWRkX2tleSgiZW52IiwgInByb2R1Y3Rpb24iKQ==How to obtain or fill in: first write the UTF-8 Pipeline script, then perform standard base64 encoding; the example decodes to add_key("env", "production"). |
| testData | string | Declared optional, but if omitted on create, the controller decoding None may return InvalidBase64, so always explicitly provide W10= or an empty string. Omitting it on modify restores an empty string. Public add/modify accepts only an empty string, or content that strictly base64-decodes to empty or a JSON array; a single object cannot be encoded directly. Array members should be strings or objects; numbers/null may cause a 500 in the historical per-item length validation; the historical limit per item is about 20480 (for objects, the serialized object's memory size; for strings, the historical weighted length), not the script's 1 MiB limit. Allow null: False Allow empty string: True Example: W3sibWVzc2FnZSI6ImV4YW1wbGUgbG9nIn1dHow to obtain or fill in: first serialize the sample array to JSON, then encode it as UTF-8 and base64; an empty array [] is W10=. |
|
| dataType | string | Optional, defaults to line_protocol; supports line_protocol/json/message. Omitting it on modify restores line_protocol; this is not category. Although an empty string is declared compatible, explicitly choose a supported value. Allow null: False Allow empty string: True Available values: ['line_protocol', 'json', 'message'] Example: jsonHow to obtain or fill in: choose according to the testData sample and the script input. |
|
| isForce | boolean | Optional, defaults to false. Used only for default conflict confirmation; it cannot skip syntax, source, name, version, or other validations; forced replacement turns the original default into non-default and archives its version. Allow null: False Example: falseHow to obtain or fill in: after receiving content.confirm, confirm the replacement of the original default Pipeline and then set it to true. |
|
| configVersion | integer | Optional on modify but strongly recommended as an integer ≥1; restoring history requires the current version; this is not the target historical version. If it does not match the current version, HTTP 409 is returned; re-read, merge the changes, and submit again. Allow null: False $minValue: 1 Example: 1How to obtain or fill in: get it from content.configVersion in the current details or from currentPipelineInfo.configVersion on the first history screen. |
|
| asDefault | int | Optional, defaults to 0; only 0/1 is recommended; if a default already exists and isForce is not set, HTTP 200 returns a confirm array, the target configuration of this request is not saved, and it must not be treated as a successful create/modify. Allow null: False Example: 0How to obtain or fill in: 1 if it should serve as the fallback rule for the same category/type, otherwise 0. |
|
| enableByLogBackup | int | Optional, defaults to 0; 0/1 is recommended. The saved flag does not guarantee that existing forwarded data is automatically reprocessed. Allow null: False Example: 0How to obtain or fill in: 1 if the rule needs to process forwarded data; confirm support from the actual data forwarding chain. |
|
| category | string | Y | Required, lineage/logging/object/custom_object/network/tracing/rum/llm/agent_monitor/security/keyevent/metric/profiling/dialtesting/cloud_billing; billing is a legacy compatible value. Modifying may change the category, in which case the script, source, and extend must be reconciled together. Allow null: False Allow empty string: False Available values: ['lineage', 'logging', 'object', 'custom_object', 'network', 'tracing', 'rum', 'llm', 'agent_monitor', 'security', 'keyevent', 'metric', 'profiling', 'dialtesting', 'billing', 'cloud_billing', 'keyevent'] Example: loggingHow to obtain or fill in: choose according to the target data domain and collection configuration. |
| extend | json | Optional, defaults to {}; on modify it is replaced entirely, not merged. rum/llm use the appID × measurement combination to generate source relationships; unknown subfields are rejected by public validation. Allow null: False Example: {"loggingIndex": "default"}How to obtain or fill in: organize the following declared fields according to the category and existing details. |
|
| extend.appID | array | For rum/llm, a non-empty array should be provided together with measurement; if both are empty, there may be no dedicated source, and providing appID without measurement reports a missing parameter. Allow null: True Example: ["appid_example"]How to obtain or fill in: obtain the real appId from the corresponding RUM/LLM application management. |
|
| extend.measurement | array | For rum/llm, combined with appID in a Cartesian product; providing measurement without appID reports a missing parameter, and saving does not verify that every application/measurement actually has data. Allow null: True Example: ["view"]How to obtain or fill in: obtain it from the measurement of the application's real data, such as RUM view/action, and fill it in according to the actual category. |
|
| extend.loggingIndex | string | Optional echo field for the log index; no value is filled in by default, and omitting it on modify clears it along with extend; this is not the source array. Allow null: True Example: defaultHow to obtain or fill in: obtain the applicable index identifier from the Log Index list. |
|
| extend.ifAiCreate | boolean | Optional echo; does not trigger an AI task. Allow null: True Example: falseHow to obtain or fill in: record whether it was generated with AI assistance; omit if this marker is not needed. |
|
| extend.aiTargetStructure | string | Optional string, saved only for echo; this API does not generate scripts. Allow empty string: True Allow null: True Example: How to obtain or fill in: the target structure description at the time of AI generation; omit if not needed. |
|
| extend.exampleSource | string | Optional echo; does not replace the source association. Allow empty string: True Allow null: True Example: nginxHow to obtain or fill in: display value of the sample source, which must correspond to the real source. |
|
| extend.exampleType | string | Optional echo string; the server does not provide a fixed enumeration. Allow empty string: True Allow null: True Example: customHow to obtain or fill in: display value of the sample type, defined by client-side business logic. |
Additional parameter notes¶
Concurrent modification protection¶
It is recommended to first call /api/v1/pipeline/<pl_uuid>/get to read the current configuration and configVersion, then submit the existing modification parameters plus configVersion. This API is not a partial update API that only submits configVersion; required parameters such as name, type, category, and content must still be provided per the contract.
configVersion is an optional positive integer; omitting it remains compatible with legacy calls but disables the version conflict check. When the version matches and the configuration actually changes, the old configuration is archived and the new configuration version is returned; saving an identical configuration repeatedly does not create a version. When receiving 409 / ft.PipelineConfigVersionConflict, re-read and compare the configuration, then submit again after confirming; do not automatically overwrite others' changes.
Example request body: {"name":"demo","type":"local","category":"logging","content":"YWRkX2tleShjaXR5LCAic2hhbmdoYWkiKQ==","testData":"W10=","source":["nginx"],"configVersion":3}.
Response and retry¶
On a successful response, content is the current Pipeline object, including configVersion, configVersionAt, configVersionOperator, configVersionSource, configVersionAction, and configVersionSourceInfo. Times are Unix second-level timestamps. If content is {"confirm":["logging"]}, it means the default replacement needs confirmation and this modification has not been completed; isForce applies only to default replacement and does not skip name/source or version conflict validation.
The content and testData request fields are both Base64-encoded. Normal OpenAPI modification retains the constraint that testData must decode to empty or a JSON array. After a timeout, first query the current configuration to confirm the write result, avoiding unconditional duplicate submissions.
Request example¶
curl --request POST 'https://openapi.guance.com/api/v1/pipeline/pl_example/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json' \
--data-raw '{"name":"production_parser","type":"local","category":"logging","content":"YWRkX2tleSgiZW52IiwgInByb2R1Y3Rpb24iKQ==","testData":"W3sibWVzc2FnZSI6ImV4YW1wbGUgbG9nIn1d","dataType":"json","asDefault":0,"enableByLogBackup":0,"extend":{"loggingIndex":"default"},"source":["nginx"],"configVersion":1}'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.id | integer | Database ID; operate with uuid. |
| content.uuid | string | pl_ object UUID. |
| content.workspaceUUID | string | Owning workspace; an empty string for system templates. |
| content.isSysTemplate | string / integer / boolean | Whether it is a system template; the entity is a Text column and may return a string marker; parse according to the actual marker, and do not judge directly by whether the string is non-empty. |
| content.isCustomSysTemp | integer or boolean | Whether it is a customized system template. |
| content.language | string | Template/configuration language; may be an empty string. |
| content.status | integer | 0 enabled, 2 disabled, 3 deleted. |
| content.creator | string | Creator identity. |
| content.updator | string | Identity of the most recent update. |
| content.createAt | integer | Creation time in Unix seconds. |
| content.updateAt | integer | Update time in Unix seconds. |
| content.deleteAt | integer | Deletion time in Unix seconds; -1 if not deleted. |
| content.name | string | Saved configuration: required, maximum 256 count units (ASCII/half-width katakana counts as 1, other characters as 2); letters, digits, underscores, Chinese characters U+4e00..9fa5, and hyphens are allowed; a non-empty value is recommended. Duplicates are not allowed within the same category, even if local/central differ or the old item is disabled. This is not the input log source. |
| content.type | string | Saved configuration: required, local/central; for Synthetic Testing (dialtesting), create/modify supports only central. The workspace plan may restrict central. Modifying replaces the original run type. |
| content.category | string | Saved configuration: required, lineage/logging/object/custom_object/network/tracing/rum/llm/agent_monitor/security/keyevent/metric/profiling/dialtesting/cloud_billing; billing is a legacy compatible value. Modifying may change the category, in which case the script, source, and extend must be reconciled together. |
| content.source | array | Diff summary of this source relationship update; may include removed sources and may omit the still-preserved intersection; it is not the final source set, so read it back with get. |
| content.source[] | string | A source name involved in this relationship change; do not use it to determine whether it is still bound in the end. |
| content.content | string | Saved configuration: required base64 string; after decoding, create must be non-empty. The full decoded script must satisfy both a UI character count ≤1048576 and UTF-8 bytes ≤1048576; BMP non-ASCII counts as 2 and supplementary characters as 4. Exceeding either limit returns ft.ContextExceedLimit. Saving compiles synchronously without samples and checks references to enabled scripts in the same category; success does not mean the real data debugging passed or that the change has taken effect. |
| content.testData | string | Saved configuration: declared optional, but if omitted on create, the controller decoding None may return InvalidBase64, so always explicitly provide W10= or an empty string. Omitting it on modify restores an empty string. Public add/modify accepts only an empty string, or content that strictly base64-decodes to empty or a JSON array; a single object cannot be encoded directly. Array members should be strings or objects; numbers/null may cause a 500 in the historical per-item length validation; the historical limit per item is about 20480 (for objects, the serialized object's memory size; for strings, the historical weighted length), not the script's 1 MiB limit. |
| content.dataType | string | Saved configuration: optional, defaults to line_protocol; supports line_protocol/json/message. Omitting it on modify restores line_protocol; this is not category. Although an empty string is declared compatible, explicitly choose a supported value. |
| content.asDefault | integer | Saved configuration: optional, defaults to 0; only 0/1 is recommended; if a default already exists and isForce is not set, HTTP 200 returns a confirm array, the target configuration of this request is not saved, and it must not be treated as a successful create/modify. |
| content.enableByLogBackup | integer | Saved configuration: optional, defaults to 0; 0/1 is recommended. The saved flag does not guarantee that existing forwarded data is automatically reprocessed. |
| content.extend | json | Saved configuration: optional, defaults to {}; on modify it is replaced entirely, not merged. rum/llm use the appID × measurement combination to generate source relationships; unknown subfields are rejected by public validation. |
| content.extend.appID | array | Saved configuration: for rum/llm, a non-empty array should be provided together with measurement; if both are empty, there may be no dedicated source, and providing appID without measurement reports a missing parameter. |
| content.extend.measurement | array | Saved configuration: for rum/llm, combined with appID in a Cartesian product; providing measurement without appID reports a missing parameter, and saving does not verify that every application/measurement actually has data. |
| content.extend.loggingIndex | string | Saved configuration: optional echo field for the log index; no value is filled in by default, and omitting it on modify clears it along with extend; this is not the source array. |
| content.extend.ifAiCreate | boolean | Saved configuration: optional echo; does not trigger an AI task. |
| content.extend.aiTargetStructure | string | Saved configuration: optional string, saved only for echo; this API does not generate scripts. |
| content.extend.exampleSource | string | Saved configuration: optional echo; does not replace the source association. |
| content.extend.exampleType | string | Saved configuration: optional echo string; the server does not provide a fixed enumeration. |
| content.extend.appID[] | string | Saved configuration: a non-empty string is recommended. |
| content.extend.measurement[] | string | Saved configuration: a non-empty string is recommended. |
| content.configVersion | integer | Current configuration version, initially 1; incremented when the configuration actually changes; enabling/disabling is not a configuration snapshot field. |
| content.configVersionAt | integer | Time when this configuration version took effect, in Unix seconds. |
| content.configVersionOperator | string | Identity of the operator for this version. |
| content.configVersionSource | string | Source, such as openapi/console/history/workspace_restore/legacy/system. |
| content.configVersionAction | string | Such as create/modify/import/official_clone/current_clone/history_restore/history_clone/default_replace/baseline. |
| content.configVersionSourceInfo | object | Source action information; {} when there is no source, and fields may be omitted depending on the action. |
| content.configVersionSourceInfo.templateName | string | Name of the source template for official clone. |
| content.configVersionSourceInfo.pipelineUUID | string | Source Pipeline UUID. |
| content.configVersionSourceInfo.configVersion | integer | Source configuration version number. |
| content.configVersionSourceInfo.pipelineHistoryUUID | string | Historical UUID of the source for history clone/restore. |
| content.configVersionSourceInfo.replacedByName | string | New file name triggered by the default replacement. |
| content.configVersionSourceInfo.replacedByPipelineUUID | string | Pipeline UUID triggered by the default replacement. |
| content.declaration | object or null | Workspace public declaration attached to a non-empty business object; may be null or an empty object when not configured; an empty object is not added. |
| content.confirm | array<string> |
Replaces the normal entity on a default conflict, listing the categories that need replacement confirmation; this branch does not save the target of this request. |
| content.confirm[] | string | A single category. |
| content.pl_errors | array<object> |
Array of compilation errors returned only in the content of an ft.PipelineSyntaxError error. |
| content.pl_errors[].error | string | Compilation error description. |
| content.pl_errors[].pos_chain | array<object> |
Reference/position chain. |
| content.pl_errors[].pos_chain[].file | string | File name. |
| content.pl_errors[].pos_chain[].ln | integer | Non-negative position index, defined by the compiler; keep the original value for troubleshooting. |
| content.pl_errors[].pos_chain[].col | integer | Non-negative position index, defined by the compiler; keep the original value for troubleshooting. |
| content.pl_errors[].pos_chain[].pos | integer | Non-negative position index, defined by the compiler; keep the original value for troubleshooting. |
{
"code": 200,
"content": {
"id": 100,
"uuid": "pl_example",
"workspaceUUID": "wksp_example",
"name": "production_parser",
"type": "local",
"category": "logging",
"content": "YWRkX2tleSgiZW52IiwgInByb2R1Y3Rpb24iKQ==",
"testData": "W3sibWVzc2FnZSI6ImV4YW1wbGUgbG9nIn1d",
"dataType": "json",
"asDefault": 0,
"enableByLogBackup": 0,
"extend": {
"loggingIndex": "default"
},
"isSysTemplate": 0,
"isCustomSysTemp": 0,
"language": "",
"status": 0,
"creator": "wsak_example",
"updator": "wsak_example",
"createAt": 1785427200,
"updateAt": 1785427200,
"deleteAt": -1,
"configVersion": 2,
"configVersionAt": 1785427200,
"configVersionOperator": "wsak_example",
"configVersionSource": "openapi",
"configVersionAction": "modify",
"configVersionSourceInfo": {},
"source": [
"nginx"
],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Default replacement pending confirmation:
{
"code": 200,
"content": {
"confirm": [
"logging"
],
"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 | Check 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. |
| 406 | ft.InvalidBase64 | The content or testData submitted this time is not decodable Base64 content | Invalid base64 content | Provide both content and testData completely, encoding as UTF-8 first and then base64. |
| 406 | ft.ContextExceedLimit | The script exceeds the UI character count or the 1 MiB UTF-8 byte limit, or a single add/modify test sample exceeds the historical length | Text content exceeds the limit, limited to {} characters | Reduce the script or the single sample, and check the unit indicated in message. |
| 406 | ft.PipelineSyntaxError | Synchronous compilation without samples returns a script or reference syntax error | Pipeline script syntax error, please check the error position | Locate and fix according to error and pos_chain in content.pl_errors, then retry. |
| 400 | ft.PipelineNameExists | A non-deleted script with the same name exists in the same workspace and category | A Pipeline with the same name already exists | Change the name, or update the original UUID. |
| 400 | ft.PipelineSourceExists | A non-deleted rule in the same category/type already occupies the same exact source | The source of this type of Pipeline already exists | Check the source binding and use an appropriate source; wildcard entries do not participate in this check. |
| 403 | ft.ForbiddenFreeEditionWorkspace | The Pipeline run type restrictions of the workspace plan do not allow this type | Free Plan workspaces do not support this feature. Upgrade to the Commercial Plan to unlock it | Have the administrator confirm the workspace plan and supported run modes. |
| 500 | ft.InternalServerError | The synchronous compilation service is unavailable/timed out/malformed (internal PipelineValidationUnavailable is ultimately wrapped uniformly), or a database, structural error, or post-submit formatting failure occurs | Internal error | Before retrying later, read the current configuration and version to confirm whether it was already saved; if it keeps failing, provide the traceId. |
| 406 | ft.DialingPipelineOnlyCentral | dialtesting selects local | Synthetic Testing pipelines support only central pipeline configuration | Use the supported central option and confirm the workspace plan. |
| 406 | ft.MissingNeededParmeterAppID | Only one of appID and measurement is provided for rum/llm | appID must be specified | Provide both, or leave both empty; there is a legacy compatibility difference in the error key between modify and create. |
| 404 | ft.NotFoundPipelineCfg | The current Pipeline to modify in this workspace does not exist or has been deleted | The specified Pipeline configuration was not found | Refresh the corresponding system template or the current workspace's Pipeline list to obtain the accurate target and source identifier for this operation. |
| 409 | ft.PipelineConfigVersionConflict | The submitted configVersion does not match the current one | The Pipeline configuration has been updated. Refresh and try again | Re-obtain the latest version and merge the changes. |
| 406 | ft.InvalidPipelineTestData | The public testData decoding result is not a JSON array | Invalid pipeline testData; after base64 decoding it must be empty or a JSON array | Use an array or an empty string. |