06 May 2020
11:20 PM
- last edited on
30 Aug 2022
03: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.
Can you try making that rule via the UI? You might get it to work that way.
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"}
]