/v1/iam/sts-sessionsList STS sessions
List active and recent STS (role assumption) sessions for the current organization. Requires `iam:ListSTSSessions` permission.
Query Parameters
role_id
string<uuid>optionalquery
Filter by role ID
principal_id
string<uuid>optionalquery
Filter by principal ID (user or service account)
principal_type
stringoptionalquery
Filter by principal type
Enum: "user", "service_account"
active_only
booleanoptionalquery
Only show active (non-expired, non-revoked) sessions
Default: true
limit
integeroptionalquery
Maximum number of items to return
Default: 20
Example: 20
marker
string<uuid>optionalquery
ID of the last item from the previous page (for pagination)
Example: "550e8400-e29b-41d4-a716-446655440000"
Responses
List of STS sessions
Content-Type: application/json
sts_sessions
arrayoptionalmeta
objectoptionalAuthentication required or token invalid
Content-Type: application/json
error
objectrequiredInsufficient permissions
Content-Type: application/json
error
objectrequiredcurl -X GET "https://api.spo1.mycloud.com/v1/iam/sts-sessions" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-H "Content-Type: application/json"
Response
List of STS sessions
{"sts_sessions": [{"id": "550e8400-e29b-41d4-a716-446655440000","organization_id": "550e8400-e29b-41d4-a716-446655440000","role_id": "550e8400-e29b-41d4-a716-446655440000","role_name": "string","principal_id": "550e8400-e29b-41d4-a716-446655440000","principal_type": "user","principal_name": "string","session_name": "string","created_at": "2024-01-15T10:30:00Z","expires_at": "2024-01-15T10:30:00Z","last_used_at": "2024-01-15T10:30:00Z","revoked": true,"revoked_at": "2024-01-15T10:30:00Z","revoked_reason": "string","source_ip": "string","is_active": true}],"meta": {"total": 150,"limit": 20,"marker": "550e8400-e29b-41d4-a716-446655440000","has_more": true}}