KRON PAM API Collection v3.4.0
Authentication
Logout
1 min
code examples curl location globoff request post '{{url}}/aioc rest web/rest/logout' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x xsrf token {{csrftoken}}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x xsrf token", "{{csrftoken}}"); var requestoptions = { method 'post', headers myheaders, redirect 'follow' }; fetch("{{url}}/aioc rest web/rest/logout", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("{{url}}/aioc rest web/rest/logout") http = net http new(url host, url port); request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["x xsrf token"] = "{{csrftoken}}" response = http request(request) puts response read body import requests import json url = "{{url}}/aioc rest web/rest/logout" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json', 'x xsrf token' '{{csrftoken}}' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses ok