cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create global request naming rule using configuration API based on SERVICE_REQUEST_ATTRIBUTE

henk_stobbe
Mentor

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


2 REPLIES 2

ChadTurner
Leader

Can you try making that rule via the UI? You might get it to work that way.

-Chad

curtis_kellogg
Newcomer

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"}

]