ユーザーのロールと権限を検証し、ユーザーのセッションを終了させる非同期ジョブを作成します。POSTリクエストのステータスを返します。
["123456","456789"]
ユーザーIDのリスト。
["user@sample.com","user2@sample.com"]
A list of user logins.
リクエストのステータスに関するメッセージを返します。
一部のパラメータが無効な場合にエラーを返します。
Users can not be NULL or EMPTY
when no value is provided.User id format is string
when the provided user id format is incorrect.Supported payload format is JSON
when the provided payload format is incorrect.権限が不足している場合にエラーを返します。
リソースが見つからなかった場合にエラーを返します。
レート制限を超えた場合にエラーを返します。
内部サーバーの問題が発生している場合にエラーを返します。
リクエストがタイムアウトした場合にエラーを返します。
予期しないクライアントエラー。
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)})));
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"
}