Skip to content
Start here

API Gateway

API GatewayConfigurations

Retrieve information about specific configuration properties
api_gateway.configurations.get(ConfigurationGetParams**kwargs) -> Configuration
GET/zones/{zone_id}/api_gateway/configuration
Update configuration properties
api_gateway.configurations.update(ConfigurationUpdateParams**kwargs) -> Configuration
PUT/zones/{zone_id}/api_gateway/configuration
ModelsExpand Collapse
class Configuration:
auth_id_characteristics: List[AuthIDCharacteristic]
One of the following:
class AuthIDCharacteristicAPIShieldAuthIDCharacteristic:

Auth ID Characteristic

name: str

The name of the characteristic field, i.e., the header or cookie name.

maxLength128
type: Literal["header", "cookie"]

The type of characteristic.

One of the following:
"header"
"cookie"
class AuthIDCharacteristicAPIShieldAuthIDCharacteristicJWTClaim:

Auth ID Characteristic extracted from JWT Token Claims

name: str

Claim location expressed as $(token_config_id):$(json_path), where token_config_id is the ID of the token configuration used in validating the JWT, and json_path is a RFC 9535 JSONPath (https://goessner.net/articles/JsonPath/, https://www.rfc-editor.org/rfc/rfc9535.html). The JSONPath expression may be in dot or bracket notation, may only specify literal keys or array indexes, and must return a singleton value, which will be interpreted as a string.

maxLength128
type: Literal["jwt"]

The type of characteristic.

API GatewayDiscovery

Retrieve discovered operations on a zone rendered as OpenAPI schemas
api_gateway.discovery.get(DiscoveryGetParams**kwargs) -> DiscoveryGetResponse
GET/zones/{zone_id}/api_gateway/discovery
ModelsExpand Collapse
class DiscoveryOperation:
id: str

UUID.

maxLength36
minLength36
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
origin: List[Literal["ML", "SessionIdentifier", "LabelDiscovery"]]

API discovery engine(s) that discovered this operation

One of the following:
"ML"
"SessionIdentifier"
"LabelDiscovery"
state: Literal["review", "saved", "ignored"]

State of operation in API Discovery

  • review - Operation is not saved into API Shield Endpoint Management
  • saved - Operation is saved into API Shield Endpoint Management
  • ignored - Operation is marked as ignored
One of the following:
"review"
"saved"
"ignored"
features: Optional[Features]
traffic_stats: Optional[FeaturesTrafficStats]
last_updated: datetime
formatdate-time
period_seconds: int

The period in seconds these statistics were computed over

requests: float

The average number of requests seen during this period

formatfloat
class DiscoveryGetResponse:
schemas: List[object]
timestamp: datetime
formatdate-time

API GatewayDiscoveryOperations

Retrieve discovered operations on a zone
api_gateway.discovery.operations.list(OperationListParams**kwargs) -> SyncV4PagePaginationArray[DiscoveryOperation]
GET/zones/{zone_id}/api_gateway/discovery/operations
Patch discovered operation
api_gateway.discovery.operations.edit(stroperation_id, OperationEditParams**kwargs) -> OperationEditResponse
PATCH/zones/{zone_id}/api_gateway/discovery/operations/{operation_id}
Patch discovered operations
api_gateway.discovery.operations.bulk_edit(OperationBulkEditParams**kwargs) -> OperationBulkEditResponse
PATCH/zones/{zone_id}/api_gateway/discovery/operations
ModelsExpand Collapse
class OperationEditResponse:
state: Optional[Literal["review", "saved", "ignored"]]

State of operation in API Discovery

  • review - Operation is not saved into API Shield Endpoint Management
  • saved - Operation is saved into API Shield Endpoint Management
  • ignored - Operation is marked as ignored
One of the following:
"review"
"saved"
"ignored"
Dict[str, OperationBulkEditResponseItem]
state: Optional[Literal["review", "ignored"]]

Mark state of operation in API Discovery

  • review - Mark operation as for review
  • ignored - Mark operation as ignored
One of the following:
"review"
"ignored"

API GatewayLabels

Retrieve all labels
api_gateway.labels.list(LabelListParams**kwargs) -> SyncV4PagePaginationArray[LabelListResponse]
GET/zones/{zone_id}/api_gateway/labels
ModelsExpand Collapse
class LabelListResponse:
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
mapped_resources: Optional[object]

Provides counts of what resources are linked to this label

API GatewayLabelsUser

Create user labels
api_gateway.labels.user.bulk_create(UserBulkCreateParams**kwargs) -> SyncSinglePage[UserBulkCreateResponse]
POST/zones/{zone_id}/api_gateway/labels/user
Delete user labels
api_gateway.labels.user.bulk_delete(UserBulkDeleteParams**kwargs) -> SyncSinglePage[UserBulkDeleteResponse]
DELETE/zones/{zone_id}/api_gateway/labels/user
Retrieve user label
api_gateway.labels.user.get(strname, UserGetParams**kwargs) -> UserGetResponse
GET/zones/{zone_id}/api_gateway/labels/user/{name}
Update user label
api_gateway.labels.user.update(strname, UserUpdateParams**kwargs) -> UserUpdateResponse
PUT/zones/{zone_id}/api_gateway/labels/user/{name}
Patch user label
api_gateway.labels.user.edit(strname, UserEditParams**kwargs) -> UserEditResponse
PATCH/zones/{zone_id}/api_gateway/labels/user/{name}
Delete user label
api_gateway.labels.user.delete(strname, UserDeleteParams**kwargs) -> UserDeleteResponse
DELETE/zones/{zone_id}/api_gateway/labels/user/{name}
ModelsExpand Collapse
class UserBulkCreateResponse:
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
class UserBulkDeleteResponse:
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
class UserGetResponse:
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
mapped_resources: Optional[object]

Provides counts of what resources are linked to this label

class UserUpdateResponse:
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
class UserEditResponse:
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
class UserDeleteResponse:
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"

API GatewayLabelsUserResources

API GatewayLabelsUserResourcesOperation

Replace operation(s) attached to a user label
api_gateway.labels.user.resources.operation.update(strname, OperationUpdateParams**kwargs) -> OperationUpdateResponse
PUT/zones/{zone_id}/api_gateway/labels/user/{name}/resources/operation
ModelsExpand Collapse
class OperationUpdateResponse:
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
mapped_resources: Optional[object]

Provides counts of what resources are linked to this label

API GatewayLabelsManaged

Retrieve managed label
api_gateway.labels.managed.get(strname, ManagedGetParams**kwargs) -> ManagedGetResponse
GET/zones/{zone_id}/api_gateway/labels/managed/{name}
ModelsExpand Collapse
class ManagedGetResponse:
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
mapped_resources: Optional[object]

Provides counts of what resources are linked to this label

API GatewayLabelsManagedResources

API GatewayLabelsManagedResourcesOperation

Replace operation(s) attached to a managed label
api_gateway.labels.managed.resources.operation.update(strname, OperationUpdateParams**kwargs) -> OperationUpdateResponse
PUT/zones/{zone_id}/api_gateway/labels/managed/{name}/resources/operation
ModelsExpand Collapse
class OperationUpdateResponse:
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
mapped_resources: Optional[object]

Provides counts of what resources are linked to this label

API GatewayOperations

Retrieve information about all operations on a zone
api_gateway.operations.list(OperationListParams**kwargs) -> SyncV4PagePaginationArray[OperationListResponse]
GET/zones/{zone_id}/api_gateway/operations
Retrieve information about an operation
api_gateway.operations.get(stroperation_id, OperationGetParams**kwargs) -> OperationGetResponse
GET/zones/{zone_id}/api_gateway/operations/{operation_id}
Add one operation to a zone
api_gateway.operations.create(OperationCreateParams**kwargs) -> OperationCreateResponse
POST/zones/{zone_id}/api_gateway/operations/item
Delete an operation
api_gateway.operations.delete(stroperation_id, OperationDeleteParams**kwargs) -> OperationDeleteResponse
DELETE/zones/{zone_id}/api_gateway/operations/{operation_id}
Add operations to a zone
api_gateway.operations.bulk_create(OperationBulkCreateParams**kwargs) -> SyncSinglePage[OperationBulkCreateResponse]
POST/zones/{zone_id}/api_gateway/operations
Delete multiple operations
api_gateway.operations.bulk_delete(OperationBulkDeleteParams**kwargs) -> OperationBulkDeleteResponse
DELETE/zones/{zone_id}/api_gateway/operations
ModelsExpand Collapse
class APIShield:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
class OperationListResponse:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
features: Optional[Features]
One of the following:
class FeaturesAPIShieldOperationFeatureThresholds:
thresholds: Optional[FeaturesAPIShieldOperationFeatureThresholdsThresholds]
auth_id_tokens: Optional[int]

The total number of auth-ids seen across this calculation.

data_points: Optional[int]

The number of data points used for the threshold suggestion calculation.

last_updated: Optional[datetime]
formatdate-time
p50: Optional[int]

The p50 quantile of requests (in period_seconds).

p90: Optional[int]

The p90 quantile of requests (in period_seconds).

p99: Optional[int]

The p99 quantile of requests (in period_seconds).

period_seconds: Optional[int]

The period over which this threshold is suggested.

requests: Optional[int]

The estimated number of requests covered by these calculations.

suggested_threshold: Optional[int]

The suggested threshold in requests done by the same auth_id or period_seconds.

class FeaturesAPIShieldOperationFeatureParameterSchemas:
parameter_schemas: FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas
last_updated: Optional[datetime]
formatdate-time
parameter_schemas: Optional[FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas]

An operation schema object containing a response.

parameters: Optional[List[object]]

An array containing the learned parameter schemas.

responses: Optional[object]

An empty response object. This field is required to yield a valid operation schema.

class FeaturesAPIShieldOperationFeatureAPIRouting:
api_routing: Optional[FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]

API Routing settings on endpoint.

last_updated: Optional[datetime]
formatdate-time
route: Optional[str]

Target route.

class FeaturesAPIShieldOperationFeatureConfidenceIntervals:
confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]
last_updated: Optional[datetime]
formatdate-time
suggested_threshold: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold]
confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals]
p90: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

