Element Type
3 min
Get Element Types
GET
http://{{hostname}}/aioc-rest-web/rest/element/loadAll
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/element/loadAll");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Get All Element Type Property Type
GET
http://{{hostname}}/aioc-rest-web/rest/element/loadAllElementTypePropertyType
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/element/loadAllElementTypePropertyType");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Save Element Type
POST
http://{{hostname}}/aioc-rest-web/rest/element/saveElementType
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/element/saveElementType");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"elementTypeId\": \"test_element_type\",\n \"elementTypeName\": \"Test Element Type\",\n \"vendor\": null,\n \"category\": null,\n \"elementTypeProperties\": [\n {\n \"elementTypePropertyValue\": \"do_nothing\",\n \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_z\"\n }\n ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Delete Element Type
POST
http://{{hostname}}/aioc-rest-web/rest/element/removeElementType
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/element/removeElementType");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"dbId\": 927\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Delete Multiple ElementTypes
POST
http://{{hostname}}/aioc-rest-web/rest/element/removeMultiElementType
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/element/removeMultiElementType");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n {\n \"dbId\": 930\n },\n {\n \"dbId\": 932\n }\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Update Element Type
POST
http://{{hostname}}/aioc-rest-web/rest/element/saveElementType
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/element/saveElementType");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"dbId\": 920,\n \"elementTypeId\": \"test_element_type\",\n \"elementTypeName\": \"Test Element Type\",\n \"vendor\": null,\n \"category\": null,\n \"elementTypeProperties\": [\n {\n \"elementTypePropertyValue\": \"do_nothing\",\n \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_z\"\n },\n {\n \"elementTypePropertyValue\": \"abort\",\n \"elementTypePropertyKey\": \"enforcer.terminal.behaviour.ctrl_c\"\n }\n ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);