We use cookies on our website to ensure we provide you with the best experience on our website. By using our website, you agree to the use of cookies for analytics and personalized content.This website uses cookies. More Information
It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda Web Application Firewall

Service Group

  • Last updated on

A Service Group is a container with multiple services. You can use service groups for grouping services for example, all HTTP services can be within a service group. 

To Create a Service Group

URL: /v1/vsites/{vsite_id}/service_groups
Method: POST
Description: Creates a service group with the given name under the specified vsite.
Parameter NameData TypeMandatoryDescription
Input Parameters:   
nameAlphanumericYesA name for the service group that needs to be created.
Example:

Request:

curl http://192.168.0.1:8000/restapi/v1/vsites/default/service_groups -u 'eyJldCI6IjEzODAyNDEzMjciLCJwYXNzd29yZCI6IjkzYjNmMzYyYjc3NGM4OTNjMzI4ZjExZTJk\nM2I1NTAxIiwidXNlciI6ImFkbWluIn0=\n:' -X POST -H Content-Type:application/json -d '{"name":"demo_service_gp"}'

Response:

{"id":"demo_service_gp","token":"eyJldCI6IjEzODAyNDE1MjEiLCJwYXNzd29yZCI6Ijk5Nzc3MmE0ZDY5NWViYmM5Mzc0NDcyODU3\nMWM1YmE4IiwidXNlciI6ImFkbWluIn0=\n"}

To Retrieve Service Groups

URL:  /v1/vsites/{vsite_id}/service_groups

          /v1/vsites/{vsite_id}/service_groups/{service_group_id}
Method: GET
Description: Lists all service groups if “service_group_id” is not specified.
Parameter NameData TypeMandatoryDescription
Input Parameters:   
parametersAlphanumericOptionalAny specific parameter name that needs to be retrieved. See Example 2.
Example1:

 Request:

curl http://192.168.0.1:8000/restapi/v1/vsites/default/service_groups/demo_service_gp -u 'eyJldCI6IjEzODAyNDEzMjciLCJwYXNzd29yZCI6IjkzYjNmMzYyYjc3NGM4OTNjMzI4ZjExZTJk\nM2I1NTAxIiwidXNlciI6ImFkbWluIn0=\n:' -X GET

Response:

{"name":"demo_service_gp","id":"demo_service_gp","token":"eyJldCI6IjEzODAyNDE1OTMiLCJwYXNzd29yZCI6ImU1OTJiZTkxNTEwMjliNDAwZThjNDNkNDM1\nZThmZGEyIiwidXNlciI6ImFkbWluIn0=\n","virtual_services":[]}

Example 2:

Request:

curl http://192.168.0.1:8000/restapi/v1/vsites/default/service_groups/demo_service_gp -u 'eyJldCI6IjE1MDE4MjcwNTUiLCJwYXNzd29yZCI6ImYzOTM0NTQ5ODhjZWVkMWExMjQwMzFkMDkw\nZGZlZTIwIiwidXNlciI6ImFkbWluIn0=\n:' -X GET -G -d parameters=name

Response:

{"name":"demo_service_gp","id":"demo_service_gp","token":"eyJldCI6IjE1MDQzMjI0NzEiLCJwYXNzd29yZCI6ImRmMTg3YTZjNzJhMDRmZjhhOTNjYTJmMTRj\nN2I0ZGQ0IiwidXNlciI6ImFkbWluIn0=\n"}

To Update a Service Group

URL: /v1/vsites/{vsite_id}/service_groups/{service_group_id}
Method: PUT
Description: Updates the given service group with the given value.
Parameter NameData TypeMandatoryDescription
Input Parameters:   
new_nameAlphanumericYesA new name for the service group.
Example:

Request:

curl http://192.168.0.1:8000/restapi/v1/vsites/default/service_groups/demo_service_gp -u 'eyJldCI6IjEzODAyNDEzMjciLCJwYXNzd29yZCI6IjkzYjNmMzYyYjc3NGM4OTNjMzI4ZjExZTJk\nM2I1NTAxIiwidXNlciI6ImFkbWluIn0=\n:' -X PUT -H Content-Type:application/json -d '{"new_name":"new_service_gp"}'

Response:

{"id":"demo_service_gp","token":"eyJldCI6IjEzODAyNDE2NzEiLCJwYXNzd29yZCI6IjRlYjQ5YzgxODY2ZDFkNDkwODExNGUyMjI2\nNTk1N2VmIiwidXNlciI6ImFkbWluIn0=\n"}

To Delete a Service Group

URL: /v1/vsites/{vsite_id}/service_groups/{service_group_id}
Method: DELETE
Description: Deletes the given service group.
Example:

Request:

curl http://192.168.0.1:8000/restapi/v1/vsites/default/service_groups/new_service_gp -u  'eyJldCI6IjEzODAyNDEzMjciLCJwYXNzd29yZCI6IjkzYjNmMzYyYjc3NGM4OTNjMzI4ZjExZTJk\nM2I1NTAxIiwidXNlciI6ImFkbWluIn0=\n:' -X DELETE

Response:

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

Last updated on