Create processing result output version

Create a version of the specified processing result output content. When making concurrent modifications, please bring the expected version number to avoid overwriting other versions.

HTTP
POST $CLOUDSIGMA_API_BASE/lineage/artifacts/{artifact_id}/blocks/{block_id}/revisions

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Prepare personal access token and target workspace ID that can access the target workspace.

Request body

Replace $ARTIFACT_ID, $BLOCK_ID, $CLOUDSIGMA_API_KEY, $WORKSPACE_ID in the example with actual values.

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/lineage/artifacts/$ARTIFACT_ID/blocks/$BLOCK_ID/revisions" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "use_current_effective": true,
  "expected_effective_set_version": 3,
  "revision_content_payload": "修订后的内容",
  "revision_content_ref": "sha256:a8b2ad79294cb22a44f2fac7d3f7c539e2541f7c9c51df78a5d366cb733d6af9",
  "revision_content_hash": "sha256:a8b2ad79294cb22a44f2fac7d3f7c539e2541f7c9c51df78a5d366cb733d6af9"
}'

Parameter

Type

Required

Description

artifact_id

string

Yes

A composite identifier composed of the root asset ID and the source run ID, encoded as a path segment.

block_id

string

Yes

Output content ID.

Request body

Field

Type

Required

Description

base_revision_id

string

No

The output version ID the new version is based on.

use_original

boolean

No

Use the original content as a base.

use_current_effective

boolean

No

Use the currently effective version as the basis.

expected_effective_set_version

integer or null

When using the current effective baseline

The version number of the currently effective version set.

expected_base_content_hash

string

No

A hash used to verify whether the underlying content has changed.

revision_content_ref

string

Yes

References to new version content.

revision_content_hash

string

Yes

The hash of the new version content.

revision_content_payload

string or null

No

Complete content of the new version.

patch_json

string

No

Non-empty patches are not currently supported. Fixed to “”.

Content references and content hashes must be submitted. revision_content_payload is a raw UTF-8 string, not Base64 text. revision_content_hash uses sha256: plus 64 digit hexadecimal digest, in raw bytes, revision_content_ref is consistent with the content object reference.

patch_json currently does not support non-empty patches. Submissions of non-empty patches will be rejected and the patch content will not be applied.

Only one type of use_original=true, non-empty base_revision_id and use_current_effective=true can be selected. When selecting the current effective revision, expected_effective_set_version must also be filled in to check whether the effective version has changed. Even if you fill in this value in other ways, the currently effective version will not be checked.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "artifact_id": "asset-001:case-001",
    "block_id": "block-001",
    "revision": {
      "revision_id": "rev-002",
      "workspace_id": "",
      "branch_id": "",
      "target_scope": "final_artifact",
      "root_asset_id": "",
      "output_artifact_id": "",
      "case_id": "",
      "node_execution_id": "",
      "block_id": "",
      "base_revision_id": "",
      "base_content_ref": "",
      "base_content_hash": "",
      "base_effective_set_version": 0,
      "revision_content_ref": "",
      "revision_content_hash": "",
      "patch_json": "",
      "status": "active",
      "created_by": "",
      "created_at": "2026-08-21T07:00:00Z"
    }
  }
}

Field

Type

Description

data.artifact_id

string

Processing result ID.

data.node_id

string

Full node path.

data.node_execution_id

string

Node execution ID.

data.output_artifact_id

string

Output product ID.

data.block_id

string

Output content ID.

data.revision

object

Newly created output version.

data.revision.revision_id

string

Revision ID.

data.revision.workspace_id

string

The workspace ID to which it belongs.

data.revision.branch_id

string

Rerun branch ID.

data.revision.target_scope

string

target range. Value: final_artifact, node_output.

data.revision.root_asset_id

string

Root asset ID.

data.revision.output_artifact_id

string

Output product ID.

data.revision.case_id

string

Run ID.

data.revision.node_execution_id

string

Node execution ID.

data.revision.block_id

string

Output block ID.

data.revision.base_revision_id

string

Baseline revision ID.

data.revision.base_content_ref

string

Baseline content reference.

data.revision.base_content_hash

string

Summary of baseline content.

data.revision.base_effective_set_version

integer

Baseline effective revision set version. Not less than 0.

data.revision.revision_content_ref

string

Newly revised content cited.

data.revision.revision_content_hash

string

Summary of new revisions.

data.revision.patch_json

string

Non-empty patches are not currently supported. Fixed to “”.

data.revision.status

string

status. Fixed to “active”.

data.revision.created_by

string

Creator.

data.revision.created_at

string

Creation time. RFC 3339 time.

Creating a revision only saves the new revision and does not automatically become an effective revision. Use the returned revision ID to call the corresponding effective switching interface.

Error response

The content object must be available and the digest must match. After content is written, subsequent database saves can still fail. Error return does not guarantee that there will be no residual content, so do not automatically create it again.

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}

Field

Type

Required

Description

code

string

No

error code.

msg

string

No

Readable error message.

data

null

No

null in error response.

Last updated on