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 the X-API-Key Header.

  • $WORKSPACE_ID: Target workspace ID, passed through the X-Workspace-ID Header and also as workspace_id in the path.

  • $POLICY_ID: The running policy ID to query as policy_id in 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

workspace_id

string

Yes

The current workspace ID.

policy_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

code

integer

0 on success.

data.id

string

Run policy ID.

data.workspace_id

string

ID of the workspace to which it belongs.

data.name

string

Policy name and description; description is only returned if there is a value.

data.description

string

Policy name and description; description is only returned if there is a value.

data.status

string

Policy status, scope type, and reference.

data.scope_type

string

Policy status, scope type, and reference.

data.scope_ref

string

Policy status, scope type, and reference.

data.admission

object

Admission, budget, and retry configuration; returned only if there is a value.

data.budgets

object

Admission, budget, and retry configuration; returned only if there is a value.

data.retry

object

Admission, budget, and retry configuration; returned only if there is a value.

data.data_policy

object

Data, product, and provider constraints; only returned if there is a value.

data.artifact_policy

object

Data, product, and provider constraints; only returned if there is a value.

data.provider_constraints

object

Data, product, and provider constraints; only returned if there is a value.

data.version

integer

Policy version.

data.labels

object

Additional labels, annotations, and metadata; returned only when values are present.

data.annotations

object

Additional labels, annotations, and metadata; returned only when values are present.

data.metadata

object

Additional labels, annotations, and metadata; returned only when values are present.

data.created_at

string

Creation and update time.

data.updated_at

string

Creation and update time.

Error response

{
  "code": 3,
  "message": "运行策略不存在"
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

2INVALID_ARGUMENT

The path parameter is invalid.

Check workspace and policy IDs.

401

6UNAUTHENTICATED

Credentials are missing or invalid.

Check API Key.

403

5PERMISSION_DENIED

The current identity does not have read permission.

Use valid credentials, or contact your administrator for authorization.

404

3NOT_FOUND

Run policy does not exist.

Query the running policy list first.

503

15UNAVAILABLE

The running policy service is unavailable.

Try again later.

Follow-up operations

Use Update running strategy to modify variable fields.

Last updated on