p95: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

p99: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

mean: Optional[float]

Suggested threshold.

class FeaturesAPIShieldOperationFeatureSchemaInfo:
schema_info: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]
active_schema: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema]

Schema active on endpoint.

id: Optional[str]

UUID.

maxLength36
minLength36
created_at: Optional[datetime]
formatdate-time
is_learned: Optional[bool]

True if schema is Cloudflare-provided.

name: Optional[str]

Schema file name.

learned_available: Optional[bool]

True if a Cloudflare-provided learned schema is available for this endpoint.

mitigation_action: Optional[Literal["none", "log", "block"]]

Action taken on requests failing validation.

One of the following:
"none"
"log"
"block"
class OperationGetResponse:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
features: Optional[Features]
One of the following:
class FeaturesAPIShieldOperationFeatureThresholds:
thresholds: Optional[FeaturesAPIShieldOperationFeatureThresholdsThresholds]
auth_id_tokens: Optional[int]

The total number of auth-ids seen across this calculation.

data_points: Optional[int]

The number of data points used for the threshold suggestion calculation.

last_updated: Optional[datetime]
formatdate-time
p50: Optional[int]

The p50 quantile of requests (in period_seconds).

p90: Optional[int]

The p90 quantile of requests (in period_seconds).

p99: Optional[int]

