Query the details of the running strategy¶
Read the scope, admission criteria, budget, retry, and data policy of a run policy configuration.
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/runtime-policy-profiles/{policy_id}
Preparation before calling¶
First query the running policy list to obtain the policy ID. 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: Target workspace ID, passed through theX-Workspace-IDHeader and also asworkspace_idin the path.$POLICY_ID: The running policy ID to query aspolicy_idin the path.
Request example¶
curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/runtime-policy-profiles/$POLICY_ID" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
Yes |
The current workspace ID. |
|
string |
Yes |
The running policy ID. |
Successful response¶
Returns 200 on success.
{
"code": 0,
"data": {
"id": "policy_01",
"workspace_id": "ws_01",
"name": "默认运行限制",
"status": "active",
"scope_type": "workspace",
"admission": {},
"budgets": {
"max_steps": 20
},
"retry": {},
"version": 1,
"created_at": "2026-08-18T01:00:00Z",
"updated_at": "2026-08-18T01:00:00Z"
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
string |
Run policy ID. |
|
string |
ID of the workspace to which it belongs. |
|
string |
Policy name and description; description is only returned if there is a value. |
|
string |
Policy name and description; description is only returned if there is a value. |
|
string |
Policy status, scope type, and reference. |
|
string |
Policy status, scope type, and reference. |
|
string |
Policy status, scope type, and reference. |
|
object |
Admission, budget, and retry configuration; returned only if there is a value. |
|
object |
Admission, budget, and retry configuration; returned only if there is a value. |
|
object |
Admission, budget, and retry configuration; returned only if there is a value. |
|
object |
Data, product, and provider constraints; only returned if there is a value. |
|
object |
Data, product, and provider constraints; only returned if there is a value. |
|
object |
Data, product, and provider constraints; only returned if there is a value. |
|
integer |
Policy version. |
|
object |
Additional labels, annotations, and metadata; returned only when values are present. |
|
object |
Additional labels, annotations, and metadata; returned only when values are present. |
|
object |
Additional labels, annotations, and metadata; returned only when values are present. |
|
string |
Creation and update time. |
|
string |
Creation and update time. |
Error response¶
{
"code": 3,
"message": "运行策略不存在"
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The path parameter is invalid. |
Check workspace and policy IDs. |
|
|
Credentials are missing or invalid. |
Check API Key. |
|
|
The current identity does not have read permission. |
Use valid credentials, or contact your administrator for authorization. |
|
|
Run policy does not exist. |
Query the running policy list first. |
|
|
The running policy service is unavailable. |
Try again later. |
Follow-up operations¶
Use Update running strategy to modify variable fields.