# Manage workflow artifacts and data lineage

Query the links between artifacts, files, and processing nodes; inspect output blocks and their revisions; and switch revisions or rerun processing nodes when needed. This page does not start or resume an entire workflow job; see [Run, resume, and retry workflow jobs](workflow-jobs-recovery.md) for those operations.

## Prerequisites

Prepare credentials that can access the target workspace and the IDs of the artifact, file, or processing node to trace. For service endpoints, authentication, and general request formats, see [Prepare to call an API](../../api-call-basics.md).

Before creating a revision, setting an effective revision, or rerunning a node, query the relevant lineage, node, output blocks, and revisions to confirm the target object.

## Call sequence

1. Start with an artifact or file to query its processing lineage and locate the node to inspect.
2. Query node details and the artifact or node output blocks and revision records to confirm the output to inspect or adjust.
3. Create an output-block revision when you need to retain a new version; set an effective revision when you need to change the revision in use.
4. Rerun the node with its current configuration or specified revisions when needed, then query the lineage and output blocks again to confirm the result.

## API operations

### Query lineage and nodes

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| Query artifact processing lineage | [Get artifact lineage](../../../../reference/api/ai-studio/data-processing/workflow-lineage/get-artifact-lineage.md) | You need to trace processing from an artifact. |
| Query file processing lineage | [Get file lineage](../../../../reference/api/ai-studio/data-processing/workflow-lineage/get-file-lineage.md) | You need to trace processing from a file. |
| Query processing-node details | [Get a lineage node](../../../../reference/api/ai-studio/data-processing/workflow-lineage/get-lineage-node.md) | You located a node and need its details. |

### Inspect and revise output blocks

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| List artifact output blocks | [List artifact output blocks](../../../../reference/api/ai-studio/data-processing/workflow-lineage/list-artifact-output-blocks.md) | You need to inspect output blocks associated with an artifact. |
| List node output blocks | [List artifact-node output blocks](../../../../reference/api/ai-studio/data-processing/workflow-lineage/list-artifact-node-output-blocks.md) | You need to inspect output blocks for a specified node. |
| List output-block revisions | [List artifact block revisions](../../../../reference/api/ai-studio/data-processing/workflow-lineage/list-artifact-block-revisions.md) | You need to inspect existing output-block revisions. |
| List node output-block revisions | [List artifact-node block revisions](../../../../reference/api/ai-studio/data-processing/workflow-lineage/list-artifact-node-block-revisions.md) | You need to inspect revisions for a node output block. |
| Create an output-block revision | [Create an artifact block revision](../../../../reference/api/ai-studio/data-processing/workflow-lineage/create-artifact-block-revision.md) | You need to add a revision for an output block. |
| Create a node output-block revision | [Create an artifact-node block revision](../../../../reference/api/ai-studio/data-processing/workflow-lineage/create-artifact-node-block-revision.md) | You need to add a revision for a node output block. |
| Set an effective revision | [Switch artifact effective revisions](../../../../reference/api/ai-studio/data-processing/workflow-lineage/switch-artifact-effective-revisions.md) | You need to switch the revision used by an artifact. |
| Set a node effective revision | [Switch artifact-node effective revisions](../../../../reference/api/ai-studio/data-processing/workflow-lineage/switch-artifact-node-effective-revisions.md) | You need to switch the revision used by a node. |

### Rerun nodes

| What you need to do | API operation | Use it when |
| --- | --- | --- |
| Rerun a processing node | [Rerun an artifact node](../../../../reference/api/ai-studio/data-processing/workflow-lineage/rerun-artifact-node.md) | You need to reprocess a node using its current configuration. |
| Rerun a node with specified revisions | [Rerun an artifact node with revisions](../../../../reference/api/ai-studio/data-processing/workflow-lineage/rerun-artifact-node-with-revisions.md) | You need to reprocess a node with selected revisions. |

## Confirm the result

After creating or switching a revision, query the corresponding output blocks and revision records to confirm current content. After rerunning a node, query [artifact lineage](../../../../reference/api/ai-studio/data-processing/workflow-lineage/get-artifact-lineage.md) or [processing-node details](../../../../reference/api/ai-studio/data-processing/workflow-lineage/get-lineage-node.md) again to confirm node information.

## Limitations and notes

- Revisions, nodes, and artifacts are objects at different levels. Before switching or rerunning, use lineage and node details to confirm the target level.
- Setting an effective revision and rerunning affect the output used later. Check the relevant operation page for conditions and scope first.

## Next steps

- [Run, resume, and retry workflow jobs](workflow-jobs-recovery.md)