The p99 quantile of requests (in period_seconds).

period_seconds: Optional[int]

The period over which this threshold is suggested.

requests: Optional[int]

The estimated number of requests covered by these calculations.

suggested_threshold: Optional[int]

The suggested threshold in requests done by the same auth_id or period_seconds.

class FeaturesAPIShieldOperationFeatureParameterSchemas:
parameter_schemas: FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas
last_updated: Optional[datetime]
formatdate-time
parameter_schemas: Optional[FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas]

An operation schema object containing a response.

parameters: Optional[List[object]]

An array containing the learned parameter schemas.

responses: Optional[object]

An empty response object. This field is required to yield a valid operation schema.

class FeaturesAPIShieldOperationFeatureAPIRouting:
api_routing: Optional[FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]

API Routing settings on endpoint.

last_updated: Optional[datetime]
formatdate-time
route: Optional[str]

Target route.

class FeaturesAPIShieldOperationFeatureConfidenceIntervals:
confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]
last_updated: Optional[datetime]
formatdate-time
suggested_threshold: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold]
confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals]
p90: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

p95: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

p99: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

mean: Optional[float]

Suggested threshold.

class FeaturesAPIShieldOperationFeatureSchemaInfo:
schema_info: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]
active_schema: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema]

Schema active on endpoint.

