View permission schema¶
View the permission resources, actions, and grant scopes supported by the current workspace. Use them when configuring permission policies or object grants.
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/iam/permissions/schema
Preparation before calling¶
Prepare a personal access token that can access the target workspace and the target workspace ID.
Request parameters¶
curl -X GET "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/iam/permissions/schema" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target workspace ID. |
Successful response¶
On success, returns the permission schema available to the current workspace. When creating or updating a policy, use the returned schema version, action IDs, resource types, and scope options.
{
"code": "OK",
"msg": "OK",
"data": {
"schema_version": "schema-v1",
"capabilities": {
"application_policy_actions_included": true,
"matrixone_actions_included": true
},
"resources": [],
"actions": [],
"operations": [],
"request_id": "req-001",
"trace_id": "trace-001"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
string |
Current permission schema version. |
|
object |
Flags for the permission capabilities included in the current schema. |
|
object array |
Resource types and their supported scopes. |
|
object array |
Action definitions available to policies. |
|
object array |
Product operations and their permission requirements. |
|
string |
Request correlation ID. |
|
string |
Trace ID. |
Error response¶
{
"code": "ErrIAMSchemaInvalid",
"msg": "Service temporarily unavailable",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Error message. |
|
null |
— |
Next steps¶
Select policy inputs¶
Before validating or applying an application permission policy or an object grant, select matching actions, resource types, and grant scopes from the current schema.