Skip to content

Export



POST /api/v1/pipeline/export

Overview

Export the migration template JSON for selected Pipelines.

Before Calling and Usage Steps

Returns a content.pipelines array, not a file download. It contains the base64 body of the current configuration and examples, but not UUIDs, version history, or operator information. You must first verify non-deleted UUIDs item by item from the current workspace list, and not mix in cross-workspace, template, or other mismatched items. The primary entity is queried only in the current workspace, but association queries use the complete input. If it contains associations that did not enter the export subject, a 500 may occur during assembly; if no primary entity matches at all, a 404 is returned; mixed input is not guaranteed to ignore only invalid items. Before migration, check the target data category, source, and default conflicts; import does not preserve the exported disabled state.

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 enter: Obtain an OpenAPI Key with this operation permission from API Key Management in the target workspace.

Body Request Parameters

Parameter Type Required Description
pipelineUUIDs[*] string Do not use a name.
Example: pl_example
How to obtain or enter: A single UUID in the current workspace.
pipelineUUIDs array Y Required array; non-empty recommended.
Allows null: False
Example: ["pl_example"]
How to obtain or enter: Get the target UUID from the Pipeline List.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/pipeline/export' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"pipelineUUIDs":["pl_example"]}'

Response

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

Field Type Description
content.pipelines array<object> Template array.
content.pipelines[].name string Save configuration: Required; maximum 256 counting units (ASCII/half-width Katakana count as 1, other characters as 2); allows alphanumeric characters, underscores, Chinese characters U+4e00..9fa5, and hyphens; non-empty 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.pipelines[].type string Save configuration: Required; local/central. For Synthetic Testing (dialtesting), create/update can only be central. The workspace version may restrict central. Updates replace the original runtime type.
content.pipelines[].category string Save configuration: Required; lineage/logging/object/custom_object/network/tracing/rum/llm/agent_monitor/security/keyevent/metric/profiling/dialtesting/cloud_billing; billing is a legacy compatibility value. Updates can change the category; the script, source, and extend need to be checked together.
content.pipelines[].source array Save configuration: Optional; defaults to []. Omitting it on update 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. A regular exact source cannot be occupied by another non-deleted Pipeline within the same category/type. For rum/llm create/update, this array is ignored; use extend.appID and measurement instead.
content.pipelines[].source[] string Save configuration: Non-empty strings recommended. The array is not strictly validated item by item; do not mix unrelated data domains.
content.pipelines[].content string Save configuration: Required base64 string; after decoding, it must be non-empty on create. The full decoded script must satisfy both a UI character count ≤1048576 and UTF-8 bytes ≤1048576; non-ASCII BMP characters count as 2 and supplementary characters as 4. If either limit is exceeded, ft.ContextExceedLimit is returned. Saving synchronously performs sample-free compilation and checks enabled script references in the same category; success does not mean the script has passed debugging with real data or taken effect.
content.pipelines[].dataType string Save configuration: Optional; defaults to line_protocol; supports line_protocol/json/message. Omitting it on update restores line_protocol; this is not category. Although an empty string is declared compatible, explicitly select a supported value.
content.pipelines[].asDefault integer Save configuration: Optional; defaults to 0; only 0/1 recommended. If a default already exists and isForce is not set, HTTP 200 returns a confirm array, the target configuration is not saved this time, and this is not considered a successful create/update.
content.pipelines[].enableByLogBackup integer Save configuration: Optional; defaults to 0; 0/1 recommended. Saving the flag does not guarantee that existing forwarded data is automatically rerun.
content.pipelines[].extend json Save configuration: Optional; defaults to {}. Updates replace the whole object and do not merge. For rum/llm, source relationships are generated from the appID × measurement combination; unknown subfields are rejected by public validation.
content.pipelines[].extend.appID array Save configuration: For rum/llm, provide a non-empty array together with measurement. If both are empty, there may be no dedicated source; if appID is present without measurement, a missing parameter error is reported.
content.pipelines[].extend.measurement array Save configuration: For rum/llm, forms a Cartesian combination with appID. If measurement is present but appID is absent, a missing parameter error is reported; saving does not verify that every app/measurement actually has data.
content.pipelines[].extend.loggingIndex string Save configuration: Optional log index echo field; no value is populated by default; if omitted on update, it is cleared along with extend; this is not the source array.
content.pipelines[].extend.ifAiCreate boolean Save configuration: Optional echo; does not trigger AI tasks.
content.pipelines[].extend.aiTargetStructure string Save configuration: Optional string; saved for echo only; this API does not generate scripts.
content.pipelines[].extend.exampleSource string Save configuration: Optional echo; does not replace source associations.
content.pipelines[].extend.exampleType string Save configuration: Optional echo string; the server does not provide a fixed enumeration.
content.pipelines[].extend.appID[] string Save configuration: Non-empty strings recommended.
content.pipelines[].extend.measurement[] string Save configuration: Non-empty strings recommended.
content.pipelines[].isDisable boolean Original state at export time; the current public import does not apply this flag, and the item is enabled by default after import.
content.pipelines[].examples array<object> Array of test examples; each item is base64-encoded separately.
content.pipelines[].examples[] object A single example.
content.pipelines[].examples[].data string Base64 of a single example's UTF-8 string; objects are encoded as JSON, and text is encoded as a JSON string to avoid loss during import parsing.
content.declaration object Public declaration; import only takes pipelines.
{
  "code": 200,
  "content": {
    "pipelines": [
      {
        "name": "production_parser",
        "type": "local",
        "category": "logging",
        "asDefault": 0,
        "enableByLogBackup": 0,
        "source": [
          "nginx"
        ],
        "isDisable": false,
        "content": "YWRkX2tleSgiZW52IiwgInByb2R1Y3Rpb24iKQ==",
        "examples": [
          {
            "data": "eyJtZXNzYWdlIjoiZXhhbXBsZSBsb2cifQ=="
          }
        ],
        "dataType": "json",
        "extend": {
          "loggingIndex": "default"
        }
      }
    ],
    "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 Request field missing, or field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Request JSON syntax is invalid Request JSON format error Correct the JSON according to content.reason, line, and column.
406 ft.PipelineNotExist The request collection has no non-deleted matching item in the current workspace The exported Pipeline does not exist Refresh the list and then export.
500 ft.InternalServerError The input mixes associated UUIDs that did not enter the export subject, or configuration/example assembly failed Internal error Export only with non-deleted UUIDs verified item by item from the current workspace list; if the failure persists, provide the traceId.

Feedback

Is this page helpful?