Query data subscription list¶
Lists the data subscriptions received by the current workspace.
GET https://moi.matrixorigin.cn/newmoi/data-share/subscriptions
Preparation before calling¶
Prepare a personal access token and target workspace ID that has 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: The workspace ID to be queried is passed through theX-Workspace-IDHeader.
Request example¶
curl "https://moi.matrixorigin.cn/newmoi/data-share/subscriptions?page=1&page_size=20" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Query parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
Search by keyword. |
|
string |
No |
Filter by subscription status. |
|
integer |
No |
Page number; default |
|
integer |
No |
Number per page; default |
Successful response¶
Returns 200 on success. data.list is the current page and data.total is the total number of matches.
{
"code": "OK",
"msg": "OK",
"data": {
"list": [
{
"id": "201",
"pub_name": "sales-share",
"source_database_id": "101",
"mo_database_name": "sales",
"table_scope": {
"mode": "selected",
"object_ids": ["1001"]
},
"target_database_id": "",
"obj_display_name": "sales",
"obj_display_path": "catalog/sales",
"source_workspace_id": "ws-001",
"source_workspace_name": "数据工作区",
"publisher": "user-001",
"published_at": "2026-08-18T10:00:00Z",
"status": "unsubscribed",
"sub_name": "",
"subscribed_by": "",
"created_at": "2026-08-18T10:00:00Z"
}
],
"total": 1,
"page": 1,
"page_size": 20
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
object[] |
Current page subscription list; empty array when there is no result. |
|
integer |
The total number of matches. |
|
integer |
Current page number. |
|
integer |
Number per page. |
|
string |
Subscription ID. |
|
string |
Source publication name. |
|
string |
Source database ID. |
|
string |
Source database name. |
|
object |
Publish shared table range. |
|
string |
Range mode: |
|
string[] |
List of table IDs when the range mode is |
|
string |
ID of the subscription database in the target workspace; empty string if not accepted. |
|
string |
The display name of the source database. |
|
string |
The display path of the source database. |
|
string |
Source workspace ID. |
|
string |
Source workspace name; returned if there is a value. |
|
string |
Publisher. |
|
string |
Release time. |
|
string |
Current subscription status. |
|
string |
The name of the subscription database in the target workspace; empty string if not accepted. |
|
string |
Identity to accept subscription; empty string if not accepted. |
|
string |
The time when the subscription was accepted; an empty string if not accepted. |
In this document, [] after a type means an array; for example, object[] is an array of objects. In field paths, [] means each item in an array; for example, data.list[].id is the id field of each item in data.list.
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
Pagination or filtering parameters cannot be parsed. |
Check |
|
|
The current identity does not have permission to read the subscription. |
Request to grant read permission to the data subscription. |
|
|
Dependent services are temporarily unavailable. |
Try again later. |
|
|
The server failed to read the subscription list. |
Try again later. |
Follow-up operations¶
Use data.list[].id Accept data subscription.