id: Optional[str]

UUID.

maxLength36
minLength36
created_at: Optional[datetime]
formatdate-time
is_learned: Optional[bool]

True if schema is Cloudflare-provided.

name: Optional[str]

Schema file name.

learned_available: Optional[bool]

True if a Cloudflare-provided learned schema is available for this endpoint.

mitigation_action: Optional[Literal["none", "log", "block"]]

Action taken on requests failing validation.

One of the following:
"none"
"log"
"block"
class OperationCreateResponse:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
features: Optional[Features]
One of the following:
class FeaturesAPIShieldOperationFeatureThresholds:
thresholds: Optional[FeaturesAPIShieldOperationFeatureThresholdsThresholds]
auth_id_tokens: Optional[int]

The total number of auth-ids seen across this calculation.

data_points: Optional[int]

The number of data points used for the threshold suggestion calculation.

last_updated: Optional[datetime]
formatdate-time
p50: Optional[int]

The p50 quantile of requests (in period_seconds).

p90: Optional[int]

The p90 quantile of requests (in period_seconds).

p99: Optional[int]

The p99 quantile of requests (in period_seconds).

period_seconds: Optional[int]

The period over which this threshold is suggested.

requests: Optional[int]

The estimated number of requests covered by these calculations.

suggested_threshold: Optional[int]

The suggested threshold in requests done by the same auth_id or period_seconds.

class FeaturesAPIShieldOperationFeatureParameterSchemas:
parameter_schemas: FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas
last_updated: Optional[datetime]
formatdate-time
parameter_schemas: Optional[FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas]

An operation schema object containing a response.

parameters: Optional[List[object]]

An array containing the learned parameter schemas.

responses: Optional[object]

An empty response object. This field is required to yield a valid operation schema.

class FeaturesAPIShieldOperationFeatureAPIRouting:
api_routing: Optional[FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]

API Routing settings on endpoint.

last_updated: Optional[datetime]
formatdate-time
route: Optional[str]

Target route.

class FeaturesAPIShieldOperationFeatureConfidenceIntervals:
confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]
last_updated: Optional[datetime]
formatdate-time
suggested_threshold: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold]
confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals]
p90: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

p95: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

p99: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

mean: Optional[float]

Suggested threshold.

class FeaturesAPIShieldOperationFeatureSchemaInfo:
schema_info: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]
active_schema: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema]

Schema active on endpoint.

id: Optional[str]

UUID.

maxLength36
minLength36
created_at: Optional[datetime]
formatdate-time
is_learned: Optional[bool]

True if schema is Cloudflare-provided.

name: Optional[str]

Schema file name.

learned_available: Optional[bool]

True if a Cloudflare-provided learned schema is available for this endpoint.

mitigation_action: Optional[Literal["none", "log", "block"]]

Action taken on requests failing validation.

