Skip to main content
POST
/
shield
/
shield-zone
/
{shieldZoneId}
/
api-guardian
Upload your OpenAPI specification
curl --request POST \
  --url https://api.bunny.net/shield/shield-zone/{shieldZoneId}/api-guardian \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "enforceAuthorisationValidation": true
}
'
{
  "error": {
    "statusCode": 100,
    "success": true,
    "message": "<string>",
    "errorKey": "<string>"
  },
  "data": {
    "endpoints": [
      {
        "schemaTitle": "<string>",
        "schemaVersion": "<string>",
        "requestMethods": "<string>",
        "requestPath": "<string>",
        "apiGuardianEndpointId": 123,
        "shieldZoneId": 123,
        "requestBodyType": "<string>",
        "requestBodySchema": "<string>",
        "responseBodySchema": "<string>",
        "aiGuardian": true,
        "aiGuardianGuardrails": "<string>",
        "validateRequestBodySchema": true,
        "validateResponseBodySchema": true,
        "validateAuthorization": true,
        "authorizationConfiguration": "<string>",
        "enabled": true,
        "rateLimitingGlobalEnabled": true,
        "rateLimitingGlobalRequestCount": 123,
        "rateLimitingGlobalTimeframeSeconds": 123,
        "rateLimitingGlobalBlockTimeSeconds": 123,
        "rateLimitingPerIpEnabled": true,
        "rateLimitingPerIpRequestCount": 123,
        "rateLimitingPerIpTimeframeSeconds": 123,
        "rateLimitingPerIpBlockTimeSeconds": 123,
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "shieldZone": {
          "userId": "<string>",
          "shieldZoneId": 123,
          "pullZoneId": 123,
          "planType": 0,
          "deletedDateTime": "2023-11-07T05:31:56Z",
          "learningMode": true,
          "learningModeUntil": "2023-11-07T05:31:56Z",
          "wafEnabled": true,
          "wafExecutionMode": 0,
          "wafBlockingMode": 123,
          "wafDisabledRuleGroups": "<string>",
          "wafDisabledRules": "<string>",
          "wafLogOnlyRules": "<string>",
          "wafRequestHeaderLoggingEnabled": true,
          "wafRequestIgnoredHeaders": "<string>",
          "wafRealtimeThreatIntelligenceEnabled": true,
          "wafRequestBodyLimitAction": 0,
          "wafResponseBodyLimitAction": 0,
          "wafProfileId": 123,
          "dDoSEnabled": true,
          "dDoSShieldSensitivity": 0,
          "dDoSExecutionMode": 0,
          "dDoSBlockingMode": 123,
          "dDoSChallengeWindow": 123,
          "dDoSRequestVariationSensitivity": 123,
          "dDoSDisabledRules": "<string>",
          "totalWAFCustomRules": 123,
          "totalRateLimitRules": 123,
          "lastModified": "2023-11-07T05:31:56Z",
          "createdDateTime": "2023-11-07T05:31:56Z",
          "reviewedRules": "<string>",
          "whitelabelResponsePages": true,
          "botDetectionConfiguration": {
            "shieldZoneId": 123,
            "executionMode": 0,
            "requestIntegrity": 0,
            "ipAddressSensitivity": 0,
            "browserFingerprintSensitivity": 0,
            "browserFingerprintAggression": 0,
            "browserFingerprintMaxCookieAgeMinutes": 123,
            "browserFingerprintUsersPerIpLimit": 123,
            "browserFingerprintCollectAvailableSeconds": 123,
            "browserFingerprintUseComplexBrowserFingerprint": true,
            "browserFingerprintMaxRequestsUntilBlock": 123,
            "browserFingerprintMaxRequestsUntilInject": 123,
            "shieldZone": "<unknown>"
          },
          "uploadScanningConfiguration": {
            "shieldZoneId": 123,
            "isEnabled": true,
            "antivirusScanningMode": 0,
            "csamScanningMode": 0,
            "shieldZone": "<unknown>"
          },
          "billableAudits": [
            {
              "auditDateTime": "2023-11-07T05:31:56Z",
              "shieldZoneId": 123,
              "userId": "<string>",
              "userEmail": "<string>",
              "updateType": 0,
              "billableAuditId": 123,
              "note": "<string>",
              "shieldZone": "<unknown>"
            }
          ],
          "userWafRules": [
            {
              "id": 123,
              "wafRuleFileId": 123,
              "shieldZoneId": 123,
              "userId": "<string>",
              "ruleName": "<string>",
              "ruleDescription": "<string>",
              "ruleJson": "<string>",
              "ruleType": 0,
              "wafRuleFile": {
                "id": 123,
                "shieldZoneId": 123,
                "fileName": "<string>",
                "fileContents": "<string>",
                "lastChanged": "2023-11-07T05:31:56Z",
                "type": 123,
                "engineRuleType": 0
              },
              "shieldZone": "<unknown>"
            }
          ],
          "accessListConfigurations": [
            {
              "shieldZoneId": 123,
              "userId": "<string>",
              "isEnabled": true,
              "action": 0,
              "id": 123,
              "accessListId": 123,
              "userAccessListId": 123,
              "shieldZone": "<unknown>"
            }
          ],
          "account": {
            "accountId": "<string>",
            "billingEligibility": 0,
            "userType": 0,
            "featureFlags": "<string>",
            "shieldZones": "<array>"
          }
        }
      }
    ]
  }
}

Path Parameters

shieldZoneId
integer<int32>
required

Body

content
string | null

The file contents of the OpenAPI specification.

enforceAuthorisationValidation
boolean

Optional. If true, we will enforce authentication requirements for all endpoints defined in the OpenAPI specification.

Response

OK

Represents the response for uploading an OpenAPI specification to the API Guardian.

error
object

Generic response object containing status information for API operations.

data
object

Represents the response containing a list of API Guardian endpoints.