Update web address rule domains
Relative path: /v2/policies/{policyUuid}/web-address-rules/{addressRuleUuid}/domains
Update all domains inside the web address rule. If the web address rule is empty, it will set specified vector of domains, otherwise it will replace all domains inside the web address rule. Original domains, that were part of web address rule will be replaced by the list of new ones.
Only domain part of URLs are extracted and imported.
All domains are imported once. Multiple URLs sharing domain part are imported once. Repeated addition of the same domain adds nothing to added_domains_count
.
Warning:
Even if single element is added the whole policy MUST BE validated.
Request body
Display Schema instead of an Example or vice-versa
Type |
Required |
Example |
Schema |
---|---|---|---|
application/json |
No |
{ "urls": [ "string" ], "sourceName": "string" } |
{
"$ref": "WebAddressRulesConfiguratorUpdateWebAddressRuleDomainsBody",
"urls": [
{
"type": "string"
}
],
"sourceName": {
"type": "string",
"description": "Name of the data source. Filename if the source is file."
}
} |
Parameters in path
Name |
Type |
Required |
Description |
---|---|---|---|
policyUuid |
string |
Yes |
Reference to policy. type: policy_management.v2.Policy |
addressRuleUuid |
string |
Yes |
Address rule where the domains will be updated. type: WebAddressRule |
Responses
Display Schema instead of an Example or vice-versa
Code |
Description |
Example |
Schema |
---|---|---|---|
200 |
Successful response. |
{ "addedDomainsCount": 0, "malformedDomains": [ "string" ] } |
{
"$ref": "v2UpdateWebAddressRuleDomainsResponse",
"addedDomainsCount": {
"type": "integer",
"description": "Count of truly imported domains duplicate domains are skipped.",
"format": "int64"
},
"malformedDomains": [
{
"type": "string"
}
]
} |
202 |
Response took too long; request cached. Response can be retrieved later using the response-id header. |
null |
[] |
400 |
One of the errors: 1. Bad or missing authorization. 2. Validation error. Invalid argument provided. |
null |
[] |
401 |
Token has expired or is invalid. |
null |
[] |
403 |
Access denied. Check permissions. |
null |
[] |
404 |
Requested resource not found. |
null |
[] |
429 |
Rate limit reached. Try again later. |
null |
[] |
500 |
Internal server failure. Try again later. |
null |
[] |
502 |
Internal server failure. Try again later. |
null |
[] |
503 |
Environment under maintenance. Try again later. |
null |
[] |
504 |
Action took too long; timeout reached |
null |
[] |