Get Http Request Rules

Get Http Request Rules

Retrieves HTTP request rules of a Virtual Service.

Request
URI
GET
https://{api_host}/cloudapi/1.0.0/loadBalancer/virtualServices/{virtualServiceId}/httpPolicy/requestRules
COPY
Path Parameters
string
virtualServiceId
Required

virtualServiceId


Authentication
This operation uses the following authentication methods.
Responses
200
Returns EdgeVirtualServiceHttpRequestRules of type(s) application/json;version=39.1
{
    "values": [
        {
            "name": "string",
            "active": false,
            "logging": false,
            "matchCriteria": {
                "clientIpMatch": {
                    "matchCriteria": "string",
                    "addresses": [
                        "string"
                    ]
                },
                "servicePortMatch": {
                    "matchCriteria": "string",
                    "ports": [
                        0
                    ]
                },
                "methodMatch": {
                    "matchCriteria": "string",
                    "methods": [
                        "string"
                    ]
                },
                "protocol": "string",
                "pathMatch": {
                    "matchCriteria": "string",
                    "matchStrings": [
                        "string"
                    ]
                },
                "queryMatch": [
                    "string"
                ],
                "headerMatch": [
                    {
                        "matchCriteria": "string",
                        "value": [
                            "string"
                        ],
                        "key": "string"
                    }
                ],
                "cookieMatch": {
                    "matchCriteria": "string",
                    "key": "string",
                    "value": "string"
                }
            },
            "headerActions": [
                {
                    "action": "string",
                    "name": "string",
                    "value": "string"
                }
            ],
            "redirectAction": {
                "statusCode": 0
            },
            "rewriteUrlAction": {
                "host": "string",
                "path": "string",
                "query": "string",
                "keepQuery": false
            }
        }
    ]
}
array of object
values
Optional
Constraints: maxItems: 100

Defines a HTTP request rule. It consists of a match criteria along with the actions to execute once the criteria is satisfied. If the match criteria is not set, defined actions will be be executed for all requests. Multiple header actions are supported which can be configured in combination with rewrite URL action. Redirect action can only be configured alone.


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/cloudapi/1.0.0/loadBalancer/virtualServices/{virtualServiceId}/httpPolicy/requestRules