Validates the roles and permissions of the user, and creates asynchronous jobs to terminate the user's sessions. Returns the status for the POST request.
["123456","456789"]
A list of user IDs
["user@sample.com","user2@sample.com"]
A list of user logins
Returns a message about the request status.
Returns an error if some of the parameters are not valid.
Users can not be NULL or EMPTY
when no value is providedUser id format is string
when the provided user id format
is incorrectSupported payload format is JSON
when the provided payload
format is incorrectReturns an error if there are insufficient permissions.
Returns an error if the resource could not be found.
Returns an error if the rate limit is exceeded.
Returns an error if there is an internal server issue.
Returns an error if the request timed out.
An unexpected client error.
curl -i -X POST "https://api.box.com/2.0/users/terminate_sessions" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-H "accept: application/json" \
-d
{
user_ids: ["6178859178", "4824866571"]
user_logins: ["user@example.com", "user2@example.com",]
}
await client.sessionTermination.terminateUsersSessions({
userIds: [getEnvVar('USER_ID')],
userLogins: [user.login!],
} satisfies TerminateUsersSessionsRequestBody);
client.session_termination.terminate_users_sessions(
[get_env_var("USER_ID")], [user.login]
)
await client.SessionTermination.TerminateUsersSessionsAsync(requestBody: new TerminateUsersSessionsRequestBody(userIds: Array.AsReadOnly(new [] {Utils.GetEnvVar("USER_ID")}), userLogins: Array.AsReadOnly(new [] {NullableUtils.Unwrap(user.Login)})));
try await client.sessionTermination.terminateUsersSessions(requestBody: TerminateUsersSessionsRequestBody(userIds: [Utils.getEnvironmentVariable(name: "USER_ID")], userLogins: [user.login!]))
var userIDs = ['33333', '44444'];
var userLogins = ['user1@example.com', 'user2@example.com'];
client.users.terminateSession({
user_ids: userIDs,
user_logins: userLogins
}).then((result) => {
/* result -> {
message: "Request is successful, please check the admin events for the status of the job" }
*/
});
{
"message": "Request is successful, please check the admin\nevents for the status of the job"
}