Listing User Login Sessions
Function
This API is used to list login sessions of a specified user. It can be called only from the organization's management account or from a delegated administrator account of a cloud service.
URI
GET /v1/identity-stores/{identity_store_id}/users/{user_id}/sessions
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
identity_store_id |
Yes |
String |
Globally unique ID of an identity source. |
|
user_id |
Yes |
String |
Globally unique ID of an IAM Identity Center user in the identity source. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Security-Token |
No |
String |
Security token (session token) of your temporary security credentials. If a temporary security credential is used, this header is required. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
session_list |
Array of UserSessionDto objects |
User login session list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
creation_time |
Long |
Session creation time. |
|
ip_address |
String |
IP address of a user. |
|
session_id |
String |
Session ID. |
|
session_not_valid_after |
Long |
Session expiration time. |
|
user_agent |
String |
User client information. |
|
user_id |
String |
Unique user ID. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
request_id |
String |
Unique ID of a request. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
|
request_id |
String |
Unique ID of a request. |
|
encoded_authorization_message |
String |
Encrypted error message. |
Example Request
Querying the login session information of a specified user
GET https://{hostname}/v1/identity-stores/{identity_store_id}/users
Example Response
Status code: 200
Successful
{
"session_list" : [ {
"creation_time" : 1753858567,
"ip_address" : "your ip",
"session_id" : "ea70c04b-d510-41c7-b0d1-51d56xxxx",
"session_not_valid_after" : 1753887367,
"user_agent" : "[Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36]",
"user_id" : "201dca3f-965b-4311-xxxx-xxxx"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful. |
|
400 |
Bad request. |
|
403 |
Forbidden. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot