Skip to content

Version Record List



GET /api/v1/pipeline_history/{pl_uuid}/list

Overview

Returns the current configuration and history from the last 90 days, paginated in descending order by id; pageSize defaults to 30. The first page returns currentPipelineInfo, and historyRecord contains lightweight metadata.

Route Parameters

Parameter Type Required Description
pl_uuid string Y Pipeline UUID

Query Parameters

Parameter Type Required Description
seqID integer Pagination cursor, a positive integer; use the id of the last item in the previous page's historyRecord, not a uuid or configVersion. Omit it on the first page; the next page returns history with ids smaller than this id.
Allow empty: False
pageSize integer Number of history records per page, default 30, minimum 1, maximum 100; does not count the current version returned separately on the first page.
Allow empty: False
$minValue: 1
$maxValue: 100

Parameter Notes

Queries the current configuration and archived historical versions of the custom Pipeline in the workspace, suitable for version auditing, CI comparison, and version selection before restoration.

Pagination Flow

  1. On the first call, do not pass seqID; pageSize defaults to 30, with a range of 1 to 100.
  2. The first page content contains currentPipelineInfo (including the current full config) and historyRecord (history metadata only, no config). For newly created or unmodified resources, historyRecord may be empty.
  3. For the next page, pass the numeric id of the last record in this page's historyRecord as seqID; do not pass the history uuid or configVersion. History is returned in descending order by id, and the next page only returns records with ids smaller than the cursor; currentPipelineInfo is not returned again.
  4. You can stop when the number of returned records is less than pageSize; if the page is exactly full, continue requesting. An empty array means there is no more history. The API does not return a total count or page number.

The list only returns history from the last 90 days by archive time; the current configuration is always fetched from the main table and is not subject to this window. Pagination is not a frozen snapshot; if new versions are created concurrently, re-request the first page to see them. When persistently saving history content for audit purposes, export and save it yourself within the retention window.

Prerequisites

Call the OpenAPI service using the DF-API-KEY of the owning workspace. Query requires read permission; restore and clone require Pipeline management and write permissions. The API does not support specifying another workspace or operator through the request body. The Endpoint, resource UUID, and API-Key in the examples are placeholders; replace them before calling and do not output the API Key in logs.

The response examples use fabricated resources to demonstrate typical business fields; actual responses may contain other fields from the regular Pipeline API. Callers should remain compatible with newly added fields.

Version Fields

Field Description
configVersion Configuration version number; new resources start from 1. Enable and disable do not advance this version
configVersionAt Time when this configuration version was generated, Unix timestamp in seconds, not milliseconds
configVersionOperator / configVersionOperatorInfo Operator identifier and its display information; may be an empty object when display information cannot be resolved
configVersionSource / configVersionAction Version source and action, for example openapi/modify, history/history_restore
configVersionSourceInfo Supplementary source information; history operations include pipelineHistoryUUID, pipelineUUID, configVersion
createAt Archive time of the history snapshot, which may be later than configVersionAt; the history list retention window is calculated by this field

The historical config.content and config.testData are Base64-encoded strings. Callers should first Base64-decode them, then read as UTF-8; testData is a test sample and is not automatically executed by read or restore APIs. Do not treat the source version number in configVersionSourceInfo as the current version number.

Exception Handling

Invalid pagination parameters are rejected; resources that do not exist, have been deleted, or do not belong to the current workspace cannot be queried. Failed reads can be retried according to the error type, but workspace permissions cannot be bypassed by changing the resource UUID.

Request Example

curl 'https://openapi.guance.com/api/v1/pipeline_history/<pl_uuid>/list?pageSize=30' -H 'DF-API-KEY: <API-Key>'

Response

{
    "code": 200,
    "content": {
        "currentPipelineInfo": {
            "pipelineUUID": "pl_example",
            "configVersion": 3,
            "configVersionAt": 1788800100,
            "configVersionOperator": "acnt_example",
            "configVersionOperatorInfo": {},
            "configVersionSource": "openapi",
            "configVersionAction": "modify",
            "configVersionSourceInfo": {},
            "config": {
                "name": "demo",
                "type": "local",
                "category": "logging",
                "source": [
                    "nginx"
                ],
                "content": "YWRkX2tleShjaXR5LCAic2hhbmdoYWkiKQ==",
                "testData": "W10=",
                "dataType": "line_protocol",
                "asDefault": 0,
                "enableByLogBackup": 0,
                "extend": {}
            }
        },
        "historyRecord": [
            {
                "id": 101,
                "uuid": "plh_example",
                "pipelineUUID": "pl_example",
                "configVersion": 2,
                "configVersionAt": 1788800000,
                "configVersionOperator": "acnt_example",
                "configVersionOperatorInfo": {},
                "configVersionSource": "openapi",
                "configVersionAction": "modify",
                "configVersionSourceInfo": {},
                "createAt": 1788800100
            }
        ]
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE_EXAMPLE"
}

Feedback

Is this page helpful?