Logout

post

/restapi/logout

This API deletes the session for the user

Request

There are no request parameters for this operation.

Back to Top

Response

200 Response

OK

401 Response

Attempt to logout when not already logged in

405 Response

Invalid request method
Back to Top

Examples

Example of Accessing the API with cURL

The following example shows how to logs user out by submitting a POST request on the REST resource using cURL. If the request requires a timestamp, use the timestamp from the response of the /login API. For more information about cURL, see Use cURL.

curl -X POST \
    -b cookies.txt \
    "https://$IPADDR/restapi/logout"

Example of the Response Headers

The following shows an example of the response headers.

HTTP/1.1 200 OK
Date: Wed, 09 Dec 2020 18:37:55 GMT
Server: Apache/2.4.6 () OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.40
Vary: Accept-Encoding
X-UA-Compatible: IE=Edge,chrome=1
Transfer-Encoding: chunked
Content-Type: application/json

Example of the Response Body

The following example shows the contents of the response body in JSON format.

{
  "status": "success",
  "message": "Logout Success - Deleted session for user talariuser"
}
Back to Top