POST /apipolicy
/apipolicy
Avi Tenant Header
Avi Tenant Header UUID
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.
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.
ApiPolicy object creation
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"
]
}
}
OK
{
"_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"
]
}
}
UNIX time since epoch in microseconds. Units(MICROSECONDS).
Configuration of labels applied to endpoints belonging to a specific classification category, such as active or orphan.
api_spec_info
Description of this API policy. Field introduced in 32.1.4. Allowed with any value in Enterprise, Essentials, Basic, Enterprise with Cloud Services edition.
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.
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.
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.
Configuration of labels applied to endpoints belonging to a specific classification category, such as active or orphan.
Classification settings that define when an API endpoint is marked as orphan due to the absence of observed traffic over a specified duration.
Configuration of labels applied to endpoints belonging to a specific classification category, such as active or orphan.
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.
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.
server_info
Configuration of labels applied to endpoints belonging to a specific classification category, such as active or orphan.
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.
url
The object UUID. Field introduced in 32.1.4. Allowed with any value in Enterprise, Essentials, Basic, Enterprise with Cloud Services edition.
Default validation actions enforced when requests or responses violate policy specifications. These actions can be overridden at the path or endpoint level.
Classification settings that define when an API endpoint is marked as zombie based on a minimum throughput threshold and duration.
Configuration of labels applied to endpoints belonging to a specific classification category, such as active or orphan.
log in failed
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"name":"string"}' https://{api_host}/api/apipolicy