Disconnect by Session ID API
POST /disconnectBySessionId
Description
This API endpoint allows an admin to disconnect a user session by providing the session's unique identifier. This operation is useful for terminating a specific session that may be unauthorized or needs to be closed for other reasons.
Request Body
The request utilizes GraphQL to perform the disconnectBySessionId
mutation.
Mutation:
mutation disconnectBySessionId ($onlineSessionId: String!) {
disconnectBySessionId (onlineSessionId: $onlineSessionId)
}
Variables:
{
"onlineSessionId": "<Session_ID>"
}
- onlineSessionId (String): The unique identifier of the online session that needs to be disconnected.
Response:
-
Success (200 OK):
- If the session disconnection is successful, the response will confirm that the session was disconnected.
{
"data": {
"disconnectBySessionId": true
}
} -
Error (4XX/5XX):
- If there is an issue with disconnecting the session, the response will include an appropriate error message and status code.
Note:
Ensure that the onlineSessionId
corresponds to an active session within the platform. This API should be used by admins with the necessary permissions to manage and terminate user sessions as required.