Skip to content
Start here

API Gateway

API GatewayConfigurations

Get session identifier settings
client.APIGateway.Configurations.Get(ctx, params) (*Configuration, error)
GET/zones/{zone_id}/api_gateway/configuration
Update session identifier settings
client.APIGateway.Configurations.Update(ctx, params) (*Configuration, error)
PUT/zones/{zone_id}/api_gateway/configuration
ModelsExpand Collapse
type Configuration struct{…}
AuthIDCharacteristics []ConfigurationAuthIDCharacteristic
One of the following:
type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristic struct{…}

Auth ID Characteristic

Name string

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

maxLength128
Type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType

The type of characteristic.

One of the following:
const ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicTypeHeader ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType = "header"
const ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicTypeCookie ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType = "cookie"
type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJWTClaim struct{…}

Auth ID Characteristic extracted from JWT Token Claims

Name string

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 ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJWTClaimType

The type of characteristic.

API GatewayDiscovery

Export discovered API operations as OpenAPI schemas
client.APIGateway.Discovery.Get(ctx, query) (*DiscoveryGetResponse, error)
GET/zones/{zone_id}/api_gateway/discovery
ModelsExpand Collapse
type DiscoveryOperation struct{…}
ID string

UUID.

maxLength36
minLength36
Endpoint string

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 string

RFC3986-compliant host.

formathostname
maxLength255
LastUpdated Time
formatdate-time
Method DiscoveryOperationMethod

The HTTP method used to access the endpoint.

One of the following:
const DiscoveryOperationMethodGet DiscoveryOperationMethod = "GET"
const DiscoveryOperationMethodPost DiscoveryOperationMethod = "POST"
const DiscoveryOperationMethodHead DiscoveryOperationMethod = "HEAD"
const DiscoveryOperationMethodOptions DiscoveryOperationMethod = "OPTIONS"
const DiscoveryOperationMethodPut DiscoveryOperationMethod = "PUT"
const DiscoveryOperationMethodDelete DiscoveryOperationMethod = "DELETE"
const DiscoveryOperationMethodConnect DiscoveryOperationMethod = "CONNECT"
const DiscoveryOperationMethodPatch DiscoveryOperationMethod = "PATCH"
const DiscoveryOperationMethodTrace DiscoveryOperationMethod = "TRACE"
Origin []DiscoveryOperationOrigin

API discovery engine(s) that discovered this operation

One of the following:
const DiscoveryOperationOriginMl DiscoveryOperationOrigin = "ML"
const DiscoveryOperationOriginSessionIdentifier DiscoveryOperationOrigin = "SessionIdentifier"
const DiscoveryOperationOriginLabelDiscovery DiscoveryOperationOrigin = "LabelDiscovery"
State DiscoveryOperationState

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:
const DiscoveryOperationStateReview DiscoveryOperationState = "review"
const DiscoveryOperationStateSaved DiscoveryOperationState = "saved"
const DiscoveryOperationStateIgnored DiscoveryOperationState = "ignored"
Features DiscoveryOperationFeaturesOptional
TrafficStats DiscoveryOperationFeaturesTrafficStatsOptional
LastUpdated Time
formatdate-time
PeriodSeconds int64

The period in seconds these statistics were computed over

Requests float64

The average number of requests seen during this period

formatfloat

API GatewayDiscoveryOperations

List discovered web and API operations
client.APIGateway.Discovery.Operations.List(ctx, params) (*V4PagePaginationArray[DiscoveryOperation], error)
GET/zones/{zone_id}/api_gateway/discovery/operations
Edit discovered web and API operations
client.APIGateway.Discovery.Operations.BulkEdit(ctx, params) (*DiscoveryOperationBulkEditResponse, error)
PATCH/zones/{zone_id}/api_gateway/discovery/operations

API GatewayLabels

List operation labels
client.APIGateway.Labels.List(ctx, params) (*V4PagePaginationArray[LabelListResponse], error)
GET/zones/{zone_id}/api_gateway/labels

API GatewayLabelsUser

Create user-defined operation labels
client.APIGateway.Labels.User.BulkNew(ctx, params) (*SinglePage[LabelUserBulkNewResponse], error)
POST/zones/{zone_id}/api_gateway/labels/user
Delete user-defined operation labels
client.APIGateway.Labels.User.BulkDelete(ctx, body) (*SinglePage[LabelUserBulkDeleteResponse], error)
DELETE/zones/{zone_id}/api_gateway/labels/user
Get a user-defined operation label
client.APIGateway.Labels.User.Get(ctx, name, params) (*LabelUserGetResponse, error)
GET/zones/{zone_id}/api_gateway/labels/user/{name}
Update a user-defined operation label
client.APIGateway.Labels.User.Update(ctx, name, params) (*LabelUserUpdateResponse, error)
PUT/zones/{zone_id}/api_gateway/labels/user/{name}
Edit a user-defined operation label
client.APIGateway.Labels.User.Edit(ctx, name, params) (*LabelUserEditResponse, error)
PATCH/zones/{zone_id}/api_gateway/labels/user/{name}
Delete a user-defined operation label
client.APIGateway.Labels.User.Delete(ctx, name, body) (*LabelUserDeleteResponse, error)
DELETE/zones/{zone_id}/api_gateway/labels/user/{name}

