View role permission view¶
View the application permission policy, authorization source, and editable status of the specified role to provide a basis for modifying application permissions.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/iam/roles/{role_id}/permission-view
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First select the character.
Prepare personal access token and target workspace ID that can access the target workspace.
Request parameters¶
Replace $WORKSPACE_ID, $ROLE_ID, $CLOUDSIGMA_API_KEY in the example with actual values.
curl -X GET "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/iam/roles/$ROLE_ID/permission-view" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target workspace ID. |
|
string |
Yes |
Target role ID. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"role_id": "role-001",
"schema_version": "schema-v1",
"policy_version": 2,
"policy_hash": "sha256:example",
"role_kind": "custom",
"role_graph_version": "graph-v1",
"lifecycle_version": "tenant-role-lifecycle-v3:provisioning-v1",
"system_role": false,
"protected_role": false,
"policy_mutation_allowed": true,
"capabilities": {
"direct_policy_included": true,
"inherited_policy_included": false,
"effective_policy_included": false,
"matrixone_data_privileges_included": false,
"ownership_impact_included": false,
"caller_editable_state_included": false
},
"direct_grants": [],
"request_id": "req-001",
"trace_id": "trace-001"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
The role ID being viewed. |
|
string |
The permissions schema version used by the current policy. |
|
integer |
Current policy version. |
|
string |
Current policy hash value. |
|
string |
Role category. Value: |
|
string |
Current character diagram version. |
|
string |
Role lifecycle versions. |
|
boolean |
Whether it is a system role. |
|
boolean |
Whether it is a protected role. |
|
boolean |
Whether policy modification is currently allowed. |
|
object |
Data source tags contained in the current view. |
|
boolean |
Whether a direct strategy has been included. |
|
boolean |
Whether to include inheritance strategy. |
|
boolean |
Contains valid policies. |
|
boolean |
Whether to include MatrixOne data permissions. |
|
boolean |
Whether ownership effects are included. |
|
boolean |
Whether to include caller editable status. |
|
array of object |
Direct delegation of roles. Returns an empty array when there is no direct authorization. |
|
integer |
Apply policy version. |
|
string |
Statement ID in the application permissions policy. |
|
string |
Policy statement categories. Value: |
|
string |
Permission actions. |
|
string |
Resource type. |
|
string |
Resource scope. Values: |
|
string |
Resource ID. |
|
string |
Resource key. |
|
string |
Authorization index key. |
|
string |
Summary of conditions. |
|
string |
Action is granted. |
|
string |
Scope of delegation. Values: empty string, |
|
boolean |
Whether to allow application permissions to be delegated again. |
|
string |
Request association ID. |
|
string |
Link tracking ID. |
Confirm current policy status
Before verifying or saving the role application permission policy, first confirm that the role currently allows policy modification. Prepare for changes by following the policy status returned on this page.
Error response¶
Normal errors only return code and msg. When core error codes are present, data may contain request_id, trace_id, and core_error_code. Parse results by error response fields.
{
"code": "ErrIAMCoreUnavailable",
"msg": "服务暂时不可用"
}
Field |
Type |
Description |
|---|---|---|
code |
string |
error code. |
msg |
string |
error message. |
data |
object |
Only errors carrying core error codes return this object. Other errors are omitted. |
data.request_id |
string |
Current request identifier. |
data.trace_id |
string |
The tracking ID of the current request. |
data.core_error_code |
string |
Core error code. |