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. 

Creating 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 'eyJldCI6IjEzODXNlciI6ImFkbWluIn0=\n:' -X POST -H Content-Type:application/json -d '{"name":"demo_service_gp"}'

Response:

{"id":"demo_service_gp","token":"eyJldCI6IjEzODM1YmE4IiwidXNlciI6ImFkbWluIn0=\n"}

Retrieving 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 'eyJldCI6IjEzM2I1NTAxIlciI6ImFkbWluIn0=\n:' -X GET

Response:

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

Example 2:

Request:

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

Response:

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

Updating 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 'eyJldCIM2I1NTAxIiwidXNlciI6ImFkbWluIn0=\n:' -X PUT -H Content-Type:application/json -d '{"new_name":"new_service_gp"}'

Response:

{"id":"demo_service_gp","token":"eyJldCI6IjNTk1N2VmIiwidXNlciI6ImFkbWluIn0=\n"}

Deleting 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  'eyJldCIM2I1NTAxIiwidXNlciI6ImFkbWluIn0=\n:' -X DELETE

Response:

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