Skip to main content
POST
/
shield
/
shield-zone
/
{shieldZoneId}
/
api-guardian
/
spec
Upload your OpenAPI specification
curl --request POST \
  --url https://api.bunny.net/shield/shield-zone/{shieldZoneId}/api-guardian/spec \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "enforceAuthorizationValidation": true
}
'
{
  "error": {
    "statusCode": 100,
    "success": true,
    "message": "<string>",
    "errorKey": "<string>"
  },
  "data": {
    "configuration": {
      "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"
    },
    "endpoints": [
      {
        "apiGuardianEndpointId": 123,
        "shieldZoneId": 123,
        "requestMethod": "<string>",
        "requestPath": "<string>",
        "validateRequestBodySchema": true,
        "validateResponseBodySchema": true,
        "validateAuthorization": true,
        "isEnabled": true,
        "authSchemes": [
          {
            "schemeName": "<string>",
            "schemeType": 0,
            "location": 0,
            "credentialName": "<string>",
            "httpScheme": "<string>"
          }
        ],
        "requestBodySchemaYaml": "<string>",
        "responseBodySchemasYaml": {},
        "availableParameters": {
          "Path": [
            "<string>"
          ],
          "Query": [
            "<string>"
          ],
          "Header": [
            "<string>"
          ],
          "Cookie": [
            "<string>"
          ]
        },
        "injectionDetectionParameters": {
          "Path": [
            "<string>"
          ],
          "Query": [
            "<string>"
          ],
          "Header": [
            "<string>"
          ],
          "Cookie": [
            "<string>"
          ]
        },
        "detectParameterXss": true,
        "detectParameterSqli": true,
        "rateLimitingEnabled": true,
        "rateLimitingType": 0,
        "rateLimitingRequestCount": 123,
        "rateLimitingTimeframe": 1,
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.bunny.net/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

shieldZoneId
integer<int32>
required

Body

Represents the request for uploading or updating an OpenAPI specification in API Guardian.

content
string | null

The file contents of the OpenAPI specification.

enforceAuthorizationValidation
boolean | null

Whether to enforce authentication requirements for endpoints. On upload, defaults to true if not specified. On update, existing endpoint auth settings are preserved if not specified.

Response

OK

Represents the response for uploading or updating an OpenAPI specification in API Guardian.

error
object

Generic response object containing status information for API operations.

data
object

The full API Guardian state for a shield zone: global configuration and all endpoints.