Authentication
1 min
Login
POST
http://{{hostname}}/aioc-rest-web/rest/login
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/login");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Cookie", "NETRIGHT_SESSIONID=a1b71fc8-da07-4c0a-b582-c17e03f8fbbf");
request.AddParameter("application/json", "{\"username\":\"admin\",\"password\":\"admin\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Logout
POST
http://{{hostname}}/aioc-rest-web/rest/logout
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/logout");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);