Version Record Details¶
GET /api/v1/pipeline_history/{pipeline_history_uuid}/get
Overview¶
Returns the selected historical configuration and beforePipelineHistoryInfo. The caller uses the two snapshots to compute differences.
Route Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| pipeline_history_uuid | string | Y | The historical UUID returned by historyRecord[].uuid in the history list, not the Pipeline UUID or numeric ID. |
Additional Parameter Notes¶
Reads the complete configuration of the specified historical version and the most recent earlier version before it, for the caller to compute differences. This API does not modify the Pipeline or execute any scripts.
Call and Response¶
First obtain pipeline_history_uuid from historyRecord[].uuid in the history list. Do not use the Pipeline UUID, the historical numeric ID, or the version number.
content is the selected historical record, and content.config is its complete configuration. content.beforePipelineHistoryInfo is the most recent available historical record of the same Pipeline with a smaller version number; it returns {} when no previous version is available. After history cleanup, intermediate versions are not guaranteed to remain contiguous. This API does not directly return a text diff, nor does it support passing in any two arbitrary version numbers. To compare any two versions, read the config of the two historical UUIDs separately and compare them yourself.
Prerequisites¶
Call the OpenAPI service using the DF-API-KEY of the owning Workspace. Queries require read permission; restore and clone operations require Pipeline management and write permissions. This 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 example uses fictional resources to show typical business fields; actual responses may contain other fields common to normal Pipeline APIs. The caller should remain compatible with newly added fields.
Version Fields¶
| Field | Description |
|---|---|
| configVersion | Configuration version number, starting from 1 for newly created resources; enabling or disabling does not advance this version |
| configVersionAt | Generation time of this configuration version, a Unix timestamp in seconds, not milliseconds |
| configVersionOperator / configVersionOperatorInfo | Operator identifier and display information; may be an empty object when the display information cannot be resolved |
| configVersionSource / configVersionAction | Version source and action, for example, openapi/modify, history/history_restore |
| configVersionSourceInfo | Additional source information; historical operations include pipelineHistoryUUID, pipelineUUID, and configVersion |
| createAt | Archive time of the historical snapshot, which may be later than configVersionAt; the retention window of the history list is calculated based on this field |
The historical config.content and config.testData are Base64-encoded strings. The caller should first decode them with Base64, then read them as UTF-8. testData is a test sample and is not executed automatically by the read or restore APIs. Do not mistake the source version number in configVersionSourceInfo for the current version number.
Error Handling¶
When a historical record has been cleaned up, its owning Pipeline has been deleted, or it does not belong to the current workspace, a resource-inaccessible error is returned. Do not rely on historical UUIDs outside the list retention window remaining available for a long time.
Request Example¶
curl 'https://openapi.guance.com/api/v1/pipeline_history/<pipeline_history_uuid>/get' -H 'DF-API-KEY: <API-Key>'
Response¶
{
"code": 200,
"content": {
"id": 101,
"uuid": "plh_example",
"pipelineUUID": "pl_example",
"configVersion": 2,
"configVersionAt": 1788800000,
"configVersionOperator": "acnt_example",
"configVersionOperatorInfo": {},
"configVersionSource": "openapi",
"configVersionAction": "modify",
"configVersionSourceInfo": {},
"createAt": 1788800100,
"config": {
"name": "demo",
"type": "local",
"category": "logging",
"source": [
"nginx"
],
"content": "YWRkX2tleShjaXR5LCAic2hhbmdoYWkiKQ==",
"testData": "W10=",
"dataType": "line_protocol",
"asDefault": 0,
"enableByLogBackup": 0,
"extend": {}
},
"beforePipelineHistoryInfo": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE_EXAMPLE"
}