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.

HTTP
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.

Shell
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

workspace_id

string

Yes

Target workspace ID.

role_id

string

Yes

Target role ID.

Successful response

JSON
{
  "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

data.role_id

string

The role ID being viewed.

data.schema_version

string

The permissions schema version used by the current policy.

data.policy_version

integer

Current policy version.

data.policy_hash

string

Current policy hash value.

data.role_kind

string

Role category. Value: custom, system.

data.role_graph_version

string

Current character diagram version.

data.lifecycle_version

string

Role lifecycle versions.

data.system_role

boolean

Whether it is a system role.

data.protected_role

boolean

Whether it is a protected role.

data.policy_mutation_allowed

boolean

Whether policy modification is currently allowed.

data.capabilities

object

Data source tags contained in the current view.

data.capabilities.direct_policy_included

boolean

Whether a direct strategy has been included.

data.capabilities.inherited_policy_included

boolean

Whether to include inheritance strategy.

data.capabilities.effective_policy_included

boolean

Contains valid policies.

data.capabilities.matrixone_data_privileges_included

boolean

Whether to include MatrixOne data permissions.

data.capabilities.ownership_impact_included

boolean

Whether ownership effects are included.

data.capabilities.caller_editable_state_included

boolean

Whether to include caller editable status.

data.direct_grants

array of object

Direct delegation of roles. Returns an empty array when there is no direct authorization.

data.direct_grants[].policy_version

integer

Apply policy version.

data.direct_grants[].statement_id

string

Statement ID in the application permissions policy.

data.direct_grants[].statement_kind

string

Policy statement categories. Value: action, grant_action.

data.direct_grants[].action_id

string

Permission actions.

data.direct_grants[].resource_type

string

Resource type.

data.direct_grants[].scope_mode

string

Resource scope. Values: all, resources, parent, path_prefix.

data.direct_grants[].resource_id

string

Resource ID.

data.direct_grants[].resource_key

string

Resource key.

data.direct_grants[].grant_index_key

string

Authorization index key.

data.direct_grants[].condition_hash

string

Summary of conditions.

data.direct_grants[].target_action_id

string

Action is granted.

data.direct_grants[].grant_scope_mode

string

Scope of delegation. Values: empty string, all, resources, parent, path_prefix.

data.direct_grants[].grant_delegatable

boolean

Whether to allow application permissions to be delegated again.

data.request_id

string

Request association ID.

data.trace_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.

JSON
{
  "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.

Last updated on