Skip to main content

"deleteSession" (jsonAction)

Disconnect a client from Remote Procedure Call service

The "deleteSession" action disconnects the client and closes the server-side resources the client is consuming. It requires a valid "authToken" from the "createSession" action.

Transactions that are not committed are automatically rolled back.

Links: Concepts | Tutorials | FAQs

Tip

Use "deleteSession" to remove a permanent session.

Request examples

Minimal

{
  "api": "admin",
  "action": "deleteSession",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{
  "requestId": "2",
  "api": "admin",
  "action": "deleteSession",
  "params": {},
  "responseOptions": {},
  "apiVersion": "1.0",
  "debug": "max",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}

Note

If the target object does not exist, the response returns success and the debug property contains a warning that the object was not found.

{
  "result": {},
  "debugInfo": {
    "request": {
      "api": "admin",
      "action": "deleteSession",
      "debug": "max",
      "authToken": "replaceWithAuthTokenFromCreateSession"
    }
  },
  "errorCode": 0,
  "errorMessage": "",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
{
  "requestId": "2",
  "debugInfo": {
    "request": {
      "api": "admin",
      "action": "deleteSession",
      "requestId": "2",
      "authToken": "replaceWithAuthTokenFromCreateSession"
    },
    "warnings": [
      {
        "code": 12031,
        "message": "'authToken' does not match any existing session. Use a valid 'authToken'."
      }
    ]
  },
  "errorCode": 0,
  "errorMessage": "",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}

The "deleteSession" action disconnects a client from the Remote Procedure Call service and closes the server-side resources the client is using. It also automatically rolls back any transactions that have not been committed.

API actions
JSON ADMIN API
jsonAction
admin session
deleteSession
deleteSessions
deletesSession
deletesSessions
delete session
cancel session
close session
end session
disconnect from server
log out
leave session
rollback transaction