07 May 2020 07:20 AM - last edited on 30 Aug 2022 11:37 AM by MaciejNeumann
Hello,
Using the API to create web request naming rules, it it correct that defining ANY placeholder works, but can not be used in the naming rule with the {} format?
Example:
{
"enabled": true,
"namingPattern": "{myplaceholder}",
"conditions": [
{
"attribute": "WEBREQUEST_URL_PATH",
"comparisonInfo": {
"type": "STRING",
"comparison": "BEGINS_WITH",
"value": "/url",
"negate": false,
"caseSensitive": false
}
}
],
"Placeholder": [
{"name": "myplaceholder",
"attribute": "WEBREQUEST_URL_PATH",
"kind": "ORIGINAL_TEXT"}
]
}
Gives: 400 Bad request. constraints violation
Pattern contains unknown method naming attribute 'myplaceholder'
KR Henk
Solved! Go to Solution.
10 May 2020 03:30 PM
Can you try making that rule via the UI? You might get it to work that way.
26 Apr 2021 02:02 PM
The api uses "placeholders" instead of "placeholder" . Change
"Placeholder": [
{"name": "myplaceholder",
"attribute": "WEBREQUEST_URL_PATH",
"kind": "ORIGINAL_TEXT"}
]
to
"placeholders": [
{"name": "myplaceholder",
"attribute": "WEBREQUEST_URL_PATH",
"kind": "ORIGINAL_TEXT"}
]