It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda Web Application Firewall

Barracuda Campus is getting an upgrade!

We are excited to announce that Barracuda Campus will migrate to a new platform around mid-January 2026. Please see the announcement on the Campus Dashboard to find out more.

Vsites

  • Last updated on

A Vsite is a networking entity on the Barracuda Web Application Firewall that can be used to host other entities such as service groups, virtual services, servers, and rule groups. A Vsite has its own routing table to route the traffic for services and servers configured in it.

Creating a Vsite

URL: /v1/vsites
Method: POST
Description: Creates a Vsite with the given name.
Parameter NameData TypeMandatoryDescription
Input Parameters:   
nameAlphanumericYesA name for the new Vsite.
active_onNumericConditional

Specify the serial number of the unit on which the Vsite needs to be active.

Note: This parameter is applicable ONLY if the unit is deployed in High Availability environment.

Creating a Vsite in a Stand-Alone Unit

Example:

# Creating Curl requests

   URLs

   : HTTP = http://192.168.0.1:8000/restpai/v1/{object_id}

   : HTTPS = https://192.168.0.1:443/restapi/v1/{object_id}

# Create URL

     : -H = Request Header (Specify Content-Type)

     : -X = Request Method (POST,GET,PUT,DELETE)

     : -d = JSON data hash

     : -u = Authentication token which you got back on login

 

curl http://192.168.0.1:8000/restapi/v1/vsites -u 'eyJldCI6IjEzNzk2NDA4MzciLCiwidXNlciI6ImFkbWluIn0=\n:' -X POST -H Content-Type:application/json -d '{"name": "demo_vsite"}'

When executed, the above curl script will dump the result, and the output will look like this:

{"id":"demo_vsite","token":"eyJldCI6IjEzNzk2NDMjNzwidXNlciI6ImFkbWluIn0=\n"}

Creating a Vsite in a Clustered Unit

Request:

curl http://192.168.0.1:8000/restapi/v1/vsites -u 'eyJldCI6IjE0MzM5NjwidXNlciI6ImFkbWluIn0=\n:' -X POST -H Content-Type:application/json -d '{"name":"demo_vsite2","active_on":"617055"}'

Response:

{"id":"demo_vsite2","token":"eyJldCI6IjE0MzM5Njc2ODAiLCJlIiwidXNlciI6ImFkbWluIn0=\n"}

Retrieving Vsites

URL: /v1/vsites

         /v1/vsites/{vsite_id}
Method: GET
Description: Lists all vsites if “vsite_id” is not specified.
Parameter NameData TypeMandatoryDescription
Input Parameters:   
parametersAlphanumericYesThe parameter names for which you want to retrieve the value. See Example 2.
Example 1:

Request:

curl http://192.168.0.1:8000/restapi/v1/vsites -u 'eyJldCI6IjEzODY3MTI3MmIxIiwidXNlciI6ImFkbWluIn0=\n:' -X GET

Response:

{
"parameters": null,
"object": "Vsites",
"data": [
{
"service_group": [
"default"
],
"service_groups": [
{
"name": "default",
"id": "default",
"virtual_services": [
{
"load_balance": {
"algorithm": "round_robin",
"failover_method": "load_balance",
"persistence_method": "none"
},
"service_hostname": [

],
"advanced_configuration": {
"enable_web_application_firewall": "yes",
"keepalive_requests": "64",
"ntlm_ignore_extra_data": "no"
},
"status": "enable",
"session_timeout": "60",
"instant_ssl": {
"secure_site_domain": [

],
"status": "off",
"sharepoint_rewrite_support": "off"
},
"comments": null,
"group": "default",
"ip_address": "99.99.107.25",
"id": "SERVICE_1",
"ssl_offloading": {
"ciphers": "default",
"sni_certificate": [

],
"trusted_certificates": [

],
"status": "off",
"enforce_client_certificate": "yes",
"enable_tls_1_2": "yes",
"enable_strict_sni_check": null,
"selected_ciphers": "AES256-GCM-SHA384,AES256-SHA256,AES256-SHA,CAMELLIA256-SHA,DES-CBC3-SHA,AES128-GCM-SHA256,AES128-SHA256,AES128-SHA,SEED-SHA,CAMELLIA128-SHA,IDEA-CBC-SHA,RC4-SHA",
"enable_tls_1": "yes",
"domain": [

],
"enable_sni": "no",
"enable_tls_1_1": "yes",
"enable_client_authentication": "no",
"enable_ssl_3": "yes"
},
"mask": "255.255.255.255",
"enable_access_logs": "yes",
"name": "SERVICE_1",
"port": "80",
"security": {
"ignore_case": "yes",
"trusted_hosts_action": "default",
"mode": "active",
"web_firewall_log_level": "notice",
"web_firewall_policy": "default",
"rate_control_status": "off",
"trusted_hosts_group": "",
"rate_control_pool": "NONE",
"client_ip_addr_header": null
},
"address_version": "ipv4",
"servers": [
{
"in_band_health_checks": {
"max_http_errors": "0",
"max_refused": "10",
"max_timeout_failure": "10",
"max_other_failure": "10"
},
"out_of_band_health_checks": {
"enable_OOB_health_checks": "yes",
"interval": "10"
},
"advanced_configuration": {
"client_impersonation": "no",
"max_establishing_connections": "100",
"max_keepalive_requests": "0",
"max_connections": "10000",
"max_requests": "1000",
"timeout": "300000",
"source_ip_to_connect": null,
"max_spare_connections": "0"
},
"ssl": {
"enable_https": "no",
"enable_tls_1_1": "yes",
"client_certificate": null,
"enable_ssl_3": "yes",
"validate_certificate": "yes",
"enable_tls_1_2": "yes",
"enable_tls_1": "yes"
},
"status": "in-service",
"name": null,
"application_layer_health_check": {
"additional_headers": [

],
"status_code": "200",
"url": null,
"method": "GET",
"match_content_string": null
},
"port": "80",
"comments": null,
"backup_server": "no",
"connection_pooling": {
"enable_connection_pooling": "yes",
"keepalive_timeout": "900000"
},
"weight": "1",
"ip_address": "11.11.1.117",
"id": null
}
],
"type": "HTTP",
"content_rules": [

]
}
]
}
],
"name": "default",
"id": "default",
"active_on": "140949",
"comments": null
}
],
"limit": null,
"token": "eyJldCI6IjEzODY3MTI2OTUiLCJwYNTMzIiwidXNlciI6ImFkbWluIn0=\n",
"offset": null
}

