Create node output version

Creates a revision for the specified node output block.

POST https://moi.matrixorigin.cn/newmoi/lineage/artifacts/{artifact_id}/nodes/{node_id}/blocks/{block_id}/revisions

Preparation before calling

Prepare a personal access token and target workspace ID that has access to the target workspace.

Request body

base_revision_idstring
The revision ID to base the new revision on.
use_originalboolean
Use original content as base.
use_current_effectiveboolean
Use the currently active revision as the basis.
expected_effective_set_versioninteger
The expected effective revision set version.
revision_content_payloadstring
New revision content.
patch_jsonstring
Revision patch JSON.

Request example

curl -X POST "https://moi.matrixorigin.cn/newmoi/lineage/artifacts/$ARTIFACT_ID/nodes/$NODE_ID/blocks/$BLOCK_ID/revisions" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "use_current_effective": true,
    "revision_content_payload": "修订后的内容"
  }'

Successful response

When the request is successful, the data of this operation is returned. Just because the write or run request has been accepted does not mean that the subsequent processing has been completed; please confirm the result based on the return status or subsequent query.

The response fields are as follows.

data.artifact_idstring
Product ID.
data.node_idstring
Node ID.
data.block_idstring
Output block ID.
data.revisionobject
The newly created revision.

Successful response example

{
  "code": "OK",
  "msg": "OK",
  "data": {"artifact_id": "art-001", "node_id": "node-001", "block_id": "block-001", "revision": {}}
}

Error response

codestring
Error code.
msgstring
Readable error message.
datanull
`null` in an error response.

Error response example

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