PATCH /apipolicy/{uuid}

PATCH /apipolicy/{uuid}

/apipolicy/{uuid}/{uuid}

Request
URI
PATCH
https://{api_host}/api/apipolicy/{uuid}
COPY
Path Parameters
string
uuid
Required  

UUID of the object to fetch

Query Parameters
string
name
Optional

object name

Header Parameters
string
X-Avi-Tenant
Optional

Avi Tenant Header

string
X-Avi-Tenant-UUID
Optional

Avi Tenant Header UUID

string
X-Avi-Version
Required  

The caller is required to set Avi Version Header to the expected version of configuration. The response from the controller will provide and accept data according to the specified version. The controller will reject POST and PUT requests where the data is not compatible with the specified version.

string
X-CSRFToken
Optional

Avi Controller may send back CSRF token in the response cookies. The caller should update the request headers with this token else controller will reject requests.


Request Body

ApiPolicy object creation

ApiPolicy of type(s) application/json
Optional

Show optional properties

{
    "name": "string"
}
{
    "_last_modified": "string",
    "active_api_labels": {
        "enabled": false,
        "labels": [
            "string"
        ]
    },
    "api_spec_info": {
        "component_schema_count": 0,
        "description": "string",
        "inline_schema_count": 0,
        "oas_version": "string",
        "path_count": 0,
        "servers": [
            {
                "description": "string",
                "url": "string"
            }
        ],
        "title": "string",
        "version": "string"
    },
    "description": "string",
    "file_object_refs": [
        "string"
    ],
    "label_mappings": [
        {
            "api_policy_actions": [
                "string"
            ],
            "enabled": false,
            "label": "string"
        }
    ],
    "name": "string",
    "non_api_url_labels": {
        "enabled": false,
        "labels": [
            "string"
        ]
    },
    "orphan_api_classification_settings": {
        "enabled": false,
        "inspection_interval_unit": "string",
        "inspection_interval_value": 0
    },
    "orphan_api_labels": {
        "enabled": false,
        "labels": [
            "string"
        ]
    },
    "path_refs": [
        "string"
    ],
    "routing_info": {
        "rules": [
            {
                "matches": {
                    "bot_detection_result": {
                        "classifications": [
                            {
                                "type": "string",
                                "user_defined_type": "string"
                            }
                        ],
                        "match_operation": "string"
                    },
                    "client_ip": {
                        "addrs": [
                            {
                                "addr": "string",
                                "type": "string"
                            }
                        ],
                        "group_refs": [
                            "string"
                        ],
                        "match_criteria": "string",
                        "prefixes": [
                            {
                                "ip_addr": {
                                    "addr": "string",
                                    "type": "string"
                                },
                                "mask": 0
                            }
                        ],
                        "ranges": [
                            {
                                "begin": {
                                    "addr": "string",
                                    "type": "string"
                                },
                                "end": {
                                    "addr": "string",
                                    "type": "string"
                                }
                            }
                        ]
                    },
                    "cookie": {
                        "match_case": "string",
                        "match_criteria": "string",
                        "name": "string",
                        "value": "string"
                    },
                    "geo_matches": [
                        {
                            "attribute": "string",
                            "match_operation": "string",
                            "values": [
                                "string"
                            ]
                        }
                    ],
                    "hdrs": [
                        {
                            "hdr": "string",
                            "match_case": "string",
                            "match_criteria": "string",
                            "string_group_refs": [
                                "string"
                            ],
                            "value": [
                                "string"
                            ]
                        }
                    ],
                    "host_hdr": {
                        "match_case": "string",
                        "match_criteria": "string",
                        "value": [
                            "string"
                        ]
                    },
                    "ip_reputation_type": {
                        "match_operation": "string",
                        "reputation_types": [
                            "string"
                        ]
                    },
                    "label": {
                        "match_criteria": "string",
                        "values": [
                            "string"
                        ]
                    },
                    "method": {
                        "match_criteria": "string",
                        "methods": [
                            "string"
                        ]
                    },
                    "path": {
                        "match_case": "string",
                        "match_criteria": "string",
                        "match_decoded_string": false,
                        "match_str": [
                            "string"
                        ],
                        "string_group_refs": [
                            "string"
                        ]
                    },
                    "protocol": {
                        "match_criteria": "string",
                        "protocols": "string"
                    },
                    "query": {
                        "match_case": "string",
                        "match_criteria": "string",
                        "match_decoded_string": false,
                        "match_str": [
                            "string"
                        ],
                        "string_group_refs": [
                            "string"
                        ]
                    },
                    "source_ip": {
                        "addrs": [
                            {
                                "addr": "string",
                                "type": "string"
                            }
                        ],
                        "group_refs": [
                            "string"
                        ],
                        "match_criteria": "string",
                        "prefixes": [
                            {
                                "ip_addr": {
                                    "addr": "string",
                                    "type": "string"
                                },
                                "mask": 0
                            }
                        ],
                        "ranges": [
                            {
                                "begin": {
                                    "addr": "string",
                                    "type": "string"
                                },
                                "end": {
                                    "addr": "string",
                                    "type": "string"
                                }
                            }
                        ]
                    },
                    "tls_fingerprint_match": {
                        "fingerprints": [
                            "string"
                        ],
                        "match_operation": "string",
                        "string_group_refs": [
                            "string"
                        ]
                    },
                    "version": {
                        "match_criteria": "string",
                        "versions": [
                            "string"
                        ]
                    },
                    "vs_port": {
                        "match_criteria": "string",
                        "ports": [
                            0
                        ]
                    }
                },
                "name": "string"
            }
        ]
    },
    "server_info": {
        "path_prefix": "string",
        "servers": [
            {
                "description": "string",
                "url": "string"
            }
        ]
    },
    "shadow_api_labels": {
        "enabled": false,
        "labels": [
            "string"
        ]
    },
    "tenant_ref": "string",
    "url": "string",
    "uuid": "string",
    "validation_settings": {
        "failed_validation_header_parameter_action": "string",
        "failed_validation_path_parameter_action": "string",
        "failed_validation_query_argument_action": "string",
        "failed_validation_request_body_parameter_action": "string",
        "missing_mandatory_header_parameter_action": "string",
        "missing_mandatory_query_argument_action": "string",
        "missing_mandatory_request_body_parameter_action": "string",
        "request_outside_path_prefix_action": "string",
        "unexpected_query_argument_action": "string",
        "unexpected_request_body_parameter_action": "string",
        "unexpected_request_header_action": "string",
        "unknown_content_type_action": "string",
        "unknown_http_method_action": "string",
        "unknown_path_action": "string",
        "unknown_response_content_type_action": "string",
        "unknown_response_status_code_action": "string"
    },
    "zombie_api_classification_settings": {
        "enabled": false,
        "inspection_interval_unit": "string",
        "inspection_interval_value": 0,
        "min_percent": "number"
    },
    "zombie_api_labels": {
        "enabled": false,
        "labels": [
            "string"
        ]
    }
}
Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns ApiPolicy of type(s) application/json
{
    "_last_modified": "string",
    "active_api_labels": {
        "enabled": false,
        "labels": [
            "string"
        ]
    },
    "api_spec_info": {
        "component_schema_count": 0,
        "description": "string",
        "inline_schema_count": 0,
        "oas_version": "string",
        "path_count": 0,
        "servers": [
            {
                "description": "string",
                "url": "string"
            }
        ],
        "title": "string",
        "version": "string"
    },
    "description": "string",
    "file_object_refs": [
        "string"
    ],
    "label_mappings": [
        {
            "api_policy_actions": [
                "string"
            ],
            "enabled": false,
            "label": "string"
        }
    ],
    "name": "string",
    "non_api_url_labels": {
        "enabled": false,
        "labels": [
            "string"
        ]
    },
    "orphan_api_classification_settings": {
        "enabled": false,
        "inspection_interval_unit": "string",
        "inspection_interval_value": 0
    },
    "orphan_api_labels": {
        "enabled": false,
        "labels": [
            "string"
        ]
    },
    "path_refs": [
        "string"
    ],
    "routing_info": {
        "rules": [
            {
                "matches": {
                    "bot_detection_result": {
                        "classifications": [
                            {
                                "type": "string",
                                "user_defined_type": "string"
                            }
                        ],
                        "match_operation": "string"
                    },
                    "client_ip": {
                        "addrs": [
                            {
                                "addr": "string",
                                "type": "string"
                            }
                        ],
                        "group_refs": [
                            "string"
                        ],
                        "match_criteria": "string",
                        "prefixes": [
                            {
                                "ip_addr": {
                                    "addr": "string",
                                    "type": "string"
                                },
                                "mask": 0
                            }
                        ],
                        "ranges": [
                            {
                                "begin": {
                                    "addr": "string",
                                    "type": "string"
                                },
                                "end": {
                                    "addr": "string",
                                    "type": "string"
                                }
                            }
                        ]
                    },
                    "cookie": {
                        "match_case": "string",
                        "match_criteria": "string",
                        "name": "string",
                        "value": "string"
                    },
                    "geo_matches": [
                        {
                            "attribute": "string",
                            "match_operation": "string",
                            "values": [
                                "string"
                            ]
                        }
                    ],
                    "hdrs": [
                        {
                            "hdr": "string",
                            "match_case": "string",
                            "match_criteria": "string",
                            "string_group_refs": [
                                "string"
                            ],
                            "value": [
                                "string"
                            ]
                        }
                    ],
                    "host_hdr": {
                        "match_case": "string",
                        "match_criteria": "string",
                        "value": [
                            "string"
                        ]
                    },
                    "ip_reputation_type": {
                        "match_operation": "string",
                        "reputation_types": [
                            "string"
                        ]
                    },
                    "label": {
                        "match_criteria": "string",
                        "values": [
                            "string"
                        ]
                    },
                    "method": {
                        "match_criteria": "string",
                        "methods": [
                            "string"
                        ]
                    },
                    "path": {
                        "match_case": "string",
                        "match_criteria": "string",
                        "match_decoded_string": false,
                        "match_str": [
                            "string"
                        ],
                        "string_group_refs": [
                            "string"
                        ]
                    },
                    "protocol": {
                        "match_criteria": "string",
                        "protocols": "string"
                    },
                    "query": {
                        "match_case": "string",
                        "match_criteria": "string",
                        "match_decoded_string": false,
                        "match_str": [
                            "string"
                        ],
                        "string_group_refs": [
                            "string"
                        ]
                    },
                    "source_ip": {
                        "addrs": [
                            {
                                "addr": "string",
                                "type": "string"
                            }
                        ],
                        "group_refs": [
                            "string"
                        ],
                        "match_criteria": "string",
                        "prefixes": [
                            {
                                "ip_addr": {
                                    "addr": "string",
                                    "type": "string"
                                },
                                "mask": 0
                            }
                        ],
                        "ranges": [
                            {
                                "begin": {
                                    "addr": "string",
                                    "type": "string"
                                },
                                "end": {
                                    "addr": "string",
                                    "type": "string"
                                }
                            }
                        ]
                    },
                    "tls_fingerprint_match": {
                        "fingerprints": [
                            "string"
                        ],
                        "match_operation": "string",
                        "string_group_refs": [
                            "string"
                        ]
                    },
                    "version": {
                        "match_criteria": "string",
                        "versions": [
                            "string"
                        ]
                    },
                    "vs_port": {
                        "match_criteria": "string",
                        "ports": [
                            0
                        ]
                    }
                },
                "name": "string"
            }
        ]
    },
    "server_info": {
        "path_prefix": "string",
        "servers": [
            {
                "description": "string",
                "url": "string"
            }
        ]
    },
    "shadow_api_labels": {
        "enabled": false,
        "labels": [
            "string"
        ]
    },
    "tenant_ref": "string",
    "url": "string",
    "uuid": "string",
    "validation_settings": {
        "failed_validation_header_parameter_action": "string",
        "failed_validation_path_parameter_action": "string",
        "failed_validation_query_argument_action": "string",
        "failed_validation_request_body_parameter_action": "string",
        "missing_mandatory_header_parameter_action": "string",
        "missing_mandatory_query_argument_action": "string",
        "missing_mandatory_request_body_parameter_action": "string",
        "request_outside_path_prefix_action": "string",
        "unexpected_query_argument_action": "string",
        "unexpected_request_body_parameter_action": "string",
        "unexpected_request_header_action": "string",
        "unknown_content_type_action": "string",
        "unknown_http_method_action": "string",
        "unknown_path_action": "string",
        "unknown_response_content_type_action": "string",
        "unknown_response_status_code_action": "string"
    },
    "zombie_api_classification_settings": {
        "enabled": false,
        "inspection_interval_unit": "string",
        "inspection_interval_value": 0,
        "min_percent": "number"
    },
    "zombie_api_labels": {
        "enabled": false,
        "labels": [
            "string"
        ]
    }
}
string
_last_modified
Read-Only  

