x-yc-apigateway:smartWebSecurity extension
Written by
Updated at June 23, 2025
The x-yc-apigateway:smartWebSecurity extension uses rules set in the Yandex Smart Web Security security profile to protect an API gateway. For example, you can use the basic rules to block unwanted traffic or Advanced Rate Limiter to limit the number of requests.
You only pay for those requests to an API gateway that were checked and not blocked. There is a separate fee for using the security profile as per the Yandex Smart Web Security pricing policy.
Supported parameters
The table below lists the parameters specific to API Gateway API gateways. You can find the description of other parameters in the OpenAPI 3.0 specification
| Parameter | Type | Description |
|---|---|---|
securityProfileId |
string |
Smart Web Security security profile ID |
Extension specification
Specification example:
openapi: "3.0.0"
x-yc-apigateway:
smartWebSecurity:
securityProfileId: fev6q4qqnn2q********
info:
version: 1.0.0
title: Protected pet store
license:
name: MIT
paths:
/:
get:
x-yc-apigateway-integration:
type: dummy
content:
'*': "This pet store is protected by SWS!"
http_code: 200