API GatewayLabelsUserResources

API GatewayLabelsUserResourcesOperation

Replace operations attached to a user-defined label
client.APIGateway.Labels.User.Resources.Operation.Update(ctx, name, params) (*LabelUserResourceOperationUpdateResponse, error)
PUT/zones/{zone_id}/api_gateway/labels/user/{name}/resources/operation

API GatewayLabelsManaged

Get a managed operation label
client.APIGateway.Labels.Managed.Get(ctx, name, params) (*LabelManagedGetResponse, error)
GET/zones/{zone_id}/api_gateway/labels/managed/{name}

API GatewayLabelsManagedResources

API GatewayLabelsManagedResourcesOperation

Replace operations attached to a managed label
client.APIGateway.Labels.Managed.Resources.Operation.Update(ctx, name, params) (*LabelManagedResourceOperationUpdateResponse, error)
PUT/zones/{zone_id}/api_gateway/labels/managed/{name}/resources/operation

API GatewayOperations

List web and API operations
client.APIGateway.Operations.List(ctx, params) (*V4PagePaginationArray[OperationListResponse], error)
GET/zones/{zone_id}/api_gateway/operations
Get a web or API operation
client.APIGateway.Operations.Get(ctx, operationID, params) (*OperationGetResponse, error)
GET/zones/{zone_id}/api_gateway/operations/{operation_id}
Create a web or API operation
client.APIGateway.Operations.New(ctx, params) (*OperationNewResponse, error)
POST/zones/{zone_id}/api_gateway/operations/item
Delete a web or API operation
client.APIGateway.Operations.Delete(ctx, operationID, body) (*OperationDeleteResponse, error)
DELETE/zones/{zone_id}/api_gateway/operations/{operation_id}
Create web or API operations
client.APIGateway.Operations.BulkNew(ctx, params) (*SinglePage[OperationBulkNewResponse], error)
POST/zones/{zone_id}/api_gateway/operations
Delete web or API operations
client.APIGateway.Operations.BulkDelete(ctx, body) (*OperationBulkDeleteResponse, error)
DELETE/zones/{zone_id}/api_gateway/operations
ModelsExpand Collapse
type APIShield struct{…}
Endpoint string

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 string

RFC3986-compliant host.

formathostname
maxLength255
LastUpdated Time
formatdate-time
Method APIShieldMethod

The HTTP method used to access the endpoint.

One of the following:
const APIShieldMethodGet APIShieldMethod = "GET"
const APIShieldMethodPost APIShieldMethod = "POST"
const APIShieldMethodHead APIShieldMethod = "HEAD"
const APIShieldMethodOptions APIShieldMethod = "OPTIONS"
const APIShieldMethodPut APIShieldMethod = "PUT"
const APIShieldMethodDelete APIShieldMethod = "DELETE"
const APIShieldMethodConnect APIShieldMethod = "CONNECT"
const APIShieldMethodPatch APIShieldMethod = "PATCH"
const APIShieldMethodTrace APIShieldMethod = "TRACE"
OperationID string

UUID.

maxLength36
minLength36

API GatewayOperationsLabels

Replace labels on a web or API operation
client.APIGateway.Operations.Labels.Update(ctx, operationID, params) (*OperationLabelUpdateResponse, error)
PUT/zones/{zone_id}/api_gateway/operations/{operation_id}/labels
Attach labels to a web or API operation
client.APIGateway.Operations.Labels.New(ctx, operationID, params) (*OperationLabelNewResponse, error)
POST/zones/{zone_id}/api_gateway/operations/{operation_id}/labels
Remove labels from a web or API operation
client.APIGateway.Operations.Labels.Delete(ctx, operationID, body) (*OperationLabelDeleteResponse, error)
DELETE/zones/{zone_id}/api_gateway/operations/{operation_id}/labels
Replace labels on web or API operations
client.APIGateway.Operations.Labels.BulkUpdate(ctx, params) (*SinglePage[OperationLabelBulkUpdateResponse], error)
PUT/zones/{zone_id}/api_gateway/operations/labels
Attach labels to web or API operations
client.APIGateway.Operations.Labels.BulkNew(ctx, params) (*SinglePage[OperationLabelBulkNewResponse], error)
POST/zones/{zone_id}/api_gateway/operations/labels
Remove labels from web or API operations
client.APIGateway.Operations.Labels.BulkDelete(ctx, body) (*SinglePage[OperationLabelBulkDeleteResponse], error)
DELETE/zones/{zone_id}/api_gateway/operations/labels

API GatewayOperationsSchema Validation

