ByCloud Docs
GuidesCLIAPISDK
get/v1/iam/sts-sessions

List STS sessions

List active and recent STS (role assumption) sessions for the current organization. Requires `iam:ListSTSSessions` permission.

Query Parameters

role_id

string<uuid>optional

query

Filter by role ID

principal_id

string<uuid>optional

query

Filter by principal ID (user or service account)

principal_type

stringoptional

query

Filter by principal type

Enum: "user", "service_account"

active_only

booleanoptional

query

Only show active (non-expired, non-revoked) sessions

Default: true

limit

integeroptional

query

Maximum number of items to return

Default: 20

Example: 20

marker

string<uuid>optional

query

ID of the last item from the previous page (for pagination)

Example: "550e8400-e29b-41d4-a716-446655440000"

Responses

200

List of STS sessions

Content-Type: application/json

sts_sessions

arrayoptional

meta

objectoptional
401

Authentication required or token invalid

Content-Type: application/json

error

objectrequired
403

Insufficient permissions

Content-Type: application/json

error

objectrequired
curl -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
}
}