One of the following:
"none"
"log"
"block"
class OperationDeleteResponse:
errors: Message
messages: Message
success: Literal[true]

Whether the API call was successful.

class OperationBulkCreateResponse:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
features: Optional[Features]
One of the following:
class FeaturesAPIShieldOperationFeatureThresholds:
thresholds: Optional[FeaturesAPIShieldOperationFeatureThresholdsThresholds]
auth_id_tokens: Optional[int]

The total number of auth-ids seen across this calculation.

data_points: Optional[int]

The number of data points used for the threshold suggestion calculation.

last_updated: Optional[datetime]
formatdate-time
p50: Optional[int]

The p50 quantile of requests (in period_seconds).

p90: Optional[int]

The p90 quantile of requests (in period_seconds).

p99: Optional[int]

The p99 quantile of requests (in period_seconds).

period_seconds: Optional[int]

The period over which this threshold is suggested.

requests: Optional[int]

The estimated number of requests covered by these calculations.

suggested_threshold: Optional[int]

The suggested threshold in requests done by the same auth_id or period_seconds.

class FeaturesAPIShieldOperationFeatureParameterSchemas:
parameter_schemas: FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas
last_updated: Optional[datetime]
formatdate-time
parameter_schemas: Optional[FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas]

An operation schema object containing a response.

parameters: Optional[List[object]]

An array containing the learned parameter schemas.

responses: Optional[object]

An empty response object. This field is required to yield a valid operation schema.

class FeaturesAPIShieldOperationFeatureAPIRouting:
api_routing: Optional[FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]

API Routing settings on endpoint.

last_updated: Optional[datetime]
formatdate-time
route: Optional[str]

Target route.

class FeaturesAPIShieldOperationFeatureConfidenceIntervals:
confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]
last_updated: Optional[datetime]
formatdate-time
suggested_threshold: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold]
confidence_intervals: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals]
p90: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

p95: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

p99: Optional[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

mean: Optional[float]

Suggested threshold.

class FeaturesAPIShieldOperationFeatureSchemaInfo:
schema_info: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]
active_schema: Optional[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema]

Schema active on endpoint.

id: Optional[str]

UUID.

maxLength36
minLength36
created_at: Optional[datetime]
formatdate-time
is_learned: Optional[bool]

True if schema is Cloudflare-provided.

name: Optional[str]

Schema file name.

learned_available: Optional[bool]

True if a Cloudflare-provided learned schema is available for this endpoint.

mitigation_action: Optional[Literal["none", "log", "block"]]

Action taken on requests failing validation.

One of the following:
"none"
"log"
"block"
class OperationBulkDeleteResponse:
errors: Message
messages: Message
success: Literal[true]

Whether the API call was successful.

API GatewayOperationsLabels

Replace label(s) on an operation in endpoint management
api_gateway.operations.labels.update(stroperation_id, LabelUpdateParams**kwargs) -> LabelUpdateResponse
PUT/zones/{zone_id}/api_gateway/operations/{operation_id}/labels
Attach label(s) on an operation in endpoint management
api_gateway.operations.labels.create(stroperation_id, LabelCreateParams**kwargs) -> LabelCreateResponse
POST/zones/{zone_id}/api_gateway/operations/{operation_id}/labels
Remove label(s) on an operation in endpoint management
api_gateway.operations.labels.delete(stroperation_id, LabelDeleteParams**kwargs) -> LabelDeleteResponse
DELETE/zones/{zone_id}/api_gateway/operations/{operation_id}/labels
Bulk replace label(s) on operation(s) in endpoint management
api_gateway.operations.labels.bulk_update(LabelBulkUpdateParams**kwargs) -> SyncSinglePage[LabelBulkUpdateResponse]
PUT/zones/{zone_id}/api_gateway/operations/labels
Bulk attach label(s) on operation(s) in endpoint management
api_gateway.operations.labels.bulk_create(LabelBulkCreateParams**kwargs) -> SyncSinglePage[LabelBulkCreateResponse]
POST/zones/{zone_id}/api_gateway/operations/labels
Bulk remove label(s) on operation(s) in endpoint management
api_gateway.operations.labels.bulk_delete(LabelBulkDeleteParams**kwargs) -> SyncSinglePage[LabelBulkDeleteResponse]
DELETE/zones/{zone_id}/api_gateway/operations/labels
ModelsExpand Collapse
class LabelUpdateResponse:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
labels: Optional[List[Label]]
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
class LabelCreateResponse:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
labels: Optional[List[Label]]
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
class LabelDeleteResponse:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
labels: Optional[List[Label]]
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
class LabelBulkUpdateResponse:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
labels: Optional[List[Label]]
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
class LabelBulkCreateResponse:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
labels: Optional[List[Label]]
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"
class LabelBulkDeleteResponse:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
labels: Optional[List[Label]]
created_at: datetime
formatdate-time
description: str

