Update data release¶
Update the table range, target workspace, or notes for data publishing.
PUT https://moi.matrixorigin.cn/newmoi/data-share/publishes/{id}
Preparation before calling¶
First query the data release list and confirm the release to be updated. Prepare the personal access token, target workspace ID, and publication ID that have access to the target workspace.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.$PUBLICATION_ID: The release ID to be updated, taken from the response of query data release list.$TABLE_ID: The table ID to be published in theselectedrange, specified in the request body.$TARGET_WORKSPACE_ID: The updated target workspace ID, specified in the request body.
Request example¶
curl -X PUT "https://moi.matrixorigin.cn/newmoi/data-share/publishes/$PUBLICATION_ID" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
--data-binary @- <<JSON
"table_scope": {
"mode": "selected",
"object_ids": ["${TABLE_ID}"]
},
"target_workspace_ids": ["${TARGET_WORKSPACE_ID}"],
"remark": "更新后的备注"
}
JSON
Path parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
A release ID greater than |
Request body¶
Submit only the fields you want to modify.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
object |
No |
The updated table range. |
|
string |
When submitting |
|
|
string[] |
Conditionally required |
When |
|
string[] |
No |
The updated target workspace ID; at least one when submitting, no duplicates, cannot include the current workspace ID, and each value cannot have leading or trailing blanks. |
|
string |
No |
Updated remarks. |
[] after a type means an array. For example, string[] is an array of strings.
Submit at least one of the fields table_scope, target_workspace_ids, or remark.
Successful response¶
When successful, 200 is returned, and data is the updated publishing object.
{
"code": "OK",
"msg": "OK",
"data": {
"id": "101",
"name": "sales-share",
"source_database_id": "1001",
"mo_database_name": "sales",
"table_scope": {
"mode": "selected",
"object_ids": ["2001"]
},
"obj_display_name": "sales",
"obj_display_path": "catalog/sales",
"targets": [
{
"workspace_id": "ws-002"
}
],
"permission": "read",
"remark": "更新后的备注",
"created_by": "user-001",
"created_at": "2026-08-18T10:00:00Z",
"updated_at": "2026-08-18T11:00:00Z"
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
string |
Release ID. |
|
string |
Release name. |
|
string |
Source database ID. |
|
string |
Source database name in MatrixOne. |
|
object |
Published table range. |
|
string |
Table range mode. |
|
string[] |
Specifies the ID of the table; it is an empty array in all table mode. |
|
string |
The name of the source object for display. |
|
string |
Source object path for display. |
|
object[] |
List of target workspaces. |
|
string |
Target workspace ID. |
|
string |
Target workspace name; returned if there is a value. |
|
string |
Publish permission. |
|
string |
Release notes. |
|
string |
Creator ID. |
|
string |
Creation time. |
|
string |
Last updated time. |
Error response¶
{
"code": "ErrConcurrentUpdate",
"msg": "资源状态冲突",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The publication ID, request body, table, or target workspace is invalid. |
Check path parameters and request fields. |
|
|
The current identity does not have update permissions. |
Request permission to publish updates to the data. |
|
|
The publication does not exist or is not visible in the current workspace. |
Check release ID and workspace. |
|
|
The publication was modified by another request after being read. |
Submit after re-reading the latest object. |
|
|
Data publishing writing is temporarily suspended. |
Try again later. |
|
|
The server failed to update and publish. |
Try again later. |
Follow-up operations¶
After updating, Query data release list confirms the publication definition.