UNIX time since epoch in microseconds. Units(MICROSECONDS).

object
active_api_labels
Optional

Configuration of labels applied to endpoints belonging to a specific classification category, such as active or orphan.

object
api_spec_info
Optional

api_spec_info

string
description
Optional

Description of this API policy. Field introduced in 32.1.4. Allowed with any value in Enterprise, Essentials, Basic, Enterprise with Cloud Services edition.

array of string
file_object_refs
Optional

Reference to the uploaded OpenAPI specification file associated with this policy. Only one file is supported at a time. It is a reference to an object of type FileObject. Field introduced in 32.1.4. Maximum of 1 items allowed. Allowed with any value in Enterprise, Essentials, Basic, Enterprise with Cloud Services edition.

array of object
label_mappings
Optional

Mapping of labels to API policy actions. Field introduced in 32.1.4. Maximum of 256 items allowed. Allowed with any value in Enterprise, Essentials, Basic, Enterprise with Cloud Services edition.

string
name
Required  

Name of this object, unique per Tenant. Field introduced in 32.1.4. Allowed with any value in Enterprise, Essentials, Basic, Enterprise with Cloud Services edition.

object
non_api_url_labels
Optional

Configuration of labels applied to endpoints belonging to a specific classification category, such as active or orphan.

object
orphan_api_classification_settings
Optional