The description of the label

last_updated: datetime
formatdate-time
metadata: object

Metadata for the label

name: str

The name of the label

source: Literal["user", "managed"]
  • user - label is owned by the user
  • managed - label is owned by cloudflare
One of the following:
"user"
"managed"

API GatewayOperationsSchema Validation

Retrieve operation-level schema validation settings
Deprecated
api_gateway.operations.schema_validation.get(stroperation_id, SchemaValidationGetParams**kwargs) -> SchemaValidationGetResponse
GET/zones/{zone_id}/api_gateway/operations/{operation_id}/schema_validation
Update operation-level schema validation settings
Deprecated
api_gateway.operations.schema_validation.update(stroperation_id, SchemaValidationUpdateParams**kwargs) -> SchemaValidationUpdateResponse
PUT/zones/{zone_id}/api_gateway/operations/{operation_id}/schema_validation
Update multiple operation-level schema validation settings
Deprecated
api_gateway.operations.schema_validation.edit(SchemaValidationEditParams**kwargs) -> SettingsMultipleRequest
PATCH/zones/{zone_id}/api_gateway/operations/schema_validation
ModelsExpand Collapse
Dict[str, SettingsMultipleRequestItem]
mitigation_action: Optional[Literal["log", "block", "none"]]

When set, this applies a mitigation action to this operation

  • log log request when request does not conform to schema for this operation
  • block deny access to the site when request does not conform to schema for this operation
  • none will skip mitigation for this operation
  • null indicates that no operation level mitigation is in place, see Zone Level Schema Validation Settings for mitigation action that will be applied
One of the following:
"log"
"block"
"none"
class SchemaValidationGetResponse:
mitigation_action: Optional[Literal["log", "block", "none"]]

When set, this applies a mitigation action to this operation

  • log log request when request does not conform to schema for this operation
  • block deny access to the site when request does not conform to schema for this operation
  • none will skip mitigation for this operation
  • null indicates that no operation level mitigation is in place, see Zone Level Schema Validation Settings for mitigation action that will be applied
One of the following:
"log"
"block"
"none"
operation_id: Optional[str]

UUID.

maxLength36
minLength36
class SchemaValidationUpdateResponse:
mitigation_action: Optional[Literal["log", "block", "none"]]

When set, this applies a mitigation action to this operation

  • log log request when request does not conform to schema for this operation
  • block deny access to the site when request does not conform to schema for this operation
  • none will skip mitigation for this operation
  • null indicates that no operation level mitigation is in place, see Zone Level Schema Validation Settings for mitigation action that will be applied
One of the following:
"log"
"block"
"none"
operation_id: Optional[str]

UUID.

maxLength36
minLength36

API GatewaySchemas

Retrieve operations and features as OpenAPI schemas
api_gateway.schemas.list(SchemaListParams**kwargs) -> SchemaListResponse
GET/zones/{zone_id}/api_gateway/schemas
ModelsExpand Collapse
class SchemaListResponse:
schemas: Optional[List[object]]
timestamp: Optional[str]

API GatewaySettings

