Set processing result effective version¶
Set the effective version of one or more processing result output contents.
POST $CLOUDSIGMA_API_BASE/lineage/artifacts/{artifact_id}/effective-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, $CLOUDSIGMA_API_KEY, $WORKSPACE_ID in the example with actual values.
curl -X POST "$CLOUDSIGMA_API_BASE/lineage/artifacts/$ARTIFACT_ID/effective-revisions" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"switches": [
{
"block_id": "block-001",
"effective_revision_id": "rev-002"
}
],
"expected_effective_set_version": 3
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
A composite identifier composed of the root asset ID and the source run ID, encoded as a path segment. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
The version number of the effective version set used to avoid concurrent overwriting. Not less than 0. |
|
array of object |
Yes |
List of output contents to update. At least 1 items. |
|
string |
When the object is provided |
Output block ID. Cannot be empty. |
|
string |
No |
The revision ID currently in effect. |
|
boolean |
No |
Whether to use the original content as a baseline. |
expected_effective_set_version must be submitted and is switched to 0 for the first time. Version conflict returns 409. Read the latest status and verify your selection before submitting.
switches must meet the non-empty and unique requirements specified by the interface, and cannot select the same target repeatedly. The version will be advanced even if the selection is the same as the current one. If the target does not exist or there is a version conflict, 404 and 409 are returned respectively.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"artifact_id": "asset-001:case-001",
"effective_set_version": 4
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
Processing result ID. |
|
string |
Full node path. |
|
string |
Node execution ID. |
|
string |
Output product ID. |
|
integer |
The version number of the effective version set after setting. Not less than 1. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
error code. |
|
string |
No |
Readable error message. |
|
null |
No |
null in error response. |