Classification settings that define when an API endpoint is marked as orphan due to the absence of observed traffic over a specified duration.

object
orphan_api_labels
Optional

Configuration of labels applied to endpoints belonging to a specific classification category, such as active or orphan.

array of string
path_refs
Optional

List of path specifications. When an OAS fileobject is associated to this ApiPolicy, the paths defined in the OAS fileobject will be automatically added to this list. If OAS fileobject has a path that is already defined in the list, the existing path in the list will be updated as per the OAS fileobject. It is a reference to an object of type ApiPath. Field introduced in 32.1.4. Maximum of 2000 items allowed. Allowed with any value in Enterprise, Essentials, Basic, Enterprise with Cloud Services edition.

object
routing_info
Optional

Header-based routing rules used in conjunction with configured servers and paths to direct requests to the appropriate Virtual Service. Evaluation matches if any rule passes, with all conditions within a rule required to pass.

object
server_info
Optional

server_info

object
shadow_api_labels
Optional

Configuration of labels applied to endpoints belonging to a specific classification category, such as active or orphan.

string
tenant_ref
Optional

It is a reference to an object of type Tenant. Field introduced in 32.1.4. Allowed with any value in Enterprise, Essentials, Basic, Enterprise with Cloud Services edition.

string
url
Read-Only  

url

string
uuid
Optional

The object UUID. Field introduced in 32.1.4. Allowed with any value in Enterprise, Essentials, Basic, Enterprise with Cloud Services edition.

object
validation_settings
Optional

Default validation actions enforced when requests or responses violate policy specifications. These actions can be overridden at the path or endpoint level.

object
zombie_api_classification_settings
Optional

Classification settings that define when an API endpoint is marked as zombie based on a minimum throughput threshold and duration.

object
zombie_api_labels
Optional

Configuration of labels applied to endpoints belonging to a specific classification category, such as active or orphan.


401

log in failed

Operation doesn't return any data structure

404

object not found

Operation doesn't return any data structure

Code Samples
COPY
                    curl -X PATCH -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"name":"string"}'