View the role inheritance graph

View the complete role relationships reachable from a specified role to identify indirect inheritance and potential cycles.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/iam/roles/{role_id}/inheritance-graph

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

First select the role.

Request parameters

Shell
curl -X GET "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/iam/roles/$ROLE_ID/inheritance-graph" \
  -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

On success, returns the role inheritance graph reachable from the target role and the current role graph version.

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "root_role_id": "role-001",
    "edges": [],
    "role_graph_version": "graph-v1"
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.root_role_id

string

Root role ID of the inheritance graph.

data.edges

object[]

Reachable role inheritance edges.

data.role_graph_version

string

Current role graph version.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}

Field

Type

Description

code

string

Error code.

msg

string

Error message.

data

null

—

Next steps

Confirm the inheritance graph

Before adding an inheritance relationship, view the complete role relationship graph and confirm that the new relationship does not create a cycle.

Last updated on