Skip to content
  • Auto
  • Light
  • Dark

Add

Add Tags to a Firewall
post/v2/firewalls/{firewall_id}/tags

To assign a tag representing a group of Droplets to a firewall, send a POST request to /v2/firewalls/$FIREWALL_ID/tags. In the body of the request, there should be a tags attribute containing a list of tag names.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Path ParametersExpand Collapse
firewall_id: string
Body ParametersExpand Collapse
tags: array of string

A flat array of tag names as strings to be applied to the resource. Tag names must exist in order to be referenced in a request.

Requires tag:create and tag:read scopes.

Add Tags to a Firewall
curl https://api.digitalocean.com/v2/firewalls/$FIREWALL_ID/tags \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN" \
    -d '{
          "tags": [
            "frontend"
          ]
        }'
Returns Examples