ModelsExpand Collapse
class Settings:
validation_default_mitigation_action: Optional[Literal["none", "log", "block"]]

The default mitigation action used when there is no mitigation action defined on the operation

Mitigation actions are as follows:

  • log - log request when request does not conform to schema
  • block - deny access to the site when request does not conform to schema

A special value of of none will skip running schema validation entirely for the request when there is no mitigation action defined on the operation

One of the following:
"none"
"log"
"block"
validation_override_mitigation_action: Optional[Literal["none"]]

When set, this overrides both zone level and operation level mitigation actions.

  • none will skip running schema validation entirely for the request
  • null indicates that no override is in place

API GatewaySettingsSchema Validation

Retrieve zone level schema validation settings
Deprecated
api_gateway.settings.schema_validation.get(SchemaValidationGetParams**kwargs) -> Settings
GET/zones/{zone_id}/api_gateway/settings/schema_validation
Update zone level schema validation settings
Deprecated
api_gateway.settings.schema_validation.update(SchemaValidationUpdateParams**kwargs) -> Settings
PUT/zones/{zone_id}/api_gateway/settings/schema_validation
Update zone level schema validation settings
Deprecated
api_gateway.settings.schema_validation.edit(SchemaValidationEditParams**kwargs) -> Settings
PATCH/zones/{zone_id}/api_gateway/settings/schema_validation

API GatewayUser Schemas

Retrieve information about all schemas on a zone
Deprecated
api_gateway.user_schemas.list(UserSchemaListParams**kwargs) -> SyncV4PagePaginationArray[OldPublicSchema]
GET/zones/{zone_id}/api_gateway/user_schemas
Retrieve information about a specific schema on a zone
Deprecated
api_gateway.user_schemas.get(strschema_id, UserSchemaGetParams**kwargs) -> OldPublicSchema
GET/zones/{zone_id}/api_gateway/user_schemas/{schema_id}
Upload a schema to a zone
Deprecated
api_gateway.user_schemas.create(UserSchemaCreateParams**kwargs) -> UserSchemaCreateResponse
POST/zones/{zone_id}/api_gateway/user_schemas
Enable validation for a schema
Deprecated
api_gateway.user_schemas.edit(strschema_id, UserSchemaEditParams**kwargs) -> OldPublicSchema
PATCH/zones/{zone_id}/api_gateway/user_schemas/{schema_id}
Delete a schema
Deprecated
api_gateway.user_schemas.delete(strschema_id, UserSchemaDeleteParams**kwargs) -> UserSchemaDeleteResponse
DELETE/zones/{zone_id}/api_gateway/user_schemas/{schema_id}
ModelsExpand Collapse
List[MessageItem]
code: int
minimum1000
message: str
documentation_url: Optional[str]
source: Optional[MessageItemSource]
pointer: Optional[str]
class OldPublicSchema:
created_at: datetime
formatdate-time
kind: Literal["openapi_v3"]

Kind of schema

name: str

Name of the schema

schema_id: str

UUID.

maxLength36
minLength36
source: Optional[str]

Source of the schema

validation_enabled: Optional[bool]

Flag whether schema is enabled for validation.

class UserSchemaCreateResponse:
upload_details: Optional[UploadDetails]
warnings: Optional[List[UploadDetailsWarning]]

Diagnostic warning events that occurred during processing. These events are non-critical errors found within the schema.

code: int

Code that identifies the event that occurred.

locations: Optional[List[str]]

JSONPath location(s) in the schema where these events were encountered. See https://goessner.net/articles/JsonPath/ for JSONPath specification.

message: Optional[str]

Diagnostic message that describes the event.

class UserSchemaDeleteResponse:
errors: Message
messages: Message
success: Literal[true]

Whether the API call was successful.

API GatewayUser SchemasOperations

