Save New Element Type
1 min
POST
{{url}}/aioc-rest-web/rest/elementType/saveElementType
Header Parameters
- Content-TypestringExample
- X-XSRF-TOKENstringExample
Body Parameters
- bodystringExample
{ "elementTypeId": "acme", "elementTypeName": "ACME", "vendor": { "dbId": 57, "name": "Acme" }, "category": { "dbId": 54, "name": "Other" }, "elementTypeProperties": [ { "dbId": 20474, "elementTypePropertyValue": ".*(?i)user(name)?.*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": { "displayName": "enforcer.terminal.behaviour.exc_last_line_patterns", "allowMultipleValues": true, "valuesPredefined": false, "elementTypePropertyValues": null, "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "valueType": "REGEX", "encryption": false } }, { "dbId": 130, "elementTypePropertyValue": ".*(?i)password.*[:|>].*", "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "elementTypePropertyType": { "displayName": "enforcer.terminal.behaviour.exc_last_line_patterns", "allowMultipleValues": true, "valuesPredefined": false, "elementTypePropertyValues": null, "elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns", "valueType": "REGEX", "encryption": false } } ] }
Responses
500
curl
curl --request POST \
--url {{url}}/aioc-rest-web/rest/elementType/saveElementType \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/elementType/saveElementType", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "net/http"
url = URI("{{url}}/aioc-rest-web/rest/elementType/saveElementType")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
url = "{{url}}/aioc-rest-web/rest/elementType/saveElementType"
payload = {}
headers = {
'accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
500
Element Type Id already exists.