Logging Out
The logout call requires that the caller has equal or greater permissions than the user they are logging out.
Examples
If a user wants to logout, they can pass their authorized token in the following call:
example: https://192.168.2.1/api/logout?token=ABCDEF1234567890ABCDEF12345678
GET https://192.168.2.1/api/logout?username=admin&password=Admin_1234 Status: HTTP/1.1 200 OK
{
"code" : 200,
"result" : {
"address" : "192.168.2.103",
"isipcuser" : false,
"isremoteuser" : false,
"permission" : "admin",
"port" : "59486",
"timestamp" : "2:58:40:389:,
"token" : "B7083A0B14C0F0BEFFBED89B99EFBC",
"user" : "admin"
},
"status" : "success"
}
To logout another user (the next examples use monitor level which has read-only access), a user with equal or greater permissions can use their token to authorize the call:
example: https://192.168.2.1/api/logout?logoutUser=monitor&token=ABCDEF1234567890ABCDEF12345678
Pass credentials with the logout command to authorize the logout call of another user:
example: https://192.168.2.1/api/logout?username=admin&password=admin&logoutUser=monitor
GET https://192.168.2.1/api/logout?username=admin&password=Admin_1234&logoutUser=monitor
Status: HTTP/1.1 200 OK
{
"code" : 200,
"result" : {
"address" : "192.168.2.103",
"isipcuser" : false,
"isremoteuser" : false,
"permission" : "guest",
"port" : "59486",
"timestamp" : "2:58:40:389:,
"token" : "B7083A0B14C0F0BEFFBED89B99EFBC",
"user" : "guest"
},
"status" : "success"
}