Retrieve all operations from a schema.
Deprecated
api_gateway.user_schemas.operations.list(strschema_id, OperationListParams**kwargs) -> SyncV4PagePaginationArray[OperationListResponse]
GET/zones/{zone_id}/api_gateway/user_schemas/{schema_id}/operations
ModelsExpand Collapse
One of the following:
class APIShieldOperation:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
last_updated: datetime
formatdate-time
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"
operation_id: str

UUID.

maxLength36
minLength36
features: Optional[APIShieldOperationFeatures]
One of the following:
class APIShieldOperationFeaturesAPIShieldOperationFeatureThresholds:
thresholds: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholds]
auth_id_tokens: Optional[int]

The total number of auth-ids seen across this calculation.

data_points: Optional[int]

The number of data points used for the threshold suggestion calculation.

last_updated: Optional[datetime]
formatdate-time
p50: Optional[int]

The p50 quantile of requests (in period_seconds).

p90: Optional[int]

The p90 quantile of requests (in period_seconds).

p99: Optional[int]

The p99 quantile of requests (in period_seconds).

period_seconds: Optional[int]

The period over which this threshold is suggested.

requests: Optional[int]

The estimated number of requests covered by these calculations.

suggested_threshold: Optional[int]

The suggested threshold in requests done by the same auth_id or period_seconds.

class APIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas:
parameter_schemas: APIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas
last_updated: Optional[datetime]
formatdate-time
parameter_schemas: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas]

An operation schema object containing a response.

parameters: Optional[List[object]]

An array containing the learned parameter schemas.

responses: Optional[object]

An empty response object. This field is required to yield a valid operation schema.

class APIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting:
api_routing: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]

API Routing settings on endpoint.

last_updated: Optional[datetime]
formatdate-time
route: Optional[str]

Target route.

class APIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals:
confidence_intervals: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]
last_updated: Optional[datetime]
formatdate-time
suggested_threshold: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold]
confidence_intervals: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals]
p90: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

p95: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

p99: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99]

Upper and lower bound for percentile estimate

lower: Optional[float]

Lower bound for percentile estimate

upper: Optional[float]

Upper bound for percentile estimate

mean: Optional[float]

Suggested threshold.

class APIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo:
schema_info: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]
active_schema: Optional[APIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema]

Schema active on endpoint.

id: Optional[str]

UUID.

maxLength36
minLength36
created_at: Optional[datetime]
formatdate-time
is_learned: Optional[bool]

True if schema is Cloudflare-provided.

name: Optional[str]

Schema file name.

learned_available: Optional[bool]

True if a Cloudflare-provided learned schema is available for this endpoint.

mitigation_action: Optional[Literal["none", "log", "block"]]

Action taken on requests failing validation.

One of the following:
"none"
"log"
"block"
class APIShieldBasicOperation:
endpoint: str

The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/.

formaturi-template
maxLength4096
host: str

RFC3986-compliant host.

formathostname
maxLength255
method: Literal["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

One of the following:
"GET"
"POST"
"HEAD"
"OPTIONS"
"PUT"
"DELETE"
"CONNECT"
"PATCH"
"TRACE"

API GatewayUser SchemasHosts

Retrieve schema hosts in a zone
Deprecated
api_gateway.user_schemas.hosts.list(HostListParams**kwargs) -> SyncV4PagePaginationArray[HostListResponse]
GET/zones/{zone_id}/api_gateway/user_schemas/hosts
ModelsExpand Collapse
class HostListResponse:
created_at: datetime
formatdate-time
hosts: List[str]

Hosts serving the schema, e.g zone.host.com

name: str

Name of the schema

schema_id: str

UUID.

maxLength36
minLength36

API GatewayExpression Template

API GatewayExpression TemplateFallthrough

Generate fallthrough WAF expression template from a set of API hosts
api_gateway.expression_template.fallthrough.create(FallthroughCreateParams**kwargs) -> FallthroughCreateResponse
POST/zones/{zone_id}/api_gateway/expression-template/fallthrough
ModelsExpand Collapse
class FallthroughCreateResponse:
expression: str

WAF Expression for fallthrough

title: str

Title for the expression