Example 2:

Request:

curl http://192.168.0.1:8000/restapi/v1/vsites -u 'eyJldCI6IjEzODY3MTIiwidXNlciI6ImFkbWluIn0=\n:' -X GET -G -d parameters=name

Response:

{"parameters":["name"],"object":"Vsites","data":[{"name":"default"},{"name":"Cuda"}],"limit":null,"token":"eyJldCI6IjEzODY3MTlciI6ImFkbWluIn0=\n","offset":null}

Example 3:

Request:

curl  http://192.168.0.1:8000/restapi/v1/vsites  -u 'eyJldCI6IjE0MzM5NjUzyIiwidXNlciI6ImFkbWluIn0=\n:' -X GET -G -d parameters=active_on,service_group

Response:

{
"parameters": [
"active_on",
"service_group"
],
"object": "Vsites",
"data": [
{
"service_group": [
"default"
],
"active_on": "511256"
},
{
"service_group": [
"dut1_vsite1_group"
],
"active_on": "511256"
},
{
"service_group": [
"dut2_vsite1_group"
],
"active_on": "617055"
},
{
"service_group": [
"demo_vsite2_group"
],
"active_on": "511256"
}
],
"limit": null,
"token": "eyJldCI6IjE0MzM5Njc3NzAiLCxIiwidXNlciI6ImFkbWluIn0=\n",
"offset": null
}

Updating a Vsite

URL: /v1/vsites/{vsite_id}
Method: PUT
Description: Updates the Vsite with the given value.
Parameter NameData TypeMandatoryDescription
Input Parameters:   
CommentsAlphanumericOptionalDescription of the Vsite.

Updating a Vsite in a Stand-Alone Unit

Example 1:

Request:

curl http://192.168.0.1:8000/restapi/v1/vsites/demo_vsite -u 'eyJldCI6IjEzODAyMzQyM2IiwidXNlciI6ImFkbWluIn0=\n:' -X PUT -H Content-Type:application/json -d '{"comments":"TEST"}'

Response:

{"msg":"Configuration Updated","id":"demo_vsite","token":"eyJldCI6IjEzODAyMzYzmJlIiwidXNlciI6ImFkbWluIn0=\n"}

Updating a Vsite in a Clustered Unit

Example 2:

Request:

curl http://192.168.0.1:8000/restapi/v1/vsites/demo_vsite2 -u 'eyJldCI6IjE0MzM5NjUzMI3MXNlciI6ImFkbWluIn0=\n:' -X PUT -H Content-Type:application/json -d '{"comments":"TEST","active_on":"511256"} '

Response:

{"msg":"Configuration Updated","id":"demo_vsite2","token":"eyJldCI6IjE0MzM5Njc3NDM2QxIiwidXNlciI6ImFkbWluIn0=\n"}

Deleting a Vsite

URL: /v1/vsites/{vsite_id}
Method: DELETE
Description: Deletes the given Vsite.
Example:

Request:

curl http://192.168.0.1:8000/restapi/v1/vsites/demo_vsite -u 'eyJldCI6IjEzNzk0GNlwidXNlciI6ImFkbWluIn0=\n:' -X DELETE

Response:

{"msg":"Successfully deleted","token":"eyJldCI6IjEzNzk2YzA2MzFiIiwidXNlciI6ImFkbWluIn0=\n"}