Skip to main content
PATCH
/
shield
/
shield-zone
/
{shieldZoneId}
/
api-guardian
Update the API Guardian configuration (enabled, execution mode, body limit action)
curl --request PATCH \
  --url https://api.bunny.net/shield/shield-zone/{shieldZoneId}/api-guardian \
  --header 'Content-Type: application/json' \
  --data '
{
  "isEnabled": true,
  "executionMode": 0,
  "bodyLimitAction": 0,
  "unmatchedPathAction": 0
}
'
{
  "error": {
    "statusCode": 100,
    "success": true,
    "message": "<string>",
    "errorKey": "<string>"
  },
  "data": {
    "shieldZoneId": 123,
    "isEnabled": true,
    "executionMode": 0,
    "bodyLimitAction": 0,
    "unmatchedPathAction": 0,
    "title": "<string>",
    "version": "<string>",
    "maxEndpoints": 123,
    "maxFieldsPerType": 123,
    "maxNestingDepth": 123,
    "maxTotalSchemaNodes": 123,
    "maxTotalRegexLength": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Path Parameters

shieldZoneId
integer<int32>
required

Body

Patch request for updating the global API Guardian configuration. All fields are optional — only provided fields are applied.

isEnabled
boolean | null

Enable or disable API Guardian entirely for this shield zone.

executionMode
enum<integer>
Available options:
0,
1
bodyLimitAction
enum<integer>
Available options:
0,
1,
2
unmatchedPathAction
enum<integer>
Available options:
0,
1,
2

Response

OK

Response for the PATCH /configuration endpoint.

error
object

Generic response object containing status information for API operations.

data
object

Global API Guardian configuration for a shield zone.