Skip to main content

"deleteSession"

JSON ADMIN "deleteSession" disconnects 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.

Tip

Use "deleteSession" to remove a permanent session.

Request examples

Minimal request

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

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.

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

Use the deleteSession API action to disconnect the client from the RPC service and close the server-side resources the client is consuming

API actionsJSON ADMIN APIjsonActionadmin sessiondeleteSessiondeleteSessionsdeletesSessiondeletesSessionsdelete session