Portal Functions
5 min
Get All Functions
GET
http://{{hostname}}/aioc-rest-web/rest/realms/getFunctions
var client = new RestClient("http://{{hostname }}/aioc-rest-web/rest/realms/getFunctions");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Get All Realms
GET
http://{{hostname}}/aioc-rest-web/rest/realms/getRealms
var client = new RestClient("http://{{hostname }}/aioc-rest-web/rest/realms/getRealms");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Save Realm
POST
http://{{hostname}}/aioc-rest-web/rest/realms/saveRealm
var client = new RestClient("http://{{hostname }}/aioc-rest-web/rest/realms/saveRealm");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"Test realm\",\n \"description\": null,\n \"functionGroups\": [\n {\n \"dbId\": 263875\n }\n ],\n \"userGroups\": [\n {\n \"id\": \"DEFAULT_GROUP_SYSYEM_USERS\"\n }\n ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Save Function Group
POST
http://{{hostname}}/aioc-rest-web/rest/realms/saveFunctionGroup
var client = new RestClient("http://{{hostname }}/aioc-rest-web/rest/realms/saveFunctionGroup");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"Test Function Group\",\n \"description\": null,\n \"functions\": [\n {\n \"dbId\": 128,\n \"name\": \"aioc.users.approve.finalApproval\"\n },\n {\n \"dbId\": 127,\n \"name\": \"aioc.users.approve.all_user\"\n }\n ],\n \"realms\": [\n 4164485\n ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Update Function Group
POST
http://{{hostname}}/aioc-rest-web/rest/realms/saveFunctionGroup
var client = new RestClient("http://{{hostname }}/aioc-rest-web/rest/realms/saveFunctionGroup");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"dbId\": 4164597,\n \"name\": \"Test Function Group\",\n \"description\": null,\n \"functions\": [\n {\n \"dbId\": 127,\n \"name\": \"aioc.users.approve.all_user\"\n }\n ],\n \"realms\": [\n 4164485\n ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Delete Function Group
POST
http://{{hostname}}/aioc-rest-web/rest/realms/deleteFunctionGroup
var client = new RestClient("http://{{hostname }}/aioc-rest-web/rest/realms/deleteFunctionGroup");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"dbId\": 4164597\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Update Realm
POST
http://{{hostname}}/aioc-rest-web/rest/realms/saveRealm
var client = new RestClient("http://{{hostname }}/aioc-rest-web/rest/realms/saveRealm");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"dbId\": 4164485,\n \"id\": \"068fd650-983f-4635-bf66-85ce75c3811c\",\n \"name\": \"Test realm\",\n \"description\": null,\n \"functionGroups\": [],\n \"userGroups\": [\n {\n \"id\": \"DEFAULT_GROUP_SYSYEM_USERS\"\n }\n ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Delete Realm
POST
http://{{hostname}}/aioc-rest-web/rest/realms/deleteRealm
var client = new RestClient("http://{{hostname }}/aioc-rest-web/rest/realms/deleteRealm");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"dbId\": 4164485\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Get Realm By Id
GET
http://{{hostname}}/aioc-rest-web/rest/realms/getRealmById/{realmUid}
var client = new RestClient("http://{{hostname }}/aioc-rest-web/rest/realms/getRealmById/1870d808-ce2d-4c85-a213-01ae39149945");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Get All FunctionGroups
GET
http://{{hostname}}/aioc-rest-web/rest/realms/getFunctionGroups
var client = new RestClient("http://{{hostname }}/aioc-rest-web/rest/realms/getFunctionGroups");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);