Retrieve operation-level schema validation settings
Deprecated
client.APIGateway.Operations.SchemaValidation.Get(ctx, operationID, query) (*OperationSchemaValidationGetResponse, error)
GET/zones/{zone_id}/api_gateway/operations/{operation_id}/schema_validation
Update operation-level schema validation settings
Deprecated
client.APIGateway.Operations.SchemaValidation.Update(ctx, operationID, params) (*OperationSchemaValidationUpdateResponse, error)
PUT/zones/{zone_id}/api_gateway/operations/{operation_id}/schema_validation
Update multiple operation-level schema validation settings
Deprecated
client.APIGateway.Operations.SchemaValidation.Edit(ctx, params) (*SettingsMultipleRequest, error)
PATCH/zones/{zone_id}/api_gateway/operations/schema_validation
ModelsExpand Collapse
type SettingsMultipleRequest map[string, SettingsMultipleRequestItem]
MitigationAction SettingsMultipleRequestItemMitigationActionOptional

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:
const SettingsMultipleRequestItemMitigationActionLog SettingsMultipleRequestItemMitigationAction = "log"
const SettingsMultipleRequestItemMitigationActionBlock SettingsMultipleRequestItemMitigationAction = "block"
const SettingsMultipleRequestItemMitigationActionNone SettingsMultipleRequestItemMitigationAction = "none"

API GatewaySchemas

Export web and API operations as OpenAPI schemas
client.APIGateway.Schemas.List(ctx, params) (*SchemaListResponse, error)
GET/zones/{zone_id}/api_gateway/schemas

API GatewaySettings

ModelsExpand Collapse
type Settings struct{…}
ValidationDefaultMitigationAction SettingsValidationDefaultMitigationActionOptional

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:
const SettingsValidationDefaultMitigationActionNone SettingsValidationDefaultMitigationAction = "none"
const SettingsValidationDefaultMitigationActionLog SettingsValidationDefaultMitigationAction = "log"
const SettingsValidationDefaultMitigationActionBlock SettingsValidationDefaultMitigationAction = "block"
ValidationOverrideMitigationAction SettingsValidationOverrideMitigationActionOptional

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
client.APIGateway.Settings.SchemaValidation.Get(ctx, query) (*Settings, error)
GET/zones/{zone_id}/api_gateway/settings/schema_validation
Update zone level schema validation settings
Deprecated
client.APIGateway.Settings.SchemaValidation.Update(ctx, params) (*Settings, error)
PUT/zones/{zone_id}/api_gateway/settings/schema_validation
Update zone level schema validation settings
Deprecated
client.APIGateway.Settings.SchemaValidation.Edit(ctx, params) (*Settings, error)
PATCH/zones/{zone_id}/api_gateway/settings/schema_validation

API GatewayUser Schemas

Retrieve information about all schemas on a zone
Deprecated
client.APIGateway.UserSchemas.List(ctx, params) (*V4PagePaginationArray[OldPublicSchema], error)
GET/zones/{zone_id}/api_gateway/user_schemas
Retrieve information about a specific schema on a zone
Deprecated
client.APIGateway.UserSchemas.Get(ctx, schemaID, params) (*OldPublicSchema, error)
GET/zones/{zone_id}/api_gateway/user_schemas/{schema_id}
Upload a legacy schema
Deprecated
client.APIGateway.UserSchemas.New(ctx, params) (*UserSchemaNewResponse, error)
POST/zones/{zone_id}/api_gateway/user_schemas
Enable validation for a schema
Deprecated
client.APIGateway.UserSchemas.Edit(ctx, schemaID, params) (*OldPublicSchema, error)
PATCH/zones/{zone_id}/api_gateway/user_schemas/{schema_id}
Delete a schema
Deprecated
client.APIGateway.UserSchemas.Delete(ctx, schemaID, body) (*UserSchemaDeleteResponse, error)
DELETE/zones/{zone_id}/api_gateway/user_schemas/{schema_id}
ModelsExpand Collapse
type Message []MessageItem
Code int64
minimum1000
Message string
DocumentationURL stringOptional
Source MessageItemSourceOptional
Pointer stringOptional
type OldPublicSchema struct{…}
CreatedAt Time
formatdate-time
Kind OldPublicSchemaKind

Kind of schema

Name string

Name of the schema

SchemaID string

UUID.

maxLength36
minLength36
Source stringOptional

Source of the schema

ValidationEnabled boolOptional

Flag whether schema is enabled for validation.

API GatewayUser SchemasOperations

Retrieve all operations from a schema
Deprecated
client.APIGateway.UserSchemas.Operations.List(ctx, schemaID, params) (*V4PagePaginationArray[UserSchemaOperationListResponse], error)
GET/zones/{zone_id}/api_gateway/user_schemas/{schema_id}/operations

API GatewayUser SchemasHosts

Retrieve schema hosts in a zone
Deprecated
client.APIGateway.UserSchemas.Hosts.List(ctx, params) (*V4PagePaginationArray[UserSchemaHostListResponse], error)
GET/zones/{zone_id}/api_gateway/user_schemas/hosts

API GatewayExpression Template

API GatewayExpression TemplateFallthrough

Generate a fallthrough WAF expression template
Deprecated
client.APIGateway.ExpressionTemplate.Fallthrough.New(ctx, params) (*ExpressionTemplateFallthroughNewResponse, error)
POST/zones/{zone_id}/api_gateway/expression-template/fallthrough