diff --git a/providers/src/cloudflare/v00.00.00000/services/cache.yaml b/providers/src/cloudflare/v00.00.00000/services/cache.yaml index 2f8aa091..265673fe 100644 --- a/providers/src/cloudflare/v00.00.00000/services/cache.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/cache.yaml @@ -1,2939 +1,2730 @@ -openapi: 3.0.3 -info: - title: cache API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones/{zone_id}/cache/cache_reserve: - get: - description: >- - Increase cache lifetimes by automatically storing all cacheable files - into Cloudflare's persistent object storage buckets. Requires Cache - Reserve subscription. Note: using Tiered Cache with Cache Reserve is - highly recommended to reduce Reserve operations costs. See the - [developer - docs](https://developers.cloudflare.com/cache/about/cache-reserve) for - more information. - operationId: zone-cache-settings-get-cache-reserve-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - $ref: '#/components/schemas/cacheReserve' - x-stainless-naming: - terraform: - property_name: zone_setting_id - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the Cache Reserve zone setting. - type: string - x-auditable: true - default: 'off' - enum: - - 'on' - - 'off' - required: - - id - - value - - editable - - id - - value - type: object - title: Cache Reserve - required: - - success - - errors - - messages - description: Get Cache Reserve setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Get Cache Reserve setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Cache Reserve setting - tags: - - Zone Cache Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - Zone Read - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: cache - resource_chain: - - cache_reserve - method: get - patch: - description: >- - Increase cache lifetimes by automatically storing all cacheable files - into Cloudflare's persistent object storage buckets. Requires Cache - Reserve subscription. Note: using Tiered Cache with Cache Reserve is - highly recommended to reduce Reserve operations costs. See the - [developer - docs](https://developers.cloudflare.com/cache/about/cache-reserve) for - more information. - operationId: zone-cache-settings-change-cache-reserve-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - value: - $ref: '#/components/schemas/cacheRulesCacheReserveValue' - required: - - value - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - $ref: '#/components/schemas/cacheReserve' - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the Cache Reserve zone setting. - type: string - x-auditable: true - default: 'off' - enum: - - 'on' - - 'off' - required: - - id - - value - - editable - - id - - value - type: object - title: Cache Reserve - required: - - success - - errors - - messages - description: Change Cache Reserve setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Change Cache Reserve setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Change Cache Reserve setting - tags: - - Zone Cache Settings - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: cache - resource_chain: - - cache_reserve - method: edit - /zones/{zone_id}/cache/cache_reserve_clear: - get: - description: >- - You can use Cache Reserve Clear to clear your Cache Reserve, but you - must first disable Cache Reserve. In most cases, this will be - accomplished within 24 hours. You cannot re-enable Cache Reserve while - this process is ongoing. Keep in mind that you cannot undo or cancel - this operation. - operationId: zone-cache-settings-get-cache-reserve-clear - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - type: object - description: >- - You can use Cache Reserve Clear to clear your Cache - Reserve, but you must first disable Cache Reserve. In most - cases, this will be accomplished within 24 hours. You - cannot re-enable Cache Reserve while this process is - ongoing. Keep in mind that you cannot undo or cancel this - operation. - title: Cache Reserve Clear - properties: - id: - $ref: >- - #/components/schemas/unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d - modified_on: - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - end_ts: - $ref: '#/components/schemas/cacheRulesCacheReserveClearEndTs' - start_ts: - $ref: >- - #/components/schemas/cacheRulesCacheReserveClearStartTs - state: - $ref: '#/components/schemas/cacheRulesCacheReserveClearState' - required: - - id - - state - - start_ts - required: - - success - - errors - - messages - description: Get Cache Reserve Clear response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Get Cache Reserve Clear failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Cache Reserve Clear - tags: - - Zone Cache Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - Zone Read - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: cache - resource_chain: - - cache_reserve - method: status - post: - description: >- - You can use Cache Reserve Clear to clear your Cache Reserve, but you - must first disable Cache Reserve. In most cases, this will be - accomplished within 24 hours. You cannot re-enable Cache Reserve while - this process is ongoing. Keep in mind that you cannot undo or cancel - this operation. - operationId: zone-cache-settings-start-cache-reserve-clear - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: {} - description: The request body is currently not used. - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - type: object - description: >- - You can use Cache Reserve Clear to clear your Cache - Reserve, but you must first disable Cache Reserve. In most - cases, this will be accomplished within 24 hours. You - cannot re-enable Cache Reserve while this process is - ongoing. Keep in mind that you cannot undo or cancel this - operation. - title: Cache Reserve Clear - properties: - id: - $ref: >- - #/components/schemas/unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d - modified_on: - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - end_ts: - $ref: '#/components/schemas/cacheRulesCacheReserveClearEndTs' - start_ts: - $ref: >- - #/components/schemas/cacheRulesCacheReserveClearStartTs - state: - $ref: '#/components/schemas/cacheRulesCacheReserveClearState' - required: - - id - - state - - start_ts - required: - - success - - errors - - messages - description: Start Cache Reserve Clear response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Start Cache Reserve Clear failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Start Cache Reserve Clear - tags: - - Zone Cache Settings - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: cache - resource_chain: - - cache_reserve - method: clear - /zones/{zone_id}/cache/origin_cloud_regions: - get: - description: >- - Returns all IP-to-cloud-region mappings configured for the zone. Each - mapping tells Cloudflare which cloud vendor and region hosts the origin - at that IP, enabling the edge to route via the nearest Tiered Cache - upper-tier co-located with that cloud provider. Returns an empty array - when no mappings exist. - operationId: origin-cloud-regions-list - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/cacheRulesOriginCloudRegionsListResult - required: - - success - - errors - - messages - type: object - description: List origin cloud region mappings response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: List origin cloud region mappings failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List origin cloud region mappings - tags: - - Origin Cloud Regions - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - patch: - description: >- - Adds or updates a single IP-to-cloud-region mapping for the zone. Unlike - POST, this operation is idempotent — if a mapping for the IP already - exists it is overwritten. Returns the complete updated list of all - mappings for the zone. Returns 403 (code 1164) when the zone has reached - the limit of 3,500 IP mappings. - operationId: origin-cloud-regions-upsert - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesOriginCloudRegionRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/cacheRulesOriginCloudRegionsListResult - required: - - success - - errors - - messages - type: object - description: Create or update origin cloud region mapping response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Create or update origin cloud region mapping failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create or update an origin cloud region mapping - tags: - - Origin Cloud Regions - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - post: - description: >- - Adds a single IP-to-cloud-region mapping for the zone. The IP must be a - valid IPv4 or IPv6 address and is normalized to canonical form before - storage (RFC 5952 for IPv6). Returns 400 (code 1145) if a mapping for - that IP already exists — use PATCH to update an existing entry. The - vendor and region are validated against the list from `GET - /zones/{zone_id}/cache/origin_cloud_regions/supported_regions`. - operationId: origin-cloud-regions-create - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesOriginCloudRegionRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/cacheRulesOriginCloudRegionSingleResult - required: - - success - - errors - - messages - type: object - description: Create origin cloud region mapping response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Create origin cloud region mapping failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create an origin cloud region mapping - tags: - - Origin Cloud Regions - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/cache/origin_cloud_regions/batch: - delete: - description: >- - Removes up to 100 IP-to-cloud-region mappings in a single request. Each - IP is validated independently — successfully deleted items are returned - in the `succeeded` array and IPs that could not be found or are invalid - are returned in the `failed` array. - operationId: origin-cloud-regions-batch-delete - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/cacheRulesOriginCloudRegionBatchResult - required: - - success - - errors - - messages - type: object - description: Batch delete origin cloud region mappings successful. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Batch delete origin cloud region mappings failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Batch delete origin cloud region mappings internal error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Batch delete origin cloud region mappings - tags: - - Origin Cloud Regions - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - patch: - description: >- - Adds or updates up to 100 IP-to-cloud-region mappings in a single - request. Each item is validated independently — valid items are applied - and invalid items are returned in the `failed` array. The vendor and - region for every item are validated against the list from `GET - /zones/{zone_id}/cache/origin_cloud_regions/supported_regions`. - operationId: origin-cloud-regions-batch-upsert - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/cacheRulesOriginCloudRegionRequest' - maxItems: 100 - type: array - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/cacheRulesOriginCloudRegionBatchResult - required: - - success - - errors - - messages - type: object - description: Batch create or update origin cloud region mappings successful. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Batch create or update origin cloud region mappings failure. - 5XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Batch create or update origin cloud region mappings internal error. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Batch create or update origin cloud region mappings - tags: - - Origin Cloud Regions - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/cache/origin_cloud_regions/supported_regions: - get: - description: >- - Returns the cloud vendors and regions that are valid values for origin - cloud region mappings. Each region includes the Tiered Cache upper-tier - colocation codes that will be used for cache routing when a mapping - targeting that region is active. Requires the zone to have Tiered Cache - enabled. - operationId: origin-cloud-regions-supported-regions - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/cacheRulesSupportedCloudRegionsResult' - required: - - success - - errors - - messages - type: object - description: List supported cloud vendors and regions response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: List supported cloud vendors and regions failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List supported cloud vendors and regions - tags: - - Origin Cloud Regions - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/cache/origin_cloud_regions/{origin_ip}: - delete: - description: >- - Removes the cloud region mapping for a single origin IP address. The IP - path parameter is normalized before lookup. Returns the deleted entry on - success. Returns 404 (code 1163) if no mapping exists for the specified - IP. When the last mapping for the zone is removed the underlying rule - record is also deleted. - operationId: origin-cloud-regions-delete - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Origin IP address whose mapping should be deleted. - in: path - name: origin_ip - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/cacheRulesOriginCloudRegionSingleResult - required: - - success - - errors - - messages - type: object - description: Delete origin cloud region mapping response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Delete origin cloud region mapping failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an origin cloud region mapping - tags: - - Origin Cloud Regions - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - get: - description: >- - Returns the cloud region mapping for a single origin IP address. The IP - path parameter is normalized before lookup (RFC 5952 for IPv6). Returns - 404 (code 1142) if the zone has no mappings or if the specified IP has - no mapping. - operationId: origin-cloud-regions-get - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Origin IP address to look up. IPv4 and IPv6 are supported. - in: path - name: origin_ip - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: >- - #/components/schemas/cacheRulesOriginCloudRegionSingleResult - required: - - success - - errors - - messages - type: object - description: Get origin cloud region mapping response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Get origin cloud region mapping failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an origin cloud region mapping - tags: - - Origin Cloud Regions - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/cache/regional_tiered_cache: - get: - description: >- - Instructs Cloudflare to check a regional hub data center on the way to - your upper tier. This can help improve performance for smart and custom - tiered cache topologies. - operationId: zone-cache-settings-get-regional-tiered-cache-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - $ref: '#/components/schemas/regionalTieredCache' - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the Regional Tiered Cache zone setting. - type: string - x-auditable: true - default: 'off' - enum: - - 'on' - - 'off' - required: - - id - - value - - editable - - id - - value - type: object - title: Regional Tiered Cache - required: - - success - - errors - - messages - description: Get Regional Tiered Cache setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Get Regional Tiered Cache setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Regional Tiered Cache setting - tags: - - Zone Cache Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - Zone Read - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: cache - resource_chain: - - regional_tiered_cache - method: get - patch: - description: >- - Instructs Cloudflare to check a regional hub data center on the way to - your upper tier. This can help improve performance for smart and custom - tiered cache topologies. - operationId: zone-cache-settings-change-regional-tiered-cache-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - value: - $ref: '#/components/schemas/cacheRulesRegionalTieredCacheValue' - required: - - value - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - $ref: '#/components/schemas/regionalTieredCache' - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the Regional Tiered Cache zone setting. - type: string - x-auditable: true - default: 'off' - enum: - - 'on' - - 'off' - required: - - id - - value - - editable - - id - - value - type: object - title: Regional Tiered Cache - required: - - success - - errors - - messages - description: Change Regional Tiered Cache setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Change Regional Tiered Cache setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Change Regional Tiered Cache setting - tags: - - Zone Cache Settings - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: cache - resource_chain: - - regional_tiered_cache - method: edit - /zones/{zone_id}/cache/tiered_cache_smart_topology_enable: - delete: - description: >- - Smart Tiered Cache dynamically selects the single closest upper tier for - each of your website’s origins with no configuration required, using our - in-house performance and routing data. Cloudflare collects latency data - for each request to an origin, and uses the latency data to determine - how well any upper-tier data center is connected with an origin. As a - result, Cloudflare can select the data center with the lowest latency to - be the upper-tier for an origin. - operationId: smart-tiered-cache-delete-smart-tiered-cache-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - description: The identifier of the caching setting. - type: string - x-auditable: true - enum: - - tiered_cache_smart_topology_enable - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - required: - - id - - editable - - id - type: object - title: Smart Tiered Cache - required: - - success - - errors - - messages - description: Delete Smart Tiered Cache setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Delete Smart Tiered Cache setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Smart Tiered Cache setting - tags: - - Smart Tiered Cache - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: cache - resource_chain: - - smart_tiered_cache - method: delete - get: - description: >- - Smart Tiered Cache dynamically selects the single closest upper tier for - each of your website’s origins with no configuration required, using our - in-house performance and routing data. Cloudflare collects latency data - for each request to an origin, and uses the latency data to determine - how well any upper-tier data center is connected with an origin. As a - result, Cloudflare can select the data center with the lowest latency to - be the upper-tier for an origin. - operationId: smart-tiered-cache-get-smart-tiered-cache-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - description: The identifier of the caching setting. - type: string - x-auditable: true - enum: - - tiered_cache_smart_topology_enable - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the Smart Tiered Cache zone setting. - type: string - x-auditable: true - default: 'off' - enum: - - 'on' - - 'off' - required: - - id - - value - - editable - - id - - value - type: object - title: Smart Tiered Cache - required: - - success - - errors - - messages - description: Get Smart Tiered Cache setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Get Smart Tiered Cache setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Smart Tiered Cache setting - tags: - - Smart Tiered Cache - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - Zone Read - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: cache - resource_chain: - - smart_tiered_cache - method: get - patch: - description: >- - Smart Tiered Cache dynamically selects the single closest upper tier for - each of your website’s origins with no configuration required, using our - in-house performance and routing data. Cloudflare collects latency data - for each request to an origin, and uses the latency data to determine - how well any upper-tier data center is connected with an origin. As a - result, Cloudflare can select the data center with the lowest latency to - be the upper-tier for an origin. - operationId: smart-tiered-cache-patch-smart-tiered-cache-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesSmartTieredCachePatch' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - description: The identifier of the caching setting. - type: string - x-auditable: true - enum: - - tiered_cache_smart_topology_enable - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the Smart Tiered Cache zone setting. - type: string - x-auditable: true - default: 'off' - enum: - - 'on' - - 'off' - required: - - id - - value - - editable - - id - - value - type: object - title: Smart Tiered Cache - required: - - success - - errors - - messages - description: Patch Smart Tiered Cache setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Patch Smart Tiered Cache setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Smart Tiered Cache setting - tags: - - Smart Tiered Cache - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: cache - resource_chain: - - smart_tiered_cache - method: edit - /zones/{zone_id}/cache/variants: - delete: - description: >- - Variant support enables caching variants of images with certain file - extensions in addition to the original. This only applies when the - origin server sends the 'Vary: Accept' response header. If the origin - server sends 'Vary: Accept' but does not serve the variant requested, - the response will not be cached. This will be indicated with BYPASS - cache status in the response headers. - operationId: zone-cache-settings-delete-variants-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - $ref: >- - #/components/schemas/unnamedSchemaRef669bfbb16c0913af7077c3c194fbfcd0 - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - required: - - id - - editable - - id - type: object - title: Variants Caching - required: - - success - - errors - - messages - description: Delete variants setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Delete variants setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete variants setting - tags: - - Zone Cache Settings - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: cache - resource_chain: - - variants - method: delete - get: - description: >- - Variant support enables caching variants of images with certain file - extensions in addition to the original. This only applies when the - origin server sends the 'Vary: Accept' response header. If the origin - server sends 'Vary: Accept' but does not serve the variant requested, - the response will not be cached. This will be indicated with BYPASS - cache status in the response headers. - operationId: zone-cache-settings-get-variants-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - $ref: >- - #/components/schemas/unnamedSchemaRef669bfbb16c0913af7077c3c194fbfcd0 - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the zone setting. - type: object - x-auditable: true - properties: - avif: - description: >- - List of strings with the MIME types of all the - variants that should be served for avif. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - bmp: - description: >- - List of strings with the MIME types of all the - variants that should be served for bmp. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - gif: - description: >- - List of strings with the MIME types of all the - variants that should be served for gif. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jp2: - description: >- - List of strings with the MIME types of all the - variants that should be served for jp2. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jpeg: - description: >- - List of strings with the MIME types of all the - variants that should be served for jpeg. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jpg: - description: >- - List of strings with the MIME types of all the - variants that should be served for jpg. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jpg2: - description: >- - List of strings with the MIME types of all the - variants that should be served for jpg2. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - png: - description: >- - List of strings with the MIME types of all the - variants that should be served for png. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - tif: - description: >- - List of strings with the MIME types of all the - variants that should be served for tif. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - tiff: - description: >- - List of strings with the MIME types of all the - variants that should be served for tiff. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - webp: - description: >- - List of strings with the MIME types of all the - variants that should be served for webp. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - required: - - id - - value - - editable - - id - - value - type: object - title: Variants Caching - required: - - success - - errors - - messages - description: Get variants setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Get variants setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get variants setting - tags: - - Zone Cache Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - Zone Read - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: cache - resource_chain: - - variants - method: get - patch: - description: >- - Variant support enables caching variants of images with certain file - extensions in addition to the original. This only applies when the - origin server sends the 'Vary: Accept' response header. If the origin - server sends 'Vary: Accept' but does not serve the variant requested, - the response will not be cached. This will be indicated with BYPASS - cache status in the response headers. - operationId: zone-cache-settings-change-variants-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - value: - $ref: '#/components/schemas/cacheRulesVariantsValue' - required: - - value - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - $ref: >- - #/components/schemas/unnamedSchemaRef669bfbb16c0913af7077c3c194fbfcd0 - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the zone setting. - type: object - x-auditable: true - properties: - avif: - description: >- - List of strings with the MIME types of all the - variants that should be served for avif. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - bmp: - description: >- - List of strings with the MIME types of all the - variants that should be served for bmp. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - gif: - description: >- - List of strings with the MIME types of all the - variants that should be served for gif. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jp2: - description: >- - List of strings with the MIME types of all the - variants that should be served for jp2. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jpeg: - description: >- - List of strings with the MIME types of all the - variants that should be served for jpeg. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jpg: - description: >- - List of strings with the MIME types of all the - variants that should be served for jpg. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jpg2: - description: >- - List of strings with the MIME types of all the - variants that should be served for jpg2. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - png: - description: >- - List of strings with the MIME types of all the - variants that should be served for png. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - tif: - description: >- - List of strings with the MIME types of all the - variants that should be served for tif. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - tiff: - description: >- - List of strings with the MIME types of all the - variants that should be served for tiff. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - webp: - description: >- - List of strings with the MIME types of all the - variants that should be served for webp. - items: - type: string - x-auditable: true - type: array - uniqueItems: true - required: - - id - - value - - editable - - id - - value - type: object - title: Variants Caching - required: - - success - - errors - - messages - description: Change variants setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Change variants setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Change variants setting - tags: - - Zone Cache Settings - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: cache - resource_chain: - - variants - method: edit - /zones/{zone_id}/purge_cache: - post: - description: >- - **Purge All Cached Content:** Removes ALL files from Cloudflare's cache. - All tiers can purge everything. ``` {"purge_everything": true} ``` - **Purge Cached Content by URL:** Granularly removes one or more files - from Cloudflare's cache by specifying URLs. All tiers can purge by URL. - To purge files with custom cache keys, include the headers used to - compute the cache key as in the example. If you have a device type or - geo in your cache key, you will need to include the CF-Device-Type or - CF-IPCountry headers. If you have lang in your cache key, you will need - to include the Accept-Language header. **NB:** When including the Origin - header, be sure to include the **scheme** and **hostname**. The port - number can be omitted if it is the default port (80 for http, 443 for - https), but must be included otherwise. Single file purge example with - files: ``` {"files": ["http://www.example.com/css/styles.css", - "http://www.example.com/js/index.js"]} ``` Single file purge example - with url and header pairs: ``` {"files": [{url: - "http://www.example.com/cat_picture.jpg", headers: { "CF-IPCountry": - "US", "CF-Device-Type": "desktop", "Accept-Language": "zh-CN" }}, {url: - "http://www.example.com/dog_picture.jpg", headers: { "CF-IPCountry": - "EU", "CF-Device-Type": "mobile", "Accept-Language": "en-US" }}]} ``` - **Purge Cached Content by Tag, Host or Prefix:** Granularly removes one - or more files from Cloudflare's cache either by specifying the host, the - associated Cache-Tag, or a Prefix. Flex purge with tags: ``` {"tags": - ["a-cache-tag", "another-cache-tag"]} ``` Flex purge with hosts: ``` - {"hosts": ["www.example.com", "images.example.com"]} ``` Flex purge with - prefixes: ``` {"prefixes": ["www.example.com/foo", - "images.example.com/bar/baz"]} ``` **Availability and limits:** please - refer to [purge cache availability and limits documentation - page](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits). - operationId: zone-purge - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: Purge by tags - properties: - tags: - description: >- - For more information on cache tags and purging by tags, - please refer to [purge by cache-tags documentation - page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-tags/). - items: - type: string - x-auditable: true - type: array - hosts: - description: >- - For more information purging by hostnames, please refer to - [purge by hostname documentation - page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-hostname/). - items: - type: string - x-auditable: true - type: array - prefixes: - description: >- - For more information on purging by prefixes, please refer to - [purge by prefix documentation - page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge_by_prefix/). - items: - type: string - x-auditable: true - type: array - purge_everything: - description: >- - For more information, please refer to [purge everything - documentation - page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-everything/). - type: boolean - x-auditable: true - files: - description: >- - For more information on purging files, please refer to - [purge by single-file documentation - page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-single-file/). - items: - type: string - x-auditable: true - type: array - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cachePurgeApiResponseSingleId' - description: Request to purge cached content successfull. - 4XX: - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/cachePurgeMessages' - messages: - $ref: '#/components/schemas/cachePurgeMessages' - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/cachePurgeIdentifier' - required: - - id - type: object - success: - description: Indicates the API call's success or failure. - type: boolean - required: - - success - - errors - - messages - - success - - errors - - messages - - result - type: object - description: Request to purge cached content failed. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Purge Cached Content - tags: - - Zone - x-api-token-group: - - Cache Purge - x-cfPermissionsRequired: - enum: - - '#cache_purge:edit' - x-stackql-sdk: - service: cache - resource_chain: [] - method: purge -components: - schemas: - cachePurgeApiResponseSingleId: - properties: - errors: - $ref: '#/components/schemas/cachePurgeMessages' - messages: - $ref: '#/components/schemas/cachePurgeMessages' - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/cachePurgeIdentifier' - required: - - id - type: object - success: - description: Indicates the API call's success or failure. - example: true - type: boolean - required: - - success - - errors - - messages - type: object - cachePurgeIdentifier: - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - cachePurgeMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - cacheReserve: - description: The identifier of the caching setting. - type: string - x-auditable: true - enum: - - cache_reserve - cacheRulesApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - items: - type: object - minLength: 1 - type: array - $ref: '#/components/schemas/cacheRulesMessages' - messages: - example: [] - items: - type: object - type: array - $ref: '#/components/schemas/cacheRulesMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - cacheRulesCacheReserveClearEndTs: - description: The time that the latest Cache Reserve Clear operation completed. - example: '2023-10-02T12:00:00.12345Z' - format: date-time - type: string - x-auditable: true - cacheRulesCacheReserveClearStartTs: - description: The time that the latest Cache Reserve Clear operation started. - example: '2023-10-02T10:00:00.12345Z' - format: date-time - type: string - x-auditable: true - cacheRulesCacheReserveClearState: - description: The current state of the Cache Reserve Clear operation. - enum: - - In-progress - - Completed - example: In-progress - type: string - x-auditable: true - cacheRulesCacheReserveValue: - default: 'off' - description: Value of the Cache Reserve zone setting. - enum: - - 'on' - - 'off' - type: string - x-auditable: true - cacheRulesEditable: - description: Whether the setting is editable. - type: boolean - x-auditable: true - cacheRulesMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - cacheRulesModifiedOn: - description: The time when the setting was last modified. - format: date-time - type: string - x-auditable: true - cacheRulesOriginCloudRegionBatchItemResult: - description: Result for a single item in a batch operation. - properties: - error: - description: >- - Error message explaining why the item failed. Present only on failed - items. - type: string - origin-ip: - description: The origin IP address for this item. - example: 192.0.2.1 - type: string - region: - description: >- - Cloud vendor region identifier. Present on succeeded items for patch - operations. - example: us-east-1 - type: string - vendor: - description: >- - Cloud vendor identifier. Present on succeeded items for patch - operations. - example: aws - type: string - required: - - origin-ip - type: object - cacheRulesOriginCloudRegionBatchResult: - description: Response result for a batch origin cloud region operation. - properties: - editable: - description: Whether the setting can be modified by the current user. - type: boolean - id: - enum: - - origin_public_cloud_region - example: origin_public_cloud_region - type: string - x-auditable: true - modified_on: - description: >- - Time the mapping set was last modified. Null when no items were - successfully applied. - format: date-time - nullable: true - type: string - x-auditable: true - readOnly: true - value: - properties: - failed: - description: Items that could not be applied, with error details. - items: - $ref: >- - #/components/schemas/cacheRulesOriginCloudRegionBatchItemResult - type: array - succeeded: - description: Items that were successfully applied. - items: - $ref: >- - #/components/schemas/cacheRulesOriginCloudRegionBatchItemResult - type: array - required: - - succeeded - - failed - type: object - required: - - id - - editable - - value - type: object - cacheRulesOriginCloudRegionEntry: - description: A single origin IP-to-cloud-region mapping. - properties: - modified_on: - description: Time this mapping was last modified. - format: date-time - type: string - x-auditable: true - readOnly: true - origin-ip: - description: The origin IP address (IPv4 or IPv6, canonicalized). - example: 192.0.2.1 - type: string - x-auditable: true - region: - description: Cloud vendor region identifier. - example: us-east-1 - type: string - x-auditable: true - vendor: - description: Cloud vendor hosting the origin. - enum: - - aws - - azure - - gcp - - oci - example: aws - type: string - x-auditable: true - required: - - origin-ip - - vendor - - region - type: object - cacheRulesOriginCloudRegionRequest: - description: Request body for creating or updating an origin cloud region mapping. - properties: - ip: - description: >- - Origin IP address (IPv4 or IPv6). Normalized to canonical form - before storage (RFC 5952 for IPv6). - example: 192.0.2.1 - type: string - x-auditable: true - region: - description: >- - Cloud vendor region identifier. Must be a valid region for the - specified vendor as returned by the supported_regions endpoint. - example: us-east-1 - type: string - x-auditable: true - vendor: - description: >- - Cloud vendor hosting the origin. Must be one of the supported - vendors. - enum: - - aws - - azure - - gcp - - oci - example: aws - type: string - x-auditable: true - required: - - ip - - vendor - - region - type: object - cacheRulesOriginCloudRegionSingleResult: - description: Response result for a single origin cloud region mapping. - properties: - editable: - description: Whether the setting can be modified by the current user. - type: boolean - id: - enum: - - origin_public_cloud_region - example: origin_public_cloud_region - type: string - x-auditable: true - modified_on: - description: Time the mapping was last modified. - format: date-time - type: string - x-auditable: true - readOnly: true - value: - $ref: '#/components/schemas/cacheRulesOriginCloudRegionEntry' - required: - - id - - editable - - value - type: object - cacheRulesOriginCloudRegionsListResult: - description: Response result for a list of origin cloud region mappings. - properties: - editable: - description: Whether the setting can be modified by the current user. - type: boolean - id: - enum: - - origin_public_cloud_region - example: origin_public_cloud_region - type: string - x-auditable: true - modified_on: - description: Time the mapping set was last modified. Null when no mappings exist. - format: date-time - nullable: true - type: string - x-auditable: true - readOnly: true - value: - items: - $ref: '#/components/schemas/cacheRulesOriginCloudRegionEntry' - type: array - required: - - id - - editable - - value - type: object - cacheRulesRegionalTieredCacheValue: - default: 'off' - description: Value of the Regional Tiered Cache zone setting. - enum: - - 'on' - - 'off' - type: string - x-auditable: true - cacheRulesSmartTieredCachePatch: - description: Update enablement of Smart Tiered Cache. - properties: - value: - description: Enable or disable the Smart Tiered Cache. - enum: - - 'on' - - 'off' - example: 'on' - type: string - x-auditable: true - required: - - value - type: object - cacheRulesSupportedCloudRegionsResult: - description: >- - Cloud vendors and their supported regions for origin cloud region - mappings. - properties: - obtained_codes: - description: >- - Whether Cloudflare airport codes (IATA colo identifiers) were - successfully resolved for the `upper_tier_colos` field on each - region. When `false`, the `upper_tier_colos` arrays may be empty or - incomplete. - type: boolean - vendors: - description: Map of vendor name to list of supported regions. - type: object - required: - - vendors - - obtained_codes - type: object - cacheRulesVariantsValue: - description: Value of the zone setting. - properties: - avif: - description: >- - List of strings with the MIME types of all the variants that should - be served for avif. - example: - - image/webp - - image/jpeg - items: - type: string - x-auditable: true - type: array - uniqueItems: true - bmp: - description: >- - List of strings with the MIME types of all the variants that should - be served for bmp. - example: - - image/webp - - image/jpeg - items: - type: string - x-auditable: true - type: array - uniqueItems: true - gif: - description: >- - List of strings with the MIME types of all the variants that should - be served for gif. - example: - - image/webp - - image/jpeg - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jp2: - description: >- - List of strings with the MIME types of all the variants that should - be served for jp2. - example: - - image/webp - - image/avif - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jpeg: - description: >- - List of strings with the MIME types of all the variants that should - be served for jpeg. - example: - - image/webp - - image/avif - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jpg: - description: >- - List of strings with the MIME types of all the variants that should - be served for jpg. - example: - - image/webp - - image/avif - items: - type: string - x-auditable: true - type: array - uniqueItems: true - jpg2: - description: >- - List of strings with the MIME types of all the variants that should - be served for jpg2. - example: - - image/webp - - image/avif - items: - type: string - x-auditable: true - type: array - uniqueItems: true - png: - description: >- - List of strings with the MIME types of all the variants that should - be served for png. - example: - - image/webp - - image/avif - items: - type: string - x-auditable: true - type: array - uniqueItems: true - tif: - description: >- - List of strings with the MIME types of all the variants that should - be served for tif. - example: - - image/webp - - image/avif - items: - type: string - x-auditable: true - type: array - uniqueItems: true - tiff: - description: >- - List of strings with the MIME types of all the variants that should - be served for tiff. - example: - - image/webp - - image/avif - items: - type: string - x-auditable: true - type: array - uniqueItems: true - webp: - description: >- - List of strings with the MIME types of all the variants that should - be served for webp. - example: - - image/jpeg - - image/avif - items: - type: string - x-auditable: true - type: array - uniqueItems: true - type: object - regionalTieredCache: - description: The identifier of the caching setting. - type: string - x-auditable: true - enum: - - tc_regional - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d: - description: ID of the zone setting. - type: string - x-auditable: true - enum: - - cache_reserve_clear - example: cache_reserve_clear - unnamedSchemaRef669bfbb16c0913af7077c3c194fbfcd0: - description: The identifier of the caching setting. - type: string - x-auditable: true - enum: - - variants - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - cache_cache_reserve: - id: cloudflare.cache.cache_cache_reserve - name: cache_cache_reserve - title: Cache Cache Reserve - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1cache_reserve/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/cache_cache_reserve/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - cache_reserve: - id: cloudflare.cache.cache_reserve - name: cache_reserve - title: Cache Reserve - methods: - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1cache_reserve/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - clear: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1cache_reserve_clear/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/cache_reserve/methods/edit' - delete: [] - replace: [] - cache_cache_reserve_clear: - id: cloudflare.cache.cache_cache_reserve_clear - name: cache_cache_reserve_clear - title: Cache Cache Reserve Clear - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1cache_reserve_clear/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/cache_cache_reserve_clear/methods/list - insert: [] - update: [] - delete: [] - replace: [] - origin_cloud_regions: - id: cloudflare.cache.origin_cloud_regions - name: origin_cloud_regions - title: Origin Cloud Regions - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - origin_cloud_regions_upsert: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - origin_cloud_regions_create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions/post' - response: - mediaType: application/json - openAPIDocKey: '200' - origin_cloud_regions_delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions~1{origin_ip}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions~1{origin_ip}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/origin_cloud_regions/methods/get' - - $ref: '#/components/x-stackQL-resources/origin_cloud_regions/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/origin_cloud_regions/methods/origin_cloud_regions_create - update: - - $ref: >- - #/components/x-stackQL-resources/origin_cloud_regions/methods/origin_cloud_regions_upsert - delete: - - $ref: >- - #/components/x-stackQL-resources/origin_cloud_regions/methods/origin_cloud_regions_delete - replace: [] - batch: - id: cloudflare.cache.batch - name: batch - title: Batch - methods: - origin_cloud_regions_batch_delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions~1batch/delete - response: - mediaType: application/json - openAPIDocKey: '200' - origin_cloud_regions_batch_upsert: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions~1batch/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/batch/methods/origin_cloud_regions_batch_upsert - delete: - - $ref: >- - #/components/x-stackQL-resources/batch/methods/origin_cloud_regions_batch_delete - replace: [] - supported_regions: - id: cloudflare.cache.supported_regions - name: supported_regions - title: Supported Regions - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions~1supported_regions/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/supported_regions/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - regional_tiered_cache: - id: cloudflare.cache.regional_tiered_cache - name: regional_tiered_cache - title: Regional Tiered Cache - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1regional_tiered_cache/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1regional_tiered_cache/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/regional_tiered_cache/methods/list - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/regional_tiered_cache/methods/edit - delete: [] - replace: [] - smart_tiered_cache: - id: cloudflare.cache.smart_tiered_cache - name: smart_tiered_cache - title: Smart Tiered Cache - methods: - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1cache~1tiered_cache_smart_topology_enable/delete - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1cache~1tiered_cache_smart_topology_enable/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1cache~1tiered_cache_smart_topology_enable/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/smart_tiered_cache/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/smart_tiered_cache/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/smart_tiered_cache/methods/delete' - replace: [] - variants: - id: cloudflare.cache.variants - name: variants - title: Variants - methods: - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1variants/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1variants/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1cache~1variants/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/variants/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/variants/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/variants/methods/delete' - replace: [] - zones: - id: cloudflare.cache.zones - name: zones - title: Zones - methods: - purge_cache: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1purge_cache/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: cache API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones/{zone_id}/cache/cache_reserve: + get: + description: 'Increase cache lifetimes by automatically storing all cacheable files into Cloudflare''s persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.' + operationId: zone-cache-settings-get-cache-reserve-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + $ref: '#/components/schemas/cacheReserve' + x-stainless-naming: + terraform: + property_name: zone_setting_id + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the Cache Reserve zone setting. + type: string + x-auditable: true + default: 'off' + enum: + - 'on' + - 'off' + required: + - id + - value + - editable + - id + - value + type: object + title: Cache Reserve + required: + - success + - errors + - messages + description: Get Cache Reserve setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Get Cache Reserve setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Cache Reserve setting + tags: + - Zone Cache Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - Zone Read + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: cache + resource_chain: + - cache_reserve + method: get + patch: + description: 'Increase cache lifetimes by automatically storing all cacheable files into Cloudflare''s persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the [developer docs](https://developers.cloudflare.com/cache/about/cache-reserve) for more information.' + operationId: zone-cache-settings-change-cache-reserve-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + value: + $ref: '#/components/schemas/cacheRulesCacheReserveValue' + required: + - value + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + $ref: '#/components/schemas/cacheReserve' + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the Cache Reserve zone setting. + type: string + x-auditable: true + default: 'off' + enum: + - 'on' + - 'off' + required: + - id + - value + - editable + - id + - value + type: object + title: Cache Reserve + required: + - success + - errors + - messages + description: Change Cache Reserve setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Change Cache Reserve setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Change Cache Reserve setting + tags: + - Zone Cache Settings + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: cache + resource_chain: + - cache_reserve + method: edit + /zones/{zone_id}/cache/cache_reserve_clear: + get: + description: You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation. + operationId: zone-cache-settings-get-cache-reserve-clear + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + type: object + description: You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation. + title: Cache Reserve Clear + properties: + id: + $ref: '#/components/schemas/unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d' + modified_on: + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + end_ts: + $ref: '#/components/schemas/cacheRulesCacheReserveClearEndTs' + start_ts: + $ref: '#/components/schemas/cacheRulesCacheReserveClearStartTs' + state: + $ref: '#/components/schemas/cacheRulesCacheReserveClearState' + required: + - id + - state + - start_ts + required: + - success + - errors + - messages + description: Get Cache Reserve Clear response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Get Cache Reserve Clear failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Cache Reserve Clear + tags: + - Zone Cache Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - Zone Read + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: cache + resource_chain: + - cache_reserve + method: status + post: + description: You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation. + operationId: zone-cache-settings-start-cache-reserve-clear + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: {} + description: The request body is currently not used. + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + type: object + description: You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation. + title: Cache Reserve Clear + properties: + id: + $ref: '#/components/schemas/unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d' + modified_on: + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + end_ts: + $ref: '#/components/schemas/cacheRulesCacheReserveClearEndTs' + start_ts: + $ref: '#/components/schemas/cacheRulesCacheReserveClearStartTs' + state: + $ref: '#/components/schemas/cacheRulesCacheReserveClearState' + required: + - id + - state + - start_ts + required: + - success + - errors + - messages + description: Start Cache Reserve Clear response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Start Cache Reserve Clear failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Start Cache Reserve Clear + tags: + - Zone Cache Settings + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: cache + resource_chain: + - cache_reserve + method: clear + /zones/{zone_id}/cache/origin_cloud_regions: + get: + description: Returns all IP-to-cloud-region mappings configured for the zone. Each mapping tells Cloudflare which cloud vendor and region hosts the origin at that IP, enabling the edge to route via the nearest Tiered Cache upper-tier co-located with that cloud provider. Returns an empty array when no mappings exist. + operationId: origin-cloud-regions-list + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionsListResult' + required: + - success + - errors + - messages + type: object + description: List origin cloud region mappings response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: List origin cloud region mappings failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List origin cloud region mappings + tags: + - Origin Cloud Regions + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + patch: + description: "Adds or updates a single IP-to-cloud-region mapping for the zone. Unlike POST, this operation is idempotent \u2014 if a mapping for the IP already exists it is overwritten. Returns the complete updated list of all mappings for the zone. Returns 403 (code 1164) when the zone has reached the limit of 3,500 IP mappings." + operationId: origin-cloud-regions-upsert + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionsListResult' + required: + - success + - errors + - messages + type: object + description: Create or update origin cloud region mapping response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Create or update origin cloud region mapping failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create or update an origin cloud region mapping + tags: + - Origin Cloud Regions + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + post: + description: "Adds a single IP-to-cloud-region mapping for the zone. The IP must be a valid IPv4 or IPv6 address and is normalized to canonical form before storage (RFC 5952 for IPv6). Returns 400 (code 1145) if a mapping for that IP already exists \u2014 use PATCH to update an existing entry. The vendor and region are validated against the list from `GET /zones/{zone_id}/cache/origin_cloud_regions/supported_regions`." + operationId: origin-cloud-regions-create + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionSingleResult' + required: + - success + - errors + - messages + type: object + description: Create origin cloud region mapping response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Create origin cloud region mapping failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create an origin cloud region mapping + tags: + - Origin Cloud Regions + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/cache/origin_cloud_regions/batch: + delete: + description: "Removes up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently \u2014 successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array." + operationId: origin-cloud-regions-batch-delete + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionBatchResult' + required: + - success + - errors + - messages + type: object + description: Batch delete origin cloud region mappings successful. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Batch delete origin cloud region mappings failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Batch delete origin cloud region mappings internal error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Batch delete origin cloud region mappings + tags: + - Origin Cloud Regions + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + patch: + description: "Adds or updates up to 100 IP-to-cloud-region mappings in a single request. Each item is validated independently \u2014 valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/cache/origin_cloud_regions/supported_regions`." + operationId: origin-cloud-regions-batch-upsert + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionRequest' + maxItems: 100 + type: array + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionBatchResult' + required: + - success + - errors + - messages + type: object + description: Batch create or update origin cloud region mappings successful. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Batch create or update origin cloud region mappings failure. + 5XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Batch create or update origin cloud region mappings internal error. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Batch create or update origin cloud region mappings + tags: + - Origin Cloud Regions + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/cache/origin_cloud_regions/supported_regions: + get: + description: Returns the cloud vendors and regions that are valid values for origin cloud region mappings. Each region includes the Tiered Cache upper-tier colocation codes that will be used for cache routing when a mapping targeting that region is active. Requires the zone to have Tiered Cache enabled. + operationId: origin-cloud-regions-supported-regions + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cacheRulesSupportedCloudRegionsResult' + required: + - success + - errors + - messages + type: object + description: List supported cloud vendors and regions response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: List supported cloud vendors and regions failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List supported cloud vendors and regions + tags: + - Origin Cloud Regions + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/cache/origin_cloud_regions/{origin_ip}: + delete: + description: Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted entry on success. Returns 404 (code 1163) if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted. + operationId: origin-cloud-regions-delete + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Origin IP address whose mapping should be deleted. + in: path + name: origin_ip + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionSingleResult' + required: + - success + - errors + - messages + type: object + description: Delete origin cloud region mapping response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Delete origin cloud region mapping failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an origin cloud region mapping + tags: + - Origin Cloud Regions + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + get: + description: Returns the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup (RFC 5952 for IPv6). Returns 404 (code 1142) if the zone has no mappings or if the specified IP has no mapping. + operationId: origin-cloud-regions-get + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Origin IP address to look up. IPv4 and IPv6 are supported. + in: path + name: origin_ip + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionSingleResult' + required: + - success + - errors + - messages + type: object + description: Get origin cloud region mapping response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Get origin cloud region mapping failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an origin cloud region mapping + tags: + - Origin Cloud Regions + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/cache/regional_tiered_cache: + get: + description: Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies. + operationId: zone-cache-settings-get-regional-tiered-cache-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + $ref: '#/components/schemas/regionalTieredCache' + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the Regional Tiered Cache zone setting. + type: string + x-auditable: true + default: 'off' + enum: + - 'on' + - 'off' + required: + - id + - value + - editable + - id + - value + type: object + title: Regional Tiered Cache + required: + - success + - errors + - messages + description: Get Regional Tiered Cache setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Get Regional Tiered Cache setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Regional Tiered Cache setting + tags: + - Zone Cache Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - Zone Read + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: cache + resource_chain: + - regional_tiered_cache + method: get + patch: + description: Instructs Cloudflare to check a regional hub data center on the way to your upper tier. This can help improve performance for smart and custom tiered cache topologies. + operationId: zone-cache-settings-change-regional-tiered-cache-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + value: + $ref: '#/components/schemas/cacheRulesRegionalTieredCacheValue' + required: + - value + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + $ref: '#/components/schemas/regionalTieredCache' + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the Regional Tiered Cache zone setting. + type: string + x-auditable: true + default: 'off' + enum: + - 'on' + - 'off' + required: + - id + - value + - editable + - id + - value + type: object + title: Regional Tiered Cache + required: + - success + - errors + - messages + description: Change Regional Tiered Cache setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Change Regional Tiered Cache setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Change Regional Tiered Cache setting + tags: + - Zone Cache Settings + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: cache + resource_chain: + - regional_tiered_cache + method: edit + /zones/{zone_id}/cache/tiered_cache_smart_topology_enable: + delete: + description: "Smart Tiered Cache dynamically selects the single closest upper tier for each of your website\u2019s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin." + operationId: smart-tiered-cache-delete-smart-tiered-cache-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + description: The identifier of the caching setting. + type: string + x-auditable: true + enum: + - tiered_cache_smart_topology_enable + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + required: + - id + - editable + - id + type: object + title: Smart Tiered Cache + required: + - success + - errors + - messages + description: Delete Smart Tiered Cache setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Delete Smart Tiered Cache setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Smart Tiered Cache setting + tags: + - Smart Tiered Cache + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: cache + resource_chain: + - smart_tiered_cache + method: delete + get: + description: "Smart Tiered Cache dynamically selects the single closest upper tier for each of your website\u2019s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin." + operationId: smart-tiered-cache-get-smart-tiered-cache-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + description: The identifier of the caching setting. + type: string + x-auditable: true + enum: + - tiered_cache_smart_topology_enable + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the Smart Tiered Cache zone setting. + type: string + x-auditable: true + default: 'off' + enum: + - 'on' + - 'off' + required: + - id + - value + - editable + - id + - value + type: object + title: Smart Tiered Cache + required: + - success + - errors + - messages + description: Get Smart Tiered Cache setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Get Smart Tiered Cache setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Smart Tiered Cache setting + tags: + - Smart Tiered Cache + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - Zone Read + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: cache + resource_chain: + - smart_tiered_cache + method: get + patch: + description: "Smart Tiered Cache dynamically selects the single closest upper tier for each of your website\u2019s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin." + operationId: smart-tiered-cache-patch-smart-tiered-cache-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesSmartTieredCachePatch' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + description: The identifier of the caching setting. + type: string + x-auditable: true + enum: + - tiered_cache_smart_topology_enable + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the Smart Tiered Cache zone setting. + type: string + x-auditable: true + default: 'off' + enum: + - 'on' + - 'off' + required: + - id + - value + - editable + - id + - value + type: object + title: Smart Tiered Cache + required: + - success + - errors + - messages + description: Patch Smart Tiered Cache setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Patch Smart Tiered Cache setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Smart Tiered Cache setting + tags: + - Smart Tiered Cache + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: cache + resource_chain: + - smart_tiered_cache + method: edit + /zones/{zone_id}/cache/variants: + delete: + description: 'Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the ''Vary: Accept'' response header. If the origin server sends ''Vary: Accept'' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.' + operationId: zone-cache-settings-delete-variants-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + $ref: '#/components/schemas/unnamedSchemaRef669bfbb16c0913af7077c3c194fbfcd0' + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + required: + - id + - editable + - id + type: object + title: Variants Caching + required: + - success + - errors + - messages + description: Delete variants setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Delete variants setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete variants setting + tags: + - Zone Cache Settings + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: cache + resource_chain: + - variants + method: delete + get: + description: 'Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the ''Vary: Accept'' response header. If the origin server sends ''Vary: Accept'' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.' + operationId: zone-cache-settings-get-variants-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + $ref: '#/components/schemas/unnamedSchemaRef669bfbb16c0913af7077c3c194fbfcd0' + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the zone setting. + type: object + x-auditable: true + properties: + avif: + description: List of strings with the MIME types of all the variants that should be served for avif. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + bmp: + description: List of strings with the MIME types of all the variants that should be served for bmp. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + gif: + description: List of strings with the MIME types of all the variants that should be served for gif. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jp2: + description: List of strings with the MIME types of all the variants that should be served for jp2. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jpeg: + description: List of strings with the MIME types of all the variants that should be served for jpeg. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jpg: + description: List of strings with the MIME types of all the variants that should be served for jpg. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jpg2: + description: List of strings with the MIME types of all the variants that should be served for jpg2. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + png: + description: List of strings with the MIME types of all the variants that should be served for png. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + tif: + description: List of strings with the MIME types of all the variants that should be served for tif. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + tiff: + description: List of strings with the MIME types of all the variants that should be served for tiff. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + webp: + description: List of strings with the MIME types of all the variants that should be served for webp. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + required: + - id + - value + - editable + - id + - value + type: object + title: Variants Caching + required: + - success + - errors + - messages + description: Get variants setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Get variants setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get variants setting + tags: + - Zone Cache Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - Zone Read + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: cache + resource_chain: + - variants + method: get + patch: + description: 'Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the ''Vary: Accept'' response header. If the origin server sends ''Vary: Accept'' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.' + operationId: zone-cache-settings-change-variants-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + value: + $ref: '#/components/schemas/cacheRulesVariantsValue' + required: + - value + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + $ref: '#/components/schemas/unnamedSchemaRef669bfbb16c0913af7077c3c194fbfcd0' + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the zone setting. + type: object + x-auditable: true + properties: + avif: + description: List of strings with the MIME types of all the variants that should be served for avif. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + bmp: + description: List of strings with the MIME types of all the variants that should be served for bmp. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + gif: + description: List of strings with the MIME types of all the variants that should be served for gif. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jp2: + description: List of strings with the MIME types of all the variants that should be served for jp2. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jpeg: + description: List of strings with the MIME types of all the variants that should be served for jpeg. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jpg: + description: List of strings with the MIME types of all the variants that should be served for jpg. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jpg2: + description: List of strings with the MIME types of all the variants that should be served for jpg2. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + png: + description: List of strings with the MIME types of all the variants that should be served for png. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + tif: + description: List of strings with the MIME types of all the variants that should be served for tif. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + tiff: + description: List of strings with the MIME types of all the variants that should be served for tiff. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + webp: + description: List of strings with the MIME types of all the variants that should be served for webp. + items: + type: string + x-auditable: true + type: array + uniqueItems: true + required: + - id + - value + - editable + - id + - value + type: object + title: Variants Caching + required: + - success + - errors + - messages + description: Change variants setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Change variants setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Change variants setting + tags: + - Zone Cache Settings + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: cache + resource_chain: + - variants + method: edit + /zones/{zone_id}/purge_cache: + post: + description: '**Purge All Cached Content:** Removes ALL files from Cloudflare''s cache. All tiers can purge everything. ``` {"purge_everything": true} ``` **Purge Cached Content by URL:** Granularly removes one or more files from Cloudflare''s cache by specifying URLs. All tiers can purge by URL. To purge files with custom cache keys, include the headers used to compute the cache key as in the example. If you have a device type or geo in your cache key, you will need to include the CF-Device-Type or CF-IPCountry headers. If you have lang in your cache key, you will need to include the Accept-Language header. **NB:** When including the Origin header, be sure to include the **scheme** and **hostname**. The port number can be omitted if it is the default port (80 for http, 443 for https), but must be included otherwise. Single file purge example with files: ``` {"files": ["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"]} ``` Single file purge example with + url and header pairs: ``` {"files": [{url: "http://www.example.com/cat_picture.jpg", headers: { "CF-IPCountry": "US", "CF-Device-Type": "desktop", "Accept-Language": "zh-CN" }}, {url: "http://www.example.com/dog_picture.jpg", headers: { "CF-IPCountry": "EU", "CF-Device-Type": "mobile", "Accept-Language": "en-US" }}]} ``` **Purge Cached Content by Tag, Host or Prefix:** Granularly removes one or more files from Cloudflare''s cache either by specifying the host, the associated Cache-Tag, or a Prefix. Flex purge with tags: ``` {"tags": ["a-cache-tag", "another-cache-tag"]} ``` Flex purge with hosts: ``` {"hosts": ["www.example.com", "images.example.com"]} ``` Flex purge with prefixes: ``` {"prefixes": ["www.example.com/foo", "images.example.com/bar/baz"]} ``` **Availability and limits:** please refer to [purge cache availability and limits documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).' + operationId: zone-purge + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: Purge by tags + properties: + tags: + description: For more information on cache tags and purging by tags, please refer to [purge by cache-tags documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-tags/). + items: + type: string + x-auditable: true + type: array + hosts: + description: For more information purging by hostnames, please refer to [purge by hostname documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-hostname/). + items: + type: string + x-auditable: true + type: array + prefixes: + description: For more information on purging by prefixes, please refer to [purge by prefix documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge_by_prefix/). + items: + type: string + x-auditable: true + type: array + purge_everything: + description: For more information, please refer to [purge everything documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-everything/). + type: boolean + x-auditable: true + files: + description: For more information on purging files, please refer to [purge by single-file documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-single-file/). + items: + type: string + x-auditable: true + type: array + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cachePurgeApiResponseSingleId' + description: Request to purge cached content successfull. + 4XX: + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/cachePurgeMessages' + messages: + $ref: '#/components/schemas/cachePurgeMessages' + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/cachePurgeIdentifier' + required: + - id + type: object + success: + description: Indicates the API call's success or failure. + type: boolean + required: + - success + - errors + - messages + - success + - errors + - messages + - result + type: object + description: Request to purge cached content failed. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Purge Cached Content + tags: + - Zone + x-api-token-group: + - Cache Purge + x-cfPermissionsRequired: + enum: + - '#cache_purge:edit' + x-stackql-sdk: + service: cache + resource_chain: [] + method: purge + /graphql/cdn_network_analytics_adaptive_groups: + post: + operationId: graphql-cdn_network_analytics_adaptive_groups-list + summary: Cloudflare CDN edge network-layer analytics for an account, grouped by colo, source/destination country, packet direction, and IP protocol + description: Cloudflare CDN edge network-layer analytics for an account, grouped by colo, source/destination country, packet direction, and IP protocol. Per-tuple totals for bits and packets received at the edge. + x-stackQL-graphQL: + url: https://api.cloudflare.com/client/v4/graphql + httpVerb: POST + responseSelection: + jsonPath: $.result[*] + cursor: + jsonPath: $.result[*].__no_cursor + query: "query {\n viewer {\n accounts(filter: { accountTag: \"{{ .account_tag }}\" }, limit: 1) {\n cdnNetworkAnalyticsAdaptiveGroups(\n filter: { datetime_geq: \"{{ .since }}\", datetime_lt: \"{{ .until }}\" }\n limit: {{ if .limit }}{{ .limit }}{{ else }}100{{ end }}\n orderBy: [datetimeMinute_ASC]\n ) {\n dimensions {\n datetime: datetimeMinute\n coloCode\n coloCountry\n direction\n ipProtocolName\n sourceCountry\n destinationCountry\n }\n sum {\n bits\n packets\n }\n }\n }\n }\n}\n" + x-stackql-protocol: graphql + parameters: + - name: account_tag + in: path + required: true + schema: + type: string + description: Cloudflare account ID (the 32-char hex tag). + - name: since + in: query + required: true + schema: + type: string + format: date-time + description: Lower bound (inclusive). RFC3339. + - name: until + in: query + required: true + schema: + type: string + format: date-time + description: Upper bound (exclusive). RFC3339. + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + description: Maximum dimension-tuple rows per call. + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + datetime: + type: string + format: date-time + colo_code: + type: string + description: IATA code of the receiving Cloudflare datacenter. + colo_country: + type: string + description: Country of the receiving datacenter. + direction: + type: string + description: Packet direction relative to the customer network. + ip_protocol_name: + type: string + description: Name of the L4 protocol (TCP / UDP / ICMP / GRE / etc.). + source_country: + type: string + description: Country of the source IP. + destination_country: + type: string + description: Country of the destination IP. + bits: + type: integer + description: Sum of bits received. + packets: + type: integer + description: Sum of packets received. +components: + schemas: + cachePurgeApiResponseSingleId: + properties: + errors: + $ref: '#/components/schemas/cachePurgeMessages' + messages: + $ref: '#/components/schemas/cachePurgeMessages' + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/cachePurgeIdentifier' + required: + - id + type: object + success: + description: Indicates the API call's success or failure. + example: true + type: boolean + required: + - success + - errors + - messages + type: object + cachePurgeIdentifier: + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + cachePurgeMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + cacheReserve: + description: The identifier of the caching setting. + type: string + x-auditable: true + enum: + - cache_reserve + cacheRulesApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + items: + type: object + minLength: 1 + type: array + $ref: '#/components/schemas/cacheRulesMessages' + messages: + example: [] + items: + type: object + type: array + $ref: '#/components/schemas/cacheRulesMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + cacheRulesCacheReserveClearEndTs: + description: The time that the latest Cache Reserve Clear operation completed. + example: '2023-10-02T12:00:00.12345Z' + format: date-time + type: string + x-auditable: true + cacheRulesCacheReserveClearStartTs: + description: The time that the latest Cache Reserve Clear operation started. + example: '2023-10-02T10:00:00.12345Z' + format: date-time + type: string + x-auditable: true + cacheRulesCacheReserveClearState: + description: The current state of the Cache Reserve Clear operation. + enum: + - In-progress + - Completed + example: In-progress + type: string + x-auditable: true + cacheRulesCacheReserveValue: + default: 'off' + description: Value of the Cache Reserve zone setting. + enum: + - 'on' + - 'off' + type: string + x-auditable: true + cacheRulesEditable: + description: Whether the setting is editable. + type: boolean + x-auditable: true + cacheRulesMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + cacheRulesModifiedOn: + description: The time when the setting was last modified. + format: date-time + type: string + x-auditable: true + cacheRulesOriginCloudRegionBatchItemResult: + description: Result for a single item in a batch operation. + properties: + error: + description: Error message explaining why the item failed. Present only on failed items. + type: string + origin-ip: + description: The origin IP address for this item. + example: 192.0.2.1 + type: string + region: + description: Cloud vendor region identifier. Present on succeeded items for patch operations. + example: us-east-1 + type: string + vendor: + description: Cloud vendor identifier. Present on succeeded items for patch operations. + example: aws + type: string + required: + - origin-ip + type: object + cacheRulesOriginCloudRegionBatchResult: + description: Response result for a batch origin cloud region operation. + properties: + editable: + description: Whether the setting can be modified by the current user. + type: boolean + id: + enum: + - origin_public_cloud_region + example: origin_public_cloud_region + type: string + x-auditable: true + modified_on: + description: Time the mapping set was last modified. Null when no items were successfully applied. + format: date-time + nullable: true + type: string + x-auditable: true + readOnly: true + value: + properties: + failed: + description: Items that could not be applied, with error details. + items: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionBatchItemResult' + type: array + succeeded: + description: Items that were successfully applied. + items: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionBatchItemResult' + type: array + required: + - succeeded + - failed + type: object + required: + - id + - editable + - value + type: object + cacheRulesOriginCloudRegionEntry: + description: A single origin IP-to-cloud-region mapping. + properties: + modified_on: + description: Time this mapping was last modified. + format: date-time + type: string + x-auditable: true + readOnly: true + origin-ip: + description: The origin IP address (IPv4 or IPv6, canonicalized). + example: 192.0.2.1 + type: string + x-auditable: true + region: + description: Cloud vendor region identifier. + example: us-east-1 + type: string + x-auditable: true + vendor: + description: Cloud vendor hosting the origin. + enum: + - aws + - azure + - gcp + - oci + example: aws + type: string + x-auditable: true + required: + - origin-ip + - vendor + - region + type: object + cacheRulesOriginCloudRegionRequest: + description: Request body for creating or updating an origin cloud region mapping. + properties: + ip: + description: Origin IP address (IPv4 or IPv6). Normalized to canonical form before storage (RFC 5952 for IPv6). + example: 192.0.2.1 + type: string + x-auditable: true + region: + description: Cloud vendor region identifier. Must be a valid region for the specified vendor as returned by the supported_regions endpoint. + example: us-east-1 + type: string + x-auditable: true + vendor: + description: Cloud vendor hosting the origin. Must be one of the supported vendors. + enum: + - aws + - azure + - gcp + - oci + example: aws + type: string + x-auditable: true + required: + - ip + - vendor + - region + type: object + cacheRulesOriginCloudRegionSingleResult: + description: Response result for a single origin cloud region mapping. + properties: + editable: + description: Whether the setting can be modified by the current user. + type: boolean + id: + enum: + - origin_public_cloud_region + example: origin_public_cloud_region + type: string + x-auditable: true + modified_on: + description: Time the mapping was last modified. + format: date-time + type: string + x-auditable: true + readOnly: true + value: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionEntry' + required: + - id + - editable + - value + type: object + cacheRulesOriginCloudRegionsListResult: + description: Response result for a list of origin cloud region mappings. + properties: + editable: + description: Whether the setting can be modified by the current user. + type: boolean + id: + enum: + - origin_public_cloud_region + example: origin_public_cloud_region + type: string + x-auditable: true + modified_on: + description: Time the mapping set was last modified. Null when no mappings exist. + format: date-time + nullable: true + type: string + x-auditable: true + readOnly: true + value: + items: + $ref: '#/components/schemas/cacheRulesOriginCloudRegionEntry' + type: array + required: + - id + - editable + - value + type: object + cacheRulesRegionalTieredCacheValue: + default: 'off' + description: Value of the Regional Tiered Cache zone setting. + enum: + - 'on' + - 'off' + type: string + x-auditable: true + cacheRulesSmartTieredCachePatch: + description: Update enablement of Smart Tiered Cache. + properties: + value: + description: Enable or disable the Smart Tiered Cache. + enum: + - 'on' + - 'off' + example: 'on' + type: string + x-auditable: true + required: + - value + type: object + cacheRulesSupportedCloudRegionsResult: + description: Cloud vendors and their supported regions for origin cloud region mappings. + properties: + obtained_codes: + description: Whether Cloudflare airport codes (IATA colo identifiers) were successfully resolved for the `upper_tier_colos` field on each region. When `false`, the `upper_tier_colos` arrays may be empty or incomplete. + type: boolean + vendors: + description: Map of vendor name to list of supported regions. + type: object + required: + - vendors + - obtained_codes + type: object + cacheRulesVariantsValue: + description: Value of the zone setting. + properties: + avif: + description: List of strings with the MIME types of all the variants that should be served for avif. + example: + - image/webp + - image/jpeg + items: + type: string + x-auditable: true + type: array + uniqueItems: true + bmp: + description: List of strings with the MIME types of all the variants that should be served for bmp. + example: + - image/webp + - image/jpeg + items: + type: string + x-auditable: true + type: array + uniqueItems: true + gif: + description: List of strings with the MIME types of all the variants that should be served for gif. + example: + - image/webp + - image/jpeg + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jp2: + description: List of strings with the MIME types of all the variants that should be served for jp2. + example: + - image/webp + - image/avif + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jpeg: + description: List of strings with the MIME types of all the variants that should be served for jpeg. + example: + - image/webp + - image/avif + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jpg: + description: List of strings with the MIME types of all the variants that should be served for jpg. + example: + - image/webp + - image/avif + items: + type: string + x-auditable: true + type: array + uniqueItems: true + jpg2: + description: List of strings with the MIME types of all the variants that should be served for jpg2. + example: + - image/webp + - image/avif + items: + type: string + x-auditable: true + type: array + uniqueItems: true + png: + description: List of strings with the MIME types of all the variants that should be served for png. + example: + - image/webp + - image/avif + items: + type: string + x-auditable: true + type: array + uniqueItems: true + tif: + description: List of strings with the MIME types of all the variants that should be served for tif. + example: + - image/webp + - image/avif + items: + type: string + x-auditable: true + type: array + uniqueItems: true + tiff: + description: List of strings with the MIME types of all the variants that should be served for tiff. + example: + - image/webp + - image/avif + items: + type: string + x-auditable: true + type: array + uniqueItems: true + webp: + description: List of strings with the MIME types of all the variants that should be served for webp. + example: + - image/jpeg + - image/avif + items: + type: string + x-auditable: true + type: array + uniqueItems: true + type: object + regionalTieredCache: + description: The identifier of the caching setting. + type: string + x-auditable: true + enum: + - tc_regional + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d: + description: ID of the zone setting. + type: string + x-auditable: true + enum: + - cache_reserve_clear + example: cache_reserve_clear + unnamedSchemaRef669bfbb16c0913af7077c3c194fbfcd0: + description: The identifier of the caching setting. + type: string + x-auditable: true + enum: + - variants + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + cache_cache_reserve: + id: cloudflare.cache.cache_cache_reserve + name: cache_cache_reserve + title: Cache Cache Reserve + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1cache_reserve/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cache_cache_reserve/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + cache_reserve: + id: cloudflare.cache.cache_reserve + name: cache_reserve + title: Cache Reserve + methods: + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1cache_reserve/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + clear: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1cache_reserve_clear/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/cache_reserve/methods/edit' + delete: [] + replace: [] + cache_cache_reserve_clear: + id: cloudflare.cache.cache_cache_reserve_clear + name: cache_cache_reserve_clear + title: Cache Cache Reserve Clear + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1cache_reserve_clear/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cache_cache_reserve_clear/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + origin_cloud_regions: + id: cloudflare.cache.origin_cloud_regions + name: origin_cloud_regions + title: Origin Cloud Regions + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + origin_cloud_regions_upsert: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + origin_cloud_regions_create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions/post' + response: + mediaType: application/json + openAPIDocKey: '200' + origin_cloud_regions_delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions~1{origin_ip}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions~1{origin_ip}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/origin_cloud_regions/methods/get' + - $ref: '#/components/x-stackQL-resources/origin_cloud_regions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/origin_cloud_regions/methods/origin_cloud_regions_create' + update: + - $ref: '#/components/x-stackQL-resources/origin_cloud_regions/methods/origin_cloud_regions_upsert' + delete: + - $ref: '#/components/x-stackQL-resources/origin_cloud_regions/methods/origin_cloud_regions_delete' + replace: [] + batch: + id: cloudflare.cache.batch + name: batch + title: Batch + methods: + origin_cloud_regions_batch_delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions~1batch/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + origin_cloud_regions_batch_upsert: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions~1batch/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/batch/methods/origin_cloud_regions_batch_upsert' + delete: + - $ref: '#/components/x-stackQL-resources/batch/methods/origin_cloud_regions_batch_delete' + replace: [] + supported_regions: + id: cloudflare.cache.supported_regions + name: supported_regions + title: Supported Regions + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1origin_cloud_regions~1supported_regions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/supported_regions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + regional_tiered_cache: + id: cloudflare.cache.regional_tiered_cache + name: regional_tiered_cache + title: Regional Tiered Cache + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1regional_tiered_cache/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1regional_tiered_cache/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/regional_tiered_cache/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/regional_tiered_cache/methods/edit' + delete: [] + replace: [] + smart_tiered_cache: + id: cloudflare.cache.smart_tiered_cache + name: smart_tiered_cache + title: Smart Tiered Cache + methods: + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1tiered_cache_smart_topology_enable/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1tiered_cache_smart_topology_enable/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1tiered_cache_smart_topology_enable/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/smart_tiered_cache/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/smart_tiered_cache/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/smart_tiered_cache/methods/delete' + replace: [] + variants: + id: cloudflare.cache.variants + name: variants + title: Variants + methods: + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1variants/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1variants/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1cache~1variants/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/variants/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/variants/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/variants/methods/delete' + replace: [] + zones: + id: cloudflare.cache.zones + name: zones + title: Zones + methods: + purge_cache: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1purge_cache/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + cdn_network_analytics_adaptive_groups: + id: cloudflare.cache.cdn_network_analytics_adaptive_groups + name: cdn_network_analytics_adaptive_groups + title: Cdn Network Analytics Adaptive Groups + methods: + list: + operation: + $ref: '#/paths/~1graphql~1cdn_network_analytics_adaptive_groups/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + transform: + type: golang_template_json_v0.3.0 + body: "{\n \"result\": [\n {{- $data := index . \"data\" }}\n {{- if $data }}\n {{- $viewer := index $data \"viewer\" }}\n {{- $accounts := index $viewer \"accounts\" }}\n {{- if and $accounts (gt (len $accounts) 0) }}\n {{- $rows := index (index $accounts 0) \"cdnNetworkAnalyticsAdaptiveGroups\" }}\n {{- $first := true -}}\n {{- range $i, $row := $rows }}\n {{- if not $first }},{{ end }}{{- $first = false }}\n {\n \"datetime\": {{ toJson (index $row \"dimensions\" \"datetime\") }},\n \"colo_code\": {{ toJson (index $row \"dimensions\" \"coloCode\") }},\n \"colo_country\": {{ toJson (index $row \"dimensions\" \"coloCountry\") }},\n \"direction\": {{ toJson (index $row \"dimensions\" \"direction\") }},\n \"ip_protocol_name\": {{ toJson (index $row \"dimensions\" \"ipProtocolName\") }},\n \"source_country\": {{ toJson (index $row \"dimensions\" \"sourceCountry\") }},\n \ + \ \"destination_country\": {{ toJson (index $row \"dimensions\" \"destinationCountry\") }},\n \"bits\": {{ index $row \"sum\" \"bits\" }},\n \"packets\": {{ index $row \"sum\" \"packets\" }}\n }\n {{- end }}\n {{- end }}\n {{- end }}\n ]\n}\n" + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cdn_network_analytics_adaptive_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/d1.yaml b/providers/src/cloudflare/v00.00.00000/services/d1.yaml index d90bf773..761ad636 100644 --- a/providers/src/cloudflare/v00.00.00000/services/d1.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/d1.yaml @@ -1,1718 +1,1681 @@ -openapi: 3.0.3 -info: - title: d1 API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/d1/database: - get: - description: Returns a list of D1 databases. - operationId: d1-list-databases - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: name - schema: - description: a database name to search for. - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 1000 - description: Number of items per page. - maximum: 10000 - minimum: 10 - type: number - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: array - items: - $ref: '#/components/schemas/d1DatabaseResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service - type: number - page: - description: Current page within paginated list of results - type: number - per_page: - description: Number of results per page of results - type: number - total_count: - description: Total results available without any search parameters - type: number - type: object - required: - - success - - errors - - messages - - result - type: object - description: List D1 databases response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: List D1 databases response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List D1 Databases - tags: - - D1 - x-api-token-group: - - D1 Read - - D1 Write - x-stackql-sdk: - service: d1 - resource_chain: - - database - method: list - post: - description: Returns the created D1 database. - operationId: d1-create-database - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - jurisdiction: - $ref: '#/components/schemas/d1Jurisdiction' - name: - $ref: '#/components/schemas/d1DatabaseName' - primary_location_hint: - $ref: '#/components/schemas/d1PrimaryLocationHint' - required: - - name - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - $ref: '#/components/schemas/d1DatabaseDetailsResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Returns the created D1 database's metadata - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Database details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create D1 Database - tags: - - D1 - x-api-token-group: - - D1 Write - x-stackql-sdk: - service: d1 - resource_chain: - - database - method: create - /accounts/{account_id}/d1/database/{database_id}: - delete: - description: Deletes the specified D1 database. - operationId: d1-delete-database - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: database_id - in: path - required: true - description: The D1 database ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - enum: - - null - nullable: true - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Delete D1 database response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Delete D1 database response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete D1 Database - tags: - - D1 - x-api-token-group: - - D1 Write - x-stackql-sdk: - service: d1 - resource_chain: - - database - method: delete - get: - description: Returns the specified D1 database. - operationId: d1-get-database - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: database_id - in: path - required: true - description: The D1 database ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - $ref: '#/components/schemas/d1DatabaseDetailsResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Database details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Database details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get D1 Database - tags: - - D1 - x-api-token-group: - - D1 Read - - D1 Write - x-stackql-sdk: - service: d1 - resource_chain: - - database - method: get - patch: - description: Updates partially the specified D1 database. - operationId: d1-update-partial-database - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: database_id - in: path - required: true - description: The D1 database ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/d1DatabaseUpdatePartialRequestBody' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - $ref: '#/components/schemas/d1DatabaseDetailsResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Database details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Update D1 database response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update D1 Database partially - tags: - - D1 - x-api-token-group: - - D1 Write - x-stackql-sdk: - service: d1 - resource_chain: - - database - method: edit - put: - description: Updates the specified D1 database. - operationId: d1-update-database - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: database_id - in: path - required: true - description: The D1 database ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/d1DatabaseUpdateRequestBody' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - $ref: '#/components/schemas/d1DatabaseDetailsResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Database details response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Update D1 database response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update D1 Database - tags: - - D1 - x-api-token-group: - - D1 Write - x-stackql-sdk: - service: d1 - resource_chain: - - database - method: update - /accounts/{account_id}/d1/database/{database_id}/export: - post: - description: >- - Returns a URL where the SQL contents of your D1 can be downloaded. Note: - this process may take some time for larger DBs, during which your D1 - will be unavailable to serve queries. To avoid blocking your DB - unnecessarily, an in-progress export must be continually polled or will - automatically cancel. - operationId: d1-export-database - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: database_id - in: path - required: true - description: The D1 database ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - current_bookmark: - description: >- - To poll an in-progress export, provide the current bookmark - (returned by your first polling response) - type: string - x-auditable: true - dump_options: - properties: - no_data: - description: Export only the table definitions, not their contents - type: boolean - x-auditable: true - no_schema: - description: Export only each table's contents, not its definition - type: boolean - x-auditable: true - tables: - description: >- - Filter the export to just one or more tables. Passing an - empty array is the same as not passing anything and - means: export all tables. - items: - type: string - x-auditable: true - type: array - type: object - output_format: - description: >- - Specifies that you will poll this endpoint until the export - completes - enum: - - polling - type: string - x-auditable: true - required: - - output_format - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - properties: - at_bookmark: - description: >- - The current time-travel bookmark for your D1, used to - poll for updates. Will not change for the duration of - the export task. - type: string - x-auditable: true - error: - description: >- - Only present when status = 'error'. Contains the error - message. - type: string - x-auditable: true - messages: - description: Logs since the last time you polled - items: - type: string - x-auditable: true - type: array - result: - description: Only present when status = 'complete' - properties: - filename: - description: The generated SQL filename. - type: string - x-auditable: true - signed_url: - description: >- - The URL to download the exported SQL. Available - for one hour. - type: string - type: object - status: - enum: - - complete - - error - type: string - x-auditable: true - success: - type: boolean - x-auditable: true - type: - enum: - - export - type: string - x-auditable: true - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Polled successfully, task no longer running (errored or complete) - '202': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - properties: - at_bookmark: - description: >- - The current time-travel bookmark for your D1, used to - poll for updates. Will not change for the duration of - the export task. - type: string - x-auditable: true - messages: - description: Logs since the last time you polled - items: - type: string - x-auditable: true - type: array - status: - enum: - - active - type: string - x-auditable: true - success: - type: boolean - x-auditable: true - type: - enum: - - export - type: string - x-auditable: true - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Polled successfully, task is currently running - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Poll failed (API error) - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Export D1 Database as SQL - tags: - - D1 - x-stackql-sdk: - service: d1 - resource_chain: - - database - method: export - /accounts/{account_id}/d1/database/{database_id}/import: - post: - description: >- - Generates a temporary URL for uploading an SQL file to, then instructing - the D1 to import it and polling it for status updates. Imports block the - D1 for their duration. - operationId: d1-import-database - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: database_id - in: path - required: true - description: The D1 database ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - type: object - title: init - properties: - action: - description: Indicates you have a new SQL file to upload. - enum: - - init - type: string - x-auditable: true - etag: - description: >- - Required when action is 'init' or 'ingest'. An md5 hash of - the file you're uploading. Used to check if it already - exists, and validate its contents before ingesting. - type: string - x-auditable: true - filename: - description: The filename you have successfully uploaded. - type: string - x-auditable: true - current_bookmark: - description: >- - This identifies the currently-running import, checking its - status. - type: string - x-auditable: true - required: - - action - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - properties: - at_bookmark: - description: >- - The current time-travel bookmark for your D1, used to - poll for updates. Will not change for the duration of - the import. Only returned if an import process is - currently running or recently finished. - type: string - x-auditable: true - error: - description: >- - Only present when status = 'error'. Contains the error - message that prevented the import from succeeding. - type: string - x-auditable: true - filename: - description: >- - Derived from the database ID and etag, to use in - avoiding repeated uploads. Only returned when for the - 'init' action. - type: string - x-auditable: true - messages: - description: Logs since the last time you polled - items: - type: string - x-auditable: true - type: array - result: - description: Only present when status = 'complete' - properties: - final_bookmark: - description: >- - The time-travel bookmark if you need restore your - D1 to directly after the import succeeded. - type: string - x-auditable: true - meta: - $ref: '#/components/schemas/d1QueryMeta' - num_queries: - description: >- - The total number of queries that were executed - during the import. - type: number - x-auditable: true - type: object - status: - enum: - - complete - - error - type: string - x-auditable: true - success: - type: boolean - x-auditable: true - type: - enum: - - import - type: string - x-auditable: true - upload_url: - description: >- - The R2 presigned URL to use for uploading. Only - returned when for the 'init' action. - type: string - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: >- - Successful action. Import is either ready to start, under way, or - finished (succeeded or failed). - '202': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - properties: - at_bookmark: - description: >- - The current bookmark for your D1, used to poll for - updates. Will not change for the duration of the - import. - type: string - x-auditable: true - messages: - description: Logs since the last time you polled - items: - type: string - x-auditable: true - type: array - status: - enum: - - active - type: string - x-auditable: true - success: - type: boolean - x-auditable: true - type: - enum: - - import - type: string - x-auditable: true - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Polled successfully, task is currently running - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Poll failed (API error) - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Import SQL into your D1 Database - tags: - - D1 - x-stackql-sdk: - service: d1 - resource_chain: - - database - method: import_ - /accounts/{account_id}/d1/database/{database_id}/query: - post: - description: Returns the query result as an object. - operationId: d1-query-database - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: database_id - in: path - required: true - description: The D1 database ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/d1BatchQuery' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: array - items: - $ref: '#/components/schemas/d1QueryResultResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Query response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Query response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Query D1 Database - tags: - - D1 - x-api-token-group: - - D1 Read - - D1 Write - /accounts/{account_id}/d1/database/{database_id}/raw: - post: - description: >- - Returns the query result rows as arrays rather than objects. This is a - performance-optimized version of the /query endpoint. - operationId: d1-raw-database-query - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: database_id - in: path - required: true - description: The D1 database ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/d1BatchQuery' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: array - items: - $ref: '#/components/schemas/d1RawResultResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Raw query response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Query response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Raw D1 Database query - tags: - - D1 - x-api-token-group: - - D1 Read - - D1 Write - /accounts/{account_id}/d1/database/{database_id}/time_travel/bookmark: - get: - description: >- - Retrieves the current bookmark, or the nearest bookmark at or before a - provided timestamp. Bookmarks can be used with the restore endpoint to - revert the database to a previous point in time. - operationId: d1-time-travel-get-bookmark - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: database_id - in: path - required: true - description: The D1 database ID. - schema: - type: string - - description: >- - An optional ISO 8601 timestamp. If provided, returns the nearest - available bookmark at or before this timestamp. If omitted, returns - the current bookmark. - in: query - name: timestamp - schema: - $ref: '#/components/schemas/d1TimeTravelTimestamp' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - properties: - bookmark: - $ref: '#/components/schemas/d1TimeTravelBookmark' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Bookmark retrieved successfully - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Failed to retrieve bookmark - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get D1 database bookmark - tags: - - D1 - x-api-token-group: - - D1 Read - - D1 Write - x-stackql-sdk: - service: d1 - resource_chain: - - database - - time_travel - method: get_bookmark - /accounts/{account_id}/d1/database/{database_id}/time_travel/restore: - post: - description: >- - Restores a D1 database to a previous point in time either via a bookmark - or a timestamp. - operationId: d1-time-travel-restore - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: database_id - in: path - required: true - description: The D1 database ID. - schema: - type: string - - description: >- - A bookmark to restore the database to. Required if `timestamp` is - not provided. - in: query - name: bookmark - schema: - $ref: '#/components/schemas/d1TimeTravelBookmark' - - description: >- - An ISO 8601 timestamp to restore the database to. Required if - `bookmark` is not provided. - in: query - name: timestamp - schema: - $ref: '#/components/schemas/d1TimeTravelTimestamp' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/d1Messages' - messages: - $ref: '#/components/schemas/d1Messages' - result: - type: object - $ref: '#/components/schemas/d1TimeTravelRestoreResponse' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Database restored successfully - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/d1ApiResponseCommonFailure' - description: Restore operation failed - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Restore D1 Database to a bookmark or point in time - tags: - - D1 - x-stackql-sdk: - service: d1 - resource_chain: - - database - - time_travel - method: restore -components: - schemas: - d1ApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/d1Messages' - messages: - example: [] - $ref: '#/components/schemas/d1Messages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - d1BatchQuery: - description: A single query object or a batch query object - type: object - title: single query - properties: - params: - $ref: '#/components/schemas/d1Params' - sql: - $ref: '#/components/schemas/d1Sql' - batch: - items: - $ref: '#/components/schemas/d1SingleQuery' - type: array - required: [] - d1CreatedAt: - description: Specifies the timestamp the resource was created as an ISO8601 string. - example: '2022-11-15T18:25:44.442097Z' - format: date-time - readOnly: true - type: string - x-auditable: true - d1DatabaseDetailsResponse: - description: The details of the D1 database. - properties: - created_at: - $ref: '#/components/schemas/d1CreatedAt' - readOnly: true - file_size: - $ref: '#/components/schemas/d1FileSize' - jurisdiction: - $ref: '#/components/schemas/d1JurisdictionNullable' - name: - $ref: '#/components/schemas/d1DatabaseName' - num_tables: - $ref: '#/components/schemas/d1TableCount' - read_replication: - $ref: '#/components/schemas/d1ReadReplicationDetails' - uuid: - $ref: '#/components/schemas/d1DatabaseIdentifier' - version: - $ref: '#/components/schemas/d1DatabaseVersion' - type: object - d1DatabaseIdentifier: - description: D1 database identifier (UUID). - example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - readOnly: true - type: string - x-auditable: true - d1DatabaseName: - description: D1 database name. - example: my-database - type: string - x-auditable: true - d1DatabaseResponse: - properties: - created_at: - $ref: '#/components/schemas/d1CreatedAt' - readOnly: true - jurisdiction: - $ref: '#/components/schemas/d1JurisdictionNullable' - name: - $ref: '#/components/schemas/d1DatabaseName' - uuid: - $ref: '#/components/schemas/d1DatabaseIdentifier' - version: - $ref: '#/components/schemas/d1DatabaseVersion' - type: object - d1DatabaseUpdatePartialRequestBody: - properties: - read_replication: - description: Configuration for D1 read replication. - properties: - mode: - $ref: '#/components/schemas/d1ReadReplicationMode' - required: - - mode - type: object - type: object - d1DatabaseUpdateRequestBody: - properties: - read_replication: - description: Configuration for D1 read replication. - properties: - mode: - $ref: '#/components/schemas/d1ReadReplicationMode' - required: - - mode - type: object - required: - - read_replication - type: object - d1DatabaseVersion: - example: production - type: string - x-auditable: true - d1FileSize: - description: The D1 database's size, in bytes. - example: 12 - type: number - x-auditable: true - d1Jurisdiction: - description: >- - Specify the location to restrict the D1 database to run and store data. - If this option is present, the location hint is ignored. - enum: - - eu - - fedramp - example: eu - type: string - x-auditable: true - d1JurisdictionNullable: - description: >- - Specify the location to restrict the D1 database to run and store data. - If this option is present, the location hint is ignored. - enum: - - eu - - fedramp - example: eu - nullable: true - type: string - x-auditable: true - d1Messages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - d1Params: - example: - - firstParam - - secondParam - items: - type: string - type: array - d1PrimaryLocationHint: - description: >- - Specify the region to create the D1 primary, if available. If this - option is omitted, the D1 will be created as close as possible to the - current user. - enum: - - wnam - - enam - - weur - - eeur - - apac - - oc - example: wnam - type: string - x-auditable: true - d1QueryMeta: - properties: - changed_db: - description: >- - Denotes if the database has been altered in some way, like deleting - rows. - type: boolean - x-auditable: true - changes: - description: >- - Rough indication of how many rows were modified by the query, as - provided by SQLite's `sqlite3_total_changes()`. - type: number - x-auditable: true - duration: - description: >- - The duration of the SQL query execution inside the database. Does - not include any network communication. - type: number - x-auditable: true - last_row_id: - description: >- - The row ID of the last inserted row in a table with an `INTEGER - PRIMARY KEY` as provided by SQLite. Tables created with `WITHOUT - ROWID` do not populate this. - type: number - x-auditable: true - rows_read: - description: >- - Number of rows read during the SQL query execution, including - indices (not all rows are necessarily returned). - type: number - x-auditable: true - rows_written: - description: >- - Number of rows written during the SQL query execution, including - indices. - type: number - x-auditable: true - served_by_colo: - $ref: '#/components/schemas/d1ServedByColo' - served_by_primary: - description: >- - Denotes if the query has been handled by the database primary - instance. - type: boolean - x-auditable: true - served_by_region: - $ref: '#/components/schemas/d1ServedByRegion' - size_after: - description: Size of the database after the query committed, in bytes. - type: number - x-auditable: true - timings: - description: Various durations for the query. - properties: - sql_duration_ms: - description: >- - The duration of the SQL query execution inside the database. - Does not include any network communication. - type: number - x-auditable: true - type: object - type: object - d1QueryResultResponse: - properties: - meta: - $ref: '#/components/schemas/d1QueryMeta' - results: - items: - type: object - type: array - success: - type: boolean - type: object - d1RawResultResponse: - properties: - meta: - $ref: '#/components/schemas/d1QueryMeta' - results: - properties: - columns: - items: - type: string - type: array - rows: - items: - items: - type: number - type: array - type: array - type: object - success: - type: boolean - type: object - d1ReadReplicationDetails: - description: Configuration for D1 read replication. - properties: - mode: - $ref: '#/components/schemas/d1ReadReplicationMode' - required: - - mode - type: object - d1ReadReplicationMode: - description: >- - The read replication mode for the database. Use 'auto' to create - replicas and allow D1 automatically place them around the world, or - 'disabled' to not use any database replicas (it can take a few hours for - all replicas to be deleted). - enum: - - auto - - disabled - example: auto - type: string - x-auditable: true - d1ServedByColo: - description: The three letters airport code of the colo that handled the query. - example: LHR - type: string - x-auditable: true - d1ServedByRegion: - description: Region location hint of the database instance that handled the query. - enum: - - WNAM - - ENAM - - WEUR - - EEUR - - APAC - - OC - example: EEUR - type: string - x-auditable: true - d1SingleQuery: - description: A single query with or without parameters - properties: - params: - $ref: '#/components/schemas/d1Params' - sql: - $ref: '#/components/schemas/d1Sql' - required: - - sql - title: single query - type: object - d1Sql: - description: >- - Your SQL query. Supports multiple statements, joined by semicolons, - which will be executed as a batch. - example: SELECT * FROM myTable WHERE field = ? OR field = ?; - type: string - d1TableCount: - example: 12 - type: number - x-auditable: true - d1TimeTravelBookmark: - description: >- - A bookmark representing a specific state of the database at a specific - point in time. - example: 00000001-00000002-00004e2f-0a83ea2fceebc654de0640c422be4653 - type: string - x-auditable: true - d1TimeTravelRestoreResponse: - description: Response from a time travel restore operation. - properties: - bookmark: - $ref: '#/components/schemas/d1TimeTravelBookmark' - description: >- - The new bookmark representing the state of the database after the - restore operation. - message: - description: A message describing the result of the restore operation. - example: Database restored successfully - type: string - x-auditable: true - previous_bookmark: - $ref: '#/components/schemas/d1TimeTravelBookmark' - description: >- - The bookmark representing the state of the database before the - restore operation. Can be used to undo the restore if needed. - type: object - d1TimeTravelTimestamp: - description: >- - An ISO 8601 timestamp used for time travel operations. The database will - be restored to the nearest available bookmark at or before this - timestamp. - example: '2024-01-15T12:00:00Z' - format: date-time - type: string - x-auditable: true - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - database: - id: cloudflare.d1.database - name: database - title: Database - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1d1~1database/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1d1~1database/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - export: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1export/post - response: - mediaType: application/json - openAPIDocKey: '200' - import: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1import/post - response: - mediaType: application/json - openAPIDocKey: '200' - create_raw: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1raw/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/database/methods/get' - - $ref: '#/components/x-stackQL-resources/database/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/database/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/database/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/database/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/database/methods/update' - database_query: - id: cloudflare.d1.database_query - name: database_query - title: Database Query - methods: - query: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1query/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: '#/components/x-stackQL-resources/database_query/methods/query' - update: [] - delete: [] - replace: [] - time_travel: - id: cloudflare.d1.time_travel - name: time_travel - title: Time Travel - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1time_travel~1bookmark/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - restore: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1time_travel~1restore/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/time_travel/methods/list' - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: d1 API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/d1/database: + get: + description: Returns a list of D1 databases. + operationId: d1-list-databases + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: name + schema: + description: a database name to search for. + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 1000 + description: Number of items per page. + maximum: 10000 + minimum: 10 + type: number + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: array + items: + $ref: '#/components/schemas/d1DatabaseResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service + type: number + page: + description: Current page within paginated list of results + type: number + per_page: + description: Number of results per page of results + type: number + total_count: + description: Total results available without any search parameters + type: number + type: object + required: + - success + - errors + - messages + - result + type: object + description: List D1 databases response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: List D1 databases response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List D1 Databases + tags: + - D1 + x-api-token-group: + - D1 Read + - D1 Write + x-stackql-sdk: + service: d1 + resource_chain: + - database + method: list + post: + description: Returns the created D1 database. + operationId: d1-create-database + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + jurisdiction: + $ref: '#/components/schemas/d1Jurisdiction' + name: + $ref: '#/components/schemas/d1DatabaseName' + primary_location_hint: + $ref: '#/components/schemas/d1PrimaryLocationHint' + required: + - name + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + $ref: '#/components/schemas/d1DatabaseDetailsResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Returns the created D1 database's metadata + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Database details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create D1 Database + tags: + - D1 + x-api-token-group: + - D1 Write + x-stackql-sdk: + service: d1 + resource_chain: + - database + method: create + /accounts/{account_id}/d1/database/{database_id}: + delete: + description: Deletes the specified D1 database. + operationId: d1-delete-database + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: database_id + in: path + required: true + description: The D1 database ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + enum: + - null + nullable: true + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Delete D1 database response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Delete D1 database response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete D1 Database + tags: + - D1 + x-api-token-group: + - D1 Write + x-stackql-sdk: + service: d1 + resource_chain: + - database + method: delete + get: + description: Returns the specified D1 database. + operationId: d1-get-database + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: database_id + in: path + required: true + description: The D1 database ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + $ref: '#/components/schemas/d1DatabaseDetailsResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Database details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Database details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get D1 Database + tags: + - D1 + x-api-token-group: + - D1 Read + - D1 Write + x-stackql-sdk: + service: d1 + resource_chain: + - database + method: get + patch: + description: Updates partially the specified D1 database. + operationId: d1-update-partial-database + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: database_id + in: path + required: true + description: The D1 database ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/d1DatabaseUpdatePartialRequestBody' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + $ref: '#/components/schemas/d1DatabaseDetailsResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Database details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Update D1 database response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update D1 Database partially + tags: + - D1 + x-api-token-group: + - D1 Write + x-stackql-sdk: + service: d1 + resource_chain: + - database + method: edit + put: + description: Updates the specified D1 database. + operationId: d1-update-database + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: database_id + in: path + required: true + description: The D1 database ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/d1DatabaseUpdateRequestBody' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + $ref: '#/components/schemas/d1DatabaseDetailsResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Database details response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Update D1 database response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update D1 Database + tags: + - D1 + x-api-token-group: + - D1 Write + x-stackql-sdk: + service: d1 + resource_chain: + - database + method: update + /accounts/{account_id}/d1/database/{database_id}/export: + post: + description: 'Returns a URL where the SQL contents of your D1 can be downloaded. Note: this process may take some time for larger DBs, during which your D1 will be unavailable to serve queries. To avoid blocking your DB unnecessarily, an in-progress export must be continually polled or will automatically cancel.' + operationId: d1-export-database + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: database_id + in: path + required: true + description: The D1 database ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + current_bookmark: + description: To poll an in-progress export, provide the current bookmark (returned by your first polling response) + type: string + x-auditable: true + dump_options: + properties: + no_data: + description: Export only the table definitions, not their contents + type: boolean + x-auditable: true + no_schema: + description: Export only each table's contents, not its definition + type: boolean + x-auditable: true + tables: + description: 'Filter the export to just one or more tables. Passing an empty array is the same as not passing anything and means: export all tables.' + items: + type: string + x-auditable: true + type: array + type: object + output_format: + description: Specifies that you will poll this endpoint until the export completes + enum: + - polling + type: string + x-auditable: true + required: + - output_format + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + properties: + at_bookmark: + description: The current time-travel bookmark for your D1, used to poll for updates. Will not change for the duration of the export task. + type: string + x-auditable: true + error: + description: Only present when status = 'error'. Contains the error message. + type: string + x-auditable: true + messages: + description: Logs since the last time you polled + items: + type: string + x-auditable: true + type: array + result: + description: Only present when status = 'complete' + properties: + filename: + description: The generated SQL filename. + type: string + x-auditable: true + signed_url: + description: The URL to download the exported SQL. Available for one hour. + type: string + type: object + status: + enum: + - complete + - error + type: string + x-auditable: true + success: + type: boolean + x-auditable: true + type: + enum: + - export + type: string + x-auditable: true + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Polled successfully, task no longer running (errored or complete) + '202': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + properties: + at_bookmark: + description: The current time-travel bookmark for your D1, used to poll for updates. Will not change for the duration of the export task. + type: string + x-auditable: true + messages: + description: Logs since the last time you polled + items: + type: string + x-auditable: true + type: array + status: + enum: + - active + type: string + x-auditable: true + success: + type: boolean + x-auditable: true + type: + enum: + - export + type: string + x-auditable: true + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Polled successfully, task is currently running + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Poll failed (API error) + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Export D1 Database as SQL + tags: + - D1 + x-stackql-sdk: + service: d1 + resource_chain: + - database + method: export + /accounts/{account_id}/d1/database/{database_id}/import: + post: + description: Generates a temporary URL for uploading an SQL file to, then instructing the D1 to import it and polling it for status updates. Imports block the D1 for their duration. + operationId: d1-import-database + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: database_id + in: path + required: true + description: The D1 database ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + title: init + properties: + action: + description: Indicates you have a new SQL file to upload. + enum: + - init + type: string + x-auditable: true + etag: + description: Required when action is 'init' or 'ingest'. An md5 hash of the file you're uploading. Used to check if it already exists, and validate its contents before ingesting. + type: string + x-auditable: true + filename: + description: The filename you have successfully uploaded. + type: string + x-auditable: true + current_bookmark: + description: This identifies the currently-running import, checking its status. + type: string + x-auditable: true + required: + - action + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + properties: + at_bookmark: + description: The current time-travel bookmark for your D1, used to poll for updates. Will not change for the duration of the import. Only returned if an import process is currently running or recently finished. + type: string + x-auditable: true + error: + description: Only present when status = 'error'. Contains the error message that prevented the import from succeeding. + type: string + x-auditable: true + filename: + description: Derived from the database ID and etag, to use in avoiding repeated uploads. Only returned when for the 'init' action. + type: string + x-auditable: true + messages: + description: Logs since the last time you polled + items: + type: string + x-auditable: true + type: array + result: + description: Only present when status = 'complete' + properties: + final_bookmark: + description: The time-travel bookmark if you need restore your D1 to directly after the import succeeded. + type: string + x-auditable: true + meta: + $ref: '#/components/schemas/d1QueryMeta' + num_queries: + description: The total number of queries that were executed during the import. + type: number + x-auditable: true + type: object + status: + enum: + - complete + - error + type: string + x-auditable: true + success: + type: boolean + x-auditable: true + type: + enum: + - import + type: string + x-auditable: true + upload_url: + description: The R2 presigned URL to use for uploading. Only returned when for the 'init' action. + type: string + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Successful action. Import is either ready to start, under way, or finished (succeeded or failed). + '202': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + properties: + at_bookmark: + description: The current bookmark for your D1, used to poll for updates. Will not change for the duration of the import. + type: string + x-auditable: true + messages: + description: Logs since the last time you polled + items: + type: string + x-auditable: true + type: array + status: + enum: + - active + type: string + x-auditable: true + success: + type: boolean + x-auditable: true + type: + enum: + - import + type: string + x-auditable: true + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Polled successfully, task is currently running + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Poll failed (API error) + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Import SQL into your D1 Database + tags: + - D1 + x-stackql-sdk: + service: d1 + resource_chain: + - database + method: import_ + /accounts/{account_id}/d1/database/{database_id}/query: + post: + description: Returns the query result as an object. + operationId: d1-query-database + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: database_id + in: path + required: true + description: The D1 database ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/d1BatchQuery' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: array + items: + $ref: '#/components/schemas/d1QueryResultResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Query response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Query response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Query D1 Database + tags: + - D1 + x-api-token-group: + - D1 Read + - D1 Write + /accounts/{account_id}/d1/database/{database_id}/raw: + post: + description: Returns the query result rows as arrays rather than objects. This is a performance-optimized version of the /query endpoint. + operationId: d1-raw-database-query + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: database_id + in: path + required: true + description: The D1 database ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/d1BatchQuery' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: array + items: + $ref: '#/components/schemas/d1RawResultResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Raw query response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Query response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Raw D1 Database query + tags: + - D1 + x-api-token-group: + - D1 Read + - D1 Write + /accounts/{account_id}/d1/database/{database_id}/time_travel/bookmark: + get: + description: Retrieves the current bookmark, or the nearest bookmark at or before a provided timestamp. Bookmarks can be used with the restore endpoint to revert the database to a previous point in time. + operationId: d1-time-travel-get-bookmark + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: database_id + in: path + required: true + description: The D1 database ID. + schema: + type: string + - description: An optional ISO 8601 timestamp. If provided, returns the nearest available bookmark at or before this timestamp. If omitted, returns the current bookmark. + in: query + name: timestamp + schema: + $ref: '#/components/schemas/d1TimeTravelTimestamp' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + properties: + bookmark: + $ref: '#/components/schemas/d1TimeTravelBookmark' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Bookmark retrieved successfully + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Failed to retrieve bookmark + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get D1 database bookmark + tags: + - D1 + x-api-token-group: + - D1 Read + - D1 Write + x-stackql-sdk: + service: d1 + resource_chain: + - database + - time_travel + method: get_bookmark + /accounts/{account_id}/d1/database/{database_id}/time_travel/restore: + post: + description: Restores a D1 database to a previous point in time either via a bookmark or a timestamp. + operationId: d1-time-travel-restore + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: database_id + in: path + required: true + description: The D1 database ID. + schema: + type: string + - description: A bookmark to restore the database to. Required if `timestamp` is not provided. + in: query + name: bookmark + schema: + $ref: '#/components/schemas/d1TimeTravelBookmark' + - description: An ISO 8601 timestamp to restore the database to. Required if `bookmark` is not provided. + in: query + name: timestamp + schema: + $ref: '#/components/schemas/d1TimeTravelTimestamp' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/d1Messages' + messages: + $ref: '#/components/schemas/d1Messages' + result: + type: object + $ref: '#/components/schemas/d1TimeTravelRestoreResponse' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Database restored successfully + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/d1ApiResponseCommonFailure' + description: Restore operation failed + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Restore D1 Database to a bookmark or point in time + tags: + - D1 + x-stackql-sdk: + service: d1 + resource_chain: + - database + - time_travel + method: restore + /graphql/d1_analytics_adaptive_groups: + post: + operationId: graphql-d1_analytics_adaptive_groups-list + summary: Cloudflare D1 database analytics for an account, grouped by database, serving instance, and region + description: Cloudflare D1 database analytics for an account, grouped by database, serving instance, and region. Per-tuple totals for request count, read/write query counts, rows read/written, and response bytes. + x-stackQL-graphQL: + url: https://api.cloudflare.com/client/v4/graphql + httpVerb: POST + responseSelection: + jsonPath: $.result[*] + cursor: + jsonPath: $.result[*].__no_cursor + query: "query {\n viewer {\n accounts(filter: { accountTag: \"{{ .account_tag }}\" }, limit: 1) {\n d1AnalyticsAdaptiveGroups(\n filter: { datetime_geq: \"{{ .since }}\", datetime_lt: \"{{ .until }}\" }\n limit: {{ if .limit }}{{ .limit }}{{ else }}100{{ end }}\n orderBy: [datetimeMinute_ASC]\n ) {\n dimensions {\n datetime: datetimeMinute\n databaseId\n databaseRole\n servedByRegion\n }\n sum {\n readQueries\n writeQueries\n rowsRead\n rowsWritten\n queryBatchResponseBytes\n }\n count\n }\n }\n }\n}\n" + x-stackql-protocol: graphql + parameters: + - name: account_tag + in: path + required: true + schema: + type: string + description: Cloudflare account ID (the 32-char hex tag). + - name: since + in: query + required: true + schema: + type: string + format: date-time + description: Lower bound (inclusive). RFC3339. + - name: until + in: query + required: true + schema: + type: string + format: date-time + description: Upper bound (exclusive). RFC3339. + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + description: Maximum dimension-tuple rows per call. + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + datetime: + type: string + format: date-time + database_id: + type: string + description: D1 database UUID. + database_role: + type: string + description: Primary / replica role of the instance serving the request. + served_by_region: + type: string + description: Region of the D1 instance that served the request. + requests: + type: integer + description: Total D1 request count for the tuple. + read_queries: + type: integer + description: Read query count. + write_queries: + type: integer + description: Write query count. + rows_read: + type: integer + description: Rows read by queries. + rows_written: + type: integer + description: Rows written by queries. + query_batch_response_bytes: + type: integer + description: Total response bytes across batches. +components: + schemas: + d1ApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/d1Messages' + messages: + example: [] + $ref: '#/components/schemas/d1Messages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + d1BatchQuery: + description: A single query object or a batch query object + type: object + title: single query + properties: + params: + $ref: '#/components/schemas/d1Params' + sql: + $ref: '#/components/schemas/d1Sql' + batch: + items: + $ref: '#/components/schemas/d1SingleQuery' + type: array + required: [] + d1CreatedAt: + description: Specifies the timestamp the resource was created as an ISO8601 string. + example: '2022-11-15T18:25:44.442097Z' + format: date-time + readOnly: true + type: string + x-auditable: true + d1DatabaseDetailsResponse: + description: The details of the D1 database. + properties: + created_at: + $ref: '#/components/schemas/d1CreatedAt' + readOnly: true + file_size: + $ref: '#/components/schemas/d1FileSize' + jurisdiction: + $ref: '#/components/schemas/d1JurisdictionNullable' + name: + $ref: '#/components/schemas/d1DatabaseName' + num_tables: + $ref: '#/components/schemas/d1TableCount' + read_replication: + $ref: '#/components/schemas/d1ReadReplicationDetails' + uuid: + $ref: '#/components/schemas/d1DatabaseIdentifier' + version: + $ref: '#/components/schemas/d1DatabaseVersion' + type: object + d1DatabaseIdentifier: + description: D1 database identifier (UUID). + example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + readOnly: true + type: string + x-auditable: true + d1DatabaseName: + description: D1 database name. + example: my-database + type: string + x-auditable: true + d1DatabaseResponse: + properties: + created_at: + $ref: '#/components/schemas/d1CreatedAt' + readOnly: true + jurisdiction: + $ref: '#/components/schemas/d1JurisdictionNullable' + name: + $ref: '#/components/schemas/d1DatabaseName' + uuid: + $ref: '#/components/schemas/d1DatabaseIdentifier' + version: + $ref: '#/components/schemas/d1DatabaseVersion' + type: object + d1DatabaseUpdatePartialRequestBody: + properties: + read_replication: + description: Configuration for D1 read replication. + properties: + mode: + $ref: '#/components/schemas/d1ReadReplicationMode' + required: + - mode + type: object + type: object + d1DatabaseUpdateRequestBody: + properties: + read_replication: + description: Configuration for D1 read replication. + properties: + mode: + $ref: '#/components/schemas/d1ReadReplicationMode' + required: + - mode + type: object + required: + - read_replication + type: object + d1DatabaseVersion: + example: production + type: string + x-auditable: true + d1FileSize: + description: The D1 database's size, in bytes. + example: 12 + type: number + x-auditable: true + d1Jurisdiction: + description: Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored. + enum: + - eu + - fedramp + example: eu + type: string + x-auditable: true + d1JurisdictionNullable: + description: Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored. + enum: + - eu + - fedramp + example: eu + nullable: true + type: string + x-auditable: true + d1Messages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + d1Params: + example: + - firstParam + - secondParam + items: + type: string + type: array + d1PrimaryLocationHint: + description: Specify the region to create the D1 primary, if available. If this option is omitted, the D1 will be created as close as possible to the current user. + enum: + - wnam + - enam + - weur + - eeur + - apac + - oc + example: wnam + type: string + x-auditable: true + d1QueryMeta: + properties: + changed_db: + description: Denotes if the database has been altered in some way, like deleting rows. + type: boolean + x-auditable: true + changes: + description: Rough indication of how many rows were modified by the query, as provided by SQLite's `sqlite3_total_changes()`. + type: number + x-auditable: true + duration: + description: The duration of the SQL query execution inside the database. Does not include any network communication. + type: number + x-auditable: true + last_row_id: + description: The row ID of the last inserted row in a table with an `INTEGER PRIMARY KEY` as provided by SQLite. Tables created with `WITHOUT ROWID` do not populate this. + type: number + x-auditable: true + rows_read: + description: Number of rows read during the SQL query execution, including indices (not all rows are necessarily returned). + type: number + x-auditable: true + rows_written: + description: Number of rows written during the SQL query execution, including indices. + type: number + x-auditable: true + served_by_colo: + $ref: '#/components/schemas/d1ServedByColo' + served_by_primary: + description: Denotes if the query has been handled by the database primary instance. + type: boolean + x-auditable: true + served_by_region: + $ref: '#/components/schemas/d1ServedByRegion' + size_after: + description: Size of the database after the query committed, in bytes. + type: number + x-auditable: true + timings: + description: Various durations for the query. + properties: + sql_duration_ms: + description: The duration of the SQL query execution inside the database. Does not include any network communication. + type: number + x-auditable: true + type: object + type: object + d1QueryResultResponse: + properties: + meta: + $ref: '#/components/schemas/d1QueryMeta' + results: + items: + type: object + type: array + success: + type: boolean + type: object + d1RawResultResponse: + properties: + meta: + $ref: '#/components/schemas/d1QueryMeta' + results: + properties: + columns: + items: + type: string + type: array + rows: + items: + items: + type: number + type: array + type: array + type: object + success: + type: boolean + type: object + d1ReadReplicationDetails: + description: Configuration for D1 read replication. + properties: + mode: + $ref: '#/components/schemas/d1ReadReplicationMode' + required: + - mode + type: object + d1ReadReplicationMode: + description: The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted). + enum: + - auto + - disabled + example: auto + type: string + x-auditable: true + d1ServedByColo: + description: The three letters airport code of the colo that handled the query. + example: LHR + type: string + x-auditable: true + d1ServedByRegion: + description: Region location hint of the database instance that handled the query. + enum: + - WNAM + - ENAM + - WEUR + - EEUR + - APAC + - OC + example: EEUR + type: string + x-auditable: true + d1SingleQuery: + description: A single query with or without parameters + properties: + params: + $ref: '#/components/schemas/d1Params' + sql: + $ref: '#/components/schemas/d1Sql' + required: + - sql + title: single query + type: object + d1Sql: + description: Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch. + example: SELECT * FROM myTable WHERE field = ? OR field = ?; + type: string + d1TableCount: + example: 12 + type: number + x-auditable: true + d1TimeTravelBookmark: + description: A bookmark representing a specific state of the database at a specific point in time. + example: 00000001-00000002-00004e2f-0a83ea2fceebc654de0640c422be4653 + type: string + x-auditable: true + d1TimeTravelRestoreResponse: + description: Response from a time travel restore operation. + properties: + bookmark: + $ref: '#/components/schemas/d1TimeTravelBookmark' + description: The new bookmark representing the state of the database after the restore operation. + message: + description: A message describing the result of the restore operation. + example: Database restored successfully + type: string + x-auditable: true + previous_bookmark: + $ref: '#/components/schemas/d1TimeTravelBookmark' + description: The bookmark representing the state of the database before the restore operation. Can be used to undo the restore if needed. + type: object + d1TimeTravelTimestamp: + description: An ISO 8601 timestamp used for time travel operations. The database will be restored to the nearest available bookmark at or before this timestamp. + example: '2024-01-15T12:00:00Z' + format: date-time + type: string + x-auditable: true + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + database: + id: cloudflare.d1.database + name: database + title: Database + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + export: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1export/post' + response: + mediaType: application/json + openAPIDocKey: '200' + import: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1import/post' + response: + mediaType: application/json + openAPIDocKey: '200' + create_raw: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1raw/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/database/methods/get' + - $ref: '#/components/x-stackQL-resources/database/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/database/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/database/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/database/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/database/methods/update' + database_query: + id: cloudflare.d1.database_query + name: database_query + title: Database Query + methods: + query: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1query/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/database_query/methods/query' + update: [] + delete: [] + replace: [] + time_travel: + id: cloudflare.d1.time_travel + name: time_travel + title: Time Travel + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1time_travel~1bookmark/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + restore: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1d1~1database~1{database_id}~1time_travel~1restore/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/time_travel/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + d1_analytics_adaptive_groups: + id: cloudflare.d1.d1_analytics_adaptive_groups + name: d1_analytics_adaptive_groups + title: D1 Analytics Adaptive Groups + methods: + list: + operation: + $ref: '#/paths/~1graphql~1d1_analytics_adaptive_groups/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + transform: + type: golang_template_json_v0.3.0 + body: "{\n \"result\": [\n {{- $data := index . \"data\" }}\n {{- if $data }}\n {{- $viewer := index $data \"viewer\" }}\n {{- $accounts := index $viewer \"accounts\" }}\n {{- if and $accounts (gt (len $accounts) 0) }}\n {{- $rows := index (index $accounts 0) \"d1AnalyticsAdaptiveGroups\" }}\n {{- $first := true -}}\n {{- range $i, $row := $rows }}\n {{- if not $first }},{{ end }}{{- $first = false }}\n {\n \"datetime\": {{ toJson (index $row \"dimensions\" \"datetime\") }},\n \"database_id\": {{ toJson (index $row \"dimensions\" \"databaseId\") }},\n \"database_role\": {{ toJson (index $row \"dimensions\" \"databaseRole\") }},\n \"served_by_region\": {{ toJson (index $row \"dimensions\" \"servedByRegion\") }},\n \"requests\": {{ index $row \"count\" }},\n \"read_queries\": {{ index $row \"sum\" \"readQueries\" }},\n \"write_queries\": {{ index $row \"sum\" \"writeQueries\" }},\n\ + \ \"rows_read\": {{ index $row \"sum\" \"rowsRead\" }},\n \"rows_written\": {{ index $row \"sum\" \"rowsWritten\" }}\n }\n {{- end }}\n {{- end }}\n {{- end }}\n ]\n}\n" + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/d1_analytics_adaptive_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/dns.yaml b/providers/src/cloudflare/v00.00.00000/services/dns.yaml index 6ea5a066..93d99b0b 100644 --- a/providers/src/cloudflare/v00.00.00000/services/dns.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/dns.yaml @@ -5396,6 +5396,102 @@ paths: free: true pro: true operationId: get_zones_zone_id_dns_records_usage + /graphql/dns_analytics_adaptive_groups: + post: + operationId: graphql-dns_analytics_adaptive_groups-list + summary: DNS query analytics for a zone, grouped by query name, type, response code, cache status, and serving colo + description: DNS query analytics for a zone, grouped by query name, type, response code, cache status, and serving colo. Replaces the deprecated REST endpoints /zones/{zone_id}/dns_analytics/* (hard EOL 2026-12-01). + x-stackQL-graphQL: + url: https://api.cloudflare.com/client/v4/graphql + httpVerb: POST + responseSelection: + jsonPath: $.result[*] + cursor: + strategy: keyset + jsonPath: $.data.viewer.zones[0].dnsAnalyticsAdaptiveGroups[-1:].dimensions.datetime + format: ', AND datetime_gt: "{{ .value }}"' + query: "query {\n viewer {\n zones(filter: { zoneTag: \"{{ .zone_tag }}\" }, limit: 1) {\n dnsAnalyticsAdaptiveGroups(\n filter: { datetime_geq: \"{{ .since }}\", datetime_lt: \"{{ .until }}\"{{ .cursor }} }\n limit: {{ if .limit }}{{ .limit }}{{ else }}100{{ end }}\n orderBy: [datetimeMinute_ASC]\n ) {\n dimensions {\n datetime: datetimeMinute\n queryName\n queryType\n responseCode\n responseCached\n coloName\n ipVersion\n protocol\n }\n sum {\n countNotCachedAndNotStale\n countStale\n }\n count\n }\n }\n }\n}\n" + x-stackql-protocol: graphql + parameters: + - name: zone_tag + in: path + required: true + schema: + type: string + description: Cloudflare zone ID (the 32-char hex tag). + - name: since + in: query + required: true + schema: + type: string + format: date-time + description: Lower bound (inclusive). RFC3339. + - name: until + in: query + required: true + schema: + type: string + format: date-time + description: Upper bound (exclusive). RFC3339. + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + description: Maximum dimension-tuple rows per call. + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + datetime: + type: string + format: date-time + query_name: + type: string + description: DNS query name (no trailing dot). + query_type: + type: string + description: DNS query type (A + AAAA: null + MX: null + etc.).: null + response_code: + type: string + description: DNS response code (NOERROR + NXDOMAIN: null + etc.).: null + response_cached: + type: string + description: Whether the response was served from cache. + colo_name: + type: string + description: IATA code of the Cloudflare colo. + ip_version: + type: string + description: IPv4 / IPv6. + protocol: + type: string + description: Transport protocol (UDP / TCP / DoH / DoT). + queries: + type: integer + description: Total DNS queries for this dimension tuple. + queries_not_cached_not_stale: + type: integer + description: Queries served fresh (not cache + not stale).: null + queries_stale: + type: integer + description: Queries served from stale cache. components: schemas: dnsAnalyticsDimensions: @@ -8848,3 +8944,27 @@ components: update: [] delete: [] replace: [] + dns_analytics_adaptive_groups: + id: cloudflare.dns.dns_analytics_adaptive_groups + name: dns_analytics_adaptive_groups + title: Dns Analytics Adaptive Groups + methods: + list: + operation: + $ref: '#/paths/~1graphql~1dns_analytics_adaptive_groups/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + transform: + type: golang_template_json_v0.3.0 + body: "{\n \"result\": [\n {{- $data := index . \"data\" }}\n {{- if $data }}\n {{- $viewer := index $data \"viewer\" }}\n {{- $zones := index $viewer \"zones\" }}\n {{- if and $zones (gt (len $zones) 0) }}\n {{- $rows := index (index $zones 0) \"dnsAnalyticsAdaptiveGroups\" }}\n {{- $first := true -}}\n {{- range $i, $row := $rows }}\n {{- if not $first }},{{ end }}{{- $first = false }}\n {\n \"datetime\": {{ toJson (index $row \"dimensions\" \"datetime\") }},\n \"query_name\": {{ toJson (index $row \"dimensions\" \"queryName\") }},\n \"query_type\": {{ toJson (index $row \"dimensions\" \"queryType\") }},\n \"response_code\": {{ toJson (index $row \"dimensions\" \"responseCode\") }},\n \"response_cached\": {{ toJson (index $row \"dimensions\" \"responseCached\") }},\n \"colo_name\": {{ toJson (index $row \"dimensions\"\ + \ \"coloName\") }},\n \"ip_version\": {{ toJson (index $row \"dimensions\" \"ipVersion\") }},\n \"protocol\": {{ toJson (index $row \"dimensions\" \"protocol\") }},\n \"queries\": {{ index $row \"count\" }},\n \"queries_not_cached_not_stale\": {{ index $row \"sum\" \"countNotCachedAndNotStale\" }},\n \"queries_stale\": {{ index $row \"sum\" \"countStale\" }}\n }\n {{- end }}\n {{- end }}\n {{- end }}\n ]\n}\n" + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/dns_analytics_adaptive_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/firewall.yaml b/providers/src/cloudflare/v00.00.00000/services/firewall.yaml index 1522e33d..5980911b 100644 --- a/providers/src/cloudflare/v00.00.00000/services/firewall.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/firewall.yaml @@ -1,7260 +1,7106 @@ -openapi: 3.0.3 -info: - title: firewall API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /user/firewall/access_rules/rules: - get: - description: >- - Fetches IP Access rules of the user. You can filter the results using - several optional parameters. - operationId: ip-access-rules-for-a-user-list-ip-access-rules - parameters: - - in: query - name: mode - schema: - $ref: '#/components/schemas/firewallSchemasMode' - - in: query - name: configuration.target - schema: - description: Defines the target to search in existing rules. - enum: - - ip - - ip_range - - asn - - country - type: string - - in: query - name: configuration.value - schema: - description: >- - Defines the target value to search for in existing rules: an IP - address, an IP address range, or a country code, depending on the - provided `configuration.target`. Notes: You can search for a - single IPv4 address, an IP address range with a subnet of '/16' or - '/24', or a two-letter ISO-3166-1 alpha-2 country code. - type: string - - in: query - name: notes - schema: - description: >- - Defines the string to search for in the notes of existing IP - Access rules. Notes: For example, the string 'attack' would match - IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The - search is case insensitive. - type: string - - in: query - name: match - schema: - default: all - description: >- - Defines the search requirements. When set to `all`, all the search - requirements must match. When set to `any`, only one of the search - requirements has to match. - enum: - - any - - all - type: string - - in: query - name: page - schema: - description: Defines the requested page within paginated list of results. - type: number - - in: query - name: per_page - schema: - description: Defines the maximum number of results requested. - type: number - - in: query - name: order - schema: - description: Defines the field used to sort returned rules. - enum: - - configuration.target - - configuration.value - - mode - type: string - - in: query - name: direction - schema: - description: Defines the direction used to sort returned rules. - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallRuleCollectionResponse' - description: List IP Access rules response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallRule' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List IP Access rules response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List IP Access rules - tags: - - IP Access rules for a user - x-api-token-group: - - Account Firewall Access Rules Write - - Account Firewall Access Rules Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - post: - description: >- - Creates a new IP Access rule for all zones owned by the current user. - Note: To create an IP Access rule that applies to a specific zone, refer - to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) - endpoints. - operationId: ip-access-rules-for-a-user-create-an-ip-access-rule - requestBody: - content: - application/json: - schema: - properties: - configuration: - $ref: '#/components/schemas/firewallConfiguration' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - notes: - $ref: '#/components/schemas/firewallNotes' - default: '' - required: - - mode - - configuration - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallRuleSingleResponse' - description: Create an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - properties: - allowed_modes: - description: >- - The available actions that a rule can apply to a - matched request. - items: - $ref: '#/components/schemas/firewallSchemasMode' - readOnly: true - type: array - configuration: - $ref: '#/components/schemas/firewallConfiguration' - created_on: - description: The timestamp of when the rule was created. - format: date-time - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - modified_on: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - type: string - notes: - $ref: '#/components/schemas/firewallNotes' - required: - - id - - mode - - allowed_modes - - configuration - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create an IP Access rule - tags: - - IP Access rules for a user - x-api-token-group: - - Account Firewall Access Rules Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /user/firewall/access_rules/rules/{rule_id}: - delete: - description: >- - Deletes an IP Access rule at the user level. Note: Deleting a user-level - rule will affect all zones owned by the user. - operationId: ip-access-rules-for-a-user-delete-an-ip-access-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallRuleSingleIdResponse' - description: Delete an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - properties: - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an IP Access rule - tags: - - IP Access rules for a user - x-api-token-group: - - Account Firewall Access Rules Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - patch: - description: >- - Updates an IP Access rule defined at the user level. You can only update - the rule action (`mode` parameter) and notes. - operationId: ip-access-rules-for-a-user-update-an-ip-access-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - mode: - $ref: '#/components/schemas/firewallSchemasMode' - notes: - $ref: '#/components/schemas/firewallNotes' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallRuleSingleResponse' - description: Update an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - properties: - allowed_modes: - description: >- - The available actions that a rule can apply to a - matched request. - items: - $ref: '#/components/schemas/firewallSchemasMode' - readOnly: true - type: array - configuration: - $ref: '#/components/schemas/firewallConfiguration' - created_on: - description: The timestamp of when the rule was created. - format: date-time - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - modified_on: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - type: string - notes: - $ref: '#/components/schemas/firewallNotes' - required: - - id - - mode - - allowed_modes - - configuration - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an IP Access rule - tags: - - IP Access rules for a user - x-api-token-group: - - Account Firewall Access Rules Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/firewall/lockdowns: - get: - description: >- - Fetches Zone Lockdown rules. You can filter the results using several - optional parameters. - operationId: zone-lockdown-list-zone-lockdown-rules - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: description - schema: - $ref: '#/components/schemas/firewallSchemasDescriptionSearch' - - in: query - name: modified_on - schema: - $ref: '#/components/schemas/firewallModifiedOn' - - in: query - name: ip - schema: - $ref: '#/components/schemas/firewallIpSearch' - - in: query - name: priority - schema: - $ref: '#/components/schemas/firewallSchemasPriority' - - in: query - name: uri_search - schema: - $ref: '#/components/schemas/firewallUriSearch' - - in: query - name: ip_range_search - schema: - $ref: '#/components/schemas/firewallIpRangeSearch' - - in: query - name: per_page - schema: - default: 20 - description: >- - The maximum number of results per page. You can only set the value - to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`. - maximum: 1000 - minimum: 1 - type: number - - in: query - name: created_on - schema: - description: The timestamp of when the rule was created. - format: date-time - type: string - - in: query - name: description_search - schema: - description: A string to search for in the description of existing rules. - type: string - - in: query - name: ip_search - schema: - description: A single IP address to search for in existing rules. - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallZonelockdownResponseCollection' - description: List Zone Lockdown rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallZonelockdown' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: List Zone Lockdown rules response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Zone Lockdown rules - tags: - - Zone Lockdown - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - lockdowns - method: list - post: - description: Creates a new Zone Lockdown rule. - operationId: zone-lockdown-create-a-zone-lockdown-rule - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - configurations: - $ref: '#/components/schemas/firewallConfigurations' - description: - $ref: '#/components/schemas/firewallDescription' - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - priority: - $ref: '#/components/schemas/firewallSchemasPriority' - urls: - $ref: '#/components/schemas/firewallUrls' - required: - - urls - - configurations - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallZonelockdownResponseSingle' - description: Create a Zone Lockdown rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - properties: - configurations: - $ref: '#/components/schemas/firewallConfigurations' - created_on: - $ref: '#/components/schemas/firewallCreatedOn' - readOnly: true - description: - $ref: >- - #/components/schemas/firewallLockdownsComponentsSchemasDescription - id: - $ref: >- - #/components/schemas/firewallLockdownsComponentsSchemasId - modified_on: - $ref: '#/components/schemas/firewallModifiedOn' - readOnly: true - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - urls: - $ref: '#/components/schemas/firewallSchemasUrls' - required: - - id - - created_on - - modified_on - - paused - - description - - urls - - configurations - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Create a Zone Lockdown rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a Zone Lockdown rule - tags: - - Zone Lockdown - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - lockdowns - method: create - /zones/{zone_id}/firewall/lockdowns/{lock_downs_id}: - delete: - description: Deletes an existing Zone Lockdown rule. - operationId: zone-lockdown-delete-a-zone-lockdown-rule - parameters: - - in: path - name: lock_downs_id - schema: - $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - id: - $ref: >- - #/components/schemas/firewallLockdownsComponentsSchemasId - type: object - type: object - description: Delete a Zone Lockdown rule response - 4XX: - content: - application/json: - schema: - properties: - result: - properties: - id: - $ref: >- - #/components/schemas/firewallLockdownsComponentsSchemasId - type: object - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - description: Delete a Zone Lockdown rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a Zone Lockdown rule - tags: - - Zone Lockdown - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - lockdowns - method: delete - get: - description: Fetches the details of a Zone Lockdown rule. - operationId: zone-lockdown-get-a-zone-lockdown-rule - parameters: - - in: path - name: lock_downs_id - schema: - $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallZonelockdownResponseSingle' - description: Get a Zone Lockdown rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - properties: - configurations: - $ref: '#/components/schemas/firewallConfigurations' - created_on: - $ref: '#/components/schemas/firewallCreatedOn' - readOnly: true - description: - $ref: >- - #/components/schemas/firewallLockdownsComponentsSchemasDescription - id: - $ref: >- - #/components/schemas/firewallLockdownsComponentsSchemasId - modified_on: - $ref: '#/components/schemas/firewallModifiedOn' - readOnly: true - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - urls: - $ref: '#/components/schemas/firewallSchemasUrls' - required: - - id - - created_on - - modified_on - - paused - - description - - urls - - configurations - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Get a Zone Lockdown rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a Zone Lockdown rule - tags: - - Zone Lockdown - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - lockdowns - method: get - put: - description: Updates an existing Zone Lockdown rule. - operationId: zone-lockdown-update-a-zone-lockdown-rule - parameters: - - in: path - name: lock_downs_id - schema: - $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - configurations: - $ref: '#/components/schemas/firewallConfigurations' - urls: - $ref: '#/components/schemas/firewallUrls' - required: - - urls - - configurations - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallZonelockdownResponseSingle' - description: Update a Zone Lockdown rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - properties: - configurations: - $ref: '#/components/schemas/firewallConfigurations' - created_on: - $ref: '#/components/schemas/firewallCreatedOn' - readOnly: true - description: - $ref: >- - #/components/schemas/firewallLockdownsComponentsSchemasDescription - id: - $ref: >- - #/components/schemas/firewallLockdownsComponentsSchemasId - modified_on: - $ref: '#/components/schemas/firewallModifiedOn' - readOnly: true - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - urls: - $ref: '#/components/schemas/firewallSchemasUrls' - required: - - id - - created_on - - modified_on - - paused - - description - - urls - - configurations - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Update a Zone Lockdown rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a Zone Lockdown rule - tags: - - Zone Lockdown - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - lockdowns - method: update - /zones/{zone_id}/firewall/rules: - delete: - deprecated: true - description: Deletes existing firewall rules. - operationId: firewall-rules-delete-firewall-rules - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/firewallFilterRulesResponseCollectionDelete - description: Delete firewall rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallFilterRuleResponse' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Delete firewall rules response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete firewall rules - tags: - - Firewall rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - get: - deprecated: true - description: >- - Fetches firewall rules in a zone. You can filter the results using - several optional parameters. - operationId: firewall-rules-list-firewall-rules - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: description - schema: - description: A case-insensitive string to find in the description. - type: string - - in: query - name: action - schema: - description: The action to search for. Must be an exact match. - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 25 - description: Number of firewall rules per page. - maximum: 100 - minimum: 5 - type: number - - in: query - name: id - schema: - description: The unique identifier of the firewall rule. - maxLength: 32 - type: string - - in: query - name: paused - schema: - description: When true, indicates that the firewall rule is currently paused. - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFilterRulesResponseCollection' - description: List firewall rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallFilterRuleResponse' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: List firewall rules response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List firewall rules - tags: - - Firewall rules - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - rules - method: create - patch: - deprecated: true - description: Updates the priority of existing firewall rules. - operationId: firewall-rules-update-priority-of-firewall-rules - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFilterRulesResponseCollection' - description: Update priority of firewall rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallFilterRuleResponse' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Update priority of firewall rules response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update priority of firewall rules - tags: - - Firewall rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - post: - deprecated: true - description: Create one or more firewall rules. - operationId: firewall-rules-create-firewall-rules - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - action: - $ref: '#/components/schemas/firewallAction' - filter: - $ref: '#/components/schemas/firewallFilter' - required: - - filter - - action - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFilterRulesResponseCollection' - description: Create firewall rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallFilterRuleResponse' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Create firewall rules response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create firewall rules - tags: - - Firewall rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - put: - deprecated: true - description: Updates one or more existing firewall rules. - operationId: firewall-rules-update-firewall-rules - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: {} - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFilterRulesResponseCollection' - description: Update firewall rules response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallFilterRuleResponse' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Update firewall rules response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update firewall rules - tags: - - Firewall rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/firewall/rules/{rule_id}: - delete: - deprecated: true - description: Deletes an existing firewall rule. - operationId: firewall-rules-delete-a-firewall-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFilterRulesSingleResponseDelete' - description: Delete a firewall rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - type: object - properties: - action: - $ref: '#/components/schemas/firewallSchemasAction' - description: - $ref: >- - #/components/schemas/firewallFirewallRulesComponentsSchemasDescription - id: - $ref: >- - #/components/schemas/firewallFirewallRulesComponentsSchemasId - paused: - $ref: '#/components/schemas/firewallComponentsSchemasPaused' - priority: - $ref: '#/components/schemas/firewallComponentsSchemasPriority' - products: - $ref: '#/components/schemas/firewallProducts' - ref: - $ref: '#/components/schemas/firewallRef' - filter: - type: object - properties: - description: - $ref: >- - #/components/schemas/firewallFiltersComponentsSchemasDescription - expression: - $ref: '#/components/schemas/firewallExpression' - id: - $ref: >- - #/components/schemas/firewallFiltersComponentsSchemasId - paused: - $ref: >- - #/components/schemas/firewallFiltersComponentsSchemasPaused - ref: - $ref: '#/components/schemas/firewallSchemasRef' - deleted: - $ref: '#/components/schemas/firewallDeleted' - required: - - id - - deleted - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Delete a firewall rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a firewall rule - tags: - - Firewall rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - rules - method: delete - get: - deprecated: true - description: Fetches the details of a firewall rule. - operationId: firewall-rules-get-a-firewall-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFilterRulesSingleResponse' - description: Get a firewall rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - type: object - properties: - action: - $ref: '#/components/schemas/firewallSchemasAction' - description: - $ref: >- - #/components/schemas/firewallFirewallRulesComponentsSchemasDescription - id: - $ref: >- - #/components/schemas/firewallFirewallRulesComponentsSchemasId - paused: - $ref: '#/components/schemas/firewallComponentsSchemasPaused' - priority: - $ref: '#/components/schemas/firewallComponentsSchemasPriority' - products: - $ref: '#/components/schemas/firewallProducts' - ref: - $ref: '#/components/schemas/firewallRef' - filter: - type: object - properties: - description: - $ref: >- - #/components/schemas/firewallFiltersComponentsSchemasDescription - expression: - $ref: '#/components/schemas/firewallExpression' - id: - $ref: >- - #/components/schemas/firewallFiltersComponentsSchemasId - paused: - $ref: >- - #/components/schemas/firewallFiltersComponentsSchemasPaused - ref: - $ref: '#/components/schemas/firewallSchemasRef' - deleted: - $ref: '#/components/schemas/firewallDeleted' - required: - - id - - deleted - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Get a firewall rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a firewall rule - tags: - - Firewall rules - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - rules - method: edit - patch: - deprecated: true - description: Updates the priority of an existing firewall rule. - operationId: firewall-rules-update-priority-of-a-firewall-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - id: - $ref: '#/components/schemas/firewallComponentsSchemasIdentifier' - required: - - id - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFilterRulesResponseCollection' - description: Update priority of a firewall rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallFilterRuleResponse' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Update priority of a firewall rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update priority of a firewall rule - tags: - - Firewall rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - put: - deprecated: true - description: Updates an existing firewall rule. - operationId: firewall-rules-update-a-firewall-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - action: - $ref: '#/components/schemas/firewallAction' - filter: - $ref: '#/components/schemas/firewallFilter' - id: - $ref: '#/components/schemas/firewallComponentsSchemasIdentifier' - required: - - id - - filter - - action - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFilterRulesSingleResponse' - description: Update a firewall rule response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - type: object - properties: - action: - $ref: '#/components/schemas/firewallSchemasAction' - description: - $ref: >- - #/components/schemas/firewallFirewallRulesComponentsSchemasDescription - id: - $ref: >- - #/components/schemas/firewallFirewallRulesComponentsSchemasId - paused: - $ref: '#/components/schemas/firewallComponentsSchemasPaused' - priority: - $ref: '#/components/schemas/firewallComponentsSchemasPriority' - products: - $ref: '#/components/schemas/firewallProducts' - ref: - $ref: '#/components/schemas/firewallRef' - filter: - type: object - properties: - description: - $ref: >- - #/components/schemas/firewallFiltersComponentsSchemasDescription - expression: - $ref: '#/components/schemas/firewallExpression' - id: - $ref: >- - #/components/schemas/firewallFiltersComponentsSchemasId - paused: - $ref: >- - #/components/schemas/firewallFiltersComponentsSchemasPaused - ref: - $ref: '#/components/schemas/firewallSchemasRef' - deleted: - $ref: '#/components/schemas/firewallDeleted' - required: - - id - - deleted - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Update a firewall rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a firewall rule - tags: - - Firewall rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - rules - method: update - /zones/{zone_id}/firewall/ua_rules: - get: - description: >- - Fetches User Agent Blocking rules in a zone. You can filter the results - using several optional parameters. - operationId: user-agent-blocking-rules-list-user-agent-blocking-rules - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: description - schema: - $ref: '#/components/schemas/firewallDescriptionSearch' - - in: query - name: per_page - schema: - default: 20 - description: >- - The maximum number of results per page. You can only set the value - to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`. - maximum: 1000 - minimum: 1 - type: number - - in: query - name: user_agent - schema: - description: A string to search for in the user agent values of existing rules. - type: string - - in: query - name: paused - schema: - description: When true, indicates that the rule is currently paused. - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFirewalluablockResponseCollection' - description: List User Agent Blocking rules response - 4XX: - content: - application/json: - schema: - properties: - result: - items: - $ref: '#/components/schemas/firewallFirewalluablock' - type: object - type: array - enum: - - null - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List User Agent Blocking rules response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List User Agent Blocking rules - tags: - - User Agent Blocking rules - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - ua_rules - method: list - post: - description: Creates a new User Agent Blocking rule in a zone. - operationId: user-agent-blocking-rules-create-a-user-agent-blocking-rule - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - configuration: - $ref: '#/components/schemas/firewallUaConfiguration' - description: - $ref: '#/components/schemas/firewallDescription' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - required: - - mode - - configuration - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFirewalluablockResponseSingle' - description: Create a User Agent Blocking rule response - 4XX: - content: - application/json: - schema: - properties: - result: - properties: - configuration: - $ref: '#/components/schemas/firewallSchemasConfiguration' - description: - $ref: >- - #/components/schemas/firewallFirewalluablockComponentsSchemasDescription - id: - $ref: '#/components/schemas/firewallComponentsUaRuleId' - mode: - $ref: '#/components/schemas/firewallComponentsSchemasMode' - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - type: object - enum: - - null - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create a User Agent Blocking rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a User Agent Blocking rule - tags: - - User Agent Blocking rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - ua_rules - method: create - /zones/{zone_id}/firewall/ua_rules/{ua_rule_id}: - delete: - description: Deletes an existing User Agent Blocking rule. - operationId: user-agent-blocking-rules-delete-a-user-agent-blocking-rule - parameters: - - in: path - name: ua_rule_id - schema: - $ref: '#/components/schemas/firewallComponentsUaRuleId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - id: - $ref: '#/components/schemas/firewallComponentsUaRuleId' - configuration: - $ref: '#/components/schemas/firewallSchemasConfiguration' - description: - $ref: >- - #/components/schemas/firewallFirewalluablockComponentsSchemasDescription - mode: - $ref: '#/components/schemas/firewallComponentsSchemasMode' - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - type: object - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - type: boolean - type: object - required: - - success - - errors - - messages - - result - description: Delete a User Agent Blocking rule response - 4XX: - content: - application/json: - schema: - properties: - result: - properties: - configuration: - $ref: '#/components/schemas/firewallSchemasConfiguration' - description: - $ref: >- - #/components/schemas/firewallFirewalluablockComponentsSchemasDescription - id: - $ref: '#/components/schemas/firewallComponentsUaRuleId' - mode: - $ref: '#/components/schemas/firewallComponentsSchemasMode' - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - type: object - enum: - - null - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete a User Agent Blocking rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a User Agent Blocking rule - tags: - - User Agent Blocking rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - ua_rules - method: delete - get: - description: Fetches the details of a User Agent Blocking rule. - operationId: user-agent-blocking-rules-get-a-user-agent-blocking-rule - parameters: - - in: path - name: ua_rule_id - schema: - $ref: '#/components/schemas/firewallComponentsUaRuleId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFirewalluablockResponseSingle' - description: Get a User Agent Blocking rule response - 4XX: - content: - application/json: - schema: - properties: - result: - properties: - configuration: - $ref: '#/components/schemas/firewallSchemasConfiguration' - description: - $ref: >- - #/components/schemas/firewallFirewalluablockComponentsSchemasDescription - id: - $ref: '#/components/schemas/firewallComponentsUaRuleId' - mode: - $ref: '#/components/schemas/firewallComponentsSchemasMode' - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - type: object - enum: - - null - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get a User Agent Blocking rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a User Agent Blocking rule - tags: - - User Agent Blocking rules - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - ua_rules - method: get - put: - description: Updates an existing User Agent Blocking rule. - operationId: user-agent-blocking-rules-update-a-user-agent-blocking-rule - parameters: - - in: path - name: ua_rule_id - schema: - $ref: '#/components/schemas/firewallComponentsUaRuleId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - configuration: - $ref: '#/components/schemas/firewallConfiguration' - description: - $ref: '#/components/schemas/firewallDescription' - id: - $ref: '#/components/schemas/firewallComponentsSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - required: - - id - - mode - - configuration - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallFirewalluablockResponseSingle' - description: Update a User Agent Blocking rule response - 4XX: - content: - application/json: - schema: - properties: - result: - properties: - configuration: - $ref: '#/components/schemas/firewallSchemasConfiguration' - description: - $ref: >- - #/components/schemas/firewallFirewalluablockComponentsSchemasDescription - id: - $ref: '#/components/schemas/firewallComponentsUaRuleId' - mode: - $ref: '#/components/schemas/firewallComponentsSchemasMode' - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - type: object - enum: - - null - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update a User Agent Blocking rule response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a User Agent Blocking rule - tags: - - User Agent Blocking rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - ua_rules - method: update - /zones/{zone_id}/firewall/waf/overrides: - get: - deprecated: true - description: >- - Fetches the URI-based WAF overrides in a zone. **Note:** Applies only to - the [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-overrides-list-waf-overrides - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: The page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 50 - description: The number of WAF overrides per page. - maximum: 100 - minimum: 5 - type: number - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallOverrideResponseCollection' - description: List WAF overrides response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallOverride' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: List WAF overrides response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List WAF overrides - tags: - - WAF overrides - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - overrides - method: list - post: - deprecated: true - description: >- - Creates a URI-based WAF override for a zone. **Note:** Applies only to - the [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-overrides-create-a-waf-override - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - urls: - $ref: '#/components/schemas/firewallUrls' - required: - - urls - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallOverrideResponseSingle' - description: Create a WAF override response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - properties: - description: - $ref: >- - #/components/schemas/firewallComponentsSchemasDescription - groups: - $ref: '#/components/schemas/firewallGroups' - id: - $ref: '#/components/schemas/firewallOverridesId' - paused: - $ref: '#/components/schemas/firewallPaused' - priority: - $ref: '#/components/schemas/firewallPriority' - rewrite_action: - $ref: '#/components/schemas/firewallRewriteAction' - rules: - $ref: '#/components/schemas/firewallRules' - urls: - $ref: '#/components/schemas/firewallUrls' - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Create a WAF override response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a WAF override - tags: - - WAF overrides - x-api-token-group: - - Zone Settings Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - overrides - method: create - /zones/{zone_id}/firewall/waf/overrides/{overrides_id}: - delete: - deprecated: true - description: >- - Deletes an existing URI-based WAF override. **Note:** Applies only to - the [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-overrides-delete-a-waf-override - parameters: - - in: path - name: overrides_id - schema: - $ref: '#/components/schemas/firewallOverridesId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - id: - $ref: '#/components/schemas/firewallOverridesId' - type: object - type: object - description: Delete a WAF override response - 4XX: - content: - application/json: - schema: - properties: - result: - properties: - id: - $ref: '#/components/schemas/firewallOverridesId' - type: object - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - false - type: boolean - type: object - required: - - success - - errors - - messages - - result - description: Delete a WAF override response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a WAF override - tags: - - WAF overrides - x-api-token-group: - - Zone Settings Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - overrides - method: delete - get: - deprecated: true - description: >- - Fetches the details of a URI-based WAF override. **Note:** Applies only - to the [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-overrides-get-a-waf-override - parameters: - - in: path - name: overrides_id - schema: - $ref: '#/components/schemas/firewallOverridesId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallOverrideResponseSingle' - description: Get a WAF override response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - properties: - description: - $ref: >- - #/components/schemas/firewallComponentsSchemasDescription - groups: - $ref: '#/components/schemas/firewallGroups' - id: - $ref: '#/components/schemas/firewallOverridesId' - paused: - $ref: '#/components/schemas/firewallPaused' - priority: - $ref: '#/components/schemas/firewallPriority' - rewrite_action: - $ref: '#/components/schemas/firewallRewriteAction' - rules: - $ref: '#/components/schemas/firewallRules' - urls: - $ref: '#/components/schemas/firewallUrls' - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Get a WAF override response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a WAF override - tags: - - WAF overrides - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - overrides - method: get - put: - deprecated: true - description: >- - Updates an existing URI-based WAF override. **Note:** Applies only to - the [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-overrides-update-waf-override - parameters: - - in: path - name: overrides_id - schema: - $ref: '#/components/schemas/firewallOverridesId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - id: - $ref: '#/components/schemas/firewallIdentifier' - rewrite_action: - $ref: '#/components/schemas/firewallRewriteAction' - rules: - $ref: '#/components/schemas/firewallRules' - urls: - $ref: '#/components/schemas/firewallUrls' - required: - - id - - urls - - rules - - rewrite_action - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallOverrideResponseSingle' - description: Update WAF override response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - properties: - description: - $ref: >- - #/components/schemas/firewallComponentsSchemasDescription - groups: - $ref: '#/components/schemas/firewallGroups' - id: - $ref: '#/components/schemas/firewallOverridesId' - paused: - $ref: '#/components/schemas/firewallPaused' - priority: - $ref: '#/components/schemas/firewallPriority' - rewrite_action: - $ref: '#/components/schemas/firewallRewriteAction' - rules: - $ref: '#/components/schemas/firewallRules' - urls: - $ref: '#/components/schemas/firewallUrls' - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - result - - success - - errors - - messages - - result - description: Update WAF override response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update WAF override - tags: - - WAF overrides - x-api-token-group: - - Zone Settings Write - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - overrides - method: update - /zones/{zone_id}/firewall/waf/packages: - get: - deprecated: true - description: >- - Fetches WAF packages for a zone. **Note:** Applies only to the [previous - version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-packages-list-waf-packages - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - description: The page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 50 - description: The number of packages per page. - maximum: 100 - minimum: 5 - type: number - - in: query - name: order - schema: - description: The field used to sort returned packages. - enum: - - name - type: string - - in: query - name: direction - schema: - description: The direction used to sort returned packages. - enum: - - asc - - desc - type: string - - in: query - name: match - schema: - default: all - description: >- - When set to `all`, all the search requirements must match. When - set to `any`, only one of the search requirements has to match. - enum: - - any - - all - type: string - - in: query - name: name - schema: - description: The name of the WAF package. - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallPackageResponseCollection' - description: List WAF packages response - 4XX: - content: - application/json: - schema: - properties: - errors: - minLength: 1 - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Defines whether the API call was successful. - enum: - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - errors - - messages - - result - - success - type: object - description: List WAF packages response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List WAF packages - tags: - - WAF packages - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - packages - method: list - /zones/{zone_id}/firewall/waf/packages/{package_id}: - get: - deprecated: true - description: >- - Fetches the details of a WAF package. **Note:** Applies only to the - [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-packages-get-a-waf-package - parameters: - - in: path - name: package_id - schema: - $ref: '#/components/schemas/firewallPackageId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallPackageResponseSingle' - description: Get a WAF package response - 4XX: - content: - application/json: - schema: - properties: - errors: - minLength: 1 - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Defines whether the API call was successful. - enum: - - false - type: boolean - required: - - errors - - messages - - result - - success - type: object - description: Get a WAF package response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a WAF package - tags: - - WAF packages - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - packages - method: get - patch: - deprecated: true - description: >- - Updates a WAF package. You can update the sensitivity and the action of - an anomaly detection WAF package. **Note:** Applies only to the - [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-packages-update-a-waf-package - parameters: - - in: path - name: package_id - schema: - $ref: '#/components/schemas/firewallPackageId' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - action_mode: - $ref: '#/components/schemas/firewallActionMode' - sensitivity: - $ref: '#/components/schemas/firewallSensitivity' - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - $ref: '#/components/schemas/firewallAnomalyPackage' - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - type: boolean - type: object - required: - - errors - - success - - result - - messages - description: Update a WAF package response - 4XX: - content: - application/json: - schema: - properties: - result: - required: - - id - - name - - description - - detection_mode - - zone_id - title: Anomaly detection WAF package (OWASP) - properties: - description: - description: A summary of the purpose/function of the WAF package. - readOnly: true - type: string - detection_mode: - description: >- - When a WAF package uses anomaly detection, each rule - is given a score when triggered. If the total score of - all triggered rules exceeds the sensitivity defined on - the WAF package, the action defined on the package - will be taken. - enum: - - anomaly - - traditional - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallIdentifier' - name: - description: The name of the WAF package. - readOnly: true - type: string - status: - $ref: '#/components/schemas/firewallStatus' - zone_id: - $ref: '#/components/schemas/firewallIdentifier' - action_mode: - $ref: '#/components/schemas/firewallActionMode' - sensitivity: - $ref: '#/components/schemas/firewallSensitivity' - type: object - enum: - - null - errors: - minLength: 1 - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - false - type: boolean - required: - - errors - - messages - - result - - success - type: object - description: Update a WAF package response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a WAF package - tags: - - WAF packages - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - /zones/{zone_id}/firewall/waf/packages/{package_id}/groups: - get: - deprecated: true - description: >- - Fetches the WAF rule groups in a WAF package. **Note:** Applies only to - the [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-rule-groups-list-waf-rule-groups - parameters: - - in: path - name: package_id - schema: - $ref: '#/components/schemas/wafManagedRulesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: mode - schema: - $ref: '#/components/schemas/wafManagedRulesMode' - - in: query - name: page - schema: - default: 1 - description: Defines the page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 50 - description: Defines the number of rule groups per page. - maximum: 100 - minimum: 5 - type: number - - in: query - name: order - schema: - description: Defines the field used to sort returned rule groups. - enum: - - mode - - rules_count - type: string - - in: query - name: direction - schema: - description: Defines the direction used to sort returned rule groups. - enum: - - asc - - desc - type: string - - in: query - name: match - schema: - default: all - description: >- - Defines the condition for search requirements. When set to `all`, - all the search requirements must match. When set to `any`, only - one of the search requirements has to match. - enum: - - any - - all - type: string - - in: query - name: name - schema: - description: Defines the name of the rule group. - type: string - - in: query - name: rules_count - schema: - default: 0 - description: Defines the number of rules in the current rule group. - type: number - responses: - '200': - content: - application/json: - schema: - $ref: >- - #/components/schemas/wafManagedRulesRuleGroupResponseCollection - description: Defines the list WAF rule groups response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/wafManagedRulesResultInfo' - result: - items: - $ref: '#/components/schemas/wafManagedRulesSchemasGroup' - type: array - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Defines the list WAF rule groups response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List WAF rule groups - tags: - - WAF rule groups - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - packages - - groups - method: list - /zones/{zone_id}/firewall/waf/packages/{package_id}/groups/{group_id}: - get: - deprecated: true - description: >- - Fetches the details of a WAF rule group. **Note:** Applies only to the - [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-rule-groups-get-a-waf-rule-group - parameters: - - name: group_id - in: path - required: true - description: The Access group ID. - schema: - type: string - - in: path - name: package_id - schema: - $ref: '#/components/schemas/wafManagedRulesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/wafManagedRulesRuleGroupResponseSingle' - description: Get a WAF rule group response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result: - type: object - enum: - - null - nullable: true - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get a WAF rule group response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a WAF rule group - tags: - - WAF rule groups - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - packages - - groups - method: get - patch: - deprecated: true - description: >- - Updates a WAF rule group. You can update the state (`mode` parameter) of - a rule group. **Note:** Applies only to the [previous version of WAF - managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-rule-groups-update-a-waf-rule-group - parameters: - - name: group_id - in: path - required: true - description: The Access group ID. - schema: - type: string - - in: path - name: package_id - schema: - $ref: '#/components/schemas/wafManagedRulesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - mode: - $ref: '#/components/schemas/wafManagedRulesMode' - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/wafManagedRulesRuleGroupResponseSingle' - description: Update a WAF rule group response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result: - type: object - enum: - - null - nullable: true - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update a WAF rule group response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a WAF rule group - tags: - - WAF rule groups - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - packages - - groups - method: edit - /zones/{zone_id}/firewall/waf/packages/{package_id}/rules: - get: - deprecated: true - description: >- - Fetches WAF rules in a WAF package. **Note:** Applies only to the - [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-rules-list-waf-rules - parameters: - - in: path - name: package_id - schema: - $ref: '#/components/schemas/wafManagedRulesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: mode - schema: - description: Defines the action/mode a rule has been overridden to perform. - enum: - - DIS - - CHL - - BLK - - SIM - type: string - - in: query - name: group_id - schema: - $ref: '#/components/schemas/wafManagedRulesComponentsSchemasIdentifier' - - in: query - name: page - schema: - default: 1 - description: Defines the page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 50 - description: Defines the number of rules per page. - maximum: 100 - minimum: 5 - type: number - - in: query - name: order - schema: - description: Defines the field used to sort returned rules. - enum: - - priority - - group_id - - description - type: string - - in: query - name: direction - schema: - description: Defines the direction used to sort returned rules. - enum: - - asc - - desc - type: string - - in: query - name: match - schema: - default: all - description: >- - Defines the search requirements. When set to `all`, all the search - requirements must match. When set to `any`, only one of the search - requirements has to match. - enum: - - any - - all - type: string - - in: query - name: description - schema: - description: Defines the public description of the WAF rule. - type: string - - in: query - name: priority - schema: - description: >- - Defines the order in which the individual WAF rule is executed - within its rule group. - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/wafManagedRulesRuleResponseCollection' - description: List WAF rules response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/wafManagedRulesResultInfo' - result: - items: - $ref: '#/components/schemas/wafManagedRulesRule' - type: array - enum: - - null - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List WAF rules response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List WAF rules - tags: - - WAF rules - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - packages - - rules - method: list - /zones/{zone_id}/firewall/waf/packages/{package_id}/rules/{rule_id}: - get: - deprecated: true - description: >- - Fetches the details of a WAF rule in a WAF package. **Note:** Applies - only to the [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-rules-get-a-waf-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - in: path - name: package_id - schema: - $ref: '#/components/schemas/wafManagedRulesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/wafManagedRulesRuleResponseSingle' - description: Get a WAF rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result: - type: object - enum: - - null - nullable: true - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get a WAF rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get a WAF rule - tags: - - WAF rules - x-api-token-group: - - Firewall Services Write - - Firewall Services Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - packages - - rules - method: get - patch: - deprecated: true - description: >- - Updates a WAF rule. You can only update the mode/action of the rule. - **Note:** Applies only to the [previous version of WAF managed - rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). - operationId: waf-rules-update-a-waf-rule - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - in: path - name: package_id - schema: - $ref: '#/components/schemas/wafManagedRulesIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - mode: - description: >- - Defines the mode/action of the rule when triggered. You must - use a value from the `allowed_modes` array of the current - rule. - enum: - - default - - disable - - simulate - - block - - challenge - - 'on' - - 'off' - type: string - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - type: boolean - result: - type: object - title: Anomaly detection WAF rule - description: >- - When triggered, anomaly detection WAF rules contribute to - an overall threat score that will determine if a request - is considered malicious. You can configure the total - scoring threshold through the 'sensitivity' property of - the WAF package. - properties: - description: - $ref: '#/components/schemas/wafManagedRulesSchemasDescription' - group: - $ref: >- - #/components/schemas/unnamedSchemaRef532d8b97684c9032dd36bae8acddebf5 - id: - $ref: >- - #/components/schemas/wafManagedRulesRuleComponentsSchemasIdentifier - package_id: - $ref: '#/components/schemas/wafManagedRulesIdentifier' - priority: - $ref: '#/components/schemas/wafManagedRulesPriority' - allowed_modes: - $ref: >- - #/components/schemas/wafManagedRulesAllowedModesAnomaly - mode: - $ref: '#/components/schemas/wafManagedRulesModeAnomaly' - default_mode: - $ref: '#/components/schemas/wafManagedRulesDefaultMode' - required: - - allowed_modes - - description - - group - - id - - mode - - package_id - - priority - required: - - success - - errors - - messages - - result - description: Update a WAF rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result: - type: object - enum: - - null - title: Anomaly detection WAF rule - description: >- - When triggered, anomaly detection WAF rules contribute to - an overall threat score that will determine if a request - is considered malicious. You can configure the total - scoring threshold through the 'sensitivity' property of - the WAF package. - properties: - description: - $ref: '#/components/schemas/wafManagedRulesSchemasDescription' - group: - $ref: >- - #/components/schemas/unnamedSchemaRef532d8b97684c9032dd36bae8acddebf5 - id: - $ref: >- - #/components/schemas/wafManagedRulesRuleComponentsSchemasIdentifier - package_id: - $ref: '#/components/schemas/wafManagedRulesIdentifier' - priority: - $ref: '#/components/schemas/wafManagedRulesPriority' - allowed_modes: - $ref: >- - #/components/schemas/wafManagedRulesAllowedModesAnomaly - mode: - $ref: '#/components/schemas/wafManagedRulesModeAnomaly' - default_mode: - $ref: '#/components/schemas/wafManagedRulesDefaultMode' - required: - - allowed_modes - - description - - group - - id - - mode - - package_id - - priority - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update a WAF rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update a WAF rule - tags: - - WAF rules - x-api-token-group: - - Firewall Services Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - waf - - packages - - rules - method: edit - /accounts/{account_id}/firewall/access_rules/rules: - get: - description: >- - Fetches IP Access rules of an account or zone. These rules apply to all - the zones in the account or zone. You can filter the results using - several optional parameters. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: mode - schema: - $ref: '#/components/schemas/firewallSchemasMode' - - in: query - name: configuration.target - schema: - description: Defines the target to search in existing rules. - enum: - - ip - - ip_range - - asn - - country - type: string - - in: query - name: configuration.value - schema: - description: >- - Defines the target value to search for in existing rules: an IP - address, an IP address range, or a country code, depending on the - provided `configuration.target`. Notes: You can search for a - single IPv4 address, an IP address range with a subnet of '/16' or - '/24', or a two-letter ISO-3166-1 alpha-2 country code. - type: string - - in: query - name: notes - schema: - description: >- - Defines the string to search for in the notes of existing IP - Access rules. Notes: For example, the string 'attack' would match - IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The - search is case insensitive. - type: string - - in: query - name: match - schema: - default: all - description: >- - Defines the search requirements. When set to `all`, all the search - requirements must match. When set to `any`, only one of the search - requirements has to match. - enum: - - any - - all - type: string - - in: query - name: page - schema: - description: Defines the requested page within paginated list of results. - type: number - - in: query - name: per_page - schema: - description: Defines the maximum number of results requested. - type: number - - in: query - name: order - schema: - description: Defines the field used to sort returned rules. - enum: - - configuration.target - - configuration.value - - mode - type: string - - in: query - name: direction - schema: - description: Defines the direction used to sort returned rules. - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallResponseCollection' - description: List IP Access rules response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallSchemasRule' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List IP Access rules response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List IP Access rules - tags: [] - x-api-token-group: - - Account Firewall Access Rules Write - - Account Firewall Access Rules Read - x-cfPermissionsRequired: - enum: - - '#waf:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - access_rules - method: list - operationId: get_accounts_account_id_firewall_access_rules_rules - post: - description: >- - Creates a new IP Access rule for an account or zone. The rule will apply - to all zones in the account or zone. Note: To create an IP Access rule - that applies to a single zone, refer to the [IP Access rules for a - zone](#ip-access-rules-for-a-zone) endpoints. - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - configuration: - $ref: '#/components/schemas/firewallConfiguration' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - notes: - $ref: '#/components/schemas/firewallNotes' - default: '' - required: - - mode - - configuration - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallResponseSingle' - description: Create an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - required: - - id - - mode - - allowed_modes - - configuration - type: object - properties: - allowed_modes: - description: >- - The available actions that a rule can apply to a - matched request. - items: - $ref: '#/components/schemas/firewallSchemasMode' - readOnly: true - type: array - configuration: - $ref: '#/components/schemas/firewallConfiguration' - created_on: - description: The timestamp of when the rule was created. - format: date-time - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - modified_on: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - type: string - notes: - $ref: '#/components/schemas/firewallNotes' - scope: - description: >- - All zones owned by the user will have the rule - applied. - properties: - email: - $ref: '#/components/schemas/firewallEmail' - id: - $ref: '#/components/schemas/firewallIdentifier' - type: - description: Defines the scope of the rule. - enum: - - user - - organization - readOnly: true - type: string - readOnly: true - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create an IP Access rule - tags: [] - x-api-token-group: - - Account Firewall Access Rules Write - x-cfPermissionsRequired: - enum: - - '#waf:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - access_rules - method: create - operationId: post_accounts_account_id_firewall_access_rules_rules - /zones/{zone_id}/firewall/access_rules/rules: - get: - description: >- - Fetches IP Access rules of an account or zone. These rules apply to all - the zones in the account or zone. You can filter the results using - several optional parameters. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: mode - schema: - $ref: '#/components/schemas/firewallSchemasMode' - - in: query - name: configuration.target - schema: - description: Defines the target to search in existing rules. - enum: - - ip - - ip_range - - asn - - country - type: string - - in: query - name: configuration.value - schema: - description: >- - Defines the target value to search for in existing rules: an IP - address, an IP address range, or a country code, depending on the - provided `configuration.target`. Notes: You can search for a - single IPv4 address, an IP address range with a subnet of '/16' or - '/24', or a two-letter ISO-3166-1 alpha-2 country code. - type: string - - in: query - name: notes - schema: - description: >- - Defines the string to search for in the notes of existing IP - Access rules. Notes: For example, the string 'attack' would match - IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The - search is case insensitive. - type: string - - in: query - name: match - schema: - default: all - description: >- - Defines the search requirements. When set to `all`, all the search - requirements must match. When set to `any`, only one of the search - requirements has to match. - enum: - - any - - all - type: string - - in: query - name: page - schema: - description: Defines the requested page within paginated list of results. - type: number - - in: query - name: per_page - schema: - description: Defines the maximum number of results requested. - type: number - - in: query - name: order - schema: - description: Defines the field used to sort returned rules. - enum: - - configuration.target - - configuration.value - - mode - type: string - - in: query - name: direction - schema: - description: Defines the direction used to sort returned rules. - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallResponseCollection' - description: List IP Access rules response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallSchemasRule' - nullable: true - type: array - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List IP Access rules response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List IP Access rules - tags: [] - x-api-token-group: - - Account Firewall Access Rules Write - - Account Firewall Access Rules Read - x-cfPermissionsRequired: - enum: - - '#waf:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - access_rules - method: list - operationId: get_zones_zone_id_firewall_access_rules_rules - post: - description: >- - Creates a new IP Access rule for an account or zone. The rule will apply - to all zones in the account or zone. Note: To create an IP Access rule - that applies to a single zone, refer to the [IP Access rules for a - zone](#ip-access-rules-for-a-zone) endpoints. - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - configuration: - $ref: '#/components/schemas/firewallConfiguration' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - notes: - $ref: '#/components/schemas/firewallNotes' - default: '' - required: - - mode - - configuration - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallResponseSingle' - description: Create an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - required: - - id - - mode - - allowed_modes - - configuration - type: object - properties: - allowed_modes: - description: >- - The available actions that a rule can apply to a - matched request. - items: - $ref: '#/components/schemas/firewallSchemasMode' - readOnly: true - type: array - configuration: - $ref: '#/components/schemas/firewallConfiguration' - created_on: - description: The timestamp of when the rule was created. - format: date-time - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - modified_on: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - type: string - notes: - $ref: '#/components/schemas/firewallNotes' - scope: - description: >- - All zones owned by the user will have the rule - applied. - properties: - email: - $ref: '#/components/schemas/firewallEmail' - id: - $ref: '#/components/schemas/firewallIdentifier' - type: - description: Defines the scope of the rule. - enum: - - user - - organization - readOnly: true - type: string - readOnly: true - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create an IP Access rule - tags: [] - x-api-token-group: - - Account Firewall Access Rules Write - x-cfPermissionsRequired: - enum: - - '#waf:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - access_rules - method: create - operationId: post_zones_zone_id_firewall_access_rules_rules - /accounts/{account_id}/firewall/access_rules/rules/{rule_id}: - get: - description: Fetches the details of an IP Access rule defined. - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallResponseSingle' - description: Get an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - required: - - id - - mode - - allowed_modes - - configuration - type: object - properties: - allowed_modes: - description: >- - The available actions that a rule can apply to a - matched request. - items: - $ref: '#/components/schemas/firewallSchemasMode' - readOnly: true - type: array - configuration: - $ref: '#/components/schemas/firewallConfiguration' - created_on: - description: The timestamp of when the rule was created. - format: date-time - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - modified_on: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - type: string - notes: - $ref: '#/components/schemas/firewallNotes' - scope: - description: >- - All zones owned by the user will have the rule - applied. - properties: - email: - $ref: '#/components/schemas/firewallEmail' - id: - $ref: '#/components/schemas/firewallIdentifier' - type: - description: Defines the scope of the rule. - enum: - - user - - organization - readOnly: true - type: string - readOnly: true - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an IP Access rule - tags: [] - x-api-token-group: - - Account Firewall Access Rules Write - - Account Firewall Access Rules Read - x-cfPermissionsRequired: - enum: - - '#waf:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - access_rules - method: get - operationId: get_accounts_account_id_firewall_access_rules_rules_rule_id - delete: - description: >- - Deletes an existing IP Access rule defined. Note: This operation will - affect all zones in the account or zone. - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallApiResponseSingleId' - description: Delete an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/firewallIdentifier' - required: - - id - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an IP Access rule - tags: [] - x-api-token-group: - - Account Firewall Access Rules Write - x-cfPermissionsRequired: - enum: - - '#waf:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - access_rules - method: delete - operationId: delete_accounts_account_id_firewall_access_rules_rules_rule_id - patch: - description: >- - Updates an IP Access rule defined. Note: This operation will affect all - zones in the account or zone. - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/firewallSchemasRule' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallResponseSingle' - description: Update an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - required: - - id - - mode - - allowed_modes - - configuration - type: object - properties: - allowed_modes: - description: >- - The available actions that a rule can apply to a - matched request. - items: - $ref: '#/components/schemas/firewallSchemasMode' - readOnly: true - type: array - configuration: - $ref: '#/components/schemas/firewallConfiguration' - created_on: - description: The timestamp of when the rule was created. - format: date-time - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - modified_on: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - type: string - notes: - $ref: '#/components/schemas/firewallNotes' - scope: - description: >- - All zones owned by the user will have the rule - applied. - properties: - email: - $ref: '#/components/schemas/firewallEmail' - id: - $ref: '#/components/schemas/firewallIdentifier' - type: - description: Defines the scope of the rule. - enum: - - user - - organization - readOnly: true - type: string - readOnly: true - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an IP Access rule - tags: [] - x-api-token-group: - - Account Firewall Access Rules Write - x-cfPermissionsRequired: - enum: - - '#waf:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - access_rules - method: edit - operationId: patch_accounts_account_id_firewall_access_rules_rules_rule_id - /zones/{zone_id}/firewall/access_rules/rules/{rule_id}: - get: - description: Fetches the details of an IP Access rule defined. - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallResponseSingle' - description: Get an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - required: - - id - - mode - - allowed_modes - - configuration - type: object - properties: - allowed_modes: - description: >- - The available actions that a rule can apply to a - matched request. - items: - $ref: '#/components/schemas/firewallSchemasMode' - readOnly: true - type: array - configuration: - $ref: '#/components/schemas/firewallConfiguration' - created_on: - description: The timestamp of when the rule was created. - format: date-time - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - modified_on: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - type: string - notes: - $ref: '#/components/schemas/firewallNotes' - scope: - description: >- - All zones owned by the user will have the rule - applied. - properties: - email: - $ref: '#/components/schemas/firewallEmail' - id: - $ref: '#/components/schemas/firewallIdentifier' - type: - description: Defines the scope of the rule. - enum: - - user - - organization - readOnly: true - type: string - readOnly: true - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get an IP Access rule - tags: [] - x-api-token-group: - - Account Firewall Access Rules Write - - Account Firewall Access Rules Read - x-cfPermissionsRequired: - enum: - - '#waf:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - access_rules - method: get - operationId: get_zones_zone_id_firewall_access_rules_rules_rule_id - delete: - description: >- - Deletes an existing IP Access rule defined. Note: This operation will - affect all zones in the account or zone. - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallApiResponseSingleId' - description: Delete an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/firewallIdentifier' - required: - - id - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete an IP Access rule - tags: [] - x-api-token-group: - - Account Firewall Access Rules Write - x-cfPermissionsRequired: - enum: - - '#waf:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - access_rules - method: delete - operationId: delete_zones_zone_id_firewall_access_rules_rules_rule_id - patch: - description: >- - Updates an IP Access rule defined. Note: This operation will affect all - zones in the account or zone. - parameters: - - name: rule_id - in: path - required: true - description: The rule ID. - schema: - type: string - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/firewallSchemasRule' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/firewallResponseSingle' - description: Update an IP Access rule response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - required: - - id - - mode - - allowed_modes - - configuration - type: object - properties: - allowed_modes: - description: >- - The available actions that a rule can apply to a - matched request. - items: - $ref: '#/components/schemas/firewallSchemasMode' - readOnly: true - type: array - configuration: - $ref: '#/components/schemas/firewallConfiguration' - created_on: - description: The timestamp of when the rule was created. - format: date-time - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - modified_on: - description: The timestamp of when the rule was last modified. - format: date-time - readOnly: true - type: string - notes: - $ref: '#/components/schemas/firewallNotes' - scope: - description: >- - All zones owned by the user will have the rule - applied. - properties: - email: - $ref: '#/components/schemas/firewallEmail' - id: - $ref: '#/components/schemas/firewallIdentifier' - type: - description: Defines the scope of the rule. - enum: - - user - - organization - readOnly: true - type: string - readOnly: true - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update an IP Access rule response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update an IP Access rule - tags: [] - x-api-token-group: - - Account Firewall Access Rules Write - x-cfPermissionsRequired: - enum: - - '#waf:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: firewall - resource_chain: - - access_rules - method: edit - operationId: patch_zones_zone_id_firewall_access_rules_rules_rule_id -components: - schemas: - firewallAction: - description: >- - The action to perform when the threshold of matched traffic within the - configured period is exceeded. - type: object - properties: - mode: - $ref: '#/components/schemas/firewallMode' - response: - $ref: '#/components/schemas/firewallCustomResponse' - timeout: - $ref: '#/components/schemas/firewallTimeout' - firewallActionMode: - default: challenge - description: The default action performed by the rules in the WAF package. - enum: - - simulate - - block - - challenge - type: string - firewallAnomalyPackage: - required: - - id - - name - - description - - detection_mode - - zone_id - title: Anomaly detection WAF package (OWASP) - properties: - description: - description: A summary of the purpose/function of the WAF package. - example: Covers OWASP Top 10 vulnerabilities and more. - readOnly: true - type: string - detection_mode: - description: >- - When a WAF package uses anomaly detection, each rule is given a - score when triggered. If the total score of all triggered rules - exceeds the sensitivity defined on the WAF package, the action - defined on the package will be taken. - enum: - - anomaly - - traditional - example: anomaly - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallIdentifier' - name: - description: The name of the WAF package. - example: OWASP ModSecurity Core Rule Set - readOnly: true - type: string - status: - $ref: '#/components/schemas/firewallStatus' - zone_id: - $ref: '#/components/schemas/firewallIdentifier' - action_mode: - $ref: '#/components/schemas/firewallActionMode' - sensitivity: - $ref: '#/components/schemas/firewallSensitivity' - type: object - firewallApiResponseSingleId: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/firewallIdentifier' - required: - - id - type: object - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - firewallBody: - description: >- - The response body to return. The value must conform to the configured - content type. - example: This request has been rate-limited. - maxLength: 10240 - type: string - firewallComponentsSchemasDescription: - description: An informative summary of the current URI-based WAF override. - example: Enable Cloudflare Magento ruleset for shop.example.com - maxLength: 1024 - nullable: true - type: string - x-auditable: true - firewallComponentsSchemasIdentifier: - description: The unique identifier of the resource. - example: de677e5818985db1285d0e80225f06e5 - maxLength: 32 - readOnly: true - type: string - firewallComponentsSchemasMode: - description: The action to apply to a matched request. - enum: - - block - - challenge - - js_challenge - - managed_challenge - example: js_challenge - maxLength: 12 - type: string - firewallComponentsSchemasPaused: - description: When true, indicates that the firewall rule is currently paused. - example: false - type: boolean - firewallComponentsSchemasPriority: - description: >- - The priority of the rule. Optional value used to define the processing - order. A lower number indicates a higher priority. If not provided, - rules with a defined priority will be processed before rules without a - priority. - example: 50 - maximum: 2147483647 - minimum: 0 - type: number - firewallComponentsUaRuleId: - description: The unique identifier of the User Agent Blocking rule. - example: 372e67954025e0ba6aaa6d586b9e0b59 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - firewallConfiguration: - description: The rule configuration. - type: object - title: An IP address configuration. - properties: - target: - description: >- - The configuration target. You must set the target to `ip` when - specifying an IP address in the rule. - enum: - - ip - example: ip - type: string - value: - description: >- - The IP address to match. This address will be compared to the IP - address of incoming requests. - example: 198.51.100.4 - type: string - firewallConfigurations: - description: >- - A list of IP addresses or CIDR ranges that will be allowed to access the - URLs specified in the Zone Lockdown rule. You can include any number of - `ip` or `ip_range` configurations. - items: - type: object - title: An IP address configuration. - properties: - target: - description: >- - The configuration target. You must set the target to `ip` when - specifying an IP address in the Zone Lockdown rule. - enum: - - ip - example: ip - type: string - value: - description: >- - The IP address to match. This address will be compared to the IP - address of incoming requests. - example: 198.51.100.4 - type: string - type: array - firewallContentType: - description: >- - The content type of the body. Must be one of the following: - `text/plain`, `text/xml`, or `application/json`. - example: text/xml - maxLength: 50 - type: string - x-auditable: true - firewallCreatedOn: - description: The timestamp of when the rule was created. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - x-auditable: true - firewallCustomResponse: - description: >- - A custom content type and reponse to return when the threshold is - exceeded. The custom response configured in this object will override - the custom error for the zone. This object is optional. Notes: If you - omit this object, Cloudflare will use the default HTML error page. If - "mode" is "challenge", "managed_challenge", or "js_challenge", - Cloudflare will use the zone challenge pages and you should not provide - the "response" object. - type: object - properties: - body: - $ref: '#/components/schemas/firewallBody' - content_type: - $ref: '#/components/schemas/firewallContentType' - firewallDeleted: - description: When true, indicates that the firewall rule was deleted. - example: true - type: boolean - firewallDescription: - description: >- - An informative summary of the rule. This value is sanitized and any tags - will be removed. - example: Prevent multiple login failures to mitigate brute force attacks - maxLength: 1024 - type: string - x-auditable: true - firewallDescriptionSearch: - description: A string to search for in the description of existing rules. - example: abusive - type: string - x-auditable: true - firewallEmail: - description: The contact email address of the user. - example: user@example.com - maxLength: 90 - type: string - firewallExpression: - description: >- - The filter expression. For more information, refer to - [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). - example: >- - (http.request.uri.path ~ ".*wp-login.php" or http.request.uri.path ~ - ".*xmlrpc.php") and ip.addr ne 172.16.22.155 - type: string - firewallFilter: - properties: - description: - $ref: '#/components/schemas/firewallFiltersComponentsSchemasDescription' - expression: - $ref: '#/components/schemas/firewallExpression' - id: - $ref: '#/components/schemas/firewallFiltersComponentsSchemasId' - paused: - $ref: '#/components/schemas/firewallFiltersComponentsSchemasPaused' - ref: - $ref: '#/components/schemas/firewallSchemasRef' - type: object - firewallFilterRuleResponse: - type: object - properties: - action: - $ref: '#/components/schemas/firewallSchemasAction' - description: - $ref: >- - #/components/schemas/firewallFirewallRulesComponentsSchemasDescription - id: - $ref: '#/components/schemas/firewallFirewallRulesComponentsSchemasId' - paused: - $ref: '#/components/schemas/firewallComponentsSchemasPaused' - priority: - $ref: '#/components/schemas/firewallComponentsSchemasPriority' - products: - $ref: '#/components/schemas/firewallProducts' - ref: - $ref: '#/components/schemas/firewallRef' - filter: - type: object - properties: - description: - $ref: '#/components/schemas/firewallFiltersComponentsSchemasDescription' - expression: - $ref: '#/components/schemas/firewallExpression' - id: - $ref: '#/components/schemas/firewallFiltersComponentsSchemasId' - paused: - $ref: '#/components/schemas/firewallFiltersComponentsSchemasPaused' - ref: - $ref: '#/components/schemas/firewallSchemasRef' - deleted: - $ref: '#/components/schemas/firewallDeleted' - required: - - id - - deleted - firewallFilterRulesResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallFilterRuleResponse' - nullable: true - type: array - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - firewallFilterRulesResponseCollectionDelete: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallFilterRuleResponse' - nullable: true - type: array - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - firewallFilterRulesSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - $ref: '#/components/schemas/firewallFilterRuleResponse' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - - result - firewallFilterRulesSingleResponseDelete: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - $ref: '#/components/schemas/firewallFilterRuleResponse' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - - result - firewallFiltersComponentsSchemasDescription: - description: An informative summary of the filter. - example: Restrict access from these browsers on this address range. - maxLength: 500 - type: string - firewallFiltersComponentsSchemasId: - description: The unique identifier of the filter. - example: 372e67954025e0ba6aaa6d586b9e0b61 - maxLength: 32 - minLength: 32 - readOnly: true - type: string - firewallFiltersComponentsSchemasPaused: - description: When true, indicates that the filter is currently paused. - example: false - type: boolean - firewallFirewallRulesComponentsSchemasDescription: - description: An informative summary of the firewall rule. - example: Blocks traffic identified during investigation for MIR-31 - maxLength: 500 - type: string - firewallFirewallRulesComponentsSchemasId: - description: The unique identifier of the firewall rule. - example: 372e67954025e0ba6aaa6d586b9e0b60 - maxLength: 32 - type: string - firewallFirewalluablock: - properties: - configuration: - $ref: '#/components/schemas/firewallSchemasConfiguration' - description: - $ref: >- - #/components/schemas/firewallFirewalluablockComponentsSchemasDescription - id: - $ref: '#/components/schemas/firewallComponentsUaRuleId' - mode: - $ref: '#/components/schemas/firewallComponentsSchemasMode' - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - type: object - firewallFirewalluablockComponentsSchemasDescription: - description: An informative summary of the rule. - example: >- - Prevent access from abusive clients identified by this User Agent to - mitigate a DDoS attack - maxLength: 1024 - type: string - firewallFirewalluablockResponseCollection: - properties: - result: - items: - $ref: '#/components/schemas/firewallFirewalluablock' - type: object - type: array - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - type: object - required: - - success - - errors - - messages - - result - firewallFirewalluablockResponseSingle: - properties: - result: - $ref: '#/components/schemas/firewallFirewalluablock' - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - type: object - required: - - success - - errors - - messages - - result - firewallGroups: - description: >- - An object that allows you to enable or disable WAF rule groups for the - current WAF override. Each key of this object must be the ID of a WAF - rule group, and each value must be a valid WAF action (usually `default` - or `disable`). When creating a new URI-based WAF override, you must - provide a `groups` object or a `rules` object. - example: - ea8687e59929c1fd05ba97574ad43f77: default - type: object - firewallIdentifier: - description: Defines an identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - firewallIpRangeSearch: - description: A single IP address range to search for in existing rules. - example: 1.2.3.0/16 - type: string - x-auditable: true - firewallIpSearch: - description: A single IP address to search for in existing rules. - example: 1.2.3.4 - type: string - firewallLockdownsComponentsSchemasDescription: - description: An informative summary of the rule. - example: Restrict access to these endpoints to requests from a known IP address - maxLength: 1024 - type: string - firewallLockdownsComponentsSchemasId: - description: The unique identifier of the Zone Lockdown rule. - example: 372e67954025e0ba6aaa6d586b9e0b59 - maxLength: 32 - type: string - x-auditable: true - firewallMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - firewallMode: - description: The action to perform. - enum: - - simulate - - ban - - challenge - - js_challenge - - managed_challenge - example: challenge - type: string - x-auditable: true - firewallModifiedOn: - description: The timestamp of when the rule was last modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - type: string - x-auditable: true - firewallNotes: - description: >- - An informative summary of the rule, typically used as a reminder or - explanation. - example: This rule is enabled because of an event that occurred on date X. - type: string - x-auditable: true - firewallOverride: - properties: - description: - $ref: '#/components/schemas/firewallComponentsSchemasDescription' - groups: - $ref: '#/components/schemas/firewallGroups' - id: - $ref: '#/components/schemas/firewallOverridesId' - paused: - $ref: '#/components/schemas/firewallPaused' - priority: - $ref: '#/components/schemas/firewallPriority' - rewrite_action: - $ref: '#/components/schemas/firewallRewriteAction' - rules: - $ref: '#/components/schemas/firewallRules' - urls: - $ref: '#/components/schemas/firewallUrls' - type: object - firewallOverrideResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallOverride' - nullable: true - type: array - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - firewallOverrideResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - $ref: '#/components/schemas/firewallOverride' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - - result - firewallOverridesId: - description: The unique identifier of the WAF override. - example: de677e5818985db1285d0e80225f06e5 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - firewallPackageId: - description: Defines a package identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - firewallPackageResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - nullable: true - type: array - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - errors - - success - - result - - messages - firewallPackageResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - type: object - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - errors - - success - - result - - messages - firewallPaused: - description: When true, indicates that the rule is currently paused. - type: boolean - x-auditable: true - firewallPriority: - description: >- - The relative priority of the current URI-based WAF override when - multiple overrides match a single URL. A lower number indicates higher - priority. Higher priority overrides may overwrite values set by lower - priority overrides. - example: 1 - maximum: 1000000000 - minimum: -1000000000 - type: number - x-auditable: true - firewallProducts: - items: - description: >- - A list of products to bypass for a request when using the `bypass` - action. - enum: - - zoneLockdown - - uaBlock - - bic - - hot - - securityLevel - - rateLimit - - waf - example: waf - type: string - type: array - firewallRef: - description: A short reference tag. Allows you to select related firewall rules. - example: MIR-31 - maxLength: 50 - type: string - firewallResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallSchemasRule' - nullable: true - type: array - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - firewallResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - $ref: '#/components/schemas/firewallSchemasRule' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - firewallResultInfo: - properties: - count: - description: Defines the total number of results for the requested service. - example: 1 - type: number - page: - description: Defines the current page within paginated list of results. - example: 1 - type: number - per_page: - description: Defines the number of results per page of results. - example: 20 - type: number - total_count: - description: Defines the total results available without any search parameters. - example: 2000 - type: number - type: object - firewallRewriteAction: - description: >- - Specifies that, when a WAF rule matches, its configured action will be - replaced by the action configured in this object. - properties: - block: - $ref: '#/components/schemas/firewallWafRewriteAction' - challenge: - $ref: '#/components/schemas/firewallWafRewriteAction' - default: - $ref: '#/components/schemas/firewallWafRewriteAction' - disable: - $ref: '#/components/schemas/firewallWafRewriteAction' - simulate: - $ref: '#/components/schemas/firewallWafRewriteAction' - type: object - firewallRule: - properties: - allowed_modes: - description: The available actions that a rule can apply to a matched request. - example: - - whitelist - - block - - challenge - - js_challenge - - managed_challenge - items: - $ref: '#/components/schemas/firewallSchemasMode' - readOnly: true - type: array - configuration: - $ref: '#/components/schemas/firewallConfiguration' - created_on: - description: The timestamp of when the rule was created. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - modified_on: - description: The timestamp of when the rule was last modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - notes: - $ref: '#/components/schemas/firewallNotes' - required: - - id - - mode - - allowed_modes - - configuration - type: object - firewallRuleCollectionResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallRule' - nullable: true - type: array - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - firewallRuleSingleIdResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - properties: - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - type: object - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - firewallRuleSingleResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - $ref: '#/components/schemas/firewallRule' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - firewallRules: - description: >- - An object that allows you to override the action of specific WAF rules. - Each key of this object must be the ID of a WAF rule, and each value - must be a valid WAF action. Unless you are disabling a rule, ensure that - you also enable the rule group that this WAF rule belongs to. When - creating a new URI-based WAF override, you must provide a `groups` - object or a `rules` object. - example: - '100015': disable - type: object - firewallSchemasAction: - description: >- - The action to apply to a matched request. The `log` action is only - available on an Enterprise plan. - enum: - - block - - challenge - - js_challenge - - managed_challenge - - allow - - log - - bypass - example: block - type: string - firewallSchemasConfiguration: - description: The configuration object for the current rule. - properties: - target: - description: >- - The configuration target for this rule. You must set the target to - `ua` for User Agent Blocking rules. - example: ua - type: string - value: - description: >- - The exact user agent string to match. This value will be compared to - the received `User-Agent` HTTP header value. - example: >- - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 - (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4 - type: string - type: object - firewallSchemasDescriptionSearch: - description: A string to search for in the description of existing rules. - example: endpoints - type: string - x-auditable: true - firewallSchemasIdentifier: - description: The unique identifier of the IP Access rule. - example: 92f17202ed8bd63d69a66b86a49a8f6b - maxLength: 32 - readOnly: true - type: string - x-auditable: true - firewallSchemasMode: - description: The action to apply to a matched request. - enum: - - block - - challenge - - whitelist - - js_challenge - - managed_challenge - example: challenge - type: string - x-auditable: true - firewallSchemasPaused: - description: When true, indicates that the rule is currently paused. - example: false - type: boolean - x-auditable: true - default: false - firewallSchemasPriority: - description: >- - The priority of the rule to control the processing order. A lower number - indicates higher priority. If not provided, any rules with a configured - priority will be processed before rules without a priority. - example: 5 - type: number - x-auditable: true - firewallSchemasRef: - description: A short reference tag. Allows you to select related filters. - example: FIL-100 - maxLength: 50 - type: string - firewallSchemasRule: - required: - - id - - mode - - allowed_modes - - configuration - type: object - properties: - allowed_modes: - description: The available actions that a rule can apply to a matched request. - example: - - whitelist - - block - - challenge - - js_challenge - - managed_challenge - items: - $ref: '#/components/schemas/firewallSchemasMode' - readOnly: true - type: array - configuration: - $ref: '#/components/schemas/firewallConfiguration' - created_on: - description: The timestamp of when the rule was created. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - id: - $ref: '#/components/schemas/firewallSchemasIdentifier' - mode: - $ref: '#/components/schemas/firewallSchemasMode' - modified_on: - description: The timestamp of when the rule was last modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - notes: - $ref: '#/components/schemas/firewallNotes' - scope: - description: All zones owned by the user will have the rule applied. - properties: - email: - $ref: '#/components/schemas/firewallEmail' - id: - $ref: '#/components/schemas/firewallIdentifier' - type: - description: Defines the scope of the rule. - enum: - - user - - organization - example: user - readOnly: true - type: string - readOnly: true - type: object - firewallSchemasUrls: - description: >- - The URLs to include in the rule definition. You can use wildcards. Each - entered URL will be escaped before use, which means you can only use - simple wildcard patterns. - items: - example: api.mysite.com/some/endpoint* - type: string - x-auditable: true - type: array - firewallSensitivity: - default: high - description: The sensitivity of the WAF package. - enum: - - high - - medium - - low - - 'off' - type: string - firewallStatus: - default: active - description: >- - When set to `active`, indicates that the WAF package will be applied to - the zone. - enum: - - active - readOnly: true - type: string - firewallTimeout: - description: >- - The time in seconds during which Cloudflare will perform the mitigation - action. Must be an integer value greater than or equal to the period. - Notes: If "mode" is "challenge", "managed_challenge", or "js_challenge", - Cloudflare will use the zone's Challenge Passage time and you should not - provide this value. - example: 86400 - maximum: 86400 - minimum: 1 - type: number - x-auditable: true - firewallUaConfiguration: - properties: - target: - description: >- - The configuration target. You must set the target to `ua` when - specifying a user agent in the rule. - enum: - - ua - example: ua - type: string - value: - description: the user agent to exactly match - example: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) - type: string - x-auditable: true - title: A user agent configuration. - type: object - firewallUriSearch: - description: A single URI to search for in the list of URLs of existing rules. - example: /some/path - type: string - x-auditable: true - firewallUrls: - description: >- - The URLs to include in the current WAF override. You can use wildcards. - Each entered URL will be escaped before use, which means you can only - use simple wildcard patterns. - items: - example: shop.example.com/* - type: string - x-auditable: true - type: array - firewallWafRewriteAction: - description: The WAF rule action to apply. - enum: - - challenge - - block - - simulate - - disable - - default - x-auditable: true - type: string - firewallZonelockdown: - properties: - configurations: - $ref: '#/components/schemas/firewallConfigurations' - created_on: - $ref: '#/components/schemas/firewallCreatedOn' - readOnly: true - description: - $ref: '#/components/schemas/firewallLockdownsComponentsSchemasDescription' - id: - $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' - modified_on: - $ref: '#/components/schemas/firewallModifiedOn' - readOnly: true - paused: - $ref: '#/components/schemas/firewallSchemasPaused' - urls: - $ref: '#/components/schemas/firewallSchemasUrls' - required: - - id - - created_on - - modified_on - - paused - - description - - urls - - configurations - type: object - firewallZonelockdownResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - items: - type: object - $ref: '#/components/schemas/firewallZonelockdown' - nullable: true - type: array - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/firewallResultInfo' - required: - - success - - errors - - messages - - result - - result - firewallZonelockdownResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/firewallMessages' - messages: - $ref: '#/components/schemas/firewallMessages' - result: - $ref: '#/components/schemas/firewallZonelockdown' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - - result - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - unnamedSchemaRef532d8b97684c9032dd36bae8acddebf5: - description: Defines the rule group to which the current WAF rule belongs. - properties: - id: - $ref: '#/components/schemas/wafManagedRulesComponentsSchemasIdentifier' - name: - $ref: '#/components/schemas/wafManagedRulesName' - readOnly: true - type: object - wafManagedRulesAllowedModes: - description: Defines the available states for the rule group. - example: - - 'on' - - 'off' - items: - $ref: '#/components/schemas/wafManagedRulesMode' - readOnly: true - type: array - wafManagedRulesAllowedModesAnomaly: - description: >- - Defines the available modes for the current WAF rule. Applies to anomaly - detection WAF rules. - example: - - 'on' - - 'off' - items: - $ref: '#/components/schemas/wafManagedRulesModeAnomaly' - readOnly: true - type: array - wafManagedRulesComponentsSchemasIdentifier: - description: Defines the unique identifier of the rule group. - example: de677e5818985db1285d0e80225f06e5 - maxLength: 32 - type: string - x-auditable: true - wafManagedRulesDefaultMode: - description: Defines the default action/mode of a rule. - enum: - - disable - - simulate - - block - - challenge - example: block - readOnly: true - type: string - wafManagedRulesDescription: - description: Defines an informative summary of what the rule group does. - example: >- - Group designed to protect against IP addresses that are a threat and - typically used to launch DDoS attacks - nullable: true - readOnly: true - type: string - x-auditable: true - wafManagedRulesIdentifier: - description: Defines the unique identifier of a WAF package. - example: a25a9a7e9c00afc1fb2e0245519d725b - maxLength: 32 - type: string - x-auditable: true - wafManagedRulesMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - wafManagedRulesMode: - default: 'on' - description: >- - Defines the state of the rules contained in the rule group. When `on`, - the rules in the group are configurable/usable. - enum: - - 'on' - - 'off' - type: string - x-auditable: true - wafManagedRulesModeAnomaly: - description: >- - Defines the mode anomaly. When set to `on`, the current WAF rule will be - used when evaluating the request. Applies to anomaly detection WAF - rules. - enum: - - 'on' - - 'off' - example: 'on' - type: string - x-auditable: true - wafManagedRulesModifiedRulesCount: - default: 0 - description: >- - Defines the number of rules within the group that have been modified - from their default configuration. - example: 2 - readOnly: true - type: number - x-auditable: true - wafManagedRulesName: - description: Defines the name of the rule group. - example: Project Honey Pot - readOnly: true - type: string - x-auditable: true - wafManagedRulesPriority: - description: >- - Defines the order in which the individual WAF rule is executed within - its rule group. - readOnly: true - type: string - x-auditable: true - wafManagedRulesResultInfo: - properties: - count: - description: Defines the total number of results for the requested service. - example: 1 - type: number - page: - description: Defines the current page within paginated list of results. - example: 1 - type: number - per_page: - description: Defines the number of results per page of results. - example: 20 - type: number - total_count: - description: Defines the total results available without any search parameters. - example: 2000 - type: number - type: object - wafManagedRulesRule: - type: object - title: Anomaly detection WAF rule - description: >- - When triggered, anomaly detection WAF rules contribute to an overall - threat score that will determine if a request is considered malicious. - You can configure the total scoring threshold through the 'sensitivity' - property of the WAF package. - properties: - description: - $ref: '#/components/schemas/wafManagedRulesSchemasDescription' - group: - $ref: >- - #/components/schemas/unnamedSchemaRef532d8b97684c9032dd36bae8acddebf5 - id: - $ref: '#/components/schemas/wafManagedRulesRuleComponentsSchemasIdentifier' - package_id: - $ref: '#/components/schemas/wafManagedRulesIdentifier' - priority: - $ref: '#/components/schemas/wafManagedRulesPriority' - allowed_modes: - $ref: '#/components/schemas/wafManagedRulesAllowedModesAnomaly' - mode: - $ref: '#/components/schemas/wafManagedRulesModeAnomaly' - default_mode: - $ref: '#/components/schemas/wafManagedRulesDefaultMode' - required: - - allowed_modes - - description - - group - - id - - mode - - package_id - - priority - wafManagedRulesRuleComponentsSchemasIdentifier: - description: Defines the unique identifier of the WAF rule. - example: f939de3be84e66e757adcdcb87908023 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - wafManagedRulesRuleGroupResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/wafManagedRulesResultInfo' - result: - items: - $ref: '#/components/schemas/wafManagedRulesSchemasGroup' - type: array - required: - - success - - errors - - messages - - result - wafManagedRulesRuleGroupResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - required: - - success - - errors - - messages - - result - wafManagedRulesRuleResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/wafManagedRulesResultInfo' - result: - items: - $ref: '#/components/schemas/wafManagedRulesRule' - type: array - required: - - success - - errors - - messages - - result - wafManagedRulesRuleResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/wafManagedRulesMessages' - messages: - $ref: '#/components/schemas/wafManagedRulesMessages' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - type: object - required: - - success - - errors - - messages - - result - wafManagedRulesRulesCount: - default: 0 - description: Defines the number of rules in the current rule group. - example: 10 - readOnly: true - type: number - x-auditable: true - wafManagedRulesSchemasDescription: - description: Defines the public description of the WAF rule. - example: SQL injection prevention for SELECT statements - readOnly: true - type: string - x-auditable: true - wafManagedRulesSchemasGroup: - required: - - id - - name - - description - - mode - - rules_count - type: object - properties: - description: - $ref: '#/components/schemas/wafManagedRulesDescription' - id: - $ref: '#/components/schemas/wafManagedRulesComponentsSchemasIdentifier' - modified_rules_count: - $ref: '#/components/schemas/wafManagedRulesModifiedRulesCount' - name: - $ref: '#/components/schemas/wafManagedRulesName' - package_id: - $ref: '#/components/schemas/wafManagedRulesIdentifier' - rules_count: - $ref: '#/components/schemas/wafManagedRulesRulesCount' - allowed_modes: - $ref: '#/components/schemas/wafManagedRulesAllowedModes' - mode: - $ref: '#/components/schemas/wafManagedRulesMode' - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - access_rules_rules: - id: cloudflare.firewall.access_rules_rules - name: access_rules_rules - title: Access Rules Rules - methods: - list_by_user: - operation: - $ref: '#/paths/~1user~1firewall~1access_rules~1rules/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/access_rules_rules/methods/list_by_user - insert: [] - update: [] - delete: [] - replace: [] - rules: - id: cloudflare.firewall.rules - name: rules - title: Rules - methods: - ip_access_rules_for_a_user_create_an_ip_access_rule: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1firewall~1access_rules~1rules/post' - response: - mediaType: application/json - openAPIDocKey: '200' - ip_access_rules_for_a_user_delete_an_ip_access_rule: - operation: - $ref: '#/paths/~1user~1firewall~1access_rules~1rules~1{rule_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - ip_access_rules_for_a_user_update_an_ip_access_rule: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1user~1firewall~1access_rules~1rules~1{rule_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - firewall_rules_delete_firewall_rules: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - firewall_rules_update_priority_of_firewall_rules: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - firewall_rules_create_firewall_rules: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules/post' - response: - mediaType: application/json - openAPIDocKey: '200' - firewall_rules_update_firewall_rules: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules~1{rule_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - firewall_rules_update_priority_of_a_firewall_rule: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules~1{rule_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules~1{rule_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1rules~1{rule_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: - - $ref: >- - #/components/x-stackQL-resources/rules/methods/firewall_rules_create_firewall_rules - - $ref: >- - #/components/x-stackQL-resources/rules/methods/ip_access_rules_for_a_user_create_an_ip_access_rule - update: - - $ref: '#/components/x-stackQL-resources/rules/methods/edit' - - $ref: >- - #/components/x-stackQL-resources/rules/methods/firewall_rules_update_priority_of_a_firewall_rule - - $ref: >- - #/components/x-stackQL-resources/rules/methods/ip_access_rules_for_a_user_update_an_ip_access_rule - - $ref: >- - #/components/x-stackQL-resources/rules/methods/firewall_rules_update_priority_of_firewall_rules - delete: - - $ref: '#/components/x-stackQL-resources/rules/methods/delete' - - $ref: >- - #/components/x-stackQL-resources/rules/methods/ip_access_rules_for_a_user_delete_an_ip_access_rule - - $ref: >- - #/components/x-stackQL-resources/rules/methods/firewall_rules_delete_firewall_rules - replace: - - $ref: '#/components/x-stackQL-resources/rules/methods/update' - - $ref: >- - #/components/x-stackQL-resources/rules/methods/firewall_rules_update_firewall_rules - lockdowns: - id: cloudflare.firewall.lockdowns - name: lockdowns - title: Lockdowns - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1lockdowns/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1lockdowns/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1lockdowns~1{lock_downs_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1lockdowns~1{lock_downs_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1lockdowns~1{lock_downs_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/lockdowns/methods/get' - - $ref: '#/components/x-stackQL-resources/lockdowns/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/lockdowns/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/lockdowns/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/lockdowns/methods/update' - firewall_rules: - id: cloudflare.firewall.firewall_rules - name: firewall_rules - title: Firewall Rules - methods: - list_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules~1{rule_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/firewall_rules/methods/get_by_zone - - $ref: >- - #/components/x-stackQL-resources/firewall_rules/methods/list_by_zone - insert: [] - update: [] - delete: [] - replace: [] - ua_rules: - id: cloudflare.firewall.ua_rules - name: ua_rules - title: Ua Rules - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1ua_rules/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1ua_rules/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1ua_rules~1{ua_rule_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1ua_rules~1{ua_rule_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1ua_rules~1{ua_rule_id}/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/ua_rules/methods/get' - - $ref: '#/components/x-stackQL-resources/ua_rules/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/ua_rules/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/ua_rules/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/ua_rules/methods/update' - overrides: - id: cloudflare.firewall.overrides - name: overrides - title: Overrides - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides~1{overrides_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides~1{overrides_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides~1{overrides_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/overrides/methods/get' - - $ref: '#/components/x-stackQL-resources/overrides/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/overrides/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/overrides/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/overrides/methods/update' - packages: - id: cloudflare.firewall.packages - name: packages - title: Packages - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1packages/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - waf_packages_update_a_waf_package: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/packages/methods/get' - - $ref: '#/components/x-stackQL-resources/packages/methods/list' - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/packages/methods/waf_packages_update_a_waf_package - delete: [] - replace: [] - groups: - id: cloudflare.firewall.groups - name: groups - title: Groups - methods: - list: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1groups/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1groups~1{group_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1groups~1{group_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/groups/methods/get' - - $ref: '#/components/x-stackQL-resources/groups/methods/list' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/groups/methods/edit' - delete: [] - replace: [] - packages_rules: - id: cloudflare.firewall.packages_rules - name: packages_rules - title: Packages Rules - methods: - list_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1rules/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1rules~1{rule_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/packages_rules/methods/get_by_zone - - $ref: >- - #/components/x-stackQL-resources/packages_rules/methods/list_by_zone - insert: [] - update: [] - delete: [] - replace: [] - access_rules: - id: cloudflare.firewall.access_rules - name: access_rules - title: Access Rules - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules/post - response: - mediaType: application/json - openAPIDocKey: '200' - list_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules~1{rule_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - delete_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules~1{rule_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - edit_by_account: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules~1{rule_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - get_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules~1{rule_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - delete_by_zone: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules~1{rule_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - edit_by_zone: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules~1{rule_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/access_rules/methods/get_by_account - - $ref: '#/components/x-stackQL-resources/access_rules/methods/get_by_zone' - - $ref: >- - #/components/x-stackQL-resources/access_rules/methods/list_by_account - - $ref: '#/components/x-stackQL-resources/access_rules/methods/list_by_zone' - insert: - - $ref: >- - #/components/x-stackQL-resources/access_rules/methods/create_by_account - - $ref: >- - #/components/x-stackQL-resources/access_rules/methods/create_by_zone - update: - - $ref: >- - #/components/x-stackQL-resources/access_rules/methods/edit_by_account - - $ref: '#/components/x-stackQL-resources/access_rules/methods/edit_by_zone' - delete: - - $ref: >- - #/components/x-stackQL-resources/access_rules/methods/delete_by_account - - $ref: >- - #/components/x-stackQL-resources/access_rules/methods/delete_by_zone - replace: [] +openapi: 3.0.3 +info: + title: firewall API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /user/firewall/access_rules/rules: + get: + description: Fetches IP Access rules of the user. You can filter the results using several optional parameters. + operationId: ip-access-rules-for-a-user-list-ip-access-rules + parameters: + - in: query + name: mode + schema: + $ref: '#/components/schemas/firewallSchemasMode' + - in: query + name: configuration.target + schema: + description: Defines the target to search in existing rules. + enum: + - ip + - ip_range + - asn + - country + type: string + - in: query + name: configuration.value + schema: + description: 'Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`. Notes: You can search for a single IPv4 address, an IP address range with a subnet of ''/16'' or ''/24'', or a two-letter ISO-3166-1 alpha-2 country code.' + type: string + - in: query + name: notes + schema: + description: 'Defines the string to search for in the notes of existing IP Access rules. Notes: For example, the string ''attack'' would match IP Access rules with notes ''Attack 26/02'' and ''Attack 27/02''. The search is case insensitive.' + type: string + - in: query + name: match + schema: + default: all + description: Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. + enum: + - any + - all + type: string + - in: query + name: page + schema: + description: Defines the requested page within paginated list of results. + type: number + - in: query + name: per_page + schema: + description: Defines the maximum number of results requested. + type: number + - in: query + name: order + schema: + description: Defines the field used to sort returned rules. + enum: + - configuration.target + - configuration.value + - mode + type: string + - in: query + name: direction + schema: + description: Defines the direction used to sort returned rules. + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallRuleCollectionResponse' + description: List IP Access rules response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallRule' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List IP Access rules response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List IP Access rules + tags: + - IP Access rules for a user + x-api-token-group: + - Account Firewall Access Rules Write + - Account Firewall Access Rules Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + post: + description: 'Creates a new IP Access rule for all zones owned by the current user. Note: To create an IP Access rule that applies to a specific zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.' + operationId: ip-access-rules-for-a-user-create-an-ip-access-rule + requestBody: + content: + application/json: + schema: + properties: + configuration: + $ref: '#/components/schemas/firewallConfiguration' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + notes: + $ref: '#/components/schemas/firewallNotes' + default: '' + required: + - mode + - configuration + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallRuleSingleResponse' + description: Create an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + required: + - id + - mode + - allowed_modes + - configuration + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create an IP Access rule + tags: + - IP Access rules for a user + x-api-token-group: + - Account Firewall Access Rules Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /user/firewall/access_rules/rules/{rule_id}: + delete: + description: 'Deletes an IP Access rule at the user level. Note: Deleting a user-level rule will affect all zones owned by the user.' + operationId: ip-access-rules-for-a-user-delete-an-ip-access-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallRuleSingleIdResponse' + description: Delete an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + properties: + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an IP Access rule + tags: + - IP Access rules for a user + x-api-token-group: + - Account Firewall Access Rules Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + patch: + description: Updates an IP Access rule defined at the user level. You can only update the rule action (`mode` parameter) and notes. + operationId: ip-access-rules-for-a-user-update-an-ip-access-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + mode: + $ref: '#/components/schemas/firewallSchemasMode' + notes: + $ref: '#/components/schemas/firewallNotes' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallRuleSingleResponse' + description: Update an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + required: + - id + - mode + - allowed_modes + - configuration + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an IP Access rule + tags: + - IP Access rules for a user + x-api-token-group: + - Account Firewall Access Rules Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/firewall/lockdowns: + get: + description: Fetches Zone Lockdown rules. You can filter the results using several optional parameters. + operationId: zone-lockdown-list-zone-lockdown-rules + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: description + schema: + $ref: '#/components/schemas/firewallSchemasDescriptionSearch' + - in: query + name: modified_on + schema: + $ref: '#/components/schemas/firewallModifiedOn' + - in: query + name: ip + schema: + $ref: '#/components/schemas/firewallIpSearch' + - in: query + name: priority + schema: + $ref: '#/components/schemas/firewallSchemasPriority' + - in: query + name: uri_search + schema: + $ref: '#/components/schemas/firewallUriSearch' + - in: query + name: ip_range_search + schema: + $ref: '#/components/schemas/firewallIpRangeSearch' + - in: query + name: per_page + schema: + default: 20 + description: The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`. + maximum: 1000 + minimum: 1 + type: number + - in: query + name: created_on + schema: + description: The timestamp of when the rule was created. + format: date-time + type: string + - in: query + name: description_search + schema: + description: A string to search for in the description of existing rules. + type: string + - in: query + name: ip_search + schema: + description: A single IP address to search for in existing rules. + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallZonelockdownResponseCollection' + description: List Zone Lockdown rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallZonelockdown' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: List Zone Lockdown rules response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Zone Lockdown rules + tags: + - Zone Lockdown + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - lockdowns + method: list + post: + description: Creates a new Zone Lockdown rule. + operationId: zone-lockdown-create-a-zone-lockdown-rule + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + configurations: + $ref: '#/components/schemas/firewallConfigurations' + description: + $ref: '#/components/schemas/firewallDescription' + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + priority: + $ref: '#/components/schemas/firewallSchemasPriority' + urls: + $ref: '#/components/schemas/firewallUrls' + required: + - urls + - configurations + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallZonelockdownResponseSingle' + description: Create a Zone Lockdown rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + properties: + configurations: + $ref: '#/components/schemas/firewallConfigurations' + created_on: + $ref: '#/components/schemas/firewallCreatedOn' + readOnly: true + description: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' + modified_on: + $ref: '#/components/schemas/firewallModifiedOn' + readOnly: true + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + urls: + $ref: '#/components/schemas/firewallSchemasUrls' + required: + - id + - created_on + - modified_on + - paused + - description + - urls + - configurations + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Create a Zone Lockdown rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a Zone Lockdown rule + tags: + - Zone Lockdown + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - lockdowns + method: create + /zones/{zone_id}/firewall/lockdowns/{lock_downs_id}: + delete: + description: Deletes an existing Zone Lockdown rule. + operationId: zone-lockdown-delete-a-zone-lockdown-rule + parameters: + - in: path + name: lock_downs_id + schema: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + id: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' + type: object + type: object + description: Delete a Zone Lockdown rule response + 4XX: + content: + application/json: + schema: + properties: + result: + properties: + id: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' + type: object + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + description: Delete a Zone Lockdown rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a Zone Lockdown rule + tags: + - Zone Lockdown + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - lockdowns + method: delete + get: + description: Fetches the details of a Zone Lockdown rule. + operationId: zone-lockdown-get-a-zone-lockdown-rule + parameters: + - in: path + name: lock_downs_id + schema: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallZonelockdownResponseSingle' + description: Get a Zone Lockdown rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + properties: + configurations: + $ref: '#/components/schemas/firewallConfigurations' + created_on: + $ref: '#/components/schemas/firewallCreatedOn' + readOnly: true + description: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' + modified_on: + $ref: '#/components/schemas/firewallModifiedOn' + readOnly: true + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + urls: + $ref: '#/components/schemas/firewallSchemasUrls' + required: + - id + - created_on + - modified_on + - paused + - description + - urls + - configurations + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Get a Zone Lockdown rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a Zone Lockdown rule + tags: + - Zone Lockdown + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - lockdowns + method: get + put: + description: Updates an existing Zone Lockdown rule. + operationId: zone-lockdown-update-a-zone-lockdown-rule + parameters: + - in: path + name: lock_downs_id + schema: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + configurations: + $ref: '#/components/schemas/firewallConfigurations' + urls: + $ref: '#/components/schemas/firewallUrls' + required: + - urls + - configurations + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallZonelockdownResponseSingle' + description: Update a Zone Lockdown rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + properties: + configurations: + $ref: '#/components/schemas/firewallConfigurations' + created_on: + $ref: '#/components/schemas/firewallCreatedOn' + readOnly: true + description: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' + modified_on: + $ref: '#/components/schemas/firewallModifiedOn' + readOnly: true + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + urls: + $ref: '#/components/schemas/firewallSchemasUrls' + required: + - id + - created_on + - modified_on + - paused + - description + - urls + - configurations + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Update a Zone Lockdown rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a Zone Lockdown rule + tags: + - Zone Lockdown + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - lockdowns + method: update + /zones/{zone_id}/firewall/rules: + delete: + deprecated: true + description: Deletes existing firewall rules. + operationId: firewall-rules-delete-firewall-rules + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFilterRulesResponseCollectionDelete' + description: Delete firewall rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallFilterRuleResponse' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Delete firewall rules response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete firewall rules + tags: + - Firewall rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + get: + deprecated: true + description: Fetches firewall rules in a zone. You can filter the results using several optional parameters. + operationId: firewall-rules-list-firewall-rules + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: description + schema: + description: A case-insensitive string to find in the description. + type: string + - in: query + name: action + schema: + description: The action to search for. Must be an exact match. + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 25 + description: Number of firewall rules per page. + maximum: 100 + minimum: 5 + type: number + - in: query + name: id + schema: + description: The unique identifier of the firewall rule. + maxLength: 32 + type: string + - in: query + name: paused + schema: + description: When true, indicates that the firewall rule is currently paused. + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFilterRulesResponseCollection' + description: List firewall rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallFilterRuleResponse' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: List firewall rules response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List firewall rules + tags: + - Firewall rules + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - rules + method: create + patch: + deprecated: true + description: Updates the priority of existing firewall rules. + operationId: firewall-rules-update-priority-of-firewall-rules + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFilterRulesResponseCollection' + description: Update priority of firewall rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallFilterRuleResponse' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Update priority of firewall rules response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update priority of firewall rules + tags: + - Firewall rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + post: + deprecated: true + description: Create one or more firewall rules. + operationId: firewall-rules-create-firewall-rules + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + action: + $ref: '#/components/schemas/firewallAction' + filter: + $ref: '#/components/schemas/firewallFilter' + required: + - filter + - action + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFilterRulesResponseCollection' + description: Create firewall rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallFilterRuleResponse' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Create firewall rules response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create firewall rules + tags: + - Firewall rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + put: + deprecated: true + description: Updates one or more existing firewall rules. + operationId: firewall-rules-update-firewall-rules + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: {} + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFilterRulesResponseCollection' + description: Update firewall rules response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallFilterRuleResponse' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Update firewall rules response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update firewall rules + tags: + - Firewall rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/firewall/rules/{rule_id}: + delete: + deprecated: true + description: Deletes an existing firewall rule. + operationId: firewall-rules-delete-a-firewall-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFilterRulesSingleResponseDelete' + description: Delete a firewall rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + type: object + properties: + action: + $ref: '#/components/schemas/firewallSchemasAction' + description: + $ref: '#/components/schemas/firewallFirewallRulesComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallFirewallRulesComponentsSchemasId' + paused: + $ref: '#/components/schemas/firewallComponentsSchemasPaused' + priority: + $ref: '#/components/schemas/firewallComponentsSchemasPriority' + products: + $ref: '#/components/schemas/firewallProducts' + ref: + $ref: '#/components/schemas/firewallRef' + filter: + type: object + properties: + description: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasDescription' + expression: + $ref: '#/components/schemas/firewallExpression' + id: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasId' + paused: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasPaused' + ref: + $ref: '#/components/schemas/firewallSchemasRef' + deleted: + $ref: '#/components/schemas/firewallDeleted' + required: + - id + - deleted + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Delete a firewall rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a firewall rule + tags: + - Firewall rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - rules + method: delete + get: + deprecated: true + description: Fetches the details of a firewall rule. + operationId: firewall-rules-get-a-firewall-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFilterRulesSingleResponse' + description: Get a firewall rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + type: object + properties: + action: + $ref: '#/components/schemas/firewallSchemasAction' + description: + $ref: '#/components/schemas/firewallFirewallRulesComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallFirewallRulesComponentsSchemasId' + paused: + $ref: '#/components/schemas/firewallComponentsSchemasPaused' + priority: + $ref: '#/components/schemas/firewallComponentsSchemasPriority' + products: + $ref: '#/components/schemas/firewallProducts' + ref: + $ref: '#/components/schemas/firewallRef' + filter: + type: object + properties: + description: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasDescription' + expression: + $ref: '#/components/schemas/firewallExpression' + id: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasId' + paused: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasPaused' + ref: + $ref: '#/components/schemas/firewallSchemasRef' + deleted: + $ref: '#/components/schemas/firewallDeleted' + required: + - id + - deleted + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Get a firewall rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a firewall rule + tags: + - Firewall rules + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - rules + method: edit + patch: + deprecated: true + description: Updates the priority of an existing firewall rule. + operationId: firewall-rules-update-priority-of-a-firewall-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + id: + $ref: '#/components/schemas/firewallComponentsSchemasIdentifier' + required: + - id + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFilterRulesResponseCollection' + description: Update priority of a firewall rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallFilterRuleResponse' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Update priority of a firewall rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update priority of a firewall rule + tags: + - Firewall rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + put: + deprecated: true + description: Updates an existing firewall rule. + operationId: firewall-rules-update-a-firewall-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + action: + $ref: '#/components/schemas/firewallAction' + filter: + $ref: '#/components/schemas/firewallFilter' + id: + $ref: '#/components/schemas/firewallComponentsSchemasIdentifier' + required: + - id + - filter + - action + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFilterRulesSingleResponse' + description: Update a firewall rule response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + type: object + properties: + action: + $ref: '#/components/schemas/firewallSchemasAction' + description: + $ref: '#/components/schemas/firewallFirewallRulesComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallFirewallRulesComponentsSchemasId' + paused: + $ref: '#/components/schemas/firewallComponentsSchemasPaused' + priority: + $ref: '#/components/schemas/firewallComponentsSchemasPriority' + products: + $ref: '#/components/schemas/firewallProducts' + ref: + $ref: '#/components/schemas/firewallRef' + filter: + type: object + properties: + description: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasDescription' + expression: + $ref: '#/components/schemas/firewallExpression' + id: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasId' + paused: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasPaused' + ref: + $ref: '#/components/schemas/firewallSchemasRef' + deleted: + $ref: '#/components/schemas/firewallDeleted' + required: + - id + - deleted + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Update a firewall rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a firewall rule + tags: + - Firewall rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - rules + method: update + /zones/{zone_id}/firewall/ua_rules: + get: + description: Fetches User Agent Blocking rules in a zone. You can filter the results using several optional parameters. + operationId: user-agent-blocking-rules-list-user-agent-blocking-rules + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: description + schema: + $ref: '#/components/schemas/firewallDescriptionSearch' + - in: query + name: per_page + schema: + default: 20 + description: The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`. + maximum: 1000 + minimum: 1 + type: number + - in: query + name: user_agent + schema: + description: A string to search for in the user agent values of existing rules. + type: string + - in: query + name: paused + schema: + description: When true, indicates that the rule is currently paused. + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFirewalluablockResponseCollection' + description: List User Agent Blocking rules response + 4XX: + content: + application/json: + schema: + properties: + result: + items: + $ref: '#/components/schemas/firewallFirewalluablock' + type: object + type: array + enum: + - null + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List User Agent Blocking rules response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List User Agent Blocking rules + tags: + - User Agent Blocking rules + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - ua_rules + method: list + post: + description: Creates a new User Agent Blocking rule in a zone. + operationId: user-agent-blocking-rules-create-a-user-agent-blocking-rule + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + configuration: + $ref: '#/components/schemas/firewallUaConfiguration' + description: + $ref: '#/components/schemas/firewallDescription' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + required: + - mode + - configuration + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFirewalluablockResponseSingle' + description: Create a User Agent Blocking rule response + 4XX: + content: + application/json: + schema: + properties: + result: + properties: + configuration: + $ref: '#/components/schemas/firewallSchemasConfiguration' + description: + $ref: '#/components/schemas/firewallFirewalluablockComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallComponentsUaRuleId' + mode: + $ref: '#/components/schemas/firewallComponentsSchemasMode' + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + type: object + enum: + - null + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create a User Agent Blocking rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a User Agent Blocking rule + tags: + - User Agent Blocking rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - ua_rules + method: create + /zones/{zone_id}/firewall/ua_rules/{ua_rule_id}: + delete: + description: Deletes an existing User Agent Blocking rule. + operationId: user-agent-blocking-rules-delete-a-user-agent-blocking-rule + parameters: + - in: path + name: ua_rule_id + schema: + $ref: '#/components/schemas/firewallComponentsUaRuleId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + id: + $ref: '#/components/schemas/firewallComponentsUaRuleId' + configuration: + $ref: '#/components/schemas/firewallSchemasConfiguration' + description: + $ref: '#/components/schemas/firewallFirewalluablockComponentsSchemasDescription' + mode: + $ref: '#/components/schemas/firewallComponentsSchemasMode' + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + type: object + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + type: boolean + type: object + required: + - success + - errors + - messages + - result + description: Delete a User Agent Blocking rule response + 4XX: + content: + application/json: + schema: + properties: + result: + properties: + configuration: + $ref: '#/components/schemas/firewallSchemasConfiguration' + description: + $ref: '#/components/schemas/firewallFirewalluablockComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallComponentsUaRuleId' + mode: + $ref: '#/components/schemas/firewallComponentsSchemasMode' + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + type: object + enum: + - null + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete a User Agent Blocking rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a User Agent Blocking rule + tags: + - User Agent Blocking rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - ua_rules + method: delete + get: + description: Fetches the details of a User Agent Blocking rule. + operationId: user-agent-blocking-rules-get-a-user-agent-blocking-rule + parameters: + - in: path + name: ua_rule_id + schema: + $ref: '#/components/schemas/firewallComponentsUaRuleId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFirewalluablockResponseSingle' + description: Get a User Agent Blocking rule response + 4XX: + content: + application/json: + schema: + properties: + result: + properties: + configuration: + $ref: '#/components/schemas/firewallSchemasConfiguration' + description: + $ref: '#/components/schemas/firewallFirewalluablockComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallComponentsUaRuleId' + mode: + $ref: '#/components/schemas/firewallComponentsSchemasMode' + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + type: object + enum: + - null + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get a User Agent Blocking rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a User Agent Blocking rule + tags: + - User Agent Blocking rules + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - ua_rules + method: get + put: + description: Updates an existing User Agent Blocking rule. + operationId: user-agent-blocking-rules-update-a-user-agent-blocking-rule + parameters: + - in: path + name: ua_rule_id + schema: + $ref: '#/components/schemas/firewallComponentsUaRuleId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + configuration: + $ref: '#/components/schemas/firewallConfiguration' + description: + $ref: '#/components/schemas/firewallDescription' + id: + $ref: '#/components/schemas/firewallComponentsSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + required: + - id + - mode + - configuration + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallFirewalluablockResponseSingle' + description: Update a User Agent Blocking rule response + 4XX: + content: + application/json: + schema: + properties: + result: + properties: + configuration: + $ref: '#/components/schemas/firewallSchemasConfiguration' + description: + $ref: '#/components/schemas/firewallFirewalluablockComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallComponentsUaRuleId' + mode: + $ref: '#/components/schemas/firewallComponentsSchemasMode' + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + type: object + enum: + - null + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update a User Agent Blocking rule response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a User Agent Blocking rule + tags: + - User Agent Blocking rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - ua_rules + method: update + /zones/{zone_id}/firewall/waf/overrides: + get: + deprecated: true + description: Fetches the URI-based WAF overrides in a zone. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-overrides-list-waf-overrides + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: The page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 50 + description: The number of WAF overrides per page. + maximum: 100 + minimum: 5 + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallOverrideResponseCollection' + description: List WAF overrides response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallOverride' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: List WAF overrides response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List WAF overrides + tags: + - WAF overrides + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - overrides + method: list + post: + deprecated: true + description: Creates a URI-based WAF override for a zone. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-overrides-create-a-waf-override + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + urls: + $ref: '#/components/schemas/firewallUrls' + required: + - urls + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallOverrideResponseSingle' + description: Create a WAF override response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + properties: + description: + $ref: '#/components/schemas/firewallComponentsSchemasDescription' + groups: + $ref: '#/components/schemas/firewallGroups' + id: + $ref: '#/components/schemas/firewallOverridesId' + paused: + $ref: '#/components/schemas/firewallPaused' + priority: + $ref: '#/components/schemas/firewallPriority' + rewrite_action: + $ref: '#/components/schemas/firewallRewriteAction' + rules: + $ref: '#/components/schemas/firewallRules' + urls: + $ref: '#/components/schemas/firewallUrls' + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Create a WAF override response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a WAF override + tags: + - WAF overrides + x-api-token-group: + - Zone Settings Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - overrides + method: create + /zones/{zone_id}/firewall/waf/overrides/{overrides_id}: + delete: + deprecated: true + description: Deletes an existing URI-based WAF override. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-overrides-delete-a-waf-override + parameters: + - in: path + name: overrides_id + schema: + $ref: '#/components/schemas/firewallOverridesId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + id: + $ref: '#/components/schemas/firewallOverridesId' + type: object + type: object + description: Delete a WAF override response + 4XX: + content: + application/json: + schema: + properties: + result: + properties: + id: + $ref: '#/components/schemas/firewallOverridesId' + type: object + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - false + type: boolean + type: object + required: + - success + - errors + - messages + - result + description: Delete a WAF override response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a WAF override + tags: + - WAF overrides + x-api-token-group: + - Zone Settings Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - overrides + method: delete + get: + deprecated: true + description: Fetches the details of a URI-based WAF override. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-overrides-get-a-waf-override + parameters: + - in: path + name: overrides_id + schema: + $ref: '#/components/schemas/firewallOverridesId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallOverrideResponseSingle' + description: Get a WAF override response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + properties: + description: + $ref: '#/components/schemas/firewallComponentsSchemasDescription' + groups: + $ref: '#/components/schemas/firewallGroups' + id: + $ref: '#/components/schemas/firewallOverridesId' + paused: + $ref: '#/components/schemas/firewallPaused' + priority: + $ref: '#/components/schemas/firewallPriority' + rewrite_action: + $ref: '#/components/schemas/firewallRewriteAction' + rules: + $ref: '#/components/schemas/firewallRules' + urls: + $ref: '#/components/schemas/firewallUrls' + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Get a WAF override response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a WAF override + tags: + - WAF overrides + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - overrides + method: get + put: + deprecated: true + description: Updates an existing URI-based WAF override. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-overrides-update-waf-override + parameters: + - in: path + name: overrides_id + schema: + $ref: '#/components/schemas/firewallOverridesId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + id: + $ref: '#/components/schemas/firewallIdentifier' + rewrite_action: + $ref: '#/components/schemas/firewallRewriteAction' + rules: + $ref: '#/components/schemas/firewallRules' + urls: + $ref: '#/components/schemas/firewallUrls' + required: + - id + - urls + - rules + - rewrite_action + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallOverrideResponseSingle' + description: Update WAF override response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + properties: + description: + $ref: '#/components/schemas/firewallComponentsSchemasDescription' + groups: + $ref: '#/components/schemas/firewallGroups' + id: + $ref: '#/components/schemas/firewallOverridesId' + paused: + $ref: '#/components/schemas/firewallPaused' + priority: + $ref: '#/components/schemas/firewallPriority' + rewrite_action: + $ref: '#/components/schemas/firewallRewriteAction' + rules: + $ref: '#/components/schemas/firewallRules' + urls: + $ref: '#/components/schemas/firewallUrls' + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - result + - success + - errors + - messages + - result + description: Update WAF override response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update WAF override + tags: + - WAF overrides + x-api-token-group: + - Zone Settings Write + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - overrides + method: update + /zones/{zone_id}/firewall/waf/packages: + get: + deprecated: true + description: Fetches WAF packages for a zone. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-packages-list-waf-packages + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + description: The page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 50 + description: The number of packages per page. + maximum: 100 + minimum: 5 + type: number + - in: query + name: order + schema: + description: The field used to sort returned packages. + enum: + - name + type: string + - in: query + name: direction + schema: + description: The direction used to sort returned packages. + enum: + - asc + - desc + type: string + - in: query + name: match + schema: + default: all + description: When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. + enum: + - any + - all + type: string + - in: query + name: name + schema: + description: The name of the WAF package. + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallPackageResponseCollection' + description: List WAF packages response + 4XX: + content: + application/json: + schema: + properties: + errors: + minLength: 1 + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Defines whether the API call was successful. + enum: + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - errors + - messages + - result + - success + type: object + description: List WAF packages response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List WAF packages + tags: + - WAF packages + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - packages + method: list + /zones/{zone_id}/firewall/waf/packages/{package_id}: + get: + deprecated: true + description: Fetches the details of a WAF package. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-packages-get-a-waf-package + parameters: + - in: path + name: package_id + schema: + $ref: '#/components/schemas/firewallPackageId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallPackageResponseSingle' + description: Get a WAF package response + 4XX: + content: + application/json: + schema: + properties: + errors: + minLength: 1 + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Defines whether the API call was successful. + enum: + - false + type: boolean + required: + - errors + - messages + - result + - success + type: object + description: Get a WAF package response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a WAF package + tags: + - WAF packages + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - packages + method: get + patch: + deprecated: true + description: Updates a WAF package. You can update the sensitivity and the action of an anomaly detection WAF package. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-packages-update-a-waf-package + parameters: + - in: path + name: package_id + schema: + $ref: '#/components/schemas/firewallPackageId' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + action_mode: + $ref: '#/components/schemas/firewallActionMode' + sensitivity: + $ref: '#/components/schemas/firewallSensitivity' + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + $ref: '#/components/schemas/firewallAnomalyPackage' + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + type: boolean + type: object + required: + - errors + - success + - result + - messages + description: Update a WAF package response + 4XX: + content: + application/json: + schema: + properties: + result: + required: + - id + - name + - description + - detection_mode + - zone_id + title: Anomaly detection WAF package (OWASP) + properties: + description: + description: A summary of the purpose/function of the WAF package. + readOnly: true + type: string + detection_mode: + description: When a WAF package uses anomaly detection, each rule is given a score when triggered. If the total score of all triggered rules exceeds the sensitivity defined on the WAF package, the action defined on the package will be taken. + enum: + - anomaly + - traditional + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallIdentifier' + name: + description: The name of the WAF package. + readOnly: true + type: string + status: + $ref: '#/components/schemas/firewallStatus' + zone_id: + $ref: '#/components/schemas/firewallIdentifier' + action_mode: + $ref: '#/components/schemas/firewallActionMode' + sensitivity: + $ref: '#/components/schemas/firewallSensitivity' + type: object + enum: + - null + errors: + minLength: 1 + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - false + type: boolean + required: + - errors + - messages + - result + - success + type: object + description: Update a WAF package response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a WAF package + tags: + - WAF packages + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + /zones/{zone_id}/firewall/waf/packages/{package_id}/groups: + get: + deprecated: true + description: Fetches the WAF rule groups in a WAF package. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-rule-groups-list-waf-rule-groups + parameters: + - in: path + name: package_id + schema: + $ref: '#/components/schemas/wafManagedRulesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: mode + schema: + $ref: '#/components/schemas/wafManagedRulesMode' + - in: query + name: page + schema: + default: 1 + description: Defines the page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 50 + description: Defines the number of rule groups per page. + maximum: 100 + minimum: 5 + type: number + - in: query + name: order + schema: + description: Defines the field used to sort returned rule groups. + enum: + - mode + - rules_count + type: string + - in: query + name: direction + schema: + description: Defines the direction used to sort returned rule groups. + enum: + - asc + - desc + type: string + - in: query + name: match + schema: + default: all + description: Defines the condition for search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. + enum: + - any + - all + type: string + - in: query + name: name + schema: + description: Defines the name of the rule group. + type: string + - in: query + name: rules_count + schema: + default: 0 + description: Defines the number of rules in the current rule group. + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/wafManagedRulesRuleGroupResponseCollection' + description: Defines the list WAF rule groups response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/wafManagedRulesResultInfo' + result: + items: + $ref: '#/components/schemas/wafManagedRulesSchemasGroup' + type: array + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Defines the list WAF rule groups response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List WAF rule groups + tags: + - WAF rule groups + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - packages + - groups + method: list + /zones/{zone_id}/firewall/waf/packages/{package_id}/groups/{group_id}: + get: + deprecated: true + description: Fetches the details of a WAF rule group. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-rule-groups-get-a-waf-rule-group + parameters: + - name: group_id + in: path + required: true + description: The Access group ID. + schema: + type: string + - in: path + name: package_id + schema: + $ref: '#/components/schemas/wafManagedRulesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/wafManagedRulesRuleGroupResponseSingle' + description: Get a WAF rule group response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result: + type: object + enum: + - null + nullable: true + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get a WAF rule group response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a WAF rule group + tags: + - WAF rule groups + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - packages + - groups + method: get + patch: + deprecated: true + description: Updates a WAF rule group. You can update the state (`mode` parameter) of a rule group. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-rule-groups-update-a-waf-rule-group + parameters: + - name: group_id + in: path + required: true + description: The Access group ID. + schema: + type: string + - in: path + name: package_id + schema: + $ref: '#/components/schemas/wafManagedRulesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + mode: + $ref: '#/components/schemas/wafManagedRulesMode' + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/wafManagedRulesRuleGroupResponseSingle' + description: Update a WAF rule group response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result: + type: object + enum: + - null + nullable: true + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update a WAF rule group response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a WAF rule group + tags: + - WAF rule groups + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - packages + - groups + method: edit + /zones/{zone_id}/firewall/waf/packages/{package_id}/rules: + get: + deprecated: true + description: Fetches WAF rules in a WAF package. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-rules-list-waf-rules + parameters: + - in: path + name: package_id + schema: + $ref: '#/components/schemas/wafManagedRulesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: mode + schema: + description: Defines the action/mode a rule has been overridden to perform. + enum: + - DIS + - CHL + - BLK + - SIM + type: string + - in: query + name: group_id + schema: + $ref: '#/components/schemas/wafManagedRulesComponentsSchemasIdentifier' + - in: query + name: page + schema: + default: 1 + description: Defines the page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 50 + description: Defines the number of rules per page. + maximum: 100 + minimum: 5 + type: number + - in: query + name: order + schema: + description: Defines the field used to sort returned rules. + enum: + - priority + - group_id + - description + type: string + - in: query + name: direction + schema: + description: Defines the direction used to sort returned rules. + enum: + - asc + - desc + type: string + - in: query + name: match + schema: + default: all + description: Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. + enum: + - any + - all + type: string + - in: query + name: description + schema: + description: Defines the public description of the WAF rule. + type: string + - in: query + name: priority + schema: + description: Defines the order in which the individual WAF rule is executed within its rule group. + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/wafManagedRulesRuleResponseCollection' + description: List WAF rules response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/wafManagedRulesResultInfo' + result: + items: + $ref: '#/components/schemas/wafManagedRulesRule' + type: array + enum: + - null + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List WAF rules response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List WAF rules + tags: + - WAF rules + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - packages + - rules + method: list + /zones/{zone_id}/firewall/waf/packages/{package_id}/rules/{rule_id}: + get: + deprecated: true + description: Fetches the details of a WAF rule in a WAF package. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-rules-get-a-waf-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - in: path + name: package_id + schema: + $ref: '#/components/schemas/wafManagedRulesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/wafManagedRulesRuleResponseSingle' + description: Get a WAF rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result: + type: object + enum: + - null + nullable: true + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get a WAF rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get a WAF rule + tags: + - WAF rules + x-api-token-group: + - Firewall Services Write + - Firewall Services Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - packages + - rules + method: get + patch: + deprecated: true + description: Updates a WAF rule. You can only update the mode/action of the rule. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). + operationId: waf-rules-update-a-waf-rule + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - in: path + name: package_id + schema: + $ref: '#/components/schemas/wafManagedRulesIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + mode: + description: Defines the mode/action of the rule when triggered. You must use a value from the `allowed_modes` array of the current rule. + enum: + - default + - disable + - simulate + - block + - challenge + - 'on' + - 'off' + type: string + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + type: boolean + result: + type: object + title: Anomaly detection WAF rule + description: When triggered, anomaly detection WAF rules contribute to an overall threat score that will determine if a request is considered malicious. You can configure the total scoring threshold through the 'sensitivity' property of the WAF package. + properties: + description: + $ref: '#/components/schemas/wafManagedRulesSchemasDescription' + group: + $ref: '#/components/schemas/unnamedSchemaRef532d8b97684c9032dd36bae8acddebf5' + id: + $ref: '#/components/schemas/wafManagedRulesRuleComponentsSchemasIdentifier' + package_id: + $ref: '#/components/schemas/wafManagedRulesIdentifier' + priority: + $ref: '#/components/schemas/wafManagedRulesPriority' + allowed_modes: + $ref: '#/components/schemas/wafManagedRulesAllowedModesAnomaly' + mode: + $ref: '#/components/schemas/wafManagedRulesModeAnomaly' + default_mode: + $ref: '#/components/schemas/wafManagedRulesDefaultMode' + required: + - allowed_modes + - description + - group + - id + - mode + - package_id + - priority + required: + - success + - errors + - messages + - result + description: Update a WAF rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result: + type: object + enum: + - null + title: Anomaly detection WAF rule + description: When triggered, anomaly detection WAF rules contribute to an overall threat score that will determine if a request is considered malicious. You can configure the total scoring threshold through the 'sensitivity' property of the WAF package. + properties: + description: + $ref: '#/components/schemas/wafManagedRulesSchemasDescription' + group: + $ref: '#/components/schemas/unnamedSchemaRef532d8b97684c9032dd36bae8acddebf5' + id: + $ref: '#/components/schemas/wafManagedRulesRuleComponentsSchemasIdentifier' + package_id: + $ref: '#/components/schemas/wafManagedRulesIdentifier' + priority: + $ref: '#/components/schemas/wafManagedRulesPriority' + allowed_modes: + $ref: '#/components/schemas/wafManagedRulesAllowedModesAnomaly' + mode: + $ref: '#/components/schemas/wafManagedRulesModeAnomaly' + default_mode: + $ref: '#/components/schemas/wafManagedRulesDefaultMode' + required: + - allowed_modes + - description + - group + - id + - mode + - package_id + - priority + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update a WAF rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update a WAF rule + tags: + - WAF rules + x-api-token-group: + - Firewall Services Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - waf + - packages + - rules + method: edit + /accounts/{account_id}/firewall/access_rules/rules: + get: + description: Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters. + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: mode + schema: + $ref: '#/components/schemas/firewallSchemasMode' + - in: query + name: configuration.target + schema: + description: Defines the target to search in existing rules. + enum: + - ip + - ip_range + - asn + - country + type: string + - in: query + name: configuration.value + schema: + description: 'Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`. Notes: You can search for a single IPv4 address, an IP address range with a subnet of ''/16'' or ''/24'', or a two-letter ISO-3166-1 alpha-2 country code.' + type: string + - in: query + name: notes + schema: + description: 'Defines the string to search for in the notes of existing IP Access rules. Notes: For example, the string ''attack'' would match IP Access rules with notes ''Attack 26/02'' and ''Attack 27/02''. The search is case insensitive.' + type: string + - in: query + name: match + schema: + default: all + description: Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. + enum: + - any + - all + type: string + - in: query + name: page + schema: + description: Defines the requested page within paginated list of results. + type: number + - in: query + name: per_page + schema: + description: Defines the maximum number of results requested. + type: number + - in: query + name: order + schema: + description: Defines the field used to sort returned rules. + enum: + - configuration.target + - configuration.value + - mode + type: string + - in: query + name: direction + schema: + description: Defines the direction used to sort returned rules. + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallResponseCollection' + description: List IP Access rules response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallSchemasRule' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List IP Access rules response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List IP Access rules + tags: [] + x-api-token-group: + - Account Firewall Access Rules Write + - Account Firewall Access Rules Read + x-cfPermissionsRequired: + enum: + - '#waf:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - access_rules + method: list + operationId: get_accounts_account_id_firewall_access_rules_rules + post: + description: 'Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.' + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + configuration: + $ref: '#/components/schemas/firewallConfiguration' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + notes: + $ref: '#/components/schemas/firewallNotes' + default: '' + required: + - mode + - configuration + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallResponseSingle' + description: Create an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + required: + - id + - mode + - allowed_modes + - configuration + type: object + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + scope: + description: All zones owned by the user will have the rule applied. + properties: + email: + $ref: '#/components/schemas/firewallEmail' + id: + $ref: '#/components/schemas/firewallIdentifier' + type: + description: Defines the scope of the rule. + enum: + - user + - organization + readOnly: true + type: string + readOnly: true + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create an IP Access rule + tags: [] + x-api-token-group: + - Account Firewall Access Rules Write + x-cfPermissionsRequired: + enum: + - '#waf:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - access_rules + method: create + operationId: post_accounts_account_id_firewall_access_rules_rules + /zones/{zone_id}/firewall/access_rules/rules: + get: + description: Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters. + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: mode + schema: + $ref: '#/components/schemas/firewallSchemasMode' + - in: query + name: configuration.target + schema: + description: Defines the target to search in existing rules. + enum: + - ip + - ip_range + - asn + - country + type: string + - in: query + name: configuration.value + schema: + description: 'Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`. Notes: You can search for a single IPv4 address, an IP address range with a subnet of ''/16'' or ''/24'', or a two-letter ISO-3166-1 alpha-2 country code.' + type: string + - in: query + name: notes + schema: + description: 'Defines the string to search for in the notes of existing IP Access rules. Notes: For example, the string ''attack'' would match IP Access rules with notes ''Attack 26/02'' and ''Attack 27/02''. The search is case insensitive.' + type: string + - in: query + name: match + schema: + default: all + description: Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. + enum: + - any + - all + type: string + - in: query + name: page + schema: + description: Defines the requested page within paginated list of results. + type: number + - in: query + name: per_page + schema: + description: Defines the maximum number of results requested. + type: number + - in: query + name: order + schema: + description: Defines the field used to sort returned rules. + enum: + - configuration.target + - configuration.value + - mode + type: string + - in: query + name: direction + schema: + description: Defines the direction used to sort returned rules. + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallResponseCollection' + description: List IP Access rules response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallSchemasRule' + nullable: true + type: array + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List IP Access rules response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List IP Access rules + tags: [] + x-api-token-group: + - Account Firewall Access Rules Write + - Account Firewall Access Rules Read + x-cfPermissionsRequired: + enum: + - '#waf:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - access_rules + method: list + operationId: get_zones_zone_id_firewall_access_rules_rules + post: + description: 'Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.' + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + configuration: + $ref: '#/components/schemas/firewallConfiguration' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + notes: + $ref: '#/components/schemas/firewallNotes' + default: '' + required: + - mode + - configuration + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallResponseSingle' + description: Create an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + required: + - id + - mode + - allowed_modes + - configuration + type: object + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + scope: + description: All zones owned by the user will have the rule applied. + properties: + email: + $ref: '#/components/schemas/firewallEmail' + id: + $ref: '#/components/schemas/firewallIdentifier' + type: + description: Defines the scope of the rule. + enum: + - user + - organization + readOnly: true + type: string + readOnly: true + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create an IP Access rule + tags: [] + x-api-token-group: + - Account Firewall Access Rules Write + x-cfPermissionsRequired: + enum: + - '#waf:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - access_rules + method: create + operationId: post_zones_zone_id_firewall_access_rules_rules + /accounts/{account_id}/firewall/access_rules/rules/{rule_id}: + get: + description: Fetches the details of an IP Access rule defined. + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallResponseSingle' + description: Get an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + required: + - id + - mode + - allowed_modes + - configuration + type: object + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + scope: + description: All zones owned by the user will have the rule applied. + properties: + email: + $ref: '#/components/schemas/firewallEmail' + id: + $ref: '#/components/schemas/firewallIdentifier' + type: + description: Defines the scope of the rule. + enum: + - user + - organization + readOnly: true + type: string + readOnly: true + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an IP Access rule + tags: [] + x-api-token-group: + - Account Firewall Access Rules Write + - Account Firewall Access Rules Read + x-cfPermissionsRequired: + enum: + - '#waf:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - access_rules + method: get + operationId: get_accounts_account_id_firewall_access_rules_rules_rule_id + delete: + description: 'Deletes an existing IP Access rule defined. Note: This operation will affect all zones in the account or zone.' + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallApiResponseSingleId' + description: Delete an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/firewallIdentifier' + required: + - id + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an IP Access rule + tags: [] + x-api-token-group: + - Account Firewall Access Rules Write + x-cfPermissionsRequired: + enum: + - '#waf:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - access_rules + method: delete + operationId: delete_accounts_account_id_firewall_access_rules_rules_rule_id + patch: + description: 'Updates an IP Access rule defined. Note: This operation will affect all zones in the account or zone.' + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/firewallSchemasRule' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallResponseSingle' + description: Update an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + required: + - id + - mode + - allowed_modes + - configuration + type: object + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + scope: + description: All zones owned by the user will have the rule applied. + properties: + email: + $ref: '#/components/schemas/firewallEmail' + id: + $ref: '#/components/schemas/firewallIdentifier' + type: + description: Defines the scope of the rule. + enum: + - user + - organization + readOnly: true + type: string + readOnly: true + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an IP Access rule + tags: [] + x-api-token-group: + - Account Firewall Access Rules Write + x-cfPermissionsRequired: + enum: + - '#waf:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - access_rules + method: edit + operationId: patch_accounts_account_id_firewall_access_rules_rules_rule_id + /zones/{zone_id}/firewall/access_rules/rules/{rule_id}: + get: + description: Fetches the details of an IP Access rule defined. + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallResponseSingle' + description: Get an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + required: + - id + - mode + - allowed_modes + - configuration + type: object + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + scope: + description: All zones owned by the user will have the rule applied. + properties: + email: + $ref: '#/components/schemas/firewallEmail' + id: + $ref: '#/components/schemas/firewallIdentifier' + type: + description: Defines the scope of the rule. + enum: + - user + - organization + readOnly: true + type: string + readOnly: true + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get an IP Access rule + tags: [] + x-api-token-group: + - Account Firewall Access Rules Write + - Account Firewall Access Rules Read + x-cfPermissionsRequired: + enum: + - '#waf:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - access_rules + method: get + operationId: get_zones_zone_id_firewall_access_rules_rules_rule_id + delete: + description: 'Deletes an existing IP Access rule defined. Note: This operation will affect all zones in the account or zone.' + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallApiResponseSingleId' + description: Delete an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/firewallIdentifier' + required: + - id + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete an IP Access rule + tags: [] + x-api-token-group: + - Account Firewall Access Rules Write + x-cfPermissionsRequired: + enum: + - '#waf:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - access_rules + method: delete + operationId: delete_zones_zone_id_firewall_access_rules_rules_rule_id + patch: + description: 'Updates an IP Access rule defined. Note: This operation will affect all zones in the account or zone.' + parameters: + - name: rule_id + in: path + required: true + description: The rule ID. + schema: + type: string + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/firewallSchemasRule' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/firewallResponseSingle' + description: Update an IP Access rule response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + required: + - id + - mode + - allowed_modes + - configuration + type: object + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + scope: + description: All zones owned by the user will have the rule applied. + properties: + email: + $ref: '#/components/schemas/firewallEmail' + id: + $ref: '#/components/schemas/firewallIdentifier' + type: + description: Defines the scope of the rule. + enum: + - user + - organization + readOnly: true + type: string + readOnly: true + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update an IP Access rule response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update an IP Access rule + tags: [] + x-api-token-group: + - Account Firewall Access Rules Write + x-cfPermissionsRequired: + enum: + - '#waf:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: firewall + resource_chain: + - access_rules + method: edit + operationId: patch_zones_zone_id_firewall_access_rules_rules_rule_id + /graphql/firewall_events_adaptive_groups: + post: + operationId: graphql-firewall_events_adaptive_groups-list + summary: Firewall event analytics for a zone, with adaptive sampling, grouped by action / source / rule / country / status + description: Firewall event analytics for a zone, with adaptive sampling, grouped by action / source / rule / country / status. Each row aggregates the count of firewall events for one dimension tuple over the requested time window. Useful for surfacing top blocking rules, top blocked countries, top targeted paths. + x-stackQL-graphQL: + url: https://api.cloudflare.com/client/v4/graphql + httpVerb: POST + responseSelection: + jsonPath: $.result[*] + cursor: + strategy: keyset + jsonPath: $.data.viewer.zones[0].firewallEventsAdaptiveGroups[-1:].dimensions.datetime + format: ', AND datetime_gt: "{{ .value }}"' + query: "query {\n viewer {\n zones(filter: { zoneTag: \"{{ .zone_tag }}\" }, limit: 1) {\n firewallEventsAdaptiveGroups(\n filter: { datetime_geq: \"{{ .since }}\", datetime_lt: \"{{ .until }}\"{{ .cursor }} }\n limit: {{ if .limit }}{{ .limit }}{{ else }}100{{ end }}\n orderBy: [datetimeMinute_ASC]\n ) {\n dimensions {\n datetime: datetimeMinute\n action\n source\n ruleId\n rulesetId\n clientCountryName\n clientIP\n clientASNDescription\n edgeResponseStatus\n clientRequestPath\n clientRequestHTTPHost\n }\n count\n }\n }\n }\n}\n" + x-stackql-protocol: graphql + parameters: + - name: zone_tag + in: path + required: true + schema: + type: string + description: Cloudflare zone ID (the 32-char hex tag). + - name: since + in: query + required: true + schema: + type: string + format: date-time + description: Lower bound (inclusive) of the time range. RFC3339 (e.g. 2026-05-29T00:00:00Z). + - name: until + in: query + required: true + schema: + type: string + format: date-time + description: Upper bound (exclusive) of the time range. RFC3339. + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + description: Maximum number of dimension-tuple rows to return per call. + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + datetime: + type: string + format: date-time + description: Minute-bucketed timestamp (RFC3339). + action: + type: string + description: First-class action taken by the firewall (block, challenge, jschallenge, log, allow, etc.). + source: + type: string + description: Cloudflare security product that triggered the event (waf, firewallrules, ratelimit, etc.). + rule_id: + type: string + description: Product-specific rule ID triggered by this event. + ruleset_id: + type: string + description: Product-specific ruleset ID triggered by this event. + client_country_name: + type: string + description: ISO-3166 alpha-2 country code derived from client IP. + client_ip: + type: string + description: Visitor IP address (IPv4 or IPv6). + client_asn_description: + type: string + description: Visitor ASN as a string (e.g. AS15169 Google LLC). + edge_response_status: + type: integer + description: HTTP status returned to the client. + client_request_path: + type: string + description: Path component of the client request. + client_request_http_host: + type: string + description: Hostname component of the client request. + events: + type: integer + description: Number of firewall events contributing to this dimension tuple. + /graphql/firewall_events: + post: + operationId: graphql-firewall_events-list + summary: Raw firewall event stream for a zone + description: Raw firewall event stream for a zone. One row per event with attacker context (IP, ASN, country) and rule context (action, source, ruleId). Use for incident drill-down rather than rollups. + x-stackQL-graphQL: + url: https://api.cloudflare.com/client/v4/graphql + httpVerb: POST + responseSelection: + jsonPath: $.result[*] + cursor: + strategy: keyset + jsonPath: $.data.viewer.zones[0].firewallEventsAdaptive[-1:].datetime + format: ', AND datetime_lt: "{{ .value }}"' + query: "query {\n viewer {\n zones(filter: { zoneTag: \"{{ .zone_tag }}\" }, limit: 1) {\n firewallEventsAdaptive(\n filter: { datetime_geq: \"{{ .since }}\", datetime_lt: \"{{ .until }}\"{{ .cursor }} }\n limit: {{ if .limit }}{{ .limit }}{{ else }}100{{ end }}\n orderBy: [datetime_DESC]\n ) {\n datetime\n action\n source\n ruleId\n rulesetId\n ref\n clientIP\n clientAsn\n clientASNDescription\n clientCountryName\n clientRequestHTTPHost\n clientRequestHTTPMethodName\n clientRequestPath\n edgeColoName\n edgeResponseStatus\n originResponseStatus\n rayName\n userAgent\n }\n }\n }\n}\n" + x-stackql-protocol: graphql + parameters: + - name: zone_tag + in: path + required: true + schema: + type: string + description: Cloudflare zone ID (the 32-char hex tag). + - name: since + in: query + required: true + schema: + type: string + format: date-time + description: Lower bound (inclusive) of the time range. RFC3339. + - name: until + in: query + required: true + schema: + type: string + format: date-time + description: Upper bound (exclusive) of the time range. RFC3339. + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + description: Maximum number of events to return per call. + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + datetime: + type: string + format: date-time + description: Event timestamp (RFC3339). + action: + type: string + description: First-class action (block / challenge / allow / log / etc.). + source: + type: string + description: Security product that fired (waf / firewallrules / ratelimit / etc.). + rule_id: + type: string + description: Product-specific rule ID. + ruleset_id: + type: string + description: Product-specific ruleset ID. + ref: + type: string + description: User-defined rule ref tag. + client_ip: + type: string + description: Visitor IP (v4 or v6). + client_asn: + type: integer + description: Visitor ASN. + client_asn_description: + type: string + description: Visitor ASN description. + client_country_name: + type: string + description: ISO-3166 alpha-2 country code. + client_request_http_host: + type: string + client_request_http_method_name: + type: string + client_request_path: + type: string + edge_colo_name: + type: string + description: IATA code of the Cloudflare colo that served the request. + edge_response_status: + type: integer + origin_response_status: + type: integer + ray_name: + type: string + description: Cloudflare Ray ID. + user_agent: + type: string +components: + schemas: + firewallAction: + description: The action to perform when the threshold of matched traffic within the configured period is exceeded. + type: object + properties: + mode: + $ref: '#/components/schemas/firewallMode' + response: + $ref: '#/components/schemas/firewallCustomResponse' + timeout: + $ref: '#/components/schemas/firewallTimeout' + firewallActionMode: + default: challenge + description: The default action performed by the rules in the WAF package. + enum: + - simulate + - block + - challenge + type: string + firewallAnomalyPackage: + required: + - id + - name + - description + - detection_mode + - zone_id + title: Anomaly detection WAF package (OWASP) + properties: + description: + description: A summary of the purpose/function of the WAF package. + example: Covers OWASP Top 10 vulnerabilities and more. + readOnly: true + type: string + detection_mode: + description: When a WAF package uses anomaly detection, each rule is given a score when triggered. If the total score of all triggered rules exceeds the sensitivity defined on the WAF package, the action defined on the package will be taken. + enum: + - anomaly + - traditional + example: anomaly + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallIdentifier' + name: + description: The name of the WAF package. + example: OWASP ModSecurity Core Rule Set + readOnly: true + type: string + status: + $ref: '#/components/schemas/firewallStatus' + zone_id: + $ref: '#/components/schemas/firewallIdentifier' + action_mode: + $ref: '#/components/schemas/firewallActionMode' + sensitivity: + $ref: '#/components/schemas/firewallSensitivity' + type: object + firewallApiResponseSingleId: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/firewallIdentifier' + required: + - id + type: object + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + firewallBody: + description: The response body to return. The value must conform to the configured content type. + example: This request has been rate-limited. + maxLength: 10240 + type: string + firewallComponentsSchemasDescription: + description: An informative summary of the current URI-based WAF override. + example: Enable Cloudflare Magento ruleset for shop.example.com + maxLength: 1024 + nullable: true + type: string + x-auditable: true + firewallComponentsSchemasIdentifier: + description: The unique identifier of the resource. + example: de677e5818985db1285d0e80225f06e5 + maxLength: 32 + readOnly: true + type: string + firewallComponentsSchemasMode: + description: The action to apply to a matched request. + enum: + - block + - challenge + - js_challenge + - managed_challenge + example: js_challenge + maxLength: 12 + type: string + firewallComponentsSchemasPaused: + description: When true, indicates that the firewall rule is currently paused. + example: false + type: boolean + firewallComponentsSchemasPriority: + description: The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules without a priority. + example: 50 + maximum: 2147483647 + minimum: 0 + type: number + firewallComponentsUaRuleId: + description: The unique identifier of the User Agent Blocking rule. + example: 372e67954025e0ba6aaa6d586b9e0b59 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + firewallConfiguration: + description: The rule configuration. + type: object + title: An IP address configuration. + properties: + target: + description: The configuration target. You must set the target to `ip` when specifying an IP address in the rule. + enum: + - ip + example: ip + type: string + value: + description: The IP address to match. This address will be compared to the IP address of incoming requests. + example: 198.51.100.4 + type: string + firewallConfigurations: + description: A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. + items: + type: object + title: An IP address configuration. + properties: + target: + description: The configuration target. You must set the target to `ip` when specifying an IP address in the Zone Lockdown rule. + enum: + - ip + example: ip + type: string + value: + description: The IP address to match. This address will be compared to the IP address of incoming requests. + example: 198.51.100.4 + type: string + type: array + firewallContentType: + description: 'The content type of the body. Must be one of the following: `text/plain`, `text/xml`, or `application/json`.' + example: text/xml + maxLength: 50 + type: string + x-auditable: true + firewallCreatedOn: + description: The timestamp of when the rule was created. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + x-auditable: true + firewallCustomResponse: + description: 'A custom content type and reponse to return when the threshold is exceeded. The custom response configured in this object will override the custom error for the zone. This object is optional. Notes: If you omit this object, Cloudflare will use the default HTML error page. If "mode" is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the zone challenge pages and you should not provide the "response" object.' + type: object + properties: + body: + $ref: '#/components/schemas/firewallBody' + content_type: + $ref: '#/components/schemas/firewallContentType' + firewallDeleted: + description: When true, indicates that the firewall rule was deleted. + example: true + type: boolean + firewallDescription: + description: An informative summary of the rule. This value is sanitized and any tags will be removed. + example: Prevent multiple login failures to mitigate brute force attacks + maxLength: 1024 + type: string + x-auditable: true + firewallDescriptionSearch: + description: A string to search for in the description of existing rules. + example: abusive + type: string + x-auditable: true + firewallEmail: + description: The contact email address of the user. + example: user@example.com + maxLength: 90 + type: string + firewallExpression: + description: The filter expression. For more information, refer to [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + example: (http.request.uri.path ~ ".*wp-login.php" or http.request.uri.path ~ ".*xmlrpc.php") and ip.addr ne 172.16.22.155 + type: string + firewallFilter: + properties: + description: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasDescription' + expression: + $ref: '#/components/schemas/firewallExpression' + id: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasId' + paused: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasPaused' + ref: + $ref: '#/components/schemas/firewallSchemasRef' + type: object + firewallFilterRuleResponse: + type: object + properties: + action: + $ref: '#/components/schemas/firewallSchemasAction' + description: + $ref: '#/components/schemas/firewallFirewallRulesComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallFirewallRulesComponentsSchemasId' + paused: + $ref: '#/components/schemas/firewallComponentsSchemasPaused' + priority: + $ref: '#/components/schemas/firewallComponentsSchemasPriority' + products: + $ref: '#/components/schemas/firewallProducts' + ref: + $ref: '#/components/schemas/firewallRef' + filter: + type: object + properties: + description: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasDescription' + expression: + $ref: '#/components/schemas/firewallExpression' + id: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasId' + paused: + $ref: '#/components/schemas/firewallFiltersComponentsSchemasPaused' + ref: + $ref: '#/components/schemas/firewallSchemasRef' + deleted: + $ref: '#/components/schemas/firewallDeleted' + required: + - id + - deleted + firewallFilterRulesResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallFilterRuleResponse' + nullable: true + type: array + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + firewallFilterRulesResponseCollectionDelete: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallFilterRuleResponse' + nullable: true + type: array + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + firewallFilterRulesSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + $ref: '#/components/schemas/firewallFilterRuleResponse' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + - result + firewallFilterRulesSingleResponseDelete: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + $ref: '#/components/schemas/firewallFilterRuleResponse' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + - result + firewallFiltersComponentsSchemasDescription: + description: An informative summary of the filter. + example: Restrict access from these browsers on this address range. + maxLength: 500 + type: string + firewallFiltersComponentsSchemasId: + description: The unique identifier of the filter. + example: 372e67954025e0ba6aaa6d586b9e0b61 + maxLength: 32 + minLength: 32 + readOnly: true + type: string + firewallFiltersComponentsSchemasPaused: + description: When true, indicates that the filter is currently paused. + example: false + type: boolean + firewallFirewallRulesComponentsSchemasDescription: + description: An informative summary of the firewall rule. + example: Blocks traffic identified during investigation for MIR-31 + maxLength: 500 + type: string + firewallFirewallRulesComponentsSchemasId: + description: The unique identifier of the firewall rule. + example: 372e67954025e0ba6aaa6d586b9e0b60 + maxLength: 32 + type: string + firewallFirewalluablock: + properties: + configuration: + $ref: '#/components/schemas/firewallSchemasConfiguration' + description: + $ref: '#/components/schemas/firewallFirewalluablockComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallComponentsUaRuleId' + mode: + $ref: '#/components/schemas/firewallComponentsSchemasMode' + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + type: object + firewallFirewalluablockComponentsSchemasDescription: + description: An informative summary of the rule. + example: Prevent access from abusive clients identified by this User Agent to mitigate a DDoS attack + maxLength: 1024 + type: string + firewallFirewalluablockResponseCollection: + properties: + result: + items: + $ref: '#/components/schemas/firewallFirewalluablock' + type: object + type: array + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + type: object + required: + - success + - errors + - messages + - result + firewallFirewalluablockResponseSingle: + properties: + result: + $ref: '#/components/schemas/firewallFirewalluablock' + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + type: object + required: + - success + - errors + - messages + - result + firewallGroups: + description: An object that allows you to enable or disable WAF rule groups for the current WAF override. Each key of this object must be the ID of a WAF rule group, and each value must be a valid WAF action (usually `default` or `disable`). When creating a new URI-based WAF override, you must provide a `groups` object or a `rules` object. + example: + ea8687e59929c1fd05ba97574ad43f77: default + type: object + firewallIdentifier: + description: Defines an identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + firewallIpRangeSearch: + description: A single IP address range to search for in existing rules. + example: 1.2.3.0/16 + type: string + x-auditable: true + firewallIpSearch: + description: A single IP address to search for in existing rules. + example: 1.2.3.4 + type: string + firewallLockdownsComponentsSchemasDescription: + description: An informative summary of the rule. + example: Restrict access to these endpoints to requests from a known IP address + maxLength: 1024 + type: string + firewallLockdownsComponentsSchemasId: + description: The unique identifier of the Zone Lockdown rule. + example: 372e67954025e0ba6aaa6d586b9e0b59 + maxLength: 32 + type: string + x-auditable: true + firewallMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + firewallMode: + description: The action to perform. + enum: + - simulate + - ban + - challenge + - js_challenge + - managed_challenge + example: challenge + type: string + x-auditable: true + firewallModifiedOn: + description: The timestamp of when the rule was last modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + type: string + x-auditable: true + firewallNotes: + description: An informative summary of the rule, typically used as a reminder or explanation. + example: This rule is enabled because of an event that occurred on date X. + type: string + x-auditable: true + firewallOverride: + properties: + description: + $ref: '#/components/schemas/firewallComponentsSchemasDescription' + groups: + $ref: '#/components/schemas/firewallGroups' + id: + $ref: '#/components/schemas/firewallOverridesId' + paused: + $ref: '#/components/schemas/firewallPaused' + priority: + $ref: '#/components/schemas/firewallPriority' + rewrite_action: + $ref: '#/components/schemas/firewallRewriteAction' + rules: + $ref: '#/components/schemas/firewallRules' + urls: + $ref: '#/components/schemas/firewallUrls' + type: object + firewallOverrideResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallOverride' + nullable: true + type: array + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + firewallOverrideResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + $ref: '#/components/schemas/firewallOverride' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + - result + firewallOverridesId: + description: The unique identifier of the WAF override. + example: de677e5818985db1285d0e80225f06e5 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + firewallPackageId: + description: Defines a package identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + firewallPackageResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + nullable: true + type: array + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - errors + - success + - result + - messages + firewallPackageResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + type: object + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - errors + - success + - result + - messages + firewallPaused: + description: When true, indicates that the rule is currently paused. + type: boolean + x-auditable: true + firewallPriority: + description: The relative priority of the current URI-based WAF override when multiple overrides match a single URL. A lower number indicates higher priority. Higher priority overrides may overwrite values set by lower priority overrides. + example: 1 + maximum: 1000000000 + minimum: -1000000000 + type: number + x-auditable: true + firewallProducts: + items: + description: A list of products to bypass for a request when using the `bypass` action. + enum: + - zoneLockdown + - uaBlock + - bic + - hot + - securityLevel + - rateLimit + - waf + example: waf + type: string + type: array + firewallRef: + description: A short reference tag. Allows you to select related firewall rules. + example: MIR-31 + maxLength: 50 + type: string + firewallResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallSchemasRule' + nullable: true + type: array + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + firewallResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + $ref: '#/components/schemas/firewallSchemasRule' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + firewallResultInfo: + properties: + count: + description: Defines the total number of results for the requested service. + example: 1 + type: number + page: + description: Defines the current page within paginated list of results. + example: 1 + type: number + per_page: + description: Defines the number of results per page of results. + example: 20 + type: number + total_count: + description: Defines the total results available without any search parameters. + example: 2000 + type: number + type: object + firewallRewriteAction: + description: Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object. + properties: + block: + $ref: '#/components/schemas/firewallWafRewriteAction' + challenge: + $ref: '#/components/schemas/firewallWafRewriteAction' + default: + $ref: '#/components/schemas/firewallWafRewriteAction' + disable: + $ref: '#/components/schemas/firewallWafRewriteAction' + simulate: + $ref: '#/components/schemas/firewallWafRewriteAction' + type: object + firewallRule: + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + example: + - whitelist + - block + - challenge + - js_challenge + - managed_challenge + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + required: + - id + - mode + - allowed_modes + - configuration + type: object + firewallRuleCollectionResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallRule' + nullable: true + type: array + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + firewallRuleSingleIdResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + properties: + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + type: object + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + firewallRuleSingleResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + $ref: '#/components/schemas/firewallRule' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + firewallRules: + description: An object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disabling a rule, ensure that you also enable the rule group that this WAF rule belongs to. When creating a new URI-based WAF override, you must provide a `groups` object or a `rules` object. + example: + '100015': disable + type: object + firewallSchemasAction: + description: The action to apply to a matched request. The `log` action is only available on an Enterprise plan. + enum: + - block + - challenge + - js_challenge + - managed_challenge + - allow + - log + - bypass + example: block + type: string + firewallSchemasConfiguration: + description: The configuration object for the current rule. + properties: + target: + description: The configuration target for this rule. You must set the target to `ua` for User Agent Blocking rules. + example: ua + type: string + value: + description: The exact user agent string to match. This value will be compared to the received `User-Agent` HTTP header value. + example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4 + type: string + type: object + firewallSchemasDescriptionSearch: + description: A string to search for in the description of existing rules. + example: endpoints + type: string + x-auditable: true + firewallSchemasIdentifier: + description: The unique identifier of the IP Access rule. + example: 92f17202ed8bd63d69a66b86a49a8f6b + maxLength: 32 + readOnly: true + type: string + x-auditable: true + firewallSchemasMode: + description: The action to apply to a matched request. + enum: + - block + - challenge + - whitelist + - js_challenge + - managed_challenge + example: challenge + type: string + x-auditable: true + firewallSchemasPaused: + description: When true, indicates that the rule is currently paused. + example: false + type: boolean + x-auditable: true + default: false + firewallSchemasPriority: + description: The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority. + example: 5 + type: number + x-auditable: true + firewallSchemasRef: + description: A short reference tag. Allows you to select related filters. + example: FIL-100 + maxLength: 50 + type: string + firewallSchemasRule: + required: + - id + - mode + - allowed_modes + - configuration + type: object + properties: + allowed_modes: + description: The available actions that a rule can apply to a matched request. + example: + - whitelist + - block + - challenge + - js_challenge + - managed_challenge + items: + $ref: '#/components/schemas/firewallSchemasMode' + readOnly: true + type: array + configuration: + $ref: '#/components/schemas/firewallConfiguration' + created_on: + description: The timestamp of when the rule was created. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + id: + $ref: '#/components/schemas/firewallSchemasIdentifier' + mode: + $ref: '#/components/schemas/firewallSchemasMode' + modified_on: + description: The timestamp of when the rule was last modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + notes: + $ref: '#/components/schemas/firewallNotes' + scope: + description: All zones owned by the user will have the rule applied. + properties: + email: + $ref: '#/components/schemas/firewallEmail' + id: + $ref: '#/components/schemas/firewallIdentifier' + type: + description: Defines the scope of the rule. + enum: + - user + - organization + example: user + readOnly: true + type: string + readOnly: true + type: object + firewallSchemasUrls: + description: The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. + items: + example: api.mysite.com/some/endpoint* + type: string + x-auditable: true + type: array + firewallSensitivity: + default: high + description: The sensitivity of the WAF package. + enum: + - high + - medium + - low + - 'off' + type: string + firewallStatus: + default: active + description: When set to `active`, indicates that the WAF package will be applied to the zone. + enum: + - active + readOnly: true + type: string + firewallTimeout: + description: 'The time in seconds during which Cloudflare will perform the mitigation action. Must be an integer value greater than or equal to the period. Notes: If "mode" is "challenge", "managed_challenge", or "js_challenge", Cloudflare will use the zone''s Challenge Passage time and you should not provide this value.' + example: 86400 + maximum: 86400 + minimum: 1 + type: number + x-auditable: true + firewallUaConfiguration: + properties: + target: + description: The configuration target. You must set the target to `ua` when specifying a user agent in the rule. + enum: + - ua + example: ua + type: string + value: + description: the user agent to exactly match + example: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) + type: string + x-auditable: true + title: A user agent configuration. + type: object + firewallUriSearch: + description: A single URI to search for in the list of URLs of existing rules. + example: /some/path + type: string + x-auditable: true + firewallUrls: + description: The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. + items: + example: shop.example.com/* + type: string + x-auditable: true + type: array + firewallWafRewriteAction: + description: The WAF rule action to apply. + enum: + - challenge + - block + - simulate + - disable + - default + x-auditable: true + type: string + firewallZonelockdown: + properties: + configurations: + $ref: '#/components/schemas/firewallConfigurations' + created_on: + $ref: '#/components/schemas/firewallCreatedOn' + readOnly: true + description: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasDescription' + id: + $ref: '#/components/schemas/firewallLockdownsComponentsSchemasId' + modified_on: + $ref: '#/components/schemas/firewallModifiedOn' + readOnly: true + paused: + $ref: '#/components/schemas/firewallSchemasPaused' + urls: + $ref: '#/components/schemas/firewallSchemasUrls' + required: + - id + - created_on + - modified_on + - paused + - description + - urls + - configurations + type: object + firewallZonelockdownResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + items: + type: object + $ref: '#/components/schemas/firewallZonelockdown' + nullable: true + type: array + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/firewallResultInfo' + required: + - success + - errors + - messages + - result + - result + firewallZonelockdownResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/firewallMessages' + messages: + $ref: '#/components/schemas/firewallMessages' + result: + $ref: '#/components/schemas/firewallZonelockdown' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + - result + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + unnamedSchemaRef532d8b97684c9032dd36bae8acddebf5: + description: Defines the rule group to which the current WAF rule belongs. + properties: + id: + $ref: '#/components/schemas/wafManagedRulesComponentsSchemasIdentifier' + name: + $ref: '#/components/schemas/wafManagedRulesName' + readOnly: true + type: object + wafManagedRulesAllowedModes: + description: Defines the available states for the rule group. + example: + - 'on' + - 'off' + items: + $ref: '#/components/schemas/wafManagedRulesMode' + readOnly: true + type: array + wafManagedRulesAllowedModesAnomaly: + description: Defines the available modes for the current WAF rule. Applies to anomaly detection WAF rules. + example: + - 'on' + - 'off' + items: + $ref: '#/components/schemas/wafManagedRulesModeAnomaly' + readOnly: true + type: array + wafManagedRulesComponentsSchemasIdentifier: + description: Defines the unique identifier of the rule group. + example: de677e5818985db1285d0e80225f06e5 + maxLength: 32 + type: string + x-auditable: true + wafManagedRulesDefaultMode: + description: Defines the default action/mode of a rule. + enum: + - disable + - simulate + - block + - challenge + example: block + readOnly: true + type: string + wafManagedRulesDescription: + description: Defines an informative summary of what the rule group does. + example: Group designed to protect against IP addresses that are a threat and typically used to launch DDoS attacks + nullable: true + readOnly: true + type: string + x-auditable: true + wafManagedRulesIdentifier: + description: Defines the unique identifier of a WAF package. + example: a25a9a7e9c00afc1fb2e0245519d725b + maxLength: 32 + type: string + x-auditable: true + wafManagedRulesMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + wafManagedRulesMode: + default: 'on' + description: Defines the state of the rules contained in the rule group. When `on`, the rules in the group are configurable/usable. + enum: + - 'on' + - 'off' + type: string + x-auditable: true + wafManagedRulesModeAnomaly: + description: Defines the mode anomaly. When set to `on`, the current WAF rule will be used when evaluating the request. Applies to anomaly detection WAF rules. + enum: + - 'on' + - 'off' + example: 'on' + type: string + x-auditable: true + wafManagedRulesModifiedRulesCount: + default: 0 + description: Defines the number of rules within the group that have been modified from their default configuration. + example: 2 + readOnly: true + type: number + x-auditable: true + wafManagedRulesName: + description: Defines the name of the rule group. + example: Project Honey Pot + readOnly: true + type: string + x-auditable: true + wafManagedRulesPriority: + description: Defines the order in which the individual WAF rule is executed within its rule group. + readOnly: true + type: string + x-auditable: true + wafManagedRulesResultInfo: + properties: + count: + description: Defines the total number of results for the requested service. + example: 1 + type: number + page: + description: Defines the current page within paginated list of results. + example: 1 + type: number + per_page: + description: Defines the number of results per page of results. + example: 20 + type: number + total_count: + description: Defines the total results available without any search parameters. + example: 2000 + type: number + type: object + wafManagedRulesRule: + type: object + title: Anomaly detection WAF rule + description: When triggered, anomaly detection WAF rules contribute to an overall threat score that will determine if a request is considered malicious. You can configure the total scoring threshold through the 'sensitivity' property of the WAF package. + properties: + description: + $ref: '#/components/schemas/wafManagedRulesSchemasDescription' + group: + $ref: '#/components/schemas/unnamedSchemaRef532d8b97684c9032dd36bae8acddebf5' + id: + $ref: '#/components/schemas/wafManagedRulesRuleComponentsSchemasIdentifier' + package_id: + $ref: '#/components/schemas/wafManagedRulesIdentifier' + priority: + $ref: '#/components/schemas/wafManagedRulesPriority' + allowed_modes: + $ref: '#/components/schemas/wafManagedRulesAllowedModesAnomaly' + mode: + $ref: '#/components/schemas/wafManagedRulesModeAnomaly' + default_mode: + $ref: '#/components/schemas/wafManagedRulesDefaultMode' + required: + - allowed_modes + - description + - group + - id + - mode + - package_id + - priority + wafManagedRulesRuleComponentsSchemasIdentifier: + description: Defines the unique identifier of the WAF rule. + example: f939de3be84e66e757adcdcb87908023 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + wafManagedRulesRuleGroupResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/wafManagedRulesResultInfo' + result: + items: + $ref: '#/components/schemas/wafManagedRulesSchemasGroup' + type: array + required: + - success + - errors + - messages + - result + wafManagedRulesRuleGroupResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + required: + - success + - errors + - messages + - result + wafManagedRulesRuleResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/wafManagedRulesResultInfo' + result: + items: + $ref: '#/components/schemas/wafManagedRulesRule' + type: array + required: + - success + - errors + - messages + - result + wafManagedRulesRuleResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/wafManagedRulesMessages' + messages: + $ref: '#/components/schemas/wafManagedRulesMessages' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + type: object + required: + - success + - errors + - messages + - result + wafManagedRulesRulesCount: + default: 0 + description: Defines the number of rules in the current rule group. + example: 10 + readOnly: true + type: number + x-auditable: true + wafManagedRulesSchemasDescription: + description: Defines the public description of the WAF rule. + example: SQL injection prevention for SELECT statements + readOnly: true + type: string + x-auditable: true + wafManagedRulesSchemasGroup: + required: + - id + - name + - description + - mode + - rules_count + type: object + properties: + description: + $ref: '#/components/schemas/wafManagedRulesDescription' + id: + $ref: '#/components/schemas/wafManagedRulesComponentsSchemasIdentifier' + modified_rules_count: + $ref: '#/components/schemas/wafManagedRulesModifiedRulesCount' + name: + $ref: '#/components/schemas/wafManagedRulesName' + package_id: + $ref: '#/components/schemas/wafManagedRulesIdentifier' + rules_count: + $ref: '#/components/schemas/wafManagedRulesRulesCount' + allowed_modes: + $ref: '#/components/schemas/wafManagedRulesAllowedModes' + mode: + $ref: '#/components/schemas/wafManagedRulesMode' + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + access_rules_rules: + id: cloudflare.firewall.access_rules_rules + name: access_rules_rules + title: Access Rules Rules + methods: + list_by_user: + operation: + $ref: '#/paths/~1user~1firewall~1access_rules~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/access_rules_rules/methods/list_by_user' + insert: [] + update: [] + delete: [] + replace: [] + rules: + id: cloudflare.firewall.rules + name: rules + title: Rules + methods: + ip_access_rules_for_a_user_create_an_ip_access_rule: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1firewall~1access_rules~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + ip_access_rules_for_a_user_delete_an_ip_access_rule: + operation: + $ref: '#/paths/~1user~1firewall~1access_rules~1rules~1{rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + ip_access_rules_for_a_user_update_an_ip_access_rule: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1user~1firewall~1access_rules~1rules~1{rule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + firewall_rules_delete_firewall_rules: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + firewall_rules_update_priority_of_firewall_rules: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + firewall_rules_create_firewall_rules: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + firewall_rules_update_firewall_rules: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules/put' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules~1{rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + firewall_rules_update_priority_of_a_firewall_rule: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules~1{rule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules~1{rule_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1rules~1{rule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: + - $ref: '#/components/x-stackQL-resources/rules/methods/firewall_rules_create_firewall_rules' + - $ref: '#/components/x-stackQL-resources/rules/methods/ip_access_rules_for_a_user_create_an_ip_access_rule' + update: + - $ref: '#/components/x-stackQL-resources/rules/methods/edit' + - $ref: '#/components/x-stackQL-resources/rules/methods/firewall_rules_update_priority_of_a_firewall_rule' + - $ref: '#/components/x-stackQL-resources/rules/methods/ip_access_rules_for_a_user_update_an_ip_access_rule' + - $ref: '#/components/x-stackQL-resources/rules/methods/firewall_rules_update_priority_of_firewall_rules' + delete: + - $ref: '#/components/x-stackQL-resources/rules/methods/delete' + - $ref: '#/components/x-stackQL-resources/rules/methods/ip_access_rules_for_a_user_delete_an_ip_access_rule' + - $ref: '#/components/x-stackQL-resources/rules/methods/firewall_rules_delete_firewall_rules' + replace: + - $ref: '#/components/x-stackQL-resources/rules/methods/update' + - $ref: '#/components/x-stackQL-resources/rules/methods/firewall_rules_update_firewall_rules' + lockdowns: + id: cloudflare.firewall.lockdowns + name: lockdowns + title: Lockdowns + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1lockdowns/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1lockdowns/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1lockdowns~1{lock_downs_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1lockdowns~1{lock_downs_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1lockdowns~1{lock_downs_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/lockdowns/methods/get' + - $ref: '#/components/x-stackQL-resources/lockdowns/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/lockdowns/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/lockdowns/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/lockdowns/methods/update' + firewall_rules: + id: cloudflare.firewall.firewall_rules + name: firewall_rules + title: Firewall Rules + methods: + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1rules~1{rule_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/firewall_rules/methods/get_by_zone' + - $ref: '#/components/x-stackQL-resources/firewall_rules/methods/list_by_zone' + insert: [] + update: [] + delete: [] + replace: [] + ua_rules: + id: cloudflare.firewall.ua_rules + name: ua_rules + title: Ua Rules + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1ua_rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1ua_rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1ua_rules~1{ua_rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1ua_rules~1{ua_rule_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1ua_rules~1{ua_rule_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/ua_rules/methods/get' + - $ref: '#/components/x-stackQL-resources/ua_rules/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/ua_rules/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/ua_rules/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/ua_rules/methods/update' + overrides: + id: cloudflare.firewall.overrides + name: overrides + title: Overrides + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides~1{overrides_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides~1{overrides_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1overrides~1{overrides_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/overrides/methods/get' + - $ref: '#/components/x-stackQL-resources/overrides/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/overrides/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/overrides/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/overrides/methods/update' + packages: + id: cloudflare.firewall.packages + name: packages + title: Packages + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1packages/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + waf_packages_update_a_waf_package: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/packages/methods/get' + - $ref: '#/components/x-stackQL-resources/packages/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/packages/methods/waf_packages_update_a_waf_package' + delete: [] + replace: [] + groups: + id: cloudflare.firewall.groups + name: groups + title: Groups + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1groups/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1groups~1{group_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1groups~1{group_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/groups/methods/get' + - $ref: '#/components/x-stackQL-resources/groups/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/groups/methods/edit' + delete: [] + replace: [] + packages_rules: + id: cloudflare.firewall.packages_rules + name: packages_rules + title: Packages Rules + methods: + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1waf~1packages~1{package_id}~1rules~1{rule_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/packages_rules/methods/get_by_zone' + - $ref: '#/components/x-stackQL-resources/packages_rules/methods/list_by_zone' + insert: [] + update: [] + delete: [] + replace: [] + access_rules: + id: cloudflare.firewall.access_rules + name: access_rules + title: Access Rules + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules~1{rule_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + delete_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules~1{rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + edit_by_account: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1firewall~1access_rules~1rules~1{rule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + get_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules~1{rule_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + delete_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules~1{rule_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + edit_by_zone: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall~1access_rules~1rules~1{rule_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/access_rules/methods/get_by_account' + - $ref: '#/components/x-stackQL-resources/access_rules/methods/get_by_zone' + - $ref: '#/components/x-stackQL-resources/access_rules/methods/list_by_account' + - $ref: '#/components/x-stackQL-resources/access_rules/methods/list_by_zone' + insert: + - $ref: '#/components/x-stackQL-resources/access_rules/methods/create_by_account' + - $ref: '#/components/x-stackQL-resources/access_rules/methods/create_by_zone' + update: + - $ref: '#/components/x-stackQL-resources/access_rules/methods/edit_by_account' + - $ref: '#/components/x-stackQL-resources/access_rules/methods/edit_by_zone' + delete: + - $ref: '#/components/x-stackQL-resources/access_rules/methods/delete_by_account' + - $ref: '#/components/x-stackQL-resources/access_rules/methods/delete_by_zone' + replace: [] + firewall_events_adaptive_groups: + id: cloudflare.firewall.firewall_events_adaptive_groups + name: firewall_events_adaptive_groups + title: Firewall Events Adaptive Groups + methods: + list: + operation: + $ref: '#/paths/~1graphql~1firewall_events_adaptive_groups/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + transform: + type: golang_template_json_v0.3.0 + body: "{\n \"result\": [\n {{- $data := index . \"data\" }}\n {{- if $data }}\n {{- $viewer := index $data \"viewer\" }}\n {{- $zones := index $viewer \"zones\" }}\n {{- if and $zones (gt (len $zones) 0) }}\n {{- $rows := index (index $zones 0) \"firewallEventsAdaptiveGroups\" }}\n {{- $first := true -}}\n {{- range $i, $row := $rows }}\n {{- if not $first }},{{ end }}{{- $first = false }}\n {\n \"datetime\": {{ toJson (index $row \"dimensions\" \"datetime\") }},\n \"action\": {{ toJson (index $row \"dimensions\" \"action\") }},\n \"source\": {{ toJson (index $row \"dimensions\" \"source\") }},\n \"rule_id\": {{ toJson (index $row \"dimensions\" \"ruleId\") }},\n \"ruleset_id\": {{ toJson (index $row \"dimensions\" \"rulesetId\") }},\n \"client_country_name\": {{ toJson (index $row \"dimensions\" \"clientCountryName\") }},\n \ + \ \"client_ip\": {{ toJson (index $row \"dimensions\" \"clientIP\") }},\n \"client_asn_description\": {{ toJson (index $row \"dimensions\" \"clientASNDescription\") }},\n \"edge_response_status\": {{ index $row \"dimensions\" \"edgeResponseStatus\" }},\n \"client_request_path\": {{ toJson (index $row \"dimensions\" \"clientRequestPath\") }},\n \"client_request_http_host\": {{ toJson (index $row \"dimensions\" \"clientRequestHTTPHost\") }},\n \"events\": {{ index $row \"count\" }}\n }\n {{- end }}\n {{- end }}\n {{- end }}\n ]\n}\n" + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/firewall_events_adaptive_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + firewall_events: + id: cloudflare.firewall.firewall_events + name: firewall_events + title: Firewall Events + methods: + list: + operation: + $ref: '#/paths/~1graphql~1firewall_events/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + transform: + type: golang_template_json_v0.3.0 + body: "{\n \"result\": [\n {{- $data := index . \"data\" }}\n {{- if $data }}\n {{- $viewer := index $data \"viewer\" }}\n {{- $zones := index $viewer \"zones\" }}\n {{- if and $zones (gt (len $zones) 0) }}\n {{- $rows := index (index $zones 0) \"firewallEventsAdaptive\" }}\n {{- $first := true -}}\n {{- range $i, $row := $rows }}\n {{- if not $first }},{{ end }}{{- $first = false }}\n {\n \"datetime\": {{ toJson (index $row \"datetime\") }},\n \"action\": {{ toJson (index $row \"action\") }},\n \"source\": {{ toJson (index $row \"source\") }},\n \"rule_id\": {{ toJson (index $row \"ruleId\") }},\n \"ruleset_id\": {{ toJson (index $row \"rulesetId\") }},\n \"ref\": {{ toJson (index $row \"ref\") }},\n \"client_ip\": {{ toJson (index $row \"clientIP\"\ + ) }},\n \"client_asn\": {{ index $row \"clientAsn\" }},\n \"client_asn_description\": {{ toJson (index $row \"clientASNDescription\") }},\n \"client_country_name\": {{ toJson (index $row \"clientCountryName\") }},\n \"client_request_http_host\": {{ toJson (index $row \"clientRequestHTTPHost\") }},\n \"client_request_http_method_name\": {{ toJson (index $row \"clientRequestHTTPMethodName\") }},\n \"client_request_path\": {{ toJson (index $row \"clientRequestPath\") }},\n \"edge_colo_name\": {{ toJson (index $row \"edgeColoName\") }},\n \"edge_response_status\": {{ index $row \"edgeResponseStatus\" }},\n \"origin_response_status\": {{ index $row \"originResponseStatus\" }},\n \"ray_name\": {{ toJson (index $row \"rayName\") }},\n \"user_agent\": {{ toJson (index $row \"userAgent\"\ + ) }}\n }\n {{- end }}\n {{- end }}\n {{- end }}\n ]\n}\n" + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/firewall_events/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/r2.yaml b/providers/src/cloudflare/v00.00.00000/services/r2.yaml index 01868660..3b7fe8a7 100644 --- a/providers/src/cloudflare/v00.00.00000/services/r2.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/r2.yaml @@ -1,4648 +1,4549 @@ -openapi: 3.0.3 -info: - title: r2 API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration: - get: - description: List all event notification rules for a bucket. - operationId: r2-get-event-notification-configs - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2BucketConfig' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Read Configuration response. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: No Configuration Found response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Read Configuration failure. - security: - - api_token: [] - summary: List Event Notification Rules - tags: - - R2 Bucket - x-api-token-group: - - Workers R2 Storage Write - - Workers R2 Storage Read - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - event_notifications - method: list - /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}: - delete: - description: >- - Delete an event notification rule. **If no body is provided, all rules - for specified queue will be deleted**. - operationId: r2-event-notification-delete-config - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4Response' - type: object - description: Delete Configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Delete Configuration failure. - security: - - api_token: [] - summary: Delete Event Notification Rules - tags: - - R2 Bucket - x-api-token-group: - - Workers R2 Storage Write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - event_notifications - method: delete - get: - description: Get a single event notification rule. - operationId: r2-get-event-notification-config - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - default: default - description: The bucket jurisdiction. - enum: - - default - - eu - - fedramp - type: string - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2QueuesConfig' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Read Configuration response. - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: No Configuration Found response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Read Configuration failure. - security: - - api_token: [] - summary: Get Event Notification Rule - tags: - - R2 Bucket - x-api-token-group: - - Workers R2 Storage Write - - Workers R2 Storage Read - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - event_notifications - method: get - put: - description: Create event notification rule. - operationId: r2-put-event-notification-config - parameters: - - name: queue_id - in: path - required: true - description: The Cloudflare Queue ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - requestBody: - content: - application/json: - schema: - properties: - rules: - description: Array of rules to drive notifications. - items: - $ref: '#/components/schemas/r2Rule' - minItems: 1 - type: array - required: - - rules - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4Response' - type: object - description: Create Configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Create Configuration failure. - security: - - api_token: [] - summary: Create Event Notification Rule - tags: - - R2 Bucket - x-api-token-group: - - Workers R2 Storage Write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - event_notifications - method: update - /accounts/{account_id}/r2/buckets: - get: - description: Lists all R2 buckets on your account. - operationId: r2-list-buckets - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: name_contains - schema: - description: >- - Bucket names to filter by. Only buckets with this phrase in their - name will be returned. - type: string - - in: query - name: start_after - schema: - description: >- - Bucket name to start searching after. Buckets are ordered - lexicographically. - type: string - - in: query - name: per_page - schema: - default: 20 - description: Maximum number of buckets to return in a single call. - maximum: 1000 - minimum: 1 - type: number - - in: query - name: order - schema: - description: Field to order buckets by. - enum: - - name - type: string - - in: query - name: direction - schema: - description: Direction to order buckets. - enum: - - asc - - desc - type: string - - in: query - name: cursor - schema: - description: >- - Pagination cursor received during the last List Buckets call. R2 - buckets are paginated using cursors instead of page numbers. - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - properties: - buckets: - items: - $ref: '#/components/schemas/r2Bucket' - type: array - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result_info: - $ref: '#/components/schemas/r2ResultInfo' - required: - - success - - errors - - messages - - result - type: object - description: List Buckets response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: List Buckets response failure. - security: - - api_token: [] - summary: List Buckets - tags: - - R2 Bucket - x-api-token-group: - - Workers R2 Storage Write - - Workers R2 Storage Read - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - method: list - post: - description: Creates a new R2 bucket. - operationId: r2-create-bucket - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - requestBody: - content: - application/json: - schema: - properties: - locationHint: - $ref: '#/components/schemas/r2BucketLocation' - x-stainless-naming: - terraform: - property_name: location - name: - $ref: '#/components/schemas/r2BucketName' - storageClass: - $ref: '#/components/schemas/r2StorageClass' - required: - - name - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2Bucket' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Create Bucket response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Create Bucket response failure. - security: - - api_token: [] - summary: Create Bucket - tags: - - R2 Bucket - x-api-token-group: - - Workers R2 Storage Write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - method: create - /accounts/{account_id}/r2/buckets/{bucket_name}: - delete: - description: Deletes an existing R2 bucket. - operationId: r2-delete-bucket - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4Response' - description: Delete Bucket response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Delete Bucket response failure. - security: - - api_token: [] - summary: Delete Bucket - tags: - - R2 Bucket - x-api-token-group: - - Workers R2 Storage Write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - method: delete - get: - description: Gets properties of an existing R2 bucket. - operationId: r2-get-bucket - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2Bucket' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Get Bucket response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Get Bucket response failure. - security: - - api_token: [] - summary: Get Bucket - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.read - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - method: get - patch: - description: Updates properties of an existing R2 bucket. - operationId: r2-patch-bucket - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - - in: header - name: cf-r2-storage-class - schema: - x-stainless-param: storage_class - $ref: '#/components/schemas/r2StorageClass' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2Bucket' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Patch Bucket response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Get Bucket response failure. - security: - - api_token: [] - summary: Patch Bucket - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - method: edit - /accounts/{account_id}/r2/buckets/{bucket_name}/cors: - delete: - description: Delete the CORS policy for a bucket. - operationId: r2-delete-bucket-cors-policy - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4Response' - type: object - description: Success Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Error Response. - security: - - api_token: [] - summary: Delete Bucket CORS Policy - tags: - - R2 Bucket - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - cors - method: delete - get: - description: Get the CORS policy for a bucket. - operationId: r2-get-bucket-cors-policy - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - properties: - rules: - items: - $ref: '#/components/schemas/r2CorsRule' - type: array - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Success Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Error Response. - security: - - api_token: [] - summary: Get Bucket CORS Policy - tags: - - R2 Bucket - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - cors - method: get - put: - description: Set the CORS policy for a bucket. - operationId: r2-put-bucket-cors-policy - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - requestBody: - content: - application/json: - schema: - properties: - rules: - items: - $ref: '#/components/schemas/r2CorsRule' - type: array - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4Response' - type: object - description: Success Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Error Response. - security: - - api_token: [] - summary: Put Bucket CORS Policy - tags: - - R2 Bucket - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - cors - method: update - /accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom: - get: - description: Gets a list of all custom domains registered with an existing R2 bucket. - operationId: r2-list-custom-domains - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2ListCustomDomainsResponse' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: List Custom Domains response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: List Custom Domains response failure. - security: - - api_token: [] - summary: List Custom Domains of Bucket - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.read - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - domains - - custom - method: list - post: - description: Register a new custom domain for an existing R2 bucket. - operationId: r2-add-custom-domain - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/r2AddCustomDomainRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2AddCustomDomainResponse' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Add Custom Domain response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Add Custom Domain response failure. - security: - - api_token: [] - summary: Attach Custom Domain To Bucket - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - domains - - custom - method: create - /accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}: - delete: - description: Remove custom domain registration from an existing R2 bucket. - operationId: r2-delete-custom-domain - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: path - name: domain - schema: - $ref: '#/components/schemas/r2DomainName' - required: true - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2RemoveCustomDomainResponse' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Delete Custom Domain response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Delete Custom Domain response failure. - security: - - api_token: [] - summary: Remove Custom Domain From Bucket - tags: - - R2 Bucket - x-api-token-group: - - Workers R2 Storage Write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - domains - - custom - method: delete - get: - description: Get the configuration for a custom domain on an existing R2 bucket. - operationId: r2-get-custom-domain-settings - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - in: path - name: domain - schema: - $ref: '#/components/schemas/r2DomainName' - required: true - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2GetCustomDomainResponse' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Get Custom Domain Configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Get Custom Domain Configuration response failure. - security: - - api_token: [] - summary: Get Custom Domain Settings - tags: - - R2 Bucket - x-api-token-group: - - Workers R2 Storage Write - - Workers R2 Storage Read - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - domains - - custom - method: get - put: - description: Edit the configuration for a custom domain on an existing R2 bucket. - operationId: r2-edit-custom-domain-settings - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - in: path - name: domain - schema: - $ref: '#/components/schemas/r2DomainName' - required: true - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/r2EditCustomDomainRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2EditCustomDomainResponse' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Edit Custom Domain Configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Edit Custom Domain Configuration response failure. - security: - - api_token: [] - summary: Configure Custom Domain Settings - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - domains - - custom - method: update - /accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed: - get: - description: >- - Gets state of public access over the bucket's R2-managed (r2.dev) - domain. - operationId: r2-get-bucket-public-policy - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2ManagedDomainResponse' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Get Managed Subdomain response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Get Managed Subdomain response failure. - security: - - api_token: [] - summary: Get r2.dev Domain of Bucket - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.read - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - domains - - managed - method: list - put: - description: >- - Updates state of public access over the bucket's R2-managed (r2.dev) - domain. - operationId: r2-put-bucket-public-policy - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/r2EditManagedDomainRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2ManagedDomainResponse' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Update Managed Subdomain response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Update Managed Subdomain response failure. - security: - - api_token: [] - summary: Update r2.dev Domain of Bucket - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - domains - - managed - method: update - /accounts/{account_id}/r2/buckets/{bucket_name}/lifecycle: - get: - description: Get object lifecycle rules for a bucket. - operationId: r2-get-bucket-lifecycle-configuration - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2LifecycleConfig' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Success Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Error Response. - security: - - api_token: [] - summary: Get Object Lifecycle Rules - tags: - - R2 Bucket - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - lifecycle - method: get - put: - description: Set the object lifecycle rules for a bucket. - operationId: r2-put-bucket-lifecycle-configuration - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - requestBody: - content: - application/json: - schema: - properties: - rules: - items: - $ref: '#/components/schemas/r2LifecycleRule' - type: array - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4Response' - type: object - description: Success Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Error Response. - security: - - api_token: [] - summary: Put Object Lifecycle Rules - tags: - - R2 Bucket - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - lifecycle - method: update - /accounts/{account_id}/r2/buckets/{bucket_name}/local-uploads: - get: - description: >- - Get the local uploads configuration for a bucket. When enabled, object's - data is written to the nearest region first, then asynchronously - replicated to the bucket's primary region. - operationId: r2-get-bucket-local-uploads-configuration - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2LocalUploadsConfiguration' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Success Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Error Response. - security: - - api_token: [] - summary: Get Local Uploads Configuration - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.read - put: - description: >- - Set the local uploads configuration for a bucket. When enabled, object's - data is written to the nearest region first, then asynchronously - replicated to the bucket's primary region. - operationId: r2-put-bucket-local-uploads-configuration - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - enabled: - description: Whether to enable local uploads for this bucket. - type: boolean - x-auditable: true - required: - - enabled - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4Response' - type: object - description: Success Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Error Response. - security: - - api_token: [] - summary: Put Local Uploads Configuration - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.write - /accounts/{account_id}/r2/buckets/{bucket_name}/lock: - get: - description: Get lock rules for a bucket. - operationId: r2-get-bucket-lock-configuration - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2BucketLockRuleConfig' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Success Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Error Response. - security: - - api_token: [] - summary: Get Bucket Lock Rules - tags: - - R2 Bucket - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - locks - method: get - put: - description: Set lock rules for a bucket. - operationId: r2-put-bucket-lock-configuration - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - requestBody: - content: - application/json: - schema: - properties: - rules: - items: - $ref: '#/components/schemas/r2BucketLockRule' - type: array - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4Response' - type: object - description: Success Response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Error Response. - security: - - api_token: [] - summary: Put Bucket Lock Rules - tags: - - R2 Bucket - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - locks - method: update - /accounts/{account_id}/r2/buckets/{bucket_name}/sippy: - delete: - description: Disables Sippy on this bucket. - operationId: r2-delete-bucket-sippy-config - parameters: - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - properties: - enabled: - enum: - - false - type: boolean - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Delete Sippy Configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Delete Sippy Configuration response failure. - security: - - api_token: [] - summary: Disable Sippy - tags: - - R2 Bucket - x-api-token-group: - - Workers R2 Storage Write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - sippy - method: delete - get: - description: Gets configuration for Sippy for an existing R2 bucket. - operationId: r2-get-bucket-sippy-config - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2Sippy' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Get Sippy Configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Get Sippy Configuration response failure. - security: - - api_token: [] - summary: Get Sippy Configuration - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.read - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - sippy - method: get - put: - description: Sets configuration for Sippy for an existing R2 bucket. - operationId: r2-put-bucket-sippy-config - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: bucket_name - in: path - required: true - description: The R2 bucket name. - schema: - type: string - - in: header - name: cf-r2-jurisdiction - schema: - $ref: '#/components/schemas/r2Jurisdiction' - x-stainless-param: jurisdiction - requestBody: - content: - application/json: - schema: - type: object - properties: - destination: - description: R2 bucket to copy objects to. - properties: - accessKeyId: - description: >- - ID of a Cloudflare API token. This is the value labelled - "Access Key ID" when creating an API. token from the [R2 - dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens). - Sippy will use this token when writing objects to R2, so - it is best to scope this token to the bucket you're - enabling Sippy for. - type: string - provider: - $ref: '#/components/schemas/r2SippyProvider' - secretAccessKey: - description: >- - Value of a Cloudflare API token. This is the value - labelled "Secret Access Key" when creating an API. token - from the [R2 - dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens). - Sippy will use this token when writing objects to R2, so - it is best to scope this token to the bucket you're - enabling Sippy for. - type: string - x-sensitive: true - type: object - source: - description: AWS S3 bucket to copy objects from. - properties: - accessKeyId: - description: >- - Access Key ID of an IAM credential (ideally scoped to a - single S3 bucket). - type: string - bucket: - description: Name of the AWS S3 bucket. - type: string - x-auditable: true - provider: - enum: - - aws - type: string - x-auditable: true - region: - description: Name of the AWS availability zone. - type: string - x-auditable: true - secretAccessKey: - description: >- - Secret Access Key of an IAM credential (ideally scoped - to a single S3 bucket). - type: string - x-sensitive: true - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2Sippy' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Set Sippy Configuration response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Get Sippy Configuration response failure. - security: - - api_token: [] - summary: Enable Sippy - tags: - - R2 Bucket - x-cfPermissionsRequired: - enum: - - com.cloudflare.edge.r2.bucket.write - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - sippy - method: update - /accounts/{account_id}/r2/metrics: - get: - description: >- - Get Storage/Object Count Metrics across all buckets in your account. - Note that Account-Level Metrics may not immediately reflect the latest - data. - operationId: r2-get-account-level-metrics - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2AccountLevelMetrics' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Get Account-Level Metrics response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Get Account-Level Metrics response failure. - security: - - api_token: [] - summary: Get Account-Level Metrics - tags: - - R2 Account - x-cfPermissionsRequired: null - x-stackql-sdk: - service: r2 - resource_chain: - - buckets - - metrics - method: list - /accounts/{account_id}/r2/temp-access-credentials: - post: - description: >- - Creates temporary access credentials on a bucket that can be optionally - scoped to prefixes or objects. - operationId: r2-create-temp-access-credentials - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/r2TempAccessCredsRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - $ref: '#/components/schemas/r2TempAccessCredsResponse' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - description: Create temporary access credentials response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2V4ResponseFailure' - description: Create temporary access credentials response failure. - security: - - api_token: [] - summary: Create Temporary Access Credentials - tags: - - R2 Bucket - x-stackql-sdk: - service: r2 - resource_chain: - - temporary_credentials - method: create - /accounts/{account_id}/slurper/jobs: - get: - description: >- - Lists all R2 Super Slurper migration jobs for the account with their - status. - operationId: slurper-list-jobs - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - in: query - name: limit - schema: - maximum: 50 - type: integer - - in: query - name: offset - schema: - type: integer - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - items: - $ref: '#/components/schemas/r2SlurperJobResponse' - type: array - description: A list of jobs - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List jobs - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - jobs - method: list - post: - description: >- - Creates a new R2 Super Slurper migration job to transfer objects from a - source bucket (e.g. S3, GCS, R2) to R2. - operationId: slurper-create-job - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperCreateJobRequest' - responses: - '201': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - properties: - id: - type: string - type: object - description: Job created - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Maximum number of concurrent jobs has been reached - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create a job - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - jobs - method: create - /accounts/{account_id}/slurper/jobs/abortAll: - put: - description: >- - Cancels all running R2 Super Slurper migration jobs for the account. Any - objects in the middle of a transfer will finish, but no new objects will - start transferring. - operationId: slurper-abort-all-jobs - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - type: string - description: All jobs aborted - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Abort all jobs - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - jobs - method: abort_all - /accounts/{account_id}/slurper/jobs/{job_id}: - delete: - description: >- - Deletes a completed, aborted, or errored R2 Super Slurper migration job. - Active jobs cannot be deleted. - operationId: slurper-delete-job - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - type: string - description: Job deleted - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Job is still active - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete a job - tags: - - R2 Super Slurper - get: - description: >- - Retrieves detailed status and configuration for a specific R2 Super - Slurper migration job. - operationId: slurper-get-job - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/r2SlurperJobResponse' - description: Job details - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get job details - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - jobs - method: get - /accounts/{account_id}/slurper/jobs/{job_id}/abort: - put: - description: >- - Cancels a specific R2 Super Slurper migration job. Any objects in the - middle of a transfer will finish, but no new objects will start - transferring. - operationId: slurper-abort-job - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - type: string - description: Job aborted - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Abort a job - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - jobs - method: abort - /accounts/{account_id}/slurper/jobs/{job_id}/logs: - get: - description: >- - Gets log entries for an R2 Super Slurper migration job, showing - migration status changes, errors, etc. - operationId: slurper-get-job-logs - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - - in: query - name: limit - schema: - maximum: 50 - type: integer - - in: query - name: offset - schema: - type: integer - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - items: - $ref: '#/components/schemas/r2SlurperJobLogResponse' - type: array - description: Job logs - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get job logs - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - jobs - - logs - method: list - /accounts/{account_id}/slurper/jobs/{job_id}/pause: - put: - description: >- - Pauses a running R2 Super Slurper migration job. The job can be resumed - later to continue transferring. - operationId: slurper-pause-job - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - type: string - description: Job paused - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Job is not paused - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Pause a job - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - jobs - method: pause - /accounts/{account_id}/slurper/jobs/{job_id}/progress: - get: - description: Retrieves current progress metrics for an R2 Super Slurper migration job - operationId: slurper-get-job-progress - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/r2SlurperJobProgressResponse' - description: Job progress - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get job progress - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - jobs - method: progress - /accounts/{account_id}/slurper/jobs/{job_id}/resume: - put: - description: >- - Resumes a paused R2 Super Slurper migration job, continuing the transfer - from where it stopped. - operationId: slurper-resume-job - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - - name: job_id - in: path - required: true - description: The job ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - type: string - description: Job resumed - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Resume a job - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - jobs - method: resume - /accounts/{account_id}/slurper/source/connectivity-precheck: - put: - description: Check whether tokens are valid against the source bucket - operationId: slurper-check-source-connectivity - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperSourceJobSchema' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/r2SlurperConnectivityResponse' - description: Source connectivity checked - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Check source connectivity - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - connectivity_precheck - method: source - /accounts/{account_id}/slurper/target/connectivity-precheck: - put: - description: Check whether tokens are valid against the target bucket - operationId: slurper-check-target-connectivity - parameters: - - name: account_id - in: path - required: true - description: The Cloudflare account ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperR2TargetSchema' - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - true - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/r2SlurperConnectivityResponse' - description: Target connectivity checked - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/r2SlurperApiV4Failure' - description: Failure response - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Check target connectivity - tags: - - R2 Super Slurper - x-stackql-sdk: - service: r2 - resource_chain: - - super_slurper - - connectivity_precheck - method: target -components: - schemas: - r2AccountLevelMetrics: - description: Metrics based on the class they belong to. - properties: - infrequentAccess: - $ref: '#/components/schemas/r2ClassBasedMetrics' - standard: - $ref: '#/components/schemas/r2ClassBasedMetrics' - type: object - r2AddCustomDomainRequest: - example: - domain: prefix.example-domain.com - enabled: true - zoneId: 36ca64a6d92827b8a6b90be344bb1bfd - properties: - ciphers: - description: >- - An allowlist of ciphers for TLS termination. These ciphers must be - in the BoringSSL format. - items: - type: string - type: array - x-auditable: true - domain: - description: Name of the custom domain to be added. - type: string - x-auditable: true - enabled: - description: >- - Whether to enable public bucket access at the custom domain. If - undefined, the domain will be enabled. - type: boolean - x-auditable: true - minTLS: - description: >- - Minimum TLS Version the custom domain will accept for incoming - connections. If not set, defaults to 1.0. - enum: - - '1.0' - - '1.1' - - '1.2' - - '1.3' - type: string - x-auditable: true - zoneId: - description: Zone ID of the custom domain. - type: string - x-auditable: true - required: - - domain - - zoneId - - enabled - type: object - r2AddCustomDomainResponse: - example: - domain: example-domain.com - enabled: true - zoneId: 36ca64a6d92827b8a6b90be344bb1bfd - properties: - ciphers: - description: >- - An allowlist of ciphers for TLS termination. These ciphers must be - in the BoringSSL format. - items: - type: string - type: array - x-auditable: true - domain: - description: Domain name of the affected custom domain. - type: string - x-auditable: true - enabled: - description: >- - Whether this bucket is publicly accessible at the specified custom - domain. - type: boolean - minTLS: - description: >- - Minimum TLS Version the custom domain will accept for incoming - connections. If not set, defaults to 1.0. - enum: - - '1.0' - - '1.1' - - '1.2' - - '1.3' - type: string - x-auditable: true - zoneId: - description: Zone ID of the custom domain. - type: string - x-auditable: true - required: - - domain - - enabled - - zoneId - type: object - r2Bucket: - description: A single R2 bucket. - properties: - creation_date: - description: Creation timestamp. - type: string - jurisdiction: - $ref: '#/components/schemas/r2Jurisdiction' - location: - $ref: '#/components/schemas/r2BucketLocation' - name: - $ref: '#/components/schemas/r2BucketName' - storage_class: - $ref: '#/components/schemas/r2StorageClass' - type: object - r2BucketConfig: - properties: - bucketName: - description: Name of the bucket. - type: string - x-auditable: true - queues: - description: List of queues associated with the bucket. - items: - $ref: '#/components/schemas/r2QueuesConfig' - type: array - type: object - r2BucketLocation: - description: Location of the bucket. - enum: - - apac - - eeur - - enam - - weur - - wnam - - oc - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - r2BucketLockRule: - properties: - condition: - type: object - description: Condition to apply a lock rule to an object for how long in seconds. - properties: - maxAgeSeconds: - example: 100 - type: integer - x-auditable: true - type: - enum: - - Age - type: string - x-auditable: true - date: - format: date-time - type: string - x-auditable: true - required: - - type - enabled: - description: Whether or not this rule is in effect. - type: boolean - x-auditable: true - id: - description: Unique identifier for this rule. - example: Lock all objects for 24 hours - type: string - x-auditable: true - prefix: - description: >- - Rule will only apply to objects/uploads in the bucket that start - with the given prefix, an empty prefix can be provided to scope rule - to all objects/uploads. - type: string - x-auditable: true - required: - - id - - condition - - enabled - type: object - r2BucketLockRuleConfig: - properties: - rules: - items: - $ref: '#/components/schemas/r2BucketLockRule' - type: array - type: object - r2BucketName: - description: Name of the bucket. - example: example-bucket - maxLength: 64 - minLength: 3 - type: string - x-auditable: true - r2ClassBasedMetrics: - description: Metrics based on what state they are in(uploaded or published). - properties: - published: - $ref: '#/components/schemas/r2ObjectSizeMetrics' - uploaded: - $ref: '#/components/schemas/r2ObjectSizeMetrics' - type: object - r2CorsRule: - properties: - allowed: - description: >- - Object specifying allowed origins, methods and headers for this CORS - rule. - properties: - headers: - description: >- - Specifies the value for the Access-Control-Allow-Headers header - R2 sets when requesting objects in this bucket from a browser. - Cross-origin requests that include custom headers (e.g. - x-user-id) should specify these headers as AllowedHeaders. - items: - example: x-requested-by - type: string - x-auditable: true - type: array - methods: - description: >- - Specifies the value for the Access-Control-Allow-Methods header - R2 sets when requesting objects in a bucket from a browser. - items: - enum: - - GET - - PUT - - POST - - DELETE - - HEAD - type: string - x-auditable: true - type: array - origins: - description: >- - Specifies the value for the Access-Control-Allow-Origin header - R2 sets when requesting objects in a bucket from a browser. - items: - example: http://localhost:3000 - type: string - x-auditable: true - type: array - required: - - methods - - origins - type: object - exposeHeaders: - description: >- - Specifies the headers that can be exposed back, and accessed by, the - JavaScript making the cross-origin request. If you need to access - headers beyond the safelisted response headers, such as - Content-Encoding or cf-cache-status, you must specify it here. - items: - example: Content-Encoding - type: string - x-auditable: true - type: array - id: - description: Identifier for this rule. - example: Allow Local Development - type: string - x-auditable: true - maxAgeSeconds: - description: >- - Specifies the amount of time (in seconds) browsers are allowed to - cache CORS preflight responses. Browsers may limit this to 2 hours - or less, even if the maximum value (86400) is specified. - example: 3600 - type: number - x-auditable: true - required: - - allowed - type: object - r2DomainName: - description: Name of the custom domain. - example: example-domain/custom-domain.com - type: string - x-auditable: true - r2EditCustomDomainRequest: - example: - enabled: true - minTLS: '1.2' - properties: - ciphers: - description: >- - An allowlist of ciphers for TLS termination. These ciphers must be - in the BoringSSL format. - items: - type: string - type: array - x-auditable: true - enabled: - description: >- - Whether to enable public bucket access at the specified custom - domain. - type: boolean - x-auditable: true - minTLS: - description: >- - Minimum TLS Version the custom domain will accept for incoming - connections. If not set, defaults to previous value. - enum: - - '1.0' - - '1.1' - - '1.2' - - '1.3' - type: string - x-auditable: true - type: object - r2EditCustomDomainResponse: - example: - domain: example-domain.com - enabled: true - properties: - ciphers: - description: >- - An allowlist of ciphers for TLS termination. These ciphers must be - in the BoringSSL format. - items: - type: string - type: array - x-auditable: true - domain: - description: Domain name of the affected custom domain. - type: string - x-auditable: true - enabled: - description: >- - Whether this bucket is publicly accessible at the specified custom - domain. - type: boolean - x-auditable: true - minTLS: - description: >- - Minimum TLS Version the custom domain will accept for incoming - connections. If not set, defaults to 1.0. - enum: - - '1.0' - - '1.1' - - '1.2' - - '1.3' - type: string - x-auditable: true - required: - - domain - type: object - r2EditManagedDomainRequest: - example: - enabled: true - properties: - enabled: - description: Whether to enable public bucket access at the r2.dev domain. - type: boolean - x-auditable: true - required: - - enabled - type: object - r2Errors: - items: - $ref: '#/components/schemas/responseInfo' - type: array - r2GetCustomDomainResponse: - example: - domain: prefix.example-domain.one.com - enabled: false - status: - ownership: deactivated - ssl: pending - zoneId: 36ca64a6d92827b8a6b90be344bb1bfd - zoneName: example-domain.one.com - properties: - ciphers: - description: >- - An allowlist of ciphers for TLS termination. These ciphers must be - in the BoringSSL format. - items: - type: string - type: array - x-auditable: true - domain: - description: Domain name of the custom domain to be added. - type: string - x-auditable: true - enabled: - description: >- - Whether this bucket is publicly accessible at the specified custom - domain. - type: boolean - x-auditable: true - minTLS: - description: >- - Minimum TLS Version the custom domain will accept for incoming - connections. If not set, defaults to 1.0. - enum: - - '1.0' - - '1.1' - - '1.2' - - '1.3' - type: string - x-auditable: true - status: - properties: - ownership: - description: Ownership status of the domain. - enum: - - pending - - active - - deactivated - - blocked - - error - - unknown - type: string - x-auditable: true - ssl: - description: SSL certificate status. - enum: - - initializing - - pending - - active - - deactivated - - error - - unknown - type: string - x-auditable: true - required: - - ssl - - ownership - type: object - zoneId: - description: Zone ID of the custom domain resides in. - type: string - x-auditable: true - zoneName: - description: Zone that the custom domain resides in. - type: string - x-auditable: true - required: - - domain - - status - - enabled - type: object - r2Jurisdiction: - default: default - description: Jurisdiction where objects in this bucket are guaranteed to be stored. - enum: - - default - - eu - - fedramp - type: string - x-auditable: true - x-stainless-param: jurisdiction - r2LifecycleAgeCondition: - description: >- - Condition for lifecycle transitions to apply after an object reaches an - age in seconds. - properties: - maxAge: - type: integer - x-auditable: true - type: - enum: - - Age - type: string - x-auditable: true - required: - - type - - maxAge - type: object - r2LifecycleConfig: - properties: - rules: - items: - $ref: '#/components/schemas/r2LifecycleRule' - type: array - type: object - r2LifecycleRule: - properties: - abortMultipartUploadsTransition: - description: Transition to abort ongoing multipart uploads. - properties: - condition: - $ref: '#/components/schemas/r2LifecycleAgeCondition' - type: object - conditions: - description: Conditions that apply to all transitions of this rule. - properties: - prefix: - description: >- - Transitions will only apply to objects/uploads in the bucket - that start with the given prefix, an empty prefix can be - provided to scope rule to all objects/uploads. - type: string - x-auditable: true - required: - - prefix - type: object - deleteObjectsTransition: - description: Transition to delete objects. - properties: - condition: - type: object - description: >- - Condition for lifecycle transitions to apply after an object - reaches an age in seconds. - properties: - maxAge: - type: integer - x-auditable: true - type: - enum: - - Age - type: string - x-auditable: true - date: - format: date-time - type: string - x-auditable: true - required: - - type - type: object - enabled: - description: Whether or not this rule is in effect. - type: boolean - x-auditable: true - id: - description: Unique identifier for this rule. - example: Expire all objects older than 24 hours - type: string - x-auditable: true - storageClassTransitions: - description: Transitions to change the storage class of objects. - items: - $ref: '#/components/schemas/r2LifecycleStorageTransition' - type: array - required: - - id - - conditions - - enabled - type: object - r2LifecycleStorageTransition: - properties: - condition: - type: object - description: >- - Condition for lifecycle transitions to apply after an object reaches - an age in seconds. - properties: - maxAge: - type: integer - x-auditable: true - type: - enum: - - Age - type: string - x-auditable: true - date: - format: date-time - type: string - x-auditable: true - required: - - type - storageClass: - enum: - - InfrequentAccess - type: string - x-auditable: true - required: - - condition - - storageClass - type: object - r2ListCustomDomainsResponse: - example: - domains: - - domain: prefix.example-domain.one.com - enabled: false - status: - ownership: deactivated - ssl: pending - zoneId: 36ca64a6d92827b8a6b90be344bb1bfd - zoneName: example-domain.one.com - - domain: prefix.example-domain.two.com - enabled: true - status: - ownership: active - ssl: active - zoneId: d9d28585d5f8f5b0f857b055bf574f19 - properties: - domains: - items: - properties: - ciphers: - description: >- - An allowlist of ciphers for TLS termination. These ciphers - must be in the BoringSSL format. - items: - type: string - type: array - x-auditable: true - domain: - description: Domain name of the custom domain to be added. - type: string - x-auditable: true - enabled: - description: >- - Whether this bucket is publicly accessible at the specified - custom domain. - type: boolean - x-auditable: true - minTLS: - description: >- - Minimum TLS Version the custom domain will accept for incoming - connections. If not set, defaults to 1.0. - enum: - - '1.0' - - '1.1' - - '1.2' - - '1.3' - type: string - x-auditable: true - status: - properties: - ownership: - description: Ownership status of the domain. - enum: - - pending - - active - - deactivated - - blocked - - error - - unknown - type: string - x-auditable: true - ssl: - description: SSL certificate status. - enum: - - initializing - - pending - - active - - deactivated - - error - - unknown - type: string - x-auditable: true - required: - - ssl - - ownership - type: object - zoneId: - description: Zone ID of the custom domain resides in. - type: string - x-auditable: true - zoneName: - description: Zone that the custom domain resides in. - type: string - x-auditable: true - required: - - domain - - status - - enabled - type: object - type: array - required: - - domains - type: object - r2LocalUploadsConfiguration: - description: Configuration for local uploads on a bucket. - properties: - enabled: - description: >- - Whether local uploads is enabled for this bucket. When enabled, - object's data is written to the nearest region first, then - asynchronously replicated to the bucket's primary region. - type: boolean - x-auditable: true - type: object - r2ManagedDomainResponse: - example: - bucketId: 0113a9e4549cf9b1ff1bf56e04da0cef - domain: pub-0113a9e4549cf9b1ff1bf56e04da0cef.r2.dev - enabled: true - properties: - bucketId: - description: Bucket ID. - maxLength: 32 - type: string - x-auditable: true - domain: - description: Domain name of the bucket's r2.dev domain. - type: string - x-auditable: true - enabled: - description: Whether this bucket is publicly accessible at the r2.dev domain. - type: boolean - x-auditable: true - required: - - bucketId - - domain - - enabled - type: object - r2Messages: - items: - type: string - type: array - r2ObjectSizeMetrics: - description: Metrics on number of objects/amount of storage used. - properties: - metadataSize: - description: Amount of. - type: number - objects: - description: Number of objects stored. - type: number - payloadSize: - description: Amount of storage used by object data. - type: number - type: object - r2QueuesConfig: - properties: - queueId: - description: Queue ID. - example: 11111aa1-11aa-111a-a1a1-a1a111a11a11 - type: string - x-auditable: true - queueName: - description: Name of the queue. - example: first-queue - type: string - x-auditable: true - rules: - items: - properties: - actions: - description: Array of R2 object actions that will trigger notifications. - example: - - PutObject - - CopyObject - items: - $ref: '#/components/schemas/r2R2Action' - type: array - uniqueItems: true - description: - description: >- - A description that can be used to identify the event - notification rule after creation. - example: Notifications from source bucket to queue - type: string - x-auditable: true - prefix: - description: Notifications will be sent only for objects with this prefix. - example: img/ - type: string - x-auditable: true - suffix: - description: Notifications will be sent only for objects with this suffix. - example: .jpeg - type: string - x-auditable: true - createdAt: - description: Timestamp when the rule was created. - example: '2024-09-19T21:54:48.405Z' - type: string - x-auditable: true - ruleId: - description: Rule ID. - example: 11111aa1-11aa-111a-a1a1-a1a111a11a11 - type: string - x-auditable: true - required: - - actions - type: object - type: array - type: object - r2R2Action: - enum: - - PutObject - - CopyObject - - DeleteObject - - CompleteMultipartUpload - - LifecycleDeletion - type: string - x-auditable: true - r2RemoveCustomDomainResponse: - example: - domain: example-domain/custom-domain.com - properties: - domain: - description: Name of the removed custom domain. - type: string - x-auditable: true - required: - - domain - type: object - r2ResultInfo: - properties: - cursor: - description: >- - A continuation token that should be used to fetch the next page of - results. - example: >- - 1-JTdCJTIydiUyMiUzQTElMkMlMjJzdGFydEFmdGVyJTIyJTNBJTIyZGF2aWRwdWJsaWMlMjIlN0Q= - type: string - per_page: - description: Maximum number of results on this page. - example: 20 - type: number - type: object - r2Rule: - properties: - actions: - description: Array of R2 object actions that will trigger notifications. - example: - - PutObject - - CopyObject - items: - $ref: '#/components/schemas/r2R2Action' - type: array - uniqueItems: true - description: - description: >- - A description that can be used to identify the event notification - rule after creation. - example: Notifications from source bucket to queue - type: string - x-auditable: true - prefix: - description: Notifications will be sent only for objects with this prefix. - example: img/ - type: string - x-auditable: true - suffix: - description: Notifications will be sent only for objects with this suffix. - example: .jpeg - type: string - x-auditable: true - required: - - actions - type: object - r2Sippy: - properties: - destination: - description: Details about the configured destination bucket. - properties: - accessKeyId: - description: >- - ID of the Cloudflare API token used when writing objects to this - bucket. - type: string - account: - type: string - x-auditable: true - bucket: - description: Name of the bucket on the provider. - type: string - x-auditable: true - provider: - $ref: '#/components/schemas/r2SippyProvider' - type: object - enabled: - description: State of Sippy for this bucket. - type: boolean - x-auditable: true - source: - description: Details about the configured source bucket. - properties: - bucket: - description: Name of the bucket on the provider (AWS, GCS only). - nullable: true - type: string - x-auditable: true - bucketUrl: - description: S3-compatible URL (Generic S3-compatible providers only). - nullable: true - type: string - x-auditable: true - provider: - enum: - - aws - - gcs - - s3 - type: string - x-auditable: true - region: - description: Region where the bucket resides (AWS only). - nullable: true - type: string - x-auditable: true - type: object - type: object - r2SippyProvider: - enum: - - r2 - type: string - x-auditable: true - r2SlurperApiV4Error: - example: - - code: 7003 - message: No route for the URI - items: - $ref: '#/components/schemas/responseInfo' - minLength: 1 - type: array - r2SlurperApiV4Failure: - properties: - errors: - $ref: '#/components/schemas/r2SlurperApiV4Error' - messages: - $ref: '#/components/schemas/r2SlurperApiV4Message' - success: - description: Indicates if the API call was successful or not. - enum: - - false - example: false - type: boolean - x-auditable: true - type: object - r2SlurperApiV4Message: - example: [] - items: - type: string - x-auditable: true - type: array - r2SlurperConnectivityResponse: - properties: - connectivityStatus: - enum: - - success - - error - type: string - type: object - r2SlurperCreateJobRequest: - properties: - overwrite: - default: true - type: boolean - source: - $ref: '#/components/schemas/r2SlurperSourceJobSchema' - target: - $ref: '#/components/schemas/r2SlurperR2TargetSchema' - type: object - r2SlurperJobLogResponse: - properties: - createdAt: - type: string - job: - type: string - logType: - enum: - - migrationStart - - migrationComplete - - migrationAbort - - migrationError - - migrationPause - - migrationResume - - migrationErrorFailedContinuation - - importErrorRetryExhaustion - - importSkippedStorageClass - - importSkippedOversized - - importSkippedEmptyObject - - importSkippedUnsupportedContentType - - importSkippedExcludedContentType - - importSkippedInvalidMedia - - importSkippedRequiresRetrieval - type: string - message: - nullable: true - type: string - objectKey: - nullable: true - type: string - type: object - r2SlurperJobProgressResponse: - properties: - createdAt: - type: string - failedObjects: - type: integer - id: - type: string - objects: - type: integer - skippedObjects: - type: integer - status: - $ref: '#/components/schemas/r2SlurperJobStatus' - transferredObjects: - type: integer - type: object - r2SlurperJobResponse: - properties: - createdAt: - type: string - finishedAt: - nullable: true - type: string - id: - type: string - overwrite: - type: boolean - source: - type: object - title: S3SourceResponseSchema - properties: - bucket: - type: string - endpoint: - nullable: true - type: string - keys: - items: - type: string - nullable: true - type: array - pathPrefix: - nullable: true - type: string - vendor: - enum: - - s3 - type: string - jurisdiction: - $ref: '#/components/schemas/r2SlurperJurisdiction' - status: - $ref: '#/components/schemas/r2SlurperJobStatus' - target: - properties: - bucket: - type: string - jurisdiction: - $ref: '#/components/schemas/r2SlurperJurisdiction' - vendor: - $ref: '#/components/schemas/r2SippyProvider' - title: R2TargetResponseSchema - type: object - type: object - r2SlurperJobStatus: - enum: - - running - - paused - - aborted - - completed - type: string - r2SlurperJurisdiction: - enum: - - default - - eu - - fedramp - type: string - r2SlurperR2TargetSchema: - properties: - bucket: - type: string - jurisdiction: - $ref: '#/components/schemas/r2SlurperJurisdiction' - secret: - $ref: '#/components/schemas/r2SlurperS3LikeCredsSchema' - vendor: - $ref: '#/components/schemas/r2SippyProvider' - required: - - vendor - - bucket - - secret - type: object - r2SlurperS3LikeCredsSchema: - properties: - accessKeyId: - type: string - secretAccessKey: - type: string - x-sensitive: true - required: - - accessKeyId - - secretAccessKey - type: object - r2SlurperSourceJobSchema: - type: object - properties: - bucket: - type: string - endpoint: - nullable: true - type: string - keys: - items: - type: string - maxItems: 10000 - nullable: true - type: array - pathPrefix: - nullable: true - type: string - region: - nullable: true - type: string - secret: - $ref: '#/components/schemas/r2SlurperS3LikeCredsSchema' - vendor: - enum: - - s3 - type: string - jurisdiction: - $ref: '#/components/schemas/r2SlurperJurisdiction' - required: - - bucket - - secret - - vendor - r2StorageClass: - default: Standard - description: Storage class for newly uploaded objects, unless specified otherwise. - enum: - - Standard - - InfrequentAccess - type: string - x-auditable: true - r2TempAccessCredsRequest: - example: - bucket: example-bucket - objects: - - example-object - parentAccessKeyId: example-access-key-id - permission: object-read-write - prefixes: - - example-prefix/ - ttlSeconds: 3600 - properties: - bucket: - description: Name of the R2 bucket. - type: string - x-auditable: true - objects: - description: Optional object paths to scope the credentials to. - items: - type: string - x-auditable: true - type: array - parentAccessKeyId: - description: The parent access key id to use for signing. - type: string - permission: - description: Permissions allowed on the credentials. - enum: - - admin-read-write - - admin-read-only - - object-read-write - - object-read-only - type: string - x-auditable: true - prefixes: - description: Optional prefix paths to scope the credentials to. - items: - type: string - x-auditable: true - type: array - ttlSeconds: - default: 900 - description: How long the credentials will live for in seconds. - maximum: 604800 - type: number - x-auditable: true - required: - - bucket - - permission - - ttlSeconds - - parentAccessKeyId - type: object - r2TempAccessCredsResponse: - example: - accessKeyId: example-access-key-id - secretAccessKey: example-secret-key - sessionToken: example-session-token - properties: - accessKeyId: - description: ID for new access key. - type: string - secretAccessKey: - description: Secret access key. - type: string - x-sensitive: true - sessionToken: - description: Security token. - type: string - x-sensitive: true - type: object - r2V4Response: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - type: object - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - type: object - r2V4ResponseFailure: - properties: - errors: - $ref: '#/components/schemas/r2Errors' - messages: - $ref: '#/components/schemas/r2Messages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - event_notifications: - id: cloudflare.r2.event_notifications - name: event_notifications - title: Event Notifications - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1event_notifications~1r2~1{bucket_name}~1configuration/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1event_notifications~1r2~1{bucket_name}~1configuration~1queues~1{queue_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1event_notifications~1r2~1{bucket_name}~1configuration~1queues~1{queue_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1event_notifications~1r2~1{bucket_name}~1configuration~1queues~1{queue_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/event_notifications/methods/get' - - $ref: '#/components/x-stackQL-resources/event_notifications/methods/list' - insert: [] - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/event_notifications/methods/delete - replace: - - $ref: >- - #/components/x-stackQL-resources/event_notifications/methods/update - buckets: - id: cloudflare.r2.buckets - name: buckets - title: Buckets - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.buckets - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/buckets/methods/get' - - $ref: '#/components/x-stackQL-resources/buckets/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/buckets/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/buckets/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/buckets/methods/delete' - replace: [] - cors: - id: cloudflare.r2.cors - name: cors - title: Cors - methods: - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1cors/delete - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1cors/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.rules - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1cors/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/cors/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/cors/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/cors/methods/update' - custom: - id: cloudflare.r2.custom - name: custom - title: Custom - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.domains - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom/post - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom~1{domain}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom~1{domain}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom~1{domain}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/custom/methods/get' - - $ref: '#/components/x-stackQL-resources/custom/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/custom/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/custom/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/custom/methods/update' - managed: - id: cloudflare.r2.managed - name: managed - title: Managed - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1managed/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1managed/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/managed/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/managed/methods/update' - lifecycle: - id: cloudflare.r2.lifecycle - name: lifecycle - title: Lifecycle - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1lifecycle/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.rules - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1lifecycle/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/lifecycle/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/lifecycle/methods/update' - local_uploads: - id: cloudflare.r2.local_uploads - name: local_uploads - title: Local Uploads - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1local-uploads/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - r2_put_bucket_local_uploads_configuration: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1local-uploads/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/local_uploads/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/local_uploads/methods/r2_put_bucket_local_uploads_configuration - locks: - id: cloudflare.r2.locks - name: locks - title: Locks - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1lock/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.rules - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1lock/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/locks/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - sippy: - id: cloudflare.r2.sippy - name: sippy - title: Sippy - methods: - delete: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1sippy/delete - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1sippy/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1sippy/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/sippy/methods/list' - insert: [] - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/sippy/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/sippy/methods/update' - metrics: - id: cloudflare.r2.metrics - name: metrics - title: Metrics - methods: - list: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1r2~1metrics/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/metrics/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - r2: - id: cloudflare.r2.r2 - name: r2 - title: R2 - methods: - create_temp_access_credentials: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1r2~1temp-access-credentials/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - slurper_jobs: - id: cloudflare.r2.slurper_jobs - name: slurper_jobs - title: Slurper Jobs - methods: - list_by_account: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/slurper_jobs/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - jobs: - id: cloudflare.r2.jobs - name: jobs - title: Jobs - methods: - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs/post' - response: - mediaType: application/json - openAPIDocKey: '201' - abort_all: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1abortAll/put' - response: - mediaType: application/json - openAPIDocKey: '200' - slurper_delete_job: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - abort: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}~1abort/put - response: - mediaType: application/json - openAPIDocKey: '200' - pause: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}~1pause/put - response: - mediaType: application/json - openAPIDocKey: '200' - resume: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}~1resume/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/jobs/methods/get' - insert: - - $ref: '#/components/x-stackQL-resources/jobs/methods/create' - update: [] - delete: - - $ref: '#/components/x-stackQL-resources/jobs/methods/slurper_delete_job' - replace: - - $ref: '#/components/x-stackQL-resources/jobs/methods/abort_all' - logs: - id: cloudflare.r2.logs - name: logs - title: Logs - methods: - list: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}~1logs/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/logs/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - jobs_progress: - id: cloudflare.r2.jobs_progress - name: jobs_progress - title: Jobs Progress - methods: - list_by_account: - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}~1progress/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/jobs_progress/methods/list_by_account - insert: [] - update: [] - delete: [] - replace: [] - source_connectivity_precheck: - id: cloudflare.r2.source_connectivity_precheck - name: source_connectivity_precheck - title: Source Connectivity Precheck - methods: - update_connectivity_precheck: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1slurper~1source~1connectivity-precheck/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] - target_connectivity_precheck: - id: cloudflare.r2.target_connectivity_precheck - name: target_connectivity_precheck - title: Target Connectivity Precheck - methods: - update_connectivity_precheck: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1accounts~1{account_id}~1slurper~1target~1connectivity-precheck/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: [] - insert: [] - update: [] - delete: [] - replace: [] +openapi: 3.0.3 +info: + title: r2 API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration: + get: + description: List all event notification rules for a bucket. + operationId: r2-get-event-notification-configs + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2BucketConfig' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Read Configuration response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: No Configuration Found response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Read Configuration failure. + security: + - api_token: [] + summary: List Event Notification Rules + tags: + - R2 Bucket + x-api-token-group: + - Workers R2 Storage Write + - Workers R2 Storage Read + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - event_notifications + method: list + /accounts/{account_id}/event_notifications/r2/{bucket_name}/configuration/queues/{queue_id}: + delete: + description: Delete an event notification rule. **If no body is provided, all rules for specified queue will be deleted**. + operationId: r2-event-notification-delete-config + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4Response' + type: object + description: Delete Configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Delete Configuration failure. + security: + - api_token: [] + summary: Delete Event Notification Rules + tags: + - R2 Bucket + x-api-token-group: + - Workers R2 Storage Write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - event_notifications + method: delete + get: + description: Get a single event notification rule. + operationId: r2-get-event-notification-config + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + default: default + description: The bucket jurisdiction. + enum: + - default + - eu + - fedramp + type: string + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2QueuesConfig' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Read Configuration response. + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: No Configuration Found response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Read Configuration failure. + security: + - api_token: [] + summary: Get Event Notification Rule + tags: + - R2 Bucket + x-api-token-group: + - Workers R2 Storage Write + - Workers R2 Storage Read + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - event_notifications + method: get + put: + description: Create event notification rule. + operationId: r2-put-event-notification-config + parameters: + - name: queue_id + in: path + required: true + description: The Cloudflare Queue ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + requestBody: + content: + application/json: + schema: + properties: + rules: + description: Array of rules to drive notifications. + items: + $ref: '#/components/schemas/r2Rule' + minItems: 1 + type: array + required: + - rules + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4Response' + type: object + description: Create Configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Create Configuration failure. + security: + - api_token: [] + summary: Create Event Notification Rule + tags: + - R2 Bucket + x-api-token-group: + - Workers R2 Storage Write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - event_notifications + method: update + /accounts/{account_id}/r2/buckets: + get: + description: Lists all R2 buckets on your account. + operationId: r2-list-buckets + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: name_contains + schema: + description: Bucket names to filter by. Only buckets with this phrase in their name will be returned. + type: string + - in: query + name: start_after + schema: + description: Bucket name to start searching after. Buckets are ordered lexicographically. + type: string + - in: query + name: per_page + schema: + default: 20 + description: Maximum number of buckets to return in a single call. + maximum: 1000 + minimum: 1 + type: number + - in: query + name: order + schema: + description: Field to order buckets by. + enum: + - name + type: string + - in: query + name: direction + schema: + description: Direction to order buckets. + enum: + - asc + - desc + type: string + - in: query + name: cursor + schema: + description: Pagination cursor received during the last List Buckets call. R2 buckets are paginated using cursors instead of page numbers. + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + properties: + buckets: + items: + $ref: '#/components/schemas/r2Bucket' + type: array + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result_info: + $ref: '#/components/schemas/r2ResultInfo' + required: + - success + - errors + - messages + - result + type: object + description: List Buckets response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: List Buckets response failure. + security: + - api_token: [] + summary: List Buckets + tags: + - R2 Bucket + x-api-token-group: + - Workers R2 Storage Write + - Workers R2 Storage Read + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + method: list + post: + description: Creates a new R2 bucket. + operationId: r2-create-bucket + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + requestBody: + content: + application/json: + schema: + properties: + locationHint: + $ref: '#/components/schemas/r2BucketLocation' + x-stainless-naming: + terraform: + property_name: location + name: + $ref: '#/components/schemas/r2BucketName' + storageClass: + $ref: '#/components/schemas/r2StorageClass' + required: + - name + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2Bucket' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Create Bucket response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Create Bucket response failure. + security: + - api_token: [] + summary: Create Bucket + tags: + - R2 Bucket + x-api-token-group: + - Workers R2 Storage Write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + method: create + /accounts/{account_id}/r2/buckets/{bucket_name}: + delete: + description: Deletes an existing R2 bucket. + operationId: r2-delete-bucket + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4Response' + description: Delete Bucket response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Delete Bucket response failure. + security: + - api_token: [] + summary: Delete Bucket + tags: + - R2 Bucket + x-api-token-group: + - Workers R2 Storage Write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + method: delete + get: + description: Gets properties of an existing R2 bucket. + operationId: r2-get-bucket + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2Bucket' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Get Bucket response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Get Bucket response failure. + security: + - api_token: [] + summary: Get Bucket + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.read + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + method: get + patch: + description: Updates properties of an existing R2 bucket. + operationId: r2-patch-bucket + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + - in: header + name: cf-r2-storage-class + schema: + x-stainless-param: storage_class + $ref: '#/components/schemas/r2StorageClass' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2Bucket' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Patch Bucket response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Get Bucket response failure. + security: + - api_token: [] + summary: Patch Bucket + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + method: edit + /accounts/{account_id}/r2/buckets/{bucket_name}/cors: + delete: + description: Delete the CORS policy for a bucket. + operationId: r2-delete-bucket-cors-policy + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4Response' + type: object + description: Success Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Error Response. + security: + - api_token: [] + summary: Delete Bucket CORS Policy + tags: + - R2 Bucket + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - cors + method: delete + get: + description: Get the CORS policy for a bucket. + operationId: r2-get-bucket-cors-policy + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + properties: + rules: + items: + $ref: '#/components/schemas/r2CorsRule' + type: array + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Success Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Error Response. + security: + - api_token: [] + summary: Get Bucket CORS Policy + tags: + - R2 Bucket + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - cors + method: get + put: + description: Set the CORS policy for a bucket. + operationId: r2-put-bucket-cors-policy + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + requestBody: + content: + application/json: + schema: + properties: + rules: + items: + $ref: '#/components/schemas/r2CorsRule' + type: array + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4Response' + type: object + description: Success Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Error Response. + security: + - api_token: [] + summary: Put Bucket CORS Policy + tags: + - R2 Bucket + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - cors + method: update + /accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom: + get: + description: Gets a list of all custom domains registered with an existing R2 bucket. + operationId: r2-list-custom-domains + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2ListCustomDomainsResponse' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: List Custom Domains response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: List Custom Domains response failure. + security: + - api_token: [] + summary: List Custom Domains of Bucket + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.read + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - domains + - custom + method: list + post: + description: Register a new custom domain for an existing R2 bucket. + operationId: r2-add-custom-domain + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/r2AddCustomDomainRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2AddCustomDomainResponse' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Add Custom Domain response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Add Custom Domain response failure. + security: + - api_token: [] + summary: Attach Custom Domain To Bucket + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - domains + - custom + method: create + /accounts/{account_id}/r2/buckets/{bucket_name}/domains/custom/{domain}: + delete: + description: Remove custom domain registration from an existing R2 bucket. + operationId: r2-delete-custom-domain + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: path + name: domain + schema: + $ref: '#/components/schemas/r2DomainName' + required: true + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2RemoveCustomDomainResponse' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Delete Custom Domain response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Delete Custom Domain response failure. + security: + - api_token: [] + summary: Remove Custom Domain From Bucket + tags: + - R2 Bucket + x-api-token-group: + - Workers R2 Storage Write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - domains + - custom + method: delete + get: + description: Get the configuration for a custom domain on an existing R2 bucket. + operationId: r2-get-custom-domain-settings + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - in: path + name: domain + schema: + $ref: '#/components/schemas/r2DomainName' + required: true + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2GetCustomDomainResponse' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Get Custom Domain Configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Get Custom Domain Configuration response failure. + security: + - api_token: [] + summary: Get Custom Domain Settings + tags: + - R2 Bucket + x-api-token-group: + - Workers R2 Storage Write + - Workers R2 Storage Read + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - domains + - custom + method: get + put: + description: Edit the configuration for a custom domain on an existing R2 bucket. + operationId: r2-edit-custom-domain-settings + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - in: path + name: domain + schema: + $ref: '#/components/schemas/r2DomainName' + required: true + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/r2EditCustomDomainRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2EditCustomDomainResponse' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Edit Custom Domain Configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Edit Custom Domain Configuration response failure. + security: + - api_token: [] + summary: Configure Custom Domain Settings + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - domains + - custom + method: update + /accounts/{account_id}/r2/buckets/{bucket_name}/domains/managed: + get: + description: Gets state of public access over the bucket's R2-managed (r2.dev) domain. + operationId: r2-get-bucket-public-policy + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2ManagedDomainResponse' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Get Managed Subdomain response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Get Managed Subdomain response failure. + security: + - api_token: [] + summary: Get r2.dev Domain of Bucket + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.read + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - domains + - managed + method: list + put: + description: Updates state of public access over the bucket's R2-managed (r2.dev) domain. + operationId: r2-put-bucket-public-policy + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/r2EditManagedDomainRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2ManagedDomainResponse' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Update Managed Subdomain response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Update Managed Subdomain response failure. + security: + - api_token: [] + summary: Update r2.dev Domain of Bucket + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - domains + - managed + method: update + /accounts/{account_id}/r2/buckets/{bucket_name}/lifecycle: + get: + description: Get object lifecycle rules for a bucket. + operationId: r2-get-bucket-lifecycle-configuration + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2LifecycleConfig' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Success Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Error Response. + security: + - api_token: [] + summary: Get Object Lifecycle Rules + tags: + - R2 Bucket + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - lifecycle + method: get + put: + description: Set the object lifecycle rules for a bucket. + operationId: r2-put-bucket-lifecycle-configuration + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + requestBody: + content: + application/json: + schema: + properties: + rules: + items: + $ref: '#/components/schemas/r2LifecycleRule' + type: array + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4Response' + type: object + description: Success Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Error Response. + security: + - api_token: [] + summary: Put Object Lifecycle Rules + tags: + - R2 Bucket + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - lifecycle + method: update + /accounts/{account_id}/r2/buckets/{bucket_name}/local-uploads: + get: + description: Get the local uploads configuration for a bucket. When enabled, object's data is written to the nearest region first, then asynchronously replicated to the bucket's primary region. + operationId: r2-get-bucket-local-uploads-configuration + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2LocalUploadsConfiguration' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Success Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Error Response. + security: + - api_token: [] + summary: Get Local Uploads Configuration + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.read + put: + description: Set the local uploads configuration for a bucket. When enabled, object's data is written to the nearest region first, then asynchronously replicated to the bucket's primary region. + operationId: r2-put-bucket-local-uploads-configuration + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + enabled: + description: Whether to enable local uploads for this bucket. + type: boolean + x-auditable: true + required: + - enabled + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4Response' + type: object + description: Success Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Error Response. + security: + - api_token: [] + summary: Put Local Uploads Configuration + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.write + /accounts/{account_id}/r2/buckets/{bucket_name}/lock: + get: + description: Get lock rules for a bucket. + operationId: r2-get-bucket-lock-configuration + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2BucketLockRuleConfig' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Success Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Error Response. + security: + - api_token: [] + summary: Get Bucket Lock Rules + tags: + - R2 Bucket + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - locks + method: get + put: + description: Set lock rules for a bucket. + operationId: r2-put-bucket-lock-configuration + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + requestBody: + content: + application/json: + schema: + properties: + rules: + items: + $ref: '#/components/schemas/r2BucketLockRule' + type: array + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4Response' + type: object + description: Success Response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Error Response. + security: + - api_token: [] + summary: Put Bucket Lock Rules + tags: + - R2 Bucket + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - locks + method: update + /accounts/{account_id}/r2/buckets/{bucket_name}/sippy: + delete: + description: Disables Sippy on this bucket. + operationId: r2-delete-bucket-sippy-config + parameters: + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + properties: + enabled: + enum: + - false + type: boolean + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Delete Sippy Configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Delete Sippy Configuration response failure. + security: + - api_token: [] + summary: Disable Sippy + tags: + - R2 Bucket + x-api-token-group: + - Workers R2 Storage Write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - sippy + method: delete + get: + description: Gets configuration for Sippy for an existing R2 bucket. + operationId: r2-get-bucket-sippy-config + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2Sippy' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Get Sippy Configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Get Sippy Configuration response failure. + security: + - api_token: [] + summary: Get Sippy Configuration + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.read + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - sippy + method: get + put: + description: Sets configuration for Sippy for an existing R2 bucket. + operationId: r2-put-bucket-sippy-config + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: bucket_name + in: path + required: true + description: The R2 bucket name. + schema: + type: string + - in: header + name: cf-r2-jurisdiction + schema: + $ref: '#/components/schemas/r2Jurisdiction' + x-stainless-param: jurisdiction + requestBody: + content: + application/json: + schema: + type: object + properties: + destination: + description: R2 bucket to copy objects to. + properties: + accessKeyId: + description: ID of a Cloudflare API token. This is the value labelled "Access Key ID" when creating an API. token from the [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens). Sippy will use this token when writing objects to R2, so it is best to scope this token to the bucket you're enabling Sippy for. + type: string + provider: + $ref: '#/components/schemas/r2SippyProvider' + secretAccessKey: + description: Value of a Cloudflare API token. This is the value labelled "Secret Access Key" when creating an API. token from the [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens). Sippy will use this token when writing objects to R2, so it is best to scope this token to the bucket you're enabling Sippy for. + type: string + x-sensitive: true + type: object + source: + description: AWS S3 bucket to copy objects from. + properties: + accessKeyId: + description: Access Key ID of an IAM credential (ideally scoped to a single S3 bucket). + type: string + bucket: + description: Name of the AWS S3 bucket. + type: string + x-auditable: true + provider: + enum: + - aws + type: string + x-auditable: true + region: + description: Name of the AWS availability zone. + type: string + x-auditable: true + secretAccessKey: + description: Secret Access Key of an IAM credential (ideally scoped to a single S3 bucket). + type: string + x-sensitive: true + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2Sippy' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Set Sippy Configuration response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Get Sippy Configuration response failure. + security: + - api_token: [] + summary: Enable Sippy + tags: + - R2 Bucket + x-cfPermissionsRequired: + enum: + - com.cloudflare.edge.r2.bucket.write + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - sippy + method: update + /accounts/{account_id}/r2/metrics: + get: + description: Get Storage/Object Count Metrics across all buckets in your account. Note that Account-Level Metrics may not immediately reflect the latest data. + operationId: r2-get-account-level-metrics + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2AccountLevelMetrics' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Get Account-Level Metrics response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Get Account-Level Metrics response failure. + security: + - api_token: [] + summary: Get Account-Level Metrics + tags: + - R2 Account + x-cfPermissionsRequired: null + x-stackql-sdk: + service: r2 + resource_chain: + - buckets + - metrics + method: list + /accounts/{account_id}/r2/temp-access-credentials: + post: + description: Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects. + operationId: r2-create-temp-access-credentials + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/r2TempAccessCredsRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + $ref: '#/components/schemas/r2TempAccessCredsResponse' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + description: Create temporary access credentials response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2V4ResponseFailure' + description: Create temporary access credentials response failure. + security: + - api_token: [] + summary: Create Temporary Access Credentials + tags: + - R2 Bucket + x-stackql-sdk: + service: r2 + resource_chain: + - temporary_credentials + method: create + /accounts/{account_id}/slurper/jobs: + get: + description: Lists all R2 Super Slurper migration jobs for the account with their status. + operationId: slurper-list-jobs + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - in: query + name: limit + schema: + maximum: 50 + type: integer + - in: query + name: offset + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + items: + $ref: '#/components/schemas/r2SlurperJobResponse' + type: array + description: A list of jobs + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List jobs + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - jobs + method: list + post: + description: Creates a new R2 Super Slurper migration job to transfer objects from a source bucket (e.g. S3, GCS, R2) to R2. + operationId: slurper-create-job + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperCreateJobRequest' + responses: + '201': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + properties: + id: + type: string + type: object + description: Job created + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Maximum number of concurrent jobs has been reached + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create a job + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - jobs + method: create + /accounts/{account_id}/slurper/jobs/abortAll: + put: + description: Cancels all running R2 Super Slurper migration jobs for the account. Any objects in the middle of a transfer will finish, but no new objects will start transferring. + operationId: slurper-abort-all-jobs + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + type: string + description: All jobs aborted + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Abort all jobs + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - jobs + method: abort_all + /accounts/{account_id}/slurper/jobs/{job_id}: + delete: + description: Deletes a completed, aborted, or errored R2 Super Slurper migration job. Active jobs cannot be deleted. + operationId: slurper-delete-job + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + type: string + description: Job deleted + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Job is still active + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete a job + tags: + - R2 Super Slurper + get: + description: Retrieves detailed status and configuration for a specific R2 Super Slurper migration job. + operationId: slurper-get-job + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/r2SlurperJobResponse' + description: Job details + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get job details + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - jobs + method: get + /accounts/{account_id}/slurper/jobs/{job_id}/abort: + put: + description: Cancels a specific R2 Super Slurper migration job. Any objects in the middle of a transfer will finish, but no new objects will start transferring. + operationId: slurper-abort-job + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + type: string + description: Job aborted + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Abort a job + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - jobs + method: abort + /accounts/{account_id}/slurper/jobs/{job_id}/logs: + get: + description: Gets log entries for an R2 Super Slurper migration job, showing migration status changes, errors, etc. + operationId: slurper-get-job-logs + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + - in: query + name: limit + schema: + maximum: 50 + type: integer + - in: query + name: offset + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + items: + $ref: '#/components/schemas/r2SlurperJobLogResponse' + type: array + description: Job logs + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get job logs + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - jobs + - logs + method: list + /accounts/{account_id}/slurper/jobs/{job_id}/pause: + put: + description: Pauses a running R2 Super Slurper migration job. The job can be resumed later to continue transferring. + operationId: slurper-pause-job + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + type: string + description: Job paused + '409': + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Job is not paused + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Pause a job + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - jobs + method: pause + /accounts/{account_id}/slurper/jobs/{job_id}/progress: + get: + description: Retrieves current progress metrics for an R2 Super Slurper migration job + operationId: slurper-get-job-progress + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/r2SlurperJobProgressResponse' + description: Job progress + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get job progress + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - jobs + method: progress + /accounts/{account_id}/slurper/jobs/{job_id}/resume: + put: + description: Resumes a paused R2 Super Slurper migration job, continuing the transfer from where it stopped. + operationId: slurper-resume-job + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + - name: job_id + in: path + required: true + description: The job ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + type: string + description: Job resumed + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Resume a job + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - jobs + method: resume + /accounts/{account_id}/slurper/source/connectivity-precheck: + put: + description: Check whether tokens are valid against the source bucket + operationId: slurper-check-source-connectivity + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperSourceJobSchema' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/r2SlurperConnectivityResponse' + description: Source connectivity checked + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Check source connectivity + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - connectivity_precheck + method: source + /accounts/{account_id}/slurper/target/connectivity-precheck: + put: + description: Check whether tokens are valid against the target bucket + operationId: slurper-check-target-connectivity + parameters: + - name: account_id + in: path + required: true + description: The Cloudflare account ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperR2TargetSchema' + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - true + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/r2SlurperConnectivityResponse' + description: Target connectivity checked + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/r2SlurperApiV4Failure' + description: Failure response + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Check target connectivity + tags: + - R2 Super Slurper + x-stackql-sdk: + service: r2 + resource_chain: + - super_slurper + - connectivity_precheck + method: target + /graphql/r2_operations_adaptive_groups: + post: + operationId: graphql-r2_operations_adaptive_groups-list + summary: Cloudflare R2 storage operation analytics for an account, grouped by bucket, operation type, region, and HTTP status + description: Cloudflare R2 storage operation analytics for an account, grouped by bucket, operation type, region, and HTTP status. Per-tuple totals for request count, response bytes, and object size. + x-stackQL-graphQL: + url: https://api.cloudflare.com/client/v4/graphql + httpVerb: POST + responseSelection: + jsonPath: $.result[*] + cursor: + jsonPath: $.result[*].__no_cursor + query: "query {\n viewer {\n accounts(filter: { accountTag: \"{{ .account_tag }}\" }, limit: 1) {\n r2OperationsAdaptiveGroups(\n filter: { datetime_geq: \"{{ .since }}\", datetime_lt: \"{{ .until }}\" }\n limit: {{ if .limit }}{{ .limit }}{{ else }}100{{ end }}\n orderBy: [datetimeMinute_ASC]\n ) {\n dimensions {\n datetime: datetimeMinute\n bucketName\n actionType\n actionStatus\n responseStatusCode\n eyeballRegion\n storageClass\n }\n sum {\n requests\n responseBytes\n responseObjectSize\n }\n }\n }\n }\n}\n" + x-stackql-protocol: graphql + parameters: + - name: account_tag + in: path + required: true + schema: + type: string + description: Cloudflare account ID (the 32-char hex tag). + - name: since + in: query + required: true + schema: + type: string + format: date-time + description: Lower bound (inclusive). RFC3339. + - name: until + in: query + required: true + schema: + type: string + format: date-time + description: Upper bound (exclusive). RFC3339. + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + description: Maximum dimension-tuple rows per call. + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + datetime: + type: string + format: date-time + bucket_name: + type: string + description: R2 bucket name. + action_type: + type: string + description: R2 operation (GetObject / PutObject / ListObjects / etc.). + action_status: + type: string + description: Operation result (success / failure / etc.). + response_status_code: + type: integer + description: HTTP status returned. + eyeball_region: + type: string + description: Region of the requesting eyeball (WNAM / ENAM / WEU / etc.). + storage_class: + type: string + description: Storage class (Standard / InfrequentAccess). + requests: + type: integer + description: Request count for the tuple. + response_bytes: + type: integer + description: Total retrieved bytes. + response_object_size: + type: integer + description: Total response object sizes. +components: + schemas: + r2AccountLevelMetrics: + description: Metrics based on the class they belong to. + properties: + infrequentAccess: + $ref: '#/components/schemas/r2ClassBasedMetrics' + standard: + $ref: '#/components/schemas/r2ClassBasedMetrics' + type: object + r2AddCustomDomainRequest: + example: + domain: prefix.example-domain.com + enabled: true + zoneId: 36ca64a6d92827b8a6b90be344bb1bfd + properties: + ciphers: + description: An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. + items: + type: string + type: array + x-auditable: true + domain: + description: Name of the custom domain to be added. + type: string + x-auditable: true + enabled: + description: Whether to enable public bucket access at the custom domain. If undefined, the domain will be enabled. + type: boolean + x-auditable: true + minTLS: + description: Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. + enum: + - '1.0' + - '1.1' + - '1.2' + - '1.3' + type: string + x-auditable: true + zoneId: + description: Zone ID of the custom domain. + type: string + x-auditable: true + required: + - domain + - zoneId + - enabled + type: object + r2AddCustomDomainResponse: + example: + domain: example-domain.com + enabled: true + zoneId: 36ca64a6d92827b8a6b90be344bb1bfd + properties: + ciphers: + description: An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. + items: + type: string + type: array + x-auditable: true + domain: + description: Domain name of the affected custom domain. + type: string + x-auditable: true + enabled: + description: Whether this bucket is publicly accessible at the specified custom domain. + type: boolean + minTLS: + description: Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. + enum: + - '1.0' + - '1.1' + - '1.2' + - '1.3' + type: string + x-auditable: true + zoneId: + description: Zone ID of the custom domain. + type: string + x-auditable: true + required: + - domain + - enabled + - zoneId + type: object + r2Bucket: + description: A single R2 bucket. + properties: + creation_date: + description: Creation timestamp. + type: string + jurisdiction: + $ref: '#/components/schemas/r2Jurisdiction' + location: + $ref: '#/components/schemas/r2BucketLocation' + name: + $ref: '#/components/schemas/r2BucketName' + storage_class: + $ref: '#/components/schemas/r2StorageClass' + type: object + r2BucketConfig: + properties: + bucketName: + description: Name of the bucket. + type: string + x-auditable: true + queues: + description: List of queues associated with the bucket. + items: + $ref: '#/components/schemas/r2QueuesConfig' + type: array + type: object + r2BucketLocation: + description: Location of the bucket. + enum: + - apac + - eeur + - enam + - weur + - wnam + - oc + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + r2BucketLockRule: + properties: + condition: + type: object + description: Condition to apply a lock rule to an object for how long in seconds. + properties: + maxAgeSeconds: + example: 100 + type: integer + x-auditable: true + type: + enum: + - Age + type: string + x-auditable: true + date: + format: date-time + type: string + x-auditable: true + required: + - type + enabled: + description: Whether or not this rule is in effect. + type: boolean + x-auditable: true + id: + description: Unique identifier for this rule. + example: Lock all objects for 24 hours + type: string + x-auditable: true + prefix: + description: Rule will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads. + type: string + x-auditable: true + required: + - id + - condition + - enabled + type: object + r2BucketLockRuleConfig: + properties: + rules: + items: + $ref: '#/components/schemas/r2BucketLockRule' + type: array + type: object + r2BucketName: + description: Name of the bucket. + example: example-bucket + maxLength: 64 + minLength: 3 + type: string + x-auditable: true + r2ClassBasedMetrics: + description: Metrics based on what state they are in(uploaded or published). + properties: + published: + $ref: '#/components/schemas/r2ObjectSizeMetrics' + uploaded: + $ref: '#/components/schemas/r2ObjectSizeMetrics' + type: object + r2CorsRule: + properties: + allowed: + description: Object specifying allowed origins, methods and headers for this CORS rule. + properties: + headers: + description: Specifies the value for the Access-Control-Allow-Headers header R2 sets when requesting objects in this bucket from a browser. Cross-origin requests that include custom headers (e.g. x-user-id) should specify these headers as AllowedHeaders. + items: + example: x-requested-by + type: string + x-auditable: true + type: array + methods: + description: Specifies the value for the Access-Control-Allow-Methods header R2 sets when requesting objects in a bucket from a browser. + items: + enum: + - GET + - PUT + - POST + - DELETE + - HEAD + type: string + x-auditable: true + type: array + origins: + description: Specifies the value for the Access-Control-Allow-Origin header R2 sets when requesting objects in a bucket from a browser. + items: + example: http://localhost:3000 + type: string + x-auditable: true + type: array + required: + - methods + - origins + type: object + exposeHeaders: + description: Specifies the headers that can be exposed back, and accessed by, the JavaScript making the cross-origin request. If you need to access headers beyond the safelisted response headers, such as Content-Encoding or cf-cache-status, you must specify it here. + items: + example: Content-Encoding + type: string + x-auditable: true + type: array + id: + description: Identifier for this rule. + example: Allow Local Development + type: string + x-auditable: true + maxAgeSeconds: + description: Specifies the amount of time (in seconds) browsers are allowed to cache CORS preflight responses. Browsers may limit this to 2 hours or less, even if the maximum value (86400) is specified. + example: 3600 + type: number + x-auditable: true + required: + - allowed + type: object + r2DomainName: + description: Name of the custom domain. + example: example-domain/custom-domain.com + type: string + x-auditable: true + r2EditCustomDomainRequest: + example: + enabled: true + minTLS: '1.2' + properties: + ciphers: + description: An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. + items: + type: string + type: array + x-auditable: true + enabled: + description: Whether to enable public bucket access at the specified custom domain. + type: boolean + x-auditable: true + minTLS: + description: Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to previous value. + enum: + - '1.0' + - '1.1' + - '1.2' + - '1.3' + type: string + x-auditable: true + type: object + r2EditCustomDomainResponse: + example: + domain: example-domain.com + enabled: true + properties: + ciphers: + description: An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. + items: + type: string + type: array + x-auditable: true + domain: + description: Domain name of the affected custom domain. + type: string + x-auditable: true + enabled: + description: Whether this bucket is publicly accessible at the specified custom domain. + type: boolean + x-auditable: true + minTLS: + description: Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. + enum: + - '1.0' + - '1.1' + - '1.2' + - '1.3' + type: string + x-auditable: true + required: + - domain + type: object + r2EditManagedDomainRequest: + example: + enabled: true + properties: + enabled: + description: Whether to enable public bucket access at the r2.dev domain. + type: boolean + x-auditable: true + required: + - enabled + type: object + r2Errors: + items: + $ref: '#/components/schemas/responseInfo' + type: array + r2GetCustomDomainResponse: + example: + domain: prefix.example-domain.one.com + enabled: false + status: + ownership: deactivated + ssl: pending + zoneId: 36ca64a6d92827b8a6b90be344bb1bfd + zoneName: example-domain.one.com + properties: + ciphers: + description: An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. + items: + type: string + type: array + x-auditable: true + domain: + description: Domain name of the custom domain to be added. + type: string + x-auditable: true + enabled: + description: Whether this bucket is publicly accessible at the specified custom domain. + type: boolean + x-auditable: true + minTLS: + description: Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. + enum: + - '1.0' + - '1.1' + - '1.2' + - '1.3' + type: string + x-auditable: true + status: + properties: + ownership: + description: Ownership status of the domain. + enum: + - pending + - active + - deactivated + - blocked + - error + - unknown + type: string + x-auditable: true + ssl: + description: SSL certificate status. + enum: + - initializing + - pending + - active + - deactivated + - error + - unknown + type: string + x-auditable: true + required: + - ssl + - ownership + type: object + zoneId: + description: Zone ID of the custom domain resides in. + type: string + x-auditable: true + zoneName: + description: Zone that the custom domain resides in. + type: string + x-auditable: true + required: + - domain + - status + - enabled + type: object + r2Jurisdiction: + default: default + description: Jurisdiction where objects in this bucket are guaranteed to be stored. + enum: + - default + - eu + - fedramp + type: string + x-auditable: true + x-stainless-param: jurisdiction + r2LifecycleAgeCondition: + description: Condition for lifecycle transitions to apply after an object reaches an age in seconds. + properties: + maxAge: + type: integer + x-auditable: true + type: + enum: + - Age + type: string + x-auditable: true + required: + - type + - maxAge + type: object + r2LifecycleConfig: + properties: + rules: + items: + $ref: '#/components/schemas/r2LifecycleRule' + type: array + type: object + r2LifecycleRule: + properties: + abortMultipartUploadsTransition: + description: Transition to abort ongoing multipart uploads. + properties: + condition: + $ref: '#/components/schemas/r2LifecycleAgeCondition' + type: object + conditions: + description: Conditions that apply to all transitions of this rule. + properties: + prefix: + description: Transitions will only apply to objects/uploads in the bucket that start with the given prefix, an empty prefix can be provided to scope rule to all objects/uploads. + type: string + x-auditable: true + required: + - prefix + type: object + deleteObjectsTransition: + description: Transition to delete objects. + properties: + condition: + type: object + description: Condition for lifecycle transitions to apply after an object reaches an age in seconds. + properties: + maxAge: + type: integer + x-auditable: true + type: + enum: + - Age + type: string + x-auditable: true + date: + format: date-time + type: string + x-auditable: true + required: + - type + type: object + enabled: + description: Whether or not this rule is in effect. + type: boolean + x-auditable: true + id: + description: Unique identifier for this rule. + example: Expire all objects older than 24 hours + type: string + x-auditable: true + storageClassTransitions: + description: Transitions to change the storage class of objects. + items: + $ref: '#/components/schemas/r2LifecycleStorageTransition' + type: array + required: + - id + - conditions + - enabled + type: object + r2LifecycleStorageTransition: + properties: + condition: + type: object + description: Condition for lifecycle transitions to apply after an object reaches an age in seconds. + properties: + maxAge: + type: integer + x-auditable: true + type: + enum: + - Age + type: string + x-auditable: true + date: + format: date-time + type: string + x-auditable: true + required: + - type + storageClass: + enum: + - InfrequentAccess + type: string + x-auditable: true + required: + - condition + - storageClass + type: object + r2ListCustomDomainsResponse: + example: + domains: + - domain: prefix.example-domain.one.com + enabled: false + status: + ownership: deactivated + ssl: pending + zoneId: 36ca64a6d92827b8a6b90be344bb1bfd + zoneName: example-domain.one.com + - domain: prefix.example-domain.two.com + enabled: true + status: + ownership: active + ssl: active + zoneId: d9d28585d5f8f5b0f857b055bf574f19 + properties: + domains: + items: + properties: + ciphers: + description: An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format. + items: + type: string + type: array + x-auditable: true + domain: + description: Domain name of the custom domain to be added. + type: string + x-auditable: true + enabled: + description: Whether this bucket is publicly accessible at the specified custom domain. + type: boolean + x-auditable: true + minTLS: + description: Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0. + enum: + - '1.0' + - '1.1' + - '1.2' + - '1.3' + type: string + x-auditable: true + status: + properties: + ownership: + description: Ownership status of the domain. + enum: + - pending + - active + - deactivated + - blocked + - error + - unknown + type: string + x-auditable: true + ssl: + description: SSL certificate status. + enum: + - initializing + - pending + - active + - deactivated + - error + - unknown + type: string + x-auditable: true + required: + - ssl + - ownership + type: object + zoneId: + description: Zone ID of the custom domain resides in. + type: string + x-auditable: true + zoneName: + description: Zone that the custom domain resides in. + type: string + x-auditable: true + required: + - domain + - status + - enabled + type: object + type: array + required: + - domains + type: object + r2LocalUploadsConfiguration: + description: Configuration for local uploads on a bucket. + properties: + enabled: + description: Whether local uploads is enabled for this bucket. When enabled, object's data is written to the nearest region first, then asynchronously replicated to the bucket's primary region. + type: boolean + x-auditable: true + type: object + r2ManagedDomainResponse: + example: + bucketId: 0113a9e4549cf9b1ff1bf56e04da0cef + domain: pub-0113a9e4549cf9b1ff1bf56e04da0cef.r2.dev + enabled: true + properties: + bucketId: + description: Bucket ID. + maxLength: 32 + type: string + x-auditable: true + domain: + description: Domain name of the bucket's r2.dev domain. + type: string + x-auditable: true + enabled: + description: Whether this bucket is publicly accessible at the r2.dev domain. + type: boolean + x-auditable: true + required: + - bucketId + - domain + - enabled + type: object + r2Messages: + items: + type: string + type: array + r2ObjectSizeMetrics: + description: Metrics on number of objects/amount of storage used. + properties: + metadataSize: + description: Amount of. + type: number + objects: + description: Number of objects stored. + type: number + payloadSize: + description: Amount of storage used by object data. + type: number + type: object + r2QueuesConfig: + properties: + queueId: + description: Queue ID. + example: 11111aa1-11aa-111a-a1a1-a1a111a11a11 + type: string + x-auditable: true + queueName: + description: Name of the queue. + example: first-queue + type: string + x-auditable: true + rules: + items: + properties: + actions: + description: Array of R2 object actions that will trigger notifications. + example: + - PutObject + - CopyObject + items: + $ref: '#/components/schemas/r2R2Action' + type: array + uniqueItems: true + description: + description: A description that can be used to identify the event notification rule after creation. + example: Notifications from source bucket to queue + type: string + x-auditable: true + prefix: + description: Notifications will be sent only for objects with this prefix. + example: img/ + type: string + x-auditable: true + suffix: + description: Notifications will be sent only for objects with this suffix. + example: .jpeg + type: string + x-auditable: true + createdAt: + description: Timestamp when the rule was created. + example: '2024-09-19T21:54:48.405Z' + type: string + x-auditable: true + ruleId: + description: Rule ID. + example: 11111aa1-11aa-111a-a1a1-a1a111a11a11 + type: string + x-auditable: true + required: + - actions + type: object + type: array + type: object + r2R2Action: + enum: + - PutObject + - CopyObject + - DeleteObject + - CompleteMultipartUpload + - LifecycleDeletion + type: string + x-auditable: true + r2RemoveCustomDomainResponse: + example: + domain: example-domain/custom-domain.com + properties: + domain: + description: Name of the removed custom domain. + type: string + x-auditable: true + required: + - domain + type: object + r2ResultInfo: + properties: + cursor: + description: A continuation token that should be used to fetch the next page of results. + example: 1-JTdCJTIydiUyMiUzQTElMkMlMjJzdGFydEFmdGVyJTIyJTNBJTIyZGF2aWRwdWJsaWMlMjIlN0Q= + type: string + per_page: + description: Maximum number of results on this page. + example: 20 + type: number + type: object + r2Rule: + properties: + actions: + description: Array of R2 object actions that will trigger notifications. + example: + - PutObject + - CopyObject + items: + $ref: '#/components/schemas/r2R2Action' + type: array + uniqueItems: true + description: + description: A description that can be used to identify the event notification rule after creation. + example: Notifications from source bucket to queue + type: string + x-auditable: true + prefix: + description: Notifications will be sent only for objects with this prefix. + example: img/ + type: string + x-auditable: true + suffix: + description: Notifications will be sent only for objects with this suffix. + example: .jpeg + type: string + x-auditable: true + required: + - actions + type: object + r2Sippy: + properties: + destination: + description: Details about the configured destination bucket. + properties: + accessKeyId: + description: ID of the Cloudflare API token used when writing objects to this bucket. + type: string + account: + type: string + x-auditable: true + bucket: + description: Name of the bucket on the provider. + type: string + x-auditable: true + provider: + $ref: '#/components/schemas/r2SippyProvider' + type: object + enabled: + description: State of Sippy for this bucket. + type: boolean + x-auditable: true + source: + description: Details about the configured source bucket. + properties: + bucket: + description: Name of the bucket on the provider (AWS, GCS only). + nullable: true + type: string + x-auditable: true + bucketUrl: + description: S3-compatible URL (Generic S3-compatible providers only). + nullable: true + type: string + x-auditable: true + provider: + enum: + - aws + - gcs + - s3 + type: string + x-auditable: true + region: + description: Region where the bucket resides (AWS only). + nullable: true + type: string + x-auditable: true + type: object + type: object + r2SippyProvider: + enum: + - r2 + type: string + x-auditable: true + r2SlurperApiV4Error: + example: + - code: 7003 + message: No route for the URI + items: + $ref: '#/components/schemas/responseInfo' + minLength: 1 + type: array + r2SlurperApiV4Failure: + properties: + errors: + $ref: '#/components/schemas/r2SlurperApiV4Error' + messages: + $ref: '#/components/schemas/r2SlurperApiV4Message' + success: + description: Indicates if the API call was successful or not. + enum: + - false + example: false + type: boolean + x-auditable: true + type: object + r2SlurperApiV4Message: + example: [] + items: + type: string + x-auditable: true + type: array + r2SlurperConnectivityResponse: + properties: + connectivityStatus: + enum: + - success + - error + type: string + type: object + r2SlurperCreateJobRequest: + properties: + overwrite: + default: true + type: boolean + source: + $ref: '#/components/schemas/r2SlurperSourceJobSchema' + target: + $ref: '#/components/schemas/r2SlurperR2TargetSchema' + type: object + r2SlurperJobLogResponse: + properties: + createdAt: + type: string + job: + type: string + logType: + enum: + - migrationStart + - migrationComplete + - migrationAbort + - migrationError + - migrationPause + - migrationResume + - migrationErrorFailedContinuation + - importErrorRetryExhaustion + - importSkippedStorageClass + - importSkippedOversized + - importSkippedEmptyObject + - importSkippedUnsupportedContentType + - importSkippedExcludedContentType + - importSkippedInvalidMedia + - importSkippedRequiresRetrieval + type: string + message: + nullable: true + type: string + objectKey: + nullable: true + type: string + type: object + r2SlurperJobProgressResponse: + properties: + createdAt: + type: string + failedObjects: + type: integer + id: + type: string + objects: + type: integer + skippedObjects: + type: integer + status: + $ref: '#/components/schemas/r2SlurperJobStatus' + transferredObjects: + type: integer + type: object + r2SlurperJobResponse: + properties: + createdAt: + type: string + finishedAt: + nullable: true + type: string + id: + type: string + overwrite: + type: boolean + source: + type: object + title: S3SourceResponseSchema + properties: + bucket: + type: string + endpoint: + nullable: true + type: string + keys: + items: + type: string + nullable: true + type: array + pathPrefix: + nullable: true + type: string + vendor: + enum: + - s3 + type: string + jurisdiction: + $ref: '#/components/schemas/r2SlurperJurisdiction' + status: + $ref: '#/components/schemas/r2SlurperJobStatus' + target: + properties: + bucket: + type: string + jurisdiction: + $ref: '#/components/schemas/r2SlurperJurisdiction' + vendor: + $ref: '#/components/schemas/r2SippyProvider' + title: R2TargetResponseSchema + type: object + type: object + r2SlurperJobStatus: + enum: + - running + - paused + - aborted + - completed + type: string + r2SlurperJurisdiction: + enum: + - default + - eu + - fedramp + type: string + r2SlurperR2TargetSchema: + properties: + bucket: + type: string + jurisdiction: + $ref: '#/components/schemas/r2SlurperJurisdiction' + secret: + $ref: '#/components/schemas/r2SlurperS3LikeCredsSchema' + vendor: + $ref: '#/components/schemas/r2SippyProvider' + required: + - vendor + - bucket + - secret + type: object + r2SlurperS3LikeCredsSchema: + properties: + accessKeyId: + type: string + secretAccessKey: + type: string + x-sensitive: true + required: + - accessKeyId + - secretAccessKey + type: object + r2SlurperSourceJobSchema: + type: object + properties: + bucket: + type: string + endpoint: + nullable: true + type: string + keys: + items: + type: string + maxItems: 10000 + nullable: true + type: array + pathPrefix: + nullable: true + type: string + region: + nullable: true + type: string + secret: + $ref: '#/components/schemas/r2SlurperS3LikeCredsSchema' + vendor: + enum: + - s3 + type: string + jurisdiction: + $ref: '#/components/schemas/r2SlurperJurisdiction' + required: + - bucket + - secret + - vendor + r2StorageClass: + default: Standard + description: Storage class for newly uploaded objects, unless specified otherwise. + enum: + - Standard + - InfrequentAccess + type: string + x-auditable: true + r2TempAccessCredsRequest: + example: + bucket: example-bucket + objects: + - example-object + parentAccessKeyId: example-access-key-id + permission: object-read-write + prefixes: + - example-prefix/ + ttlSeconds: 3600 + properties: + bucket: + description: Name of the R2 bucket. + type: string + x-auditable: true + objects: + description: Optional object paths to scope the credentials to. + items: + type: string + x-auditable: true + type: array + parentAccessKeyId: + description: The parent access key id to use for signing. + type: string + permission: + description: Permissions allowed on the credentials. + enum: + - admin-read-write + - admin-read-only + - object-read-write + - object-read-only + type: string + x-auditable: true + prefixes: + description: Optional prefix paths to scope the credentials to. + items: + type: string + x-auditable: true + type: array + ttlSeconds: + default: 900 + description: How long the credentials will live for in seconds. + maximum: 604800 + type: number + x-auditable: true + required: + - bucket + - permission + - ttlSeconds + - parentAccessKeyId + type: object + r2TempAccessCredsResponse: + example: + accessKeyId: example-access-key-id + secretAccessKey: example-secret-key + sessionToken: example-session-token + properties: + accessKeyId: + description: ID for new access key. + type: string + secretAccessKey: + description: Secret access key. + type: string + x-sensitive: true + sessionToken: + description: Security token. + type: string + x-sensitive: true + type: object + r2V4Response: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + type: object + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + type: object + r2V4ResponseFailure: + properties: + errors: + $ref: '#/components/schemas/r2Errors' + messages: + $ref: '#/components/schemas/r2Messages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + event_notifications: + id: cloudflare.r2.event_notifications + name: event_notifications + title: Event Notifications + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1event_notifications~1r2~1{bucket_name}~1configuration/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1event_notifications~1r2~1{bucket_name}~1configuration~1queues~1{queue_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1event_notifications~1r2~1{bucket_name}~1configuration~1queues~1{queue_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1event_notifications~1r2~1{bucket_name}~1configuration~1queues~1{queue_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/event_notifications/methods/get' + - $ref: '#/components/x-stackQL-resources/event_notifications/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/event_notifications/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/event_notifications/methods/update' + buckets: + id: cloudflare.r2.buckets + name: buckets + title: Buckets + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.buckets + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/buckets/methods/get' + - $ref: '#/components/x-stackQL-resources/buckets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/buckets/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/buckets/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/buckets/methods/delete' + replace: [] + cors: + id: cloudflare.r2.cors + name: cors + title: Cors + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1cors/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1cors/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.rules + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1cors/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cors/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/cors/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/cors/methods/update' + custom: + id: cloudflare.r2.custom + name: custom + title: Custom + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.domains + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom~1{domain}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom~1{domain}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1custom~1{domain}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/custom/methods/get' + - $ref: '#/components/x-stackQL-resources/custom/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/custom/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/custom/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/custom/methods/update' + managed: + id: cloudflare.r2.managed + name: managed + title: Managed + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1managed/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1domains~1managed/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/managed/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/managed/methods/update' + lifecycle: + id: cloudflare.r2.lifecycle + name: lifecycle + title: Lifecycle + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1lifecycle/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.rules + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1lifecycle/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/lifecycle/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/lifecycle/methods/update' + local_uploads: + id: cloudflare.r2.local_uploads + name: local_uploads + title: Local Uploads + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1local-uploads/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + r2_put_bucket_local_uploads_configuration: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1local-uploads/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/local_uploads/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/local_uploads/methods/r2_put_bucket_local_uploads_configuration' + locks: + id: cloudflare.r2.locks + name: locks + title: Locks + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1lock/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.rules + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1lock/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/locks/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + sippy: + id: cloudflare.r2.sippy + name: sippy + title: Sippy + methods: + delete: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1sippy/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1sippy/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1buckets~1{bucket_name}~1sippy/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/sippy/methods/list' + insert: [] + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/sippy/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/sippy/methods/update' + metrics: + id: cloudflare.r2.metrics + name: metrics + title: Metrics + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1metrics/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/metrics/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + r2: + id: cloudflare.r2.r2 + name: r2 + title: R2 + methods: + create_temp_access_credentials: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1r2~1temp-access-credentials/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + slurper_jobs: + id: cloudflare.r2.slurper_jobs + name: slurper_jobs + title: Slurper Jobs + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/slurper_jobs/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + jobs: + id: cloudflare.r2.jobs + name: jobs + title: Jobs + methods: + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs/post' + response: + mediaType: application/json + openAPIDocKey: '201' + abort_all: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1abortAll/put' + response: + mediaType: application/json + openAPIDocKey: '200' + slurper_delete_job: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + abort: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}~1abort/put' + response: + mediaType: application/json + openAPIDocKey: '200' + pause: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}~1pause/put' + response: + mediaType: application/json + openAPIDocKey: '200' + resume: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}~1resume/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/jobs/methods/get' + insert: + - $ref: '#/components/x-stackQL-resources/jobs/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/jobs/methods/slurper_delete_job' + replace: + - $ref: '#/components/x-stackQL-resources/jobs/methods/abort_all' + logs: + id: cloudflare.r2.logs + name: logs + title: Logs + methods: + list: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}~1logs/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/logs/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + jobs_progress: + id: cloudflare.r2.jobs_progress + name: jobs_progress + title: Jobs Progress + methods: + list_by_account: + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1jobs~1{job_id}~1progress/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/jobs_progress/methods/list_by_account' + insert: [] + update: [] + delete: [] + replace: [] + source_connectivity_precheck: + id: cloudflare.r2.source_connectivity_precheck + name: source_connectivity_precheck + title: Source Connectivity Precheck + methods: + update_connectivity_precheck: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1source~1connectivity-precheck/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + target_connectivity_precheck: + id: cloudflare.r2.target_connectivity_precheck + name: target_connectivity_precheck + title: Target Connectivity Precheck + methods: + update_connectivity_precheck: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1accounts~1{account_id}~1slurper~1target~1connectivity-precheck/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: [] + insert: [] + update: [] + delete: [] + replace: [] + r2_operations_adaptive_groups: + id: cloudflare.r2.r2_operations_adaptive_groups + name: r2_operations_adaptive_groups + title: R2 Operations Adaptive Groups + methods: + list: + operation: + $ref: '#/paths/~1graphql~1r2_operations_adaptive_groups/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + transform: + type: golang_template_json_v0.3.0 + body: "{\n \"result\": [\n {{- $data := index . \"data\" }}\n {{- if $data }}\n {{- $viewer := index $data \"viewer\" }}\n {{- $accounts := index $viewer \"accounts\" }}\n {{- if and $accounts (gt (len $accounts) 0) }}\n {{- $rows := index (index $accounts 0) \"r2OperationsAdaptiveGroups\" }}\n {{- $first := true -}}\n {{- range $i, $row := $rows }}\n {{- if not $first }},{{ end }}{{- $first = false }}\n {\n \"datetime\": {{ toJson (index $row \"dimensions\" \"datetime\") }},\n \"bucket_name\": {{ toJson (index $row \"dimensions\" \"bucketName\") }},\n \"action_type\": {{ toJson (index $row \"dimensions\" \"actionType\") }},\n \"action_status\": {{ toJson (index $row \"dimensions\" \"actionStatus\") }},\n \"response_status_code\": {{ index $row \"dimensions\" \"responseStatusCode\" }},\n \"eyeball_region\": {{ toJson (index $row \"dimensions\" \"eyeballRegion\") }},\n \ + \ \"storage_class\": {{ toJson (index $row \"dimensions\" \"storageClass\") }},\n \"requests\": {{ index $row \"sum\" \"requests\" }},\n \"response_bytes\": {{ index $row \"sum\" \"responseBytes\" }},\n \"response_object_size\": {{ index $row \"sum\" \"responseObjectSize\" }}\n }\n {{- end }}\n {{- end }}\n {{- end }}\n ]\n}\n" + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/r2_operations_adaptive_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/workers.yaml b/providers/src/cloudflare/v00.00.00000/services/workers.yaml index b6f15d21..b2107bfa 100644 --- a/providers/src/cloudflare/v00.00.00000/services/workers.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/workers.yaml @@ -11177,6 +11177,97 @@ paths: resource_chain: - routes method: update + /graphql/workers_invocations: + post: + operationId: graphql-workers_invocations-list + summary: Cloudflare Workers invocation analytics for an account, grouped by script, status, and serving colo + description: Cloudflare Workers invocation analytics for an account, grouped by script, status, and serving colo. Per-tuple totals for requests, errors, CPU time, duration (GB-s), subrequests, and response bytes. + x-stackQL-graphQL: + url: https://api.cloudflare.com/client/v4/graphql + httpVerb: POST + responseSelection: + jsonPath: $.result[*] + cursor: + jsonPath: $.result[*].__no_cursor + query: "query {\n viewer {\n accounts(filter: { accountTag: \"{{ .account_tag }}\" }, limit: 1) {\n workersInvocationsAdaptive(\n filter: { datetime_geq: \"{{ .since }}\", datetime_lt: \"{{ .until }}\" }\n limit: {{ if .limit }}{{ .limit }}{{ else }}100{{ end }}\n orderBy: [datetimeMinute_ASC]\n ) {\n dimensions {\n datetime: datetimeMinute\n scriptName\n status\n coloCode\n usageModel\n }\n sum {\n requests\n errors\n subrequests\n cpuTimeUs\n duration\n wallTime\n responseBodySize\n }\n }\n }\n }\n}\n" + x-stackql-protocol: graphql + parameters: + - name: account_tag + in: path + required: true + schema: + type: string + description: Cloudflare account ID (the 32-char hex tag). + - name: since + in: query + required: true + schema: + type: string + format: date-time + description: Lower bound (inclusive). RFC3339. + - name: until + in: query + required: true + schema: + type: string + format: date-time + description: Upper bound (exclusive). RFC3339. + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + description: Maximum dimension-tuple rows per call. + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + datetime: + type: string + format: date-time + script_name: + type: string + description: Worker script name. + status: + type: string + description: Invocation status (success / clientDisconnected / scriptError / etc.). + colo_code: + type: string + description: IATA airport code of the serving colo. + usage_model: + type: string + description: Usage model (bundled / unbound / etc.). + requests: + type: integer + description: Invocation count. + errors: + type: integer + description: Errored invocations. + subrequests: + type: integer + description: Subrequest count. + cpu_time_us: + type: integer + description: Total CPU time in microseconds. + duration_gb_s: + type: integer + description: Billable duration (GB*s units). + wall_time_us: + type: integer + description: Total wall time in microseconds. + response_body_size: + type: integer + description: Total response body bytes. components: schemas: buildsAPIResponse: @@ -17683,3 +17774,27 @@ components: - $ref: '#/components/x-stackQL-resources/routes/methods/delete' replace: - $ref: '#/components/x-stackQL-resources/routes/methods/update' + workers_invocations: + id: cloudflare.workers.workers_invocations + name: workers_invocations + title: Workers Invocations + methods: + list: + operation: + $ref: '#/paths/~1graphql~1workers_invocations/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + transform: + type: golang_template_json_v0.3.0 + body: "{\n \"result\": [\n {{- $data := index . \"data\" }}\n {{- if $data }}\n {{- $viewer := index $data \"viewer\" }}\n {{- $accounts := index $viewer \"accounts\" }}\n {{- if and $accounts (gt (len $accounts) 0) }}\n {{- $rows := index (index $accounts 0) \"workersInvocationsAdaptive\" }}\n {{- $first := true -}}\n {{- range $i, $row := $rows }}\n {{- if not $first }},{{ end }}{{- $first = false }}\n {\n \"datetime\": {{ toJson (index $row \"dimensions\" \"datetime\") }},\n \"script_name\": {{ toJson (index $row \"dimensions\" \"scriptName\") }},\n \"status\": {{ toJson (index $row \"dimensions\" \"status\") }},\n \"colo_code\": {{ toJson (index $row \"dimensions\" \"coloCode\") }},\n \"usage_model\": {{ toJson (index $row \"dimensions\" \"usageModel\") }},\n \"requests\": {{ index $row \"sum\" \"requests\" }},\n \"errors\": {{ index $row \"sum\" \"errors\" }},\n \"subrequests\"\ + : {{ index $row \"sum\" \"subrequests\" }},\n \"cpu_time_us\": {{ index $row \"sum\" \"cpuTimeUs\" }},\n \"duration_gb_s\": {{ index $row \"sum\" \"duration\" }},\n \"wall_time_us\": {{ index $row \"sum\" \"wallTime\" }}\n }\n {{- end }}\n {{- end }}\n {{- end }}\n ]\n}\n" + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/workers_invocations/methods/list' + insert: [] + update: [] + delete: [] + replace: [] diff --git a/providers/src/cloudflare/v00.00.00000/services/zones.yaml b/providers/src/cloudflare/v00.00.00000/services/zones.yaml index 4b85365b..3ff3b20b 100644 --- a/providers/src/cloudflare/v00.00.00000/services/zones.yaml +++ b/providers/src/cloudflare/v00.00.00000/services/zones.yaml @@ -1,8859 +1,8484 @@ -openapi: 3.0.3 -info: - title: zones API - description: >- - Welcome to Cloudflare's API documentation site. We are experimenting with an - updated version of our API documentation - check out - [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) - to test out the new experience. To get started using Cloudflare's products - and services via the API, refer to [how to interact with - Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), - which covers using tools like - [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) - and the [official - SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to - maintain your Cloudflare resources. Using the Cloudflare API requires - authentication so that Cloudflare knows who is making requests and what - permissions you have. Create an API token to grant access to the API to - perform actions. You can also authenticate with [API - keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), - but these keys have [several - limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) - that make them less secure than API tokens. Whenever possible, use API - tokens to interact with the Cloudflare API. To create an API token, from the - Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. - For more information on how to create and troubleshoot API tokens, refer to - our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). - For information regarding rate limits, refer to our [API Rate - Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). - Totally new to Cloudflare? [Start - here](https://developers.cloudflare.com/fundamentals/get-started/). - version: 4.0.0 - contact: - name: Cloudflare - url: https://www.cloudflare.com -servers: - - url: https://api.cloudflare.com/client/v4 -security: - - api_token: [] -paths: - /zones: - get: - description: >- - Lists, searches, sorts, and filters your zones. Listing zones across - more than 500 accounts is currently not allowed. - operationId: zones-get - parameters: - - in: query - name: name - schema: - description: >- - A domain name. Optional filter operators can be provided to extend - refine the search: * `equal` (default) * `not_equal` * - `starts_with` * `ends_with` * `contains` * - `starts_with_case_sensitive` * `ends_with_case_sensitive` * - `contains_case_sensitive` - maxLength: 253 - type: string - - in: query - name: status - schema: - description: Specify a zone status to filter by. - enum: - - initializing - - pending - - active - - moved - type: string - - in: query - name: account.id - schema: - description: Filter by an account ID. - type: string - - in: query - name: account.name - schema: - description: >- - An account Name. Optional filter operators can be provided to - extend refine the search: * `equal` (default) * `not_equal` * - `starts_with` * `ends_with` * `contains` * - `starts_with_case_sensitive` * `ends_with_case_sensitive` * - `contains_case_sensitive` - maxLength: 253 - type: string - - in: query - name: page - schema: - default: 1 - description: Page number of paginated results. - minimum: 1 - type: number - - in: query - name: per_page - schema: - default: 20 - description: Number of zones per page. - maximum: 50 - minimum: 5 - type: number - - in: query - name: order - schema: - description: Field to order zones by. - enum: - - name - - status - - account.id - - account.name - - plan.id - type: string - - in: query - name: direction - schema: - description: Direction to order zones. - enum: - - asc - - desc - type: string - - in: query - name: match - schema: - default: all - description: Whether to match all search requirements or at least one (any). - enum: - - any - - all - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - success: - description: Whether the API call was successful. - type: boolean - result_info: - $ref: '#/components/schemas/zonesResultInfo' - result: - items: - $ref: '#/components/schemas/zonesZone' - type: array - required: - - success - - errors - - messages - type: object - description: List Zones response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesApiResponseCommonFailure' - description: List Zones response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Zones - tags: - - Zone - x-api-token-group: - - Zone Zone Read - x-stackql-sdk: - service: zones - resource_chain: [] - method: list - post: - operationId: zones-post - requestBody: - content: - application/json: - schema: - properties: - account: - properties: - id: - $ref: '#/components/schemas/zonesIdentifier' - type: object - name: - $ref: '#/components/schemas/zonesName' - type: - $ref: '#/components/schemas/zonesType' - required: - - name - - account - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - success: - description: Whether the API call was successful. - type: boolean - result: - $ref: '#/components/schemas/zonesZone' - required: - - success - - errors - - messages - type: object - description: Create Zone response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesApiResponseCommonFailure' - description: Create Zone response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Zone - tags: - - Zone - x-api-token-group: - - Zone Zone Edit - - Zone DNS Edit - x-stackql-sdk: - service: zones - resource_chain: [] - method: create - /zones/{zone_identifier}/analytics/colos: - get: - deprecated: true - description: >- - This view provides a breakdown of analytics data by datacenter. Note: - This is available to Enterprise customers only. - operationId: zone-analytics-(-deprecated)-get-analytics-by-co-locations - parameters: - - in: path - name: zone_identifier - schema: - $ref: '#/components/schemas/zoneAnalyticsApiIdentifier' - required: true - - in: query - name: until - schema: - $ref: '#/components/schemas/zoneAnalyticsApiUntil' - - in: query - name: since - schema: - default: -10080 - description: >- - The (inclusive) beginning of the requested time frame. This value - can be a negative integer representing the number of minutes in - the past relative to time the request is made, or can be an - absolute timestamp that conforms to RFC 3339. At this point in - time, it cannot exceed a time in the past greater than one year. - Ranges that the Cloudflare web application provides will provide - the following period length for each point: - Last 60 minutes - (from -59 to -1): 1 minute resolution - Last 7 hours (from -419 to - -60): 15 minutes resolution - Last 15 hours (from -899 to -420): - 30 minutes resolution - Last 72 hours (from -4320 to -900): 1 hour - resolution - Older than 3 days (-525600 to -4320): 1 day - resolution. - type: string - - in: query - name: continuous - schema: - default: true - description: >- - When set to true, the API will move the requested time window - backward, until it finds a region with completely aggregated data. - The API response _may not represent the requested time window_. - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zoneAnalyticsApiColoResponse' - description: Get analytics by Co-locations response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zoneAnalyticsApiMessages' - messages: - $ref: '#/components/schemas/zoneAnalyticsApiMessages' - result: - description: >- - A breakdown of all dashboard analytics data by - co-locations. This is limited to Enterprise zones only. - items: - properties: - colo_id: - description: The airport code identifer for the co-location. - type: string - timeseries: - $ref: >- - #/components/schemas/zoneAnalyticsApiTimeseriesByColo - totals: - $ref: '#/components/schemas/zoneAnalyticsApiTotalsByColo' - type: object - title: Analytics data by datacenter - type: array - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - query: - $ref: '#/components/schemas/zoneAnalyticsApiQueryResponse' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get analytics by Co-locations response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get analytics by Co-locations - tags: - - Zone Analytics (Deprecated) - x-api-token-group: - - Analytics Read - x-cfDeprecation: - description: >- - Please use the new GraphQL Analytics API instead: - https://developers.cloudflare.com/analytics/graphql-api/. It provides - equivalent data and more features, including the ability to select - only the metrics you need. Migration guide: - https://developers.cloudflare.com/analytics/migration-guides/zone-analytics/. - display: true - eol: '2021-03-01' - id: zone_analytics_deprecation - x-cfPermissionsRequired: - enum: - - '#analytics:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - /zones/{zone_identifier}/analytics/dashboard: - get: - deprecated: true - description: >- - The dashboard view provides both totals and timeseries data for the - given zone and time period across the entire Cloudflare network. - operationId: zone-analytics-(-deprecated)-get-dashboard - parameters: - - in: path - name: zone_identifier - schema: - $ref: '#/components/schemas/zoneAnalyticsApiIdentifier' - required: true - - in: query - name: until - schema: - $ref: '#/components/schemas/zoneAnalyticsApiUntil' - - in: query - name: since - schema: - default: -10080 - description: >- - The (inclusive) beginning of the requested time frame. This value - can be a negative integer representing the number of minutes in - the past relative to time the request is made, or can be an - absolute timestamp that conforms to RFC 3339. At this point in - time, it cannot exceed a time in the past greater than one year. - Ranges that the Cloudflare web application provides will provide - the following period length for each point: - Last 60 minutes - (from -59 to -1): 1 minute resolution - Last 7 hours (from -419 to - -60): 15 minutes resolution - Last 15 hours (from -899 to -420): - 30 minutes resolution - Last 72 hours (from -4320 to -900): 1 hour - resolution - Older than 3 days (-525600 to -4320): 1 day - resolution. - type: string - - in: query - name: continuous - schema: - default: true - description: >- - When set to true, the API will move the requested time window - backward, until it finds a region with completely aggregated data. - The API response _may not represent the requested time window_. - type: boolean - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zoneAnalyticsApiDashboardResponse' - description: Get dashboard response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zoneAnalyticsApiMessages' - messages: - $ref: '#/components/schemas/zoneAnalyticsApiMessages' - result: - description: Totals and timeseries data. - properties: - timeseries: - $ref: '#/components/schemas/zoneAnalyticsApiTimeseries' - totals: - $ref: '#/components/schemas/zoneAnalyticsApiTotals' - title: Dashboard response - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - query: - $ref: '#/components/schemas/zoneAnalyticsApiQueryResponse' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get dashboard response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get dashboard - tags: - - Zone Analytics (Deprecated) - x-api-token-group: - - Analytics Read - x-cfDeprecation: - description: >- - Please use the new GraphQL Analytics API instead: - https://developers.cloudflare.com/analytics/graphql-api/. It provides - equivalent data and more features, including the ability to select - only the metrics you need. Migration guide: - https://developers.cloudflare.com/analytics/migration-guides/zone-analytics/. - display: true - eol: '2021-03-01' - id: zone_analytics_deprecation - x-cfPermissionsRequired: - enum: - - '#analytics:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}: - delete: - description: Deletes an existing zone. - operationId: zones-0-delete - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zonesApiResponseSingleId' - description: Delete Zone response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesApiResponseCommonFailure' - description: Delete Zone response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Zone - tags: - - Zone - x-api-token-group: - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: zones - resource_chain: [] - method: delete - get: - operationId: zones-0-get - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - success: - description: Whether the API call was successful. - type: boolean - result: - $ref: '#/components/schemas/zonesZone' - required: - - success - - errors - - messages - type: object - description: Zone Details response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesApiResponseCommonFailure' - description: Zone Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Zone Details - tags: - - Zone - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - - 'Zero Trust: PII Read' - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - - 'Access: Apps and Policies Revoke' - - 'Access: Apps and Policies Write' - - 'Access: Apps and Policies Read' - - 'Access: Apps and Policies Revoke' - - 'Access: Mutual TLS Certificates Write' - - 'Access: Organizations, Identity Providers, and Groups Write' - - Zone Settings Write - - Zone Settings Read - - Zone Read - - DNS Read - - Workers Scripts Write - - Workers Scripts Read - - Zone Write - - Workers Routes Write - - Workers Routes Read - - Stream Write - - Stream Read - - SSL and Certificates Write - - SSL and Certificates Read - - Logs Write - - Logs Read - - Cache Purge - - Page Rules Write - - Page Rules Read - - Load Balancers Write - - Load Balancers Read - - Firewall Services Write - - Firewall Services Read - - DNS Write - - Apps Write - - Analytics Read - - 'Access: Apps and Policies Write' - - 'Access: Apps and Policies Read' - x-cfPermissionsRequired: - enum: - - '#zone:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: zones - resource_chain: [] - method: get - patch: - description: Edits a zone. Only one zone property can be changed at a time. - operationId: zones-0-patch - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - paused: - $ref: '#/components/schemas/zonesPaused' - type: - description: >- - A full zone implies that DNS is hosted with Cloudflare. A - partial zone is typically a partner-hosted zone or a CNAME - setup. This parameter is only available to Enterprise - customers or if it has been explicitly enabled on a zone. - enum: - - full - - partial - - secondary - - internal - type: string - vanity_name_servers: - $ref: '#/components/schemas/zonesVanityNameServers' - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - success: - description: Whether the API call was successful. - type: boolean - result: - $ref: '#/components/schemas/zonesZone' - required: - - success - - errors - - messages - type: object - description: Edit Zone response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesApiResponseCommonFailure' - description: Edit Zone response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit Zone - tags: - - Zone - x-api-token-group: - - Zone Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: zones - resource_chain: [] - method: edit - /zones/{zone_id}/activation_check: - put: - description: >- - Triggeres a new activation check for a PENDING Zone. This can be - triggered every 5 min for paygo/ent customers, every hour for FREE - Zones. - operationId: put-zones-zone_id-activation_check - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zoneActivationMessages' - messages: - $ref: '#/components/schemas/zoneActivationMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - id: - $ref: '#/components/schemas/zoneActivationIdentifier' - type: object - required: - - success - - errors - - messages - description: Successful Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zoneActivationApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Rerun the Activation Check - tags: - - Zone - x-api-token-group: - - Zone Write - x-stackql-sdk: - service: zones - resource_chain: - - activation_check - method: trigger - /zones/{zone_id}/analytics/latency: - get: - description: >- - Retrieves aggregate Argo Smart Routing analytics for a zone, including - latency improvements, bandwidth savings, and routing statistics. - operationId: argo-analytics-for-zone-argo-analytics-for-a-zone - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: bins - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/argoAnalyticsResponseSingle' - description: Argo Analytics for a zone response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/argoAnalyticsMessages' - messages: - $ref: '#/components/schemas/argoAnalyticsMessages' - result: - type: object - enum: - - null - nullable: true - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Argo Analytics for a zone response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Argo Analytics for a zone - tags: - - Argo Analytics for Zone - x-api-token-group: - - Analytics Read - x-cfPermissionsRequired: - enum: - - '#analytics:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/analytics/latency/colos: - get: - description: >- - Retrieves Argo Smart Routing analytics broken down by geographic points - of presence (PoPs). Shows latency improvements and routing efficiency - per location. - operationId: >- - argo-analytics-for-geolocation-argo-analytics-for-a-zone-at-different-po-ps - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/argoAnalyticsResponseSingle' - description: Argo Analytics for a zone at different PoPs response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/argoAnalyticsMessages' - messages: - $ref: '#/components/schemas/argoAnalyticsMessages' - result: - type: object - enum: - - null - nullable: true - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Argo Analytics for a zone at different PoPs response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Argo Analytics for a zone at different PoPs - tags: - - Argo Analytics for Geolocation - x-api-token-group: - - Analytics Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/available_plans: - get: - description: Lists available plans the zone can subscribe to. - operationId: zone-rate-plan-list-available-plans - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - items: - $ref: '#/components/schemas/billSubsApiAvailableRatePlan' - nullable: true - type: array - success: - description: Whether the API call was successful - enum: - - true - type: boolean - result_info: - $ref: '#/components/schemas/billSubsApiResultInfo' - required: - - success - - errors - - messages - - result - description: List Available Plans response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - items: - $ref: '#/components/schemas/billSubsApiAvailableRatePlan' - nullable: true - type: array - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/billSubsApiResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Available Plans response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Available Plans - tags: - - Zone Rate Plan - x-api-token-group: - - Billing Write - - Billing Read - x-cfPermissionsRequired: - enum: - - '#billing:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: zones - resource_chain: - - plans - method: list - /zones/{zone_id}/available_plans/{plan_identifier}: - get: - description: Details of the available plan that the zone can subscribe to. - operationId: zone-rate-plan-available-plan-details - parameters: - - in: path - name: plan_identifier - schema: - $ref: '#/components/schemas/billSubsApiIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - $ref: '#/components/schemas/billSubsApiAvailableRatePlan' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Available Plan Details response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - properties: - can_subscribe: - $ref: '#/components/schemas/billSubsApiCanSubscribe' - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - externally_managed: - $ref: '#/components/schemas/billSubsApiExternallyManaged' - frequency: - $ref: '#/components/schemas/billSubsApiSchemasFrequency' - id: - $ref: '#/components/schemas/billSubsApiIdentifier' - is_subscribed: - $ref: '#/components/schemas/billSubsApiIsSubscribed' - legacy_discount: - $ref: '#/components/schemas/billSubsApiLegacyDiscount' - legacy_id: - $ref: '#/components/schemas/billSubsApiLegacyId' - name: - $ref: '#/components/schemas/billSubsApiSchemasName' - price: - $ref: '#/components/schemas/billSubsApiSchemasPrice' - type: object - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Available Plan Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Available Plan Details - tags: - - Zone Rate Plan - x-api-token-group: - - Billing Write - - Billing Read - x-cfPermissionsRequired: - enum: - - '#billing:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: zones - resource_chain: - - plans - method: get - /zones/{zone_id}/available_rate_plans: - get: - description: Lists all rate plans the zone can subscribe to. - operationId: zone-rate-plan-list-available-rate-plans - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiPlanResponseCollection' - description: List Available Rate Plans response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - items: - $ref: '#/components/schemas/billSubsApiSchemasRatePlan' - nullable: true - type: array - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/billSubsApiResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Available Rate Plans response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Available Rate Plans - tags: - - Zone Rate Plan - x-api-token-group: - - Billing Write - - Billing Read - x-cfPermissionsRequired: - enum: - - '#billing:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: zones - resource_chain: - - rate_plans - method: get - /zones/{zone_id}/custom_ns: - get: - deprecated: true - description: >- - Get metadata for account-level custom nameservers on a zone. Deprecated - in favor of [Show DNS - Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-a-zone-list-dns-settings). - operationId: >- - account-level-custom-nameservers-usage-for-a-zone-get-account-custom-nameserver-related-zone-metadata - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/dnsCustomNameserversGetResponse' - description: Get Account Custom Nameserver Related Zone Metadata response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/dnsCustomNameserversMessages' - messages: - $ref: '#/components/schemas/dnsCustomNameserversMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - type: object - enabled: - description: Whether zone uses account-level custom nameservers. - type: boolean - x-auditable: true - ns_set: - default: 1 - description: The number of the name server set to assign to the zone. - maximum: 5 - minimum: 1 - type: number - x-auditable: true - result: - enum: - - null - nullable: true - type: object - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Get Account Custom Nameserver Related Zone Metadata response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Account Custom Nameserver Related Zone Metadata - tags: - - Account-Level Custom Nameservers Usage for a Zone - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - - 'Zero Trust: PII Read' - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - - 'Access: Apps and Policies Revoke' - - 'Access: Apps and Policies Write' - - 'Access: Apps and Policies Read' - - 'Access: Apps and Policies Revoke' - - 'Access: Mutual TLS Certificates Write' - - 'Access: Organizations, Identity Providers, and Groups Write' - - Zone Settings Write - - Zone Settings Read - - Zone Read - - DNS Read - - Workers Scripts Write - - Workers Scripts Read - - Zone Write - - Workers Routes Write - - Workers Routes Read - - Stream Write - - Stream Read - - SSL and Certificates Write - - SSL and Certificates Read - - Logs Write - - Logs Read - - Cache Purge - - Page Rules Write - - Page Rules Read - - Load Balancers Write - - Load Balancers Read - - Firewall Services Write - - Firewall Services Read - - DNS Write - - Apps Write - - Analytics Read - - 'Access: Apps and Policies Write' - - 'Access: Apps and Policies Read' - x-cfPermissionsRequired: - enum: - - '#zone:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: zones - resource_chain: - - custom_nameservers - method: update - put: - deprecated: true - description: >- - Set metadata for account-level custom nameservers on a zone. If you - would like new zones in the account to use account custom nameservers by - default, use PUT /accounts/:identifier to set the account setting - use_account_custom_ns_by_default to true. Deprecated in favor of [Update - DNS - Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-a-zone-update-dns-settings). - operationId: >- - account-level-custom-nameservers-usage-for-a-zone-set-account-custom-nameserver-related-zone-metadata - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/dnsCustomNameserversZoneMetadata' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/dnsCustomNameserversSchemasEmptyResponse' - description: Set Account Custom Nameserver Related Zone Metadata response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/dnsCustomNameserversMessages' - messages: - $ref: '#/components/schemas/dnsCustomNameserversMessages' - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - type: number - page: - description: Current page within paginated list of results. - type: number - per_page: - description: Number of results per page of results. - type: number - total_count: - description: Total results available without any search parameters. - type: number - type: object - result: - $ref: >- - #/components/schemas/unnamedSchemaRef619309774d07ec6904f1e354560d6028 - required: - - success - - errors - - messages - - success - - errors - - messages - - result - description: Set Account Custom Nameserver Related Zone Metadata response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Set Account Custom Nameserver Related Zone Metadata - tags: - - Account-Level Custom Nameservers Usage for a Zone - x-api-token-group: - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - /zones/{zone_id}/environments: - get: - operationId: zonesEnvironmentsList - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoEnvironmentsResponse' - description: Successfully listed zone environments. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoErrorResponse' - description: Client error response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List zone environments - tags: - - Zone Environments - x-api-token-group: - - Zone Versioning Write - - Zone Versioning Read - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: zones - resource_chain: - - environments - method: list - patch: - operationId: zonesEnvironmentsEdit - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoEnvironmentsRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoEnvironmentsResponse' - description: Successfully updated zone environments. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoErrorResponse' - description: Client error response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Partially update zone environments - tags: - - Zone Environments - x-api-token-group: - - Zone Versioning Write - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: zones - resource_chain: - - environments - method: edit - post: - operationId: zonesEnvironmentsCreate - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoEnvironmentsRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoEnvironmentsResponse' - description: Successfully created zone environments. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoErrorResponse' - description: Client error response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create zone environments - tags: - - Zone Environments - x-api-token-group: - - Zone Versioning Write - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: zones - resource_chain: - - environments - method: create - put: - operationId: zonesEnvironmentsUpdate - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoEnvironmentsRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoEnvironmentsResponse' - description: Successfully upserted zone environments. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoErrorResponse' - description: Client error response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Upsert zone environments - tags: - - Zone Environments - x-api-token-group: - - Zone Versioning Write - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - x-stackql-sdk: - service: zones - resource_chain: - - environments - method: update - /zones/{zone_id}/environments/{environment_id}: - delete: - operationId: zonesEnvironmentsDelete - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoEnvironmentsResponse' - description: Successfully deleted zone environment. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoErrorResponse' - description: Client error response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete zone environment - tags: - - Zone Environments - x-api-token-group: - - Zone Versioning Write - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Reference identifier for the environment. - in: path - name: environment_id - schema: - type: string - required: true - x-stackql-sdk: - service: zones - resource_chain: - - environments - method: delete - /zones/{zone_id}/environments/{environment_id}/rollback: - post: - operationId: zonesEnvironmentsRollback - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoEnvironmentsResponse' - description: Successfully rolled back zone environment. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/kaminoErrorResponse' - description: Client error response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Roll back zone environment - tags: - - Zone Environments - x-api-token-group: - - Zone Versioning Write - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Reference identifier for the environment. - in: path - name: environment_id - schema: - type: string - required: true - x-stackql-sdk: - service: zones - resource_chain: - - environments - method: rollback - /zones/{zone_id}/firewall-for-ai/custom-topics: - get: - description: Get the Firewall for AI custom topic categories for a zone. - operationId: firewall-for-ai-custom-topics-get - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/wafProductApiBundleResponseCustomTopics' - description: Get Firewall for AI custom topics response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafProductApiBundleMessages' - messages: - $ref: '#/components/schemas/wafProductApiBundleMessages' - result: - properties: - topics: - description: >- - Custom topic categories for Firewall for AI content - detection. - items: - $ref: '#/components/schemas/wafProductApiBundleCustomTopic' - maxItems: 20 - type: array - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get Firewall for AI custom topics failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Firewall for AI Custom Topics - tags: - - Firewall for AI - put: - description: >- - Set the Firewall for AI custom topic categories for a zone. A maximum of - 20 custom topics can be configured per zone. Each topic label must be - 2–20 characters using only lowercase letters (a–z), digits (0–9), and - hyphens. Each topic description must be 2–50 printable ASCII characters. - Changes can take up to a minute to propagate to the zone. - operationId: firewall-for-ai-custom-topics-put - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/wafProductApiBundleCustomTopics' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/wafProductApiBundleResponseCustomTopics' - description: Set Firewall for AI custom topics response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafProductApiBundleMessages' - messages: - $ref: '#/components/schemas/wafProductApiBundleMessages' - result: - properties: - topics: - description: >- - Custom topic categories for Firewall for AI content - detection. - items: - $ref: '#/components/schemas/wafProductApiBundleCustomTopic' - maxItems: 20 - type: array - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Set Firewall for AI custom topics failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Set Firewall for AI Custom Topics - tags: - - Firewall for AI - /zones/{zone_id}/firewall-for-ai/settings: - get: - description: Get whether Firewall for AI is enabled or disabled for a zone. - operationId: firewall-for-ai-settings-get - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/wafProductApiBundleResponseSettings' - description: Get Firewall for AI status response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafProductApiBundleMessages' - messages: - $ref: '#/components/schemas/wafProductApiBundleMessages' - result: - description: Firewall for AI enablement status for a zone. - properties: - enabled: - description: Whether Firewall for AI is enabled on the zone. - type: boolean - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Get Firewall for AI status failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Firewall for AI Status - tags: - - Firewall for AI - x-api-token-group: - - Firewall for AI Write - - Firewall for AI Read - put: - description: >- - Enable or disable Firewall for AI for a zone. Changes can take up to a - minute to propagate to the zone. - operationId: firewall-for-ai-settings-put - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/wafProductApiBundleSettings' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/wafProductApiBundleResponseSettings' - description: Set Firewall for AI status response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/wafProductApiBundleMessages' - messages: - $ref: '#/components/schemas/wafProductApiBundleMessages' - result: - description: Firewall for AI enablement status for a zone. - properties: - enabled: - description: Whether Firewall for AI is enabled on the zone. - type: boolean - type: object - enum: - - null - success: - description: Defines whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Set Firewall for AI status failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Set Firewall for AI Status - tags: - - Firewall for AI - x-api-token-group: - - Firewall for AI Write - /zones/{zone_id}/hold: - delete: - description: >- - Stop enforcement of a zone hold on the zone, permanently or temporarily, - allowing the creation and activation of zones with this zone's hostname. - operationId: zones-0-hold-delete - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: >- - If `hold_after` is provided, the hold will be temporarily disabled, - then automatically re-enabled by the system at the time specified in - this RFC3339-formatted timestamp. Otherwise, the hold will be - disabled indefinitely. - in: query - name: hold_after - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - result: - $ref: '#/components/schemas/zoneHold' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Successful Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Remove Zone Hold - tags: - - Zone Holds - x-api-token-group: - - Zone Write - x-stackql-sdk: - service: zones - resource_chain: - - holds - method: delete - get: - description: >- - Retrieve whether the zone is subject to a zone hold, and metadata about - the hold. - operationId: zones-0-hold-get - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - result: - $ref: '#/components/schemas/zoneHold' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Successful Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Zone Hold - tags: - - Zone Holds - x-api-token-group: - - Trust and Safety Write - - Trust and Safety Read - - 'Zero Trust: PII Read' - - Zaraz Edit - - Zaraz Read - - Zaraz Admin - - 'Access: Apps and Policies Revoke' - - 'Access: Apps and Policies Write' - - 'Access: Apps and Policies Read' - - 'Access: Apps and Policies Revoke' - - 'Access: Mutual TLS Certificates Write' - - 'Access: Organizations, Identity Providers, and Groups Write' - - Zone Settings Write - - Zone Settings Read - - Zone Read - - DNS Read - - Workers Scripts Write - - Workers Scripts Read - - Zone Write - - Workers Routes Write - - Workers Routes Read - - Stream Write - - Stream Read - - SSL and Certificates Write - - SSL and Certificates Read - - Logs Write - - Logs Read - - Cache Purge - - Page Rules Write - - Page Rules Read - - Load Balancers Write - - Load Balancers Read - - Firewall Services Write - - Firewall Services Read - - DNS Write - - Apps Write - - Analytics Read - - 'Access: Apps and Policies Write' - - 'Access: Apps and Policies Read' - x-stackql-sdk: - service: zones - resource_chain: - - holds - method: get - patch: - description: >- - Update the `hold_after` and/or `include_subdomains` values on an - existing zone hold. The hold is enabled if the `hold_after` date-time - value is in the past. - operationId: zones-0-hold-patch - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - hold_after: - default: '' - description: >- - If `hold_after` is provided and future-dated, the hold will - be temporarily disabled, then automatically re-enabled by - the system at the time specified in this RFC3339-formatted - timestamp. A past-dated `hold_after` value will have no - effect on an existing, enabled hold. Providing an empty - string will set its value to the current time. - type: string - include_subdomains: - default: false - description: >- - If `true`, the zone hold will extend to block any subdomain - of the given zone, as well as SSL4SaaS Custom Hostnames. For - example, a zone hold on a zone with the hostname - 'example.com' and include_subdomains=true will block - 'example.com', 'staging.example.com', - 'api.staging.example.com', etc. - type: boolean - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - result: - $ref: '#/components/schemas/zoneHold' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Successful Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Zone Hold - tags: - - Zone Holds - x-api-token-group: - - Zone Write - x-stackql-sdk: - service: zones - resource_chain: - - holds - method: edit - post: - description: >- - Enforce a zone hold on the zone, blocking the creation and activation of - zones with this zone's hostname. - operationId: zones-0-hold-post - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: >- - If provided, the zone hold will extend to block any subdomain of the - given zone, as well as SSL4SaaS Custom Hostnames. For example, a - zone hold on a zone with the hostname 'example.com' and - include_subdomains=true will block 'example.com', - 'staging.example.com', 'api.staging.example.com', etc. - in: query - name: include_subdomains - schema: - type: boolean - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - result: - $ref: '#/components/schemas/zoneHold' - success: - description: Whether the API call was successful - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Successful Response - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' - description: Client Error - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Zone Hold - tags: - - Zone Holds - x-api-token-group: - - Zone Write - x-stackql-sdk: - service: zones - resource_chain: - - holds - method: create - /zones/{zone_id}/settings: - get: - deprecated: true - description: Available settings for your user in relation to a zone. - operationId: zone-settings-get-all-zone-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zonesZoneSettingsResponseCollection' - description: Get all Zone settings response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/zonesComponentsSchemasApiResponseCommonFailure - description: Get all Zone settings response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get all zone settings - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stainless-deprecation-message: >- - This endpoint is deprecated. Zone settings should instead be managed - individually. - patch: - deprecated: true - description: Edit settings for a zone. - operationId: zone-settings-edit-zone-settings-info - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesMultipleSettings' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/zonesZoneSettingsResponseCollection' - description: Edit zone settings info response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/zonesComponentsSchemasApiResponseCommonFailure - description: Edit zone settings info response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit multiple zone settings - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stainless-deprecation-message: >- - This endpoint is deprecated. Zone settings should instead be managed - individually. - /zones/{zone_id}/settings/aegis: - get: - description: >- - Aegis provides dedicated egress IPs (from Cloudflare to your origin) for - your layer 7 WAF and CDN services. The egress IPs are reserved - exclusively for your account so that you can increase your origin - security by only allowing traffic from a small list of IP addresses. - operationId: zone-cache-settings-get-aegis-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - description: The identifier of the caching setting. - type: string - x-auditable: true - enum: - - aegis - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the zone setting. - type: object - x-auditable: true - properties: - enabled: - description: Whether the feature is enabled or not. - type: boolean - x-auditable: true - pool_id: - description: >- - Egress pool id which refers to a grouping of - dedicated egress IPs through which Cloudflare will - connect to origin. - type: string - x-auditable: true - required: - - id - - value - - editable - - id - type: object - title: Aegis - required: - - success - - errors - - messages - description: Get aegis setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Get aegis setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get aegis setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - Zone Read - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - patch: - description: >- - Aegis provides dedicated egress IPs (from Cloudflare to your origin) for - your layer 7 WAF and CDN services. The egress IPs are reserved - exclusively for your account so that you can increase your origin - security by only allowing traffic from a small list of IP addresses. - operationId: zone-cache-settings-change-aegis-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - value: - $ref: '#/components/schemas/cacheRulesAegisValue' - required: - - value - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - description: The identifier of the caching setting. - type: string - x-auditable: true - enum: - - aegis - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the zone setting. - type: object - x-auditable: true - properties: - enabled: - description: Whether the feature is enabled or not. - type: boolean - x-auditable: true - pool_id: - description: >- - Egress pool id which refers to a grouping of - dedicated egress IPs through which Cloudflare will - connect to origin. - type: string - x-auditable: true - required: - - id - - value - - editable - - id - type: object - title: Aegis - required: - - success - - errors - - messages - description: Change aegis setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Change aegis setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Change aegis setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - /zones/{zone_id}/settings/fonts: - get: - description: >- - Enhance your website's font delivery with Cloudflare Fonts. Deliver - Google Hosted fonts from your own domain, boost performance, and enhance - user privacy. Refer to the Cloudflare Fonts documentation for more - information. - operationId: zone-settings-get-fonts-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/speedMessages' - messages: - $ref: '#/components/schemas/speedMessages' - success: - description: Whether the API call was successful. - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/speedCloudflareFonts' - required: - - success - - errors - - messages - type: object - description: Get Cloudflare Fonts setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/speedApiResponseCommonFailure' - description: Get Cloudflare Fonts setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Cloudflare Fonts setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - patch: - description: >- - Enhance your website's font delivery with Cloudflare Fonts. Deliver - Google Hosted fonts from your own domain, boost performance, and enhance - user privacy. Refer to the Cloudflare Fonts documentation for more - information. - operationId: zone-settings-change-fonts-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - value: - $ref: '#/components/schemas/speedCloudflareFontsValue' - required: - - value - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/speedMessages' - messages: - $ref: '#/components/schemas/speedMessages' - success: - description: Whether the API call was successful. - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/speedCloudflareFonts' - required: - - success - - errors - - messages - type: object - description: Change Cloudflare Fonts setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/speedApiResponseCommonFailure' - description: Change Cloudflare Fonts setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Change Cloudflare Fonts setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/settings/origin_h2_max_streams: - get: - description: >- - Origin H2 Max Streams configures the max number of concurrent requests - that Cloudflare will send within the same connection when communicating - with the origin server, if the origin supports it. Note that if your - origin does not support H2 multiplexing, 5xx errors may be observed, - particularly 520s. Also note that the default value is `100` for all - plan types except Enterprise where it is `1`. `1` means that H2 - multiplexing is disabled. - operationId: zone-cache-settings-get-origin-h2-max-streams-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesOriginH2MaxStreamsResponseValue' - description: Get Origin H2 Max Streams setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Get Origin H2 Max Streams setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Origin H2 Max Streams Setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - Zone Read - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - patch: - description: >- - Origin H2 Max Streams configures the max number of concurrent requests - that Cloudflare will send within the same connection when communicating - with the origin server, if the origin supports it. Note that if your - origin does not support H2 multiplexing, 5xx errors may be observed, - particularly 520s. Also note that the default value is `100` for all - plan types except Enterprise where it is `1`. `1` means that H2 - multiplexing is disabled. - operationId: zone-cache-settings-change-origin-h2-max-streams-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - value: - $ref: '#/components/schemas/cacheRulesOriginH2MaxStreamsValue' - required: - - value - type: object - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesOriginH2MaxStreamsResponseValue' - description: Change Origin H2 Max Streams setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Change Origin H2 Max Streams response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Change Origin H2 Max Streams Setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: false - enterprise: true - free: false - pro: false - /zones/{zone_id}/settings/origin_max_http_version: - get: - description: >- - Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare - will attempt to use with your origin. This setting allows Cloudflare to - make HTTP/2 requests to your origin. (Refer to [Enable HTTP/2 to - Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), - for more information.). The default value is "2" for all plan types - except Enterprise where it is "1". - operationId: zone-cache-settings-get-origin-max-http-version-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/originMaxHttpVersion' - required: - - success - - errors - - messages - description: Get Origin Max HTTP Version setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Get Origin Max HTTP Version setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Origin Max HTTP Version Setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - Zone Read - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - patch: - description: >- - Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare - will attempt to use with your origin. This setting allows Cloudflare to - make HTTP/2 requests to your origin. (Refer to [Enable HTTP/2 to - Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), - for more information.). The default value is "2" for all plan types - except Enterprise where it is "1". - operationId: zone-cache-settings-change-origin-max-http-version-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - value: - $ref: '#/components/schemas/cacheRulesOriginMaxHttpVersionValue' - required: - - value - type: object - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - result: - $ref: '#/components/schemas/originMaxHttpVersion' - required: - - success - - errors - - messages - description: Change Origin Max HTTP Version setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' - description: Change Origin Max HTTP Version response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Change Origin Max HTTP Version Setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/settings/rum: - get: - description: Retrieves RUM status for a zone. - operationId: web-analytics-get-rum-status - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumRumSiteResponseSingle' - description: Rum Status. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get RUM status for a zone - tags: - - Web Analytics - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - patch: - description: Toggles RUM on/off for an existing zone. - operationId: web-analytics-toggle-rum - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/rumToggleRumRequest' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/rumRumSiteResponseSingle' - description: Rum toggled on/off for an existing zone. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/rumApiResponseCommonFailure' - description: Failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Toggle RUM on/off for a zone - tags: - - Web Analytics - x-api-token-group: - - Zone Settings Write - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/settings/speed_brain: - get: - description: >- - Speed Brain lets compatible browsers speculate on content which can be - prefetched or preloaded, making website navigation faster. Refer to the - Cloudflare Speed Brain documentation for more information. - operationId: zone-settings-get-speed-brain-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/speedMessages' - messages: - $ref: '#/components/schemas/speedMessages' - success: - description: Whether the API call was successful. - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/speedCloudflareSpeedBrainResponse' - required: - - success - - errors - - messages - type: object - description: Get Cloudflare Speed Brain setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/speedApiResponseCommonFailure' - description: Get Cloudflare Speed Brain setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Cloudflare Speed Brain setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - patch: - description: >- - Speed Brain lets compatible browsers speculate on content which can be - prefetched or preloaded, making website navigation faster. Refer to the - Cloudflare Speed Brain documentation for more information. - operationId: zone-settings-change-speed-brain-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - value: - description: Whether the feature is enabled or disabled. - enum: - - 'on' - - 'off' - type: string - required: - - value - type: object - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/speedMessages' - messages: - $ref: '#/components/schemas/speedMessages' - success: - description: Whether the API call was successful. - type: boolean - x-auditable: true - result: - $ref: '#/components/schemas/speedCloudflareSpeedBrainResponse' - required: - - success - - errors - - messages - type: object - description: Cloudflare Speed Brain setting response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/speedApiResponseCommonFailure' - description: Change Cloudflare Speed Brain setting response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Change Cloudflare Speed Brain setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/settings/ssl_automatic_mode: - get: - description: >- - If the system is enabled, the response will include next_scheduled_scan, - representing the next time this zone will be scanned and the zone's - ssl/tls encryption mode is potentially upgraded by the system. If the - system is disabled, next_scheduled_scan will not be present in the - response body. - operationId: ssl-detector-automatic-mode-get-enrollment - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cacheApiResponseSingleId' - description: Get Automatic SSL/TLS Enrollment status response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheApiResponseCommonFailure' - description: Get Automatic SSL/TLS Enrollment status failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Automatic SSL/TLS enrollment status for the given zone - tags: - - Automatic SSL/TLS - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - SSL and Certificates Write - - SSL and Certificates Read - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - patch: - description: >- - The automatic system is enabled when this endpoint is hit with value in - the request body is set to "auto", and disabled when the request body - value is set to "custom". - operationId: ssl-detector-automatic-mode-patch-enrollment - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheSchemasPatch' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/cacheApiResponseSingleId' - description: Patch Automatic SSL/TLS Enrollment status response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/cacheApiResponseCommonFailure' - description: Patch Automatic SSL/TLS Enrollment status failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Automatic SSL/TLS Enrollment status for given zone - tags: - - Automatic SSL/TLS - x-api-token-group: - - Zone Settings Write - - SSL and Certificates Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/settings/{setting_id}: - get: - description: Fetch a single zone setting by name - operationId: zone-settings-get-single-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: setting_id - schema: - $ref: '#/components/schemas/zonesSettingName' - required: true - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - success: - description: Whether the API call was successful - type: boolean - result: - $ref: '#/components/schemas/zonesSetting' - required: - - success - - errors - - messages - type: object - description: Get zone setting response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/zonesComponentsSchemasApiResponseCommonFailure - description: Get zone setting response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get zone setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: zones - resource_chain: - - settings - method: get - patch: - description: Updates a single zone setting by the identifier - operationId: zone-settings-edit-single-setting - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: setting_id - schema: - $ref: '#/components/schemas/zonesSettingName' - required: true - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/zonesZoneSettingsSingleRequest' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - success: - description: Whether the API call was successful - type: boolean - result: - $ref: '#/components/schemas/zonesSetting' - required: - - success - - errors - - messages - type: object - description: Edit zone setting response - 4XX: - content: - application/json: - schema: - $ref: >- - #/components/schemas/zonesComponentsSchemasApiResponseCommonFailure - description: Edit zone settings info response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Edit zone setting - tags: - - Zone Settings - x-api-token-group: - - Zone Settings Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: false - x-stackql-sdk: - service: zones - resource_chain: - - settings - method: edit - /zones/{zone_id}/smart_shield: - get: - description: Retrieve Smart Shield Settings. - operationId: smart-shield-get-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - $ref: >- - #/components/schemas/smartshieldSmartShieldSettingsGetResponse - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Smart Shield Settings response. - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' - description: Get Smart Shield Settings response failure. - '502': - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' - description: Get Smart Shield Settings response failure. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' - description: Patch Smart Shield Settings response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Smart Shield Settings - tags: - - Smart Shield Settings - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - Zone Read - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - patch: - description: Set Smart Shield Settings. - operationId: smart-shield-patch-settings - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldSmartShieldSettingsPatchBody' - responses: - '200': - content: - application/json: - schema: - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - $ref: >- - #/components/schemas/smartshieldSmartShieldSettingsPatchResponse - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - type: object - description: Smart Shield Settings response. - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' - description: Get Smart Shield Settings response failure. - '502': - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' - description: Smart Shield Settings response failure. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' - description: Patch Smart Shield Settings response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Smart Shield Settings - tags: - - Smart Shield Settings - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/smart_shield/cache_reserve_clear: - get: - description: >- - You can use Cache Reserve Clear to clear your Cache Reserve, but you - must first disable Cache Reserve. In most cases, this will be - accomplished within 24 hours. You cannot re-enable Cache Reserve while - this process is ongoing. Keep in mind that you cannot undo or cancel - this operation. - operationId: smart-shield-settings-get-cache-reserve-clear - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - type: object - description: >- - You can use Cache Reserve Clear to clear your Cache - Reserve, but you must first disable Cache Reserve. In most - cases, this will be accomplished within 24 hours. You - cannot re-enable Cache Reserve while this process is - ongoing. Keep in mind that you cannot undo or cancel this - operation. - title: Cache Reserve Clear - properties: - id: - $ref: >- - #/components/schemas/unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d - modified_on: - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - end_ts: - $ref: '#/components/schemas/smartshieldCacheReserveClearEndTs' - start_ts: - $ref: >- - #/components/schemas/smartshieldCacheReserveClearStartTs - state: - $ref: '#/components/schemas/smartshieldCacheReserveClearState' - required: - - id - - state - - start_ts - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Get Cache Reserve Clear response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' - description: Get Cache Reserve Clear failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Get Cache Reserve Clear - tags: - - Cache Reserve Clear - x-api-token-group: - - Zone Settings Write - - Zone Settings Read - - Zone Read - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - post: - description: >- - You can use Cache Reserve Clear to clear your Cache Reserve, but you - must first disable Cache Reserve. In most cases, this will be - accomplished within 24 hours. You cannot re-enable Cache Reserve while - this process is ongoing. Keep in mind that you cannot undo or cancel - this operation. - operationId: smart-shield-settings-start-cache-reserve-clear - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: {} - description: The request body is currently not used. - responses: - '200': - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - type: object - description: >- - You can use Cache Reserve Clear to clear your Cache - Reserve, but you must first disable Cache Reserve. In most - cases, this will be accomplished within 24 hours. You - cannot re-enable Cache Reserve while this process is - ongoing. Keep in mind that you cannot undo or cancel this - operation. - title: Cache Reserve Clear - properties: - id: - $ref: >- - #/components/schemas/unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d - modified_on: - description: Last time this setting was modified. - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - end_ts: - $ref: '#/components/schemas/smartshieldCacheReserveClearEndTs' - start_ts: - $ref: >- - #/components/schemas/smartshieldCacheReserveClearStartTs - state: - $ref: '#/components/schemas/smartshieldCacheReserveClearState' - required: - - id - - state - - start_ts - success: - description: Whether the API call was successful. - enum: - - true - type: boolean - required: - - success - - errors - - messages - - result - description: Start Cache Reserve Clear response. - 4XX: - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' - description: Start Cache Reserve Clear failure response. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Start Cache Reserve Clear - tags: - - Cache Reserve Clear - x-api-token-group: - - Zone Settings Write - - Zone Write - x-cfPermissionsRequired: - enum: - - '#zone_settings:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - /zones/{zone_id}/smart_shield/healthchecks: - get: - description: List configured health checks. - operationId: smart-shield-list-health-checks - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - description: Page number of paginated results. - in: query - name: page - schema: - default: 1 - minimum: 1 - type: number - - description: Maximum number of results per page. Must be a multiple of 5. - in: query - name: per_page - schema: - default: 25 - maximum: 1000 - minimum: 5 - type: number - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldResponseCollection' - description: List Health Checks response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - items: - $ref: '#/components/schemas/smartshieldHealthchecks' - nullable: true - type: array - enum: - - null - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - result_info: - $ref: '#/components/schemas/smartshieldResultInfo' - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: List Health Checks response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: List Health Checks - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - - Health Checks Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - post: - description: Create a new health check. - operationId: smart-shield-create-health-check - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldQueryHealthcheck' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldSingleHcResponse' - description: Create Health Check response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - properties: - address: - $ref: '#/components/schemas/smartshieldAddress' - check_regions: - $ref: '#/components/schemas/smartshieldCheckRegions' - consecutive_fails: - $ref: '#/components/schemas/smartshieldConsecutiveFails' - consecutive_successes: - $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' - created_on: - $ref: '#/components/schemas/smartshieldTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/smartshieldDescription' - failure_reason: - $ref: '#/components/schemas/smartshieldFailureReason' - http_config: - $ref: '#/components/schemas/smartshieldHttpConfig' - id: - $ref: '#/components/schemas/smartshieldIdentifier' - interval: - $ref: '#/components/schemas/smartshieldInterval' - modified_on: - $ref: '#/components/schemas/smartshieldTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/smartshieldName' - retries: - $ref: '#/components/schemas/smartshieldRetries' - status: - $ref: '#/components/schemas/smartshieldStatus' - suspended: - $ref: '#/components/schemas/smartshieldSuspended' - tcp_config: - $ref: '#/components/schemas/smartshieldTcpConfig' - timeout: - $ref: '#/components/schemas/smartshieldTimeout' - type: - $ref: '#/components/schemas/smartshieldType' - type: object - enum: - - null - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Health Check - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - /zones/{zone_id}/smart_shield/healthchecks/{healthcheck_id}: - delete: - description: Delete a health check. - operationId: smart-shield-delete-health-check - parameters: - - in: path - name: healthcheck_id - schema: - $ref: '#/components/schemas/smartshieldIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldSingleHcIdResponse' - description: Delete Health Check response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - properties: - id: - $ref: '#/components/schemas/smartshieldIdentifier' - type: object - enum: - - null - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Delete Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Delete Health Check - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - get: - description: Fetch a single configured health check. - operationId: smart-shield-health-check-details - parameters: - - in: path - name: healthcheck_id - schema: - $ref: '#/components/schemas/smartshieldIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldSingleHcResponse' - description: Health Check Details response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - properties: - address: - $ref: '#/components/schemas/smartshieldAddress' - check_regions: - $ref: '#/components/schemas/smartshieldCheckRegions' - consecutive_fails: - $ref: '#/components/schemas/smartshieldConsecutiveFails' - consecutive_successes: - $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' - created_on: - $ref: '#/components/schemas/smartshieldTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/smartshieldDescription' - failure_reason: - $ref: '#/components/schemas/smartshieldFailureReason' - http_config: - $ref: '#/components/schemas/smartshieldHttpConfig' - id: - $ref: '#/components/schemas/smartshieldIdentifier' - interval: - $ref: '#/components/schemas/smartshieldInterval' - modified_on: - $ref: '#/components/schemas/smartshieldTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/smartshieldName' - retries: - $ref: '#/components/schemas/smartshieldRetries' - status: - $ref: '#/components/schemas/smartshieldStatus' - suspended: - $ref: '#/components/schemas/smartshieldSuspended' - tcp_config: - $ref: '#/components/schemas/smartshieldTcpConfig' - timeout: - $ref: '#/components/schemas/smartshieldTimeout' - type: - $ref: '#/components/schemas/smartshieldType' - type: object - enum: - - null - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Health Check Details response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Health Check Details - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - - Health Checks Read - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - patch: - description: Patch a configured health check. - operationId: smart-shield-patch-health-check - parameters: - - in: path - name: healthcheck_id - schema: - $ref: '#/components/schemas/smartshieldIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldQueryHealthcheck' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldSingleHcResponse' - description: Patch Health Check response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - properties: - address: - $ref: '#/components/schemas/smartshieldAddress' - check_regions: - $ref: '#/components/schemas/smartshieldCheckRegions' - consecutive_fails: - $ref: '#/components/schemas/smartshieldConsecutiveFails' - consecutive_successes: - $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' - created_on: - $ref: '#/components/schemas/smartshieldTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/smartshieldDescription' - failure_reason: - $ref: '#/components/schemas/smartshieldFailureReason' - http_config: - $ref: '#/components/schemas/smartshieldHttpConfig' - id: - $ref: '#/components/schemas/smartshieldIdentifier' - interval: - $ref: '#/components/schemas/smartshieldInterval' - modified_on: - $ref: '#/components/schemas/smartshieldTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/smartshieldName' - retries: - $ref: '#/components/schemas/smartshieldRetries' - status: - $ref: '#/components/schemas/smartshieldStatus' - suspended: - $ref: '#/components/schemas/smartshieldSuspended' - tcp_config: - $ref: '#/components/schemas/smartshieldTcpConfig' - timeout: - $ref: '#/components/schemas/smartshieldTimeout' - type: - $ref: '#/components/schemas/smartshieldType' - type: object - enum: - - null - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Patch Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Patch Health Check - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - put: - description: Update a configured health check. - operationId: smart-shield-update-health-check - parameters: - - in: path - name: healthcheck_id - schema: - $ref: '#/components/schemas/smartshieldIdentifier' - required: true - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldSingleHcResponse' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/smartshieldSingleHcResponse' - description: Update Health Check response. - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - properties: - address: - $ref: '#/components/schemas/smartshieldAddress' - check_regions: - $ref: '#/components/schemas/smartshieldCheckRegions' - consecutive_fails: - $ref: '#/components/schemas/smartshieldConsecutiveFails' - consecutive_successes: - $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' - created_on: - $ref: '#/components/schemas/smartshieldTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/smartshieldDescription' - failure_reason: - $ref: '#/components/schemas/smartshieldFailureReason' - http_config: - $ref: '#/components/schemas/smartshieldHttpConfig' - id: - $ref: '#/components/schemas/smartshieldIdentifier' - interval: - $ref: '#/components/schemas/smartshieldInterval' - modified_on: - $ref: '#/components/schemas/smartshieldTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/smartshieldName' - retries: - $ref: '#/components/schemas/smartshieldRetries' - status: - $ref: '#/components/schemas/smartshieldStatus' - suspended: - $ref: '#/components/schemas/smartshieldSuspended' - tcp_config: - $ref: '#/components/schemas/smartshieldTcpConfig' - timeout: - $ref: '#/components/schemas/smartshieldTimeout' - type: - $ref: '#/components/schemas/smartshieldType' - type: object - enum: - - null - success: - description: Whether the API call was successful. - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update Health Check response failure. - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Health Check - tags: - - Health Checks - x-api-token-group: - - Health Checks Write - x-cfPlanAvailability: - business: true - enterprise: true - free: false - pro: true - /zones/{zone_id}/subscription: - get: - description: Lists zone subscription details. - operationId: zone-subscription-zone-subscription-details - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiZoneSubscriptionResponseSingle' - description: Zone Subscription Details response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - type: object - properties: - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - current_period_end: - $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' - current_period_start: - $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' - frequency: - description: How often the subscription is renewed automatically. - enum: - - weekly - - monthly - - quarterly - - yearly - - not-applicable - type: string - x-auditable: true - id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - price: - $ref: '#/components/schemas/billSubsApiPrice' - rate_plan: - $ref: '#/components/schemas/billSubsApiRatePlan_2' - state: - $ref: '#/components/schemas/billSubsApiState' - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Zone Subscription Details response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Zone Subscription Details - tags: - - Zone Subscription - x-api-token-group: - - Billing Write - - Billing Read - x-cfPermissionsRequired: - enum: - - '#billing:read' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: zones - resource_chain: - - subscriptions - method: get - post: - description: Create a zone subscription, either plan or add-ons. - operationId: zone-subscription-create-zone-subscription - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiSubscriptionV2' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiZoneSubscriptionResponseSingle' - description: Create Zone Subscription response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - type: object - properties: - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - current_period_end: - $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' - current_period_start: - $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' - frequency: - description: How often the subscription is renewed automatically. - enum: - - weekly - - monthly - - quarterly - - yearly - - not-applicable - type: string - x-auditable: true - id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - price: - $ref: '#/components/schemas/billSubsApiPrice' - rate_plan: - $ref: '#/components/schemas/billSubsApiRatePlan_2' - state: - $ref: '#/components/schemas/billSubsApiState' - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Create Zone Subscription response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Create Zone Subscription - tags: - - Zone Subscription - x-api-token-group: - - Billing Write - x-cfPermissionsRequired: - enum: - - '#billing:read' - - '#billing:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: zones - resource_chain: - - subscriptions - method: create - put: - description: Updates zone subscriptions, either plan or add-ons. - operationId: zone-subscription-update-zone-subscription - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiSubscriptionV2' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/billSubsApiZoneSubscriptionResponseSingle' - description: Update Zone Subscription response - 4XX: - content: - application/json: - schema: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - type: object - properties: - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - current_period_end: - $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' - current_period_start: - $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' - frequency: - description: How often the subscription is renewed automatically. - enum: - - weekly - - monthly - - quarterly - - yearly - - not-applicable - type: string - x-auditable: true - id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - price: - $ref: '#/components/schemas/billSubsApiPrice' - rate_plan: - $ref: '#/components/schemas/billSubsApiRatePlan_2' - state: - $ref: '#/components/schemas/billSubsApiState' - enum: - - null - success: - description: Whether the API call was successful - enum: - - true - - false - type: boolean - required: - - success - - errors - - messages - - result - - success - - errors - - messages - - result - description: Update Zone Subscription response failure - security: - - api_token: [] - - api_email: [] - api_key: [] - summary: Update Zone Subscription - tags: - - Zone Subscription - x-api-token-group: - - Billing Write - x-cfPermissionsRequired: - enum: - - '#billing:read' - - '#billing:edit' - x-cfPlanAvailability: - business: true - enterprise: true - free: true - pro: true - x-stackql-sdk: - service: zones - resource_chain: - - subscriptions - method: update - /zones/{zone_id}/email/sending/suppression: - get: - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: query - name: page - schema: - default: 1 - minimum: 0 - type: integer - - in: query - name: per_page - schema: - default: 100 - maximum: 1000 - minimum: 0 - type: integer - - in: query - name: order - schema: - default: created_at - enum: - - email - - expires_at - - created_at - type: string - - in: query - name: direction - schema: - default: desc - enum: - - asc - - desc - type: string - responses: - '200': - content: - application/json: - schema: - properties: - page: - type: integer - per_page: - type: integer - result: - items: - properties: - created_at: - format: date-time - type: string - readOnly: true - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - id: - format: uuid - type: string - reason: - type: string - zones: - default: [] - items: - type: string - type: array - required: - - id - - email - - reason - - created_at - - expires_at - type: object - type: array - total: - type: integer - required: - - page - - per_page - - total - - result - type: object - description: Returns suppressed emails. - '400': - content: - application/json: - schema: - properties: - errors: - items: - type: string - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Bad request. - security: - - bearerAuth: [] - summary: List account or zone email suppressions - tags: [] - operationId: get_zones_zone_id_email_sending_suppression - post: - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - requestBody: - content: - application/json: - schema: - properties: - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - required: - - email - type: object - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - id: - format: uuid - type: string - required: - - id - type: object - required: - - result - type: object - description: Returns suppression. - '400': - content: - application/json: - schema: - properties: - errors: - items: - type: string - type: array - success: - type: boolean - required: - - success - - errors - type: object - description: Bad request. - security: - - bearerAuth: [] - summary: Create account or zone email suppression - tags: [] - operationId: post_zones_zone_id_email_sending_suppression - /zones/{zone_id}/email/sending/suppression/{suppression_id}: - get: - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: suppression_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - result: - properties: - created_at: - format: date-time - type: string - readOnly: true - email: - format: email - type: string - expires_at: - format: date-time - nullable: true - type: string - id: - format: uuid - type: string - reason: - type: string - zones: - default: [] - items: - type: string - type: array - required: - - id - - email - - reason - - created_at - - expires_at - type: object - required: - - result - type: object - description: Returns suppression. - '404': - content: - application/json: - schema: - properties: - error: - type: string - success: - type: boolean - required: - - success - - error - type: object - description: Suppression not found. - security: - - bearerAuth: [] - summary: Get account or zone email suppression - tags: [] - operationId: get_zones_zone_id_email_sending_suppression_suppression_id - delete: - parameters: - - name: zone_id - in: path - required: true - description: The Cloudflare zone ID. - schema: - type: string - - in: path - name: suppression_id - schema: - type: string - required: true - responses: - '200': - content: - application/json: - schema: - properties: - success: - type: boolean - required: - - success - type: object - description: Deletes suppression. - '404': - content: - application/json: - schema: - properties: - error: - type: string - success: - type: boolean - required: - - success - - error - type: object - description: Suppression not found. - security: - - bearerAuth: [] - summary: Delete account or zone email suppression - tags: [] - operationId: delete_zones_zone_id_email_sending_suppression_suppression_id -components: - schemas: - argoAnalyticsMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - argoAnalyticsResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/argoAnalyticsMessages' - messages: - $ref: '#/components/schemas/argoAnalyticsMessages' - result: - type: object - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - billSubsApiAvailableRatePlan: - properties: - can_subscribe: - $ref: '#/components/schemas/billSubsApiCanSubscribe' - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - externally_managed: - $ref: '#/components/schemas/billSubsApiExternallyManaged' - frequency: - $ref: '#/components/schemas/billSubsApiSchemasFrequency' - id: - $ref: '#/components/schemas/billSubsApiIdentifier' - is_subscribed: - $ref: '#/components/schemas/billSubsApiIsSubscribed' - legacy_discount: - $ref: '#/components/schemas/billSubsApiLegacyDiscount' - legacy_id: - $ref: '#/components/schemas/billSubsApiLegacyId' - name: - $ref: '#/components/schemas/billSubsApiSchemasName' - price: - $ref: '#/components/schemas/billSubsApiSchemasPrice' - type: object - billSubsApiCanSubscribe: - default: false - description: Indicates whether you can subscribe to this plan. - example: true - type: boolean - x-auditable: true - billSubsApiComponentValue: - properties: - default: - $ref: '#/components/schemas/billSubsApiDefault' - name: - $ref: '#/components/schemas/billSubsApiComponentsSchemasName' - unit_price: - $ref: '#/components/schemas/billSubsApiUnitPrice' - type: object - billSubsApiComponentsSchemasName: - description: The unique component. - enum: - - zones - - page_rules - - dedicated_certificates - - dedicated_certificates_custom - example: page_rules - x-auditable: true - type: string - billSubsApiCurrency: - description: The monetary unit in which pricing information is displayed. - example: USD - readOnly: true - type: string - x-auditable: true - billSubsApiCurrentPeriodEnd: - description: The end of the current period and also when the next billing is due. - example: '2014-03-31T12:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - billSubsApiCurrentPeriodStart: - description: >- - When the current billing period started. May match initial_period_start - if this is the first period. - example: '2014-05-11T12:20:00Z' - format: date-time - readOnly: true - type: string - x-auditable: true - billSubsApiDefault: - description: The default amount allocated. - example: 5 - type: number - x-auditable: true - billSubsApiDuration: - description: The duration of the plan subscription. - example: 1 - type: number - x-auditable: true - billSubsApiExternallyManaged: - default: false - description: Indicates whether this plan is managed externally. - example: false - type: boolean - x-auditable: true - billSubsApiFrequency: - description: How often the subscription is renewed automatically. - enum: - - weekly - - monthly - - quarterly - - yearly - example: monthly - type: string - x-auditable: true - billSubsApiIdentifier: - description: Identifier - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - billSubsApiIsSubscribed: - default: false - description: Indicates whether you are currently subscribed to this plan. - example: false - type: boolean - x-auditable: true - billSubsApiLegacyDiscount: - default: false - description: Indicates whether this plan has a legacy discount applied. - example: false - type: boolean - x-auditable: true - billSubsApiLegacyId: - description: The legacy identifier for this rate plan, if any. - example: free - readOnly: true - type: string - x-auditable: true - billSubsApiMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - billSubsApiPlanResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - items: - $ref: '#/components/schemas/billSubsApiSchemasRatePlan' - nullable: true - type: array - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/billSubsApiResultInfo' - required: - - success - - errors - - messages - - result - billSubsApiPrice: - description: The price of the subscription that will be billed, in US dollars. - example: 20 - readOnly: true - type: number - x-auditable: true - billSubsApiRatePlan: - properties: - components: - $ref: '#/components/schemas/billSubsApiSchemasComponentValues' - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - duration: - $ref: '#/components/schemas/billSubsApiDuration' - frequency: - $ref: '#/components/schemas/billSubsApiSchemasFrequency' - id: - $ref: '#/components/schemas/billSubsApiRatePlanComponentsSchemasIdentifier' - name: - $ref: '#/components/schemas/billSubsApiSchemasName' - type: object - billSubsApiRatePlanComponentsSchemasIdentifier: - description: Plan identifier tag. - example: free - readOnly: true - type: string - x-auditable: true - billSubsApiRatePlan_2: - description: The rate plan applied to the subscription. - properties: - currency: - description: The currency applied to the rate plan subscription. - example: USD - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - externally_managed: - description: Whether this rate plan is managed externally from Cloudflare. - example: false - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - id: - description: The ID of the rate plan. - example: free - type: string - x-auditable: true - enum: - - free - - lite - - pro - - pro_plus - - business - - enterprise - - partners_free - - partners_pro - - partners_business - - partners_enterprise - is_contract: - description: >- - Whether a rate plan is enterprise-based (or newly adopted term - contract). - example: false - type: boolean - x-auditable: true - x-stainless-terraform-configurability: computed_optional - public_name: - description: The full name of the rate plan. - example: Business Plan - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - scope: - description: The scope that this rate plan applies to. - example: zone - type: string - x-auditable: true - x-stainless-terraform-configurability: computed_optional - sets: - description: >- - The list of sets this rate plan applies to. Returns array of - strings. - example: [] - items: - type: string - x-auditable: true - type: array - x-stainless-terraform-configurability: optional - type: object - billSubsApiResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - billSubsApiSchemasComponentValues: - description: Array of available components values for the plan. - items: - $ref: '#/components/schemas/billSubsApiComponentValue' - type: array - billSubsApiSchemasFrequency: - description: The frequency at which you will be billed for this plan. - enum: - - weekly - - monthly - - quarterly - - yearly - example: monthly - readOnly: true - type: string - x-auditable: true - billSubsApiSchemasIdentifier: - description: Subscription identifier tag. - example: 506e3185e9c882d175a2d0cb0093d9f2 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - billSubsApiSchemasName: - description: The plan name. - example: Free Plan - maxLength: 80 - readOnly: true - type: string - x-auditable: true - billSubsApiSchemasPrice: - description: The amount you will be billed for this plan. - example: 0 - type: number - x-auditable: true - billSubsApiSchemasRatePlan: - type: object - $ref: '#/components/schemas/billSubsApiRatePlan' - billSubsApiState: - description: The state that the subscription is in. - enum: - - Trial - - Provisioned - - Paid - - AwaitingPayment - - Cancelled - - Failed - - Expired - example: Paid - readOnly: true - type: string - x-auditable: true - billSubsApiSubscriptionResponse: - type: object - properties: - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - current_period_end: - $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' - current_period_start: - $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' - frequency: - description: How often the subscription is renewed automatically. - enum: - - weekly - - monthly - - quarterly - - yearly - - not-applicable - example: monthly - type: string - x-auditable: true - id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - price: - $ref: '#/components/schemas/billSubsApiPrice' - rate_plan: - $ref: '#/components/schemas/billSubsApiRatePlan_2' - state: - $ref: '#/components/schemas/billSubsApiState' - billSubsApiSubscriptionV2: - properties: - currency: - $ref: '#/components/schemas/billSubsApiCurrency' - current_period_end: - $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' - current_period_start: - $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' - frequency: - $ref: '#/components/schemas/billSubsApiFrequency' - id: - $ref: '#/components/schemas/billSubsApiSchemasIdentifier' - price: - $ref: '#/components/schemas/billSubsApiPrice' - rate_plan: - $ref: '#/components/schemas/billSubsApiRatePlan_2' - state: - $ref: '#/components/schemas/billSubsApiState' - type: object - billSubsApiUnitPrice: - description: The unit price of the addon. - example: 1 - readOnly: true - type: number - x-auditable: true - billSubsApiZoneSubscriptionResponseSingle: - type: object - properties: - errors: - $ref: '#/components/schemas/billSubsApiMessages' - messages: - $ref: '#/components/schemas/billSubsApiMessages' - result: - $ref: '#/components/schemas/billSubsApiSubscriptionResponse' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - cacheApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/cacheMessages' - messages: - example: [] - $ref: '#/components/schemas/cacheMessages' - result: - $ref: '#/components/schemas/cacheResult' - success: - description: Indicates the API call's success or failure. - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - cacheApiResponseSingleId: - properties: - errors: - $ref: '#/components/schemas/cacheMessages' - messages: - $ref: '#/components/schemas/cacheMessages' - result: - $ref: '#/components/schemas/cacheResult' - success: - description: Indicates the API call's success or failure. - example: true - type: boolean - required: - - success - - errors - - messages - - result - type: object - cacheMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - cacheResult: - properties: - editable: - description: Whether this setting can be updated or not. - readOnly: true - type: boolean - id: - example: ssl_automatic_mode - readOnly: true - type: string - modified_on: - description: Last time this setting was modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - next_scheduled_scan: - description: Next time this zone will be scanned by the Automatic SSL/TLS. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - nullable: true - readOnly: true - type: string - value: - description: Current setting of the automatic SSL/TLS. - enum: - - auto - - custom - example: auto - readOnly: true - type: string - required: - - id - - modified_on - - value - - editable - type: object - cacheRulesAegisValue: - description: Value of the zone setting. - properties: - enabled: - description: Whether the feature is enabled or not. - type: boolean - x-auditable: true - pool_id: - description: >- - Egress pool id which refers to a grouping of dedicated egress IPs - through which Cloudflare will connect to origin. - example: pool-id - type: string - x-auditable: true - type: object - cacheRulesApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - items: - type: object - minLength: 1 - type: array - $ref: '#/components/schemas/cacheRulesMessages' - messages: - example: [] - items: - type: object - type: array - $ref: '#/components/schemas/cacheRulesMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - cacheRulesEditable: - description: Whether the setting is editable. - type: boolean - x-auditable: true - cacheRulesMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - cacheRulesModifiedOn: - description: The time when the setting was last modified. - format: date-time - type: string - x-auditable: true - cacheRulesOriginH2MaxStreams: - description: >- - Origin H2 Max Streams configures the max number of concurrent requests - that Cloudflare will send within the same connection when communicating - with the origin server, if the origin supports it. Note that if your - origin does not support H2 multiplexing, 5xx errors may be observed, - particularly 520s. Also note that the default value is `100` for all - plan types except Enterprise where it is `1`. `1` means that H2 - multiplexing is disabled. - title: Origin H2 Max Streams - type: object - properties: - id: - description: Value of the zone setting. - type: string - x-auditable: true - enum: - - origin_h2_max_streams - example: origin_h2_max_streams - modified_on: - description: Last time this setting was modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - $ref: '#/components/schemas/cacheRulesOriginH2MaxStreamsValue' - required: - - id - cacheRulesOriginH2MaxStreamsResponseValue: - properties: - errors: - $ref: '#/components/schemas/cacheRulesMessages' - messages: - $ref: '#/components/schemas/cacheRulesMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result: - $ref: '#/components/schemas/cacheRulesOriginH2MaxStreams' - required: - - success - - errors - - messages - type: object - cacheRulesOriginH2MaxStreamsValue: - description: Value of the Origin H2 Max Streams Setting. - example: 50 - maximum: 1000 - minimum: 1 - type: integer - x-auditable: true - cacheRulesOriginMaxHttpVersionValue: - description: Value of the Origin Max HTTP Version Setting. - enum: - - '2' - - '1' - type: string - x-auditable: true - cacheSchemasPatch: - description: Update enablement of Automatic SSL/TLS. - properties: - value: - $ref: '#/components/schemas/cacheSchemasValue' - required: - - value - type: object - cacheSchemasValue: - description: Controls enablement of Automatic SSL/TLS. - enum: - - auto - - custom - example: auto - type: string - dnsCustomNameserversGetResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/dnsCustomNameserversMessages' - messages: - $ref: '#/components/schemas/dnsCustomNameserversMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - type: object - enabled: - description: Whether zone uses account-level custom nameservers. - example: true - type: boolean - x-auditable: true - ns_set: - default: 1 - description: The number of the name server set to assign to the zone. - example: 1 - maximum: 5 - minimum: 1 - type: number - x-auditable: true - required: - - success - - errors - - messages - dnsCustomNameserversMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - dnsCustomNameserversSchemasEmptyResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/dnsCustomNameserversMessages' - messages: - $ref: '#/components/schemas/dnsCustomNameserversMessages' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - type: object - result: - items: - description: Unused - type: string - x-auditable: true - maxItems: 0 - type: array - required: - - success - - errors - - messages - dnsCustomNameserversZoneMetadata: - properties: - enabled: - description: Whether zone uses account-level custom nameservers. - example: true - type: boolean - x-auditable: true - ns_set: - default: 1 - description: The number of the name server set to assign to the zone. - example: 1 - maximum: 5 - minimum: 1 - type: number - x-auditable: true - type: object - kaminoEnvironment: - properties: - expression: - type: string - http_application_id: - nullable: true - type: string - locked_on_deployment: - nullable: true - type: boolean - name: - type: string - position: - $ref: '#/components/schemas/kaminoEnvironmentPosition' - ref: - type: string - version: - format: int64 - nullable: true - type: integer - required: - - name - - ref - - version - - expression - - locked_on_deployment - - position - type: object - kaminoEnvironmentPosition: - $ref: '#/components/schemas/unnamedSchemaRef34bb6e31800bc0207c083affa12d2775' - kaminoEnvironmentsRequest: - properties: - environments: - items: - $ref: '#/components/schemas/kaminoEnvironment' - type: array - required: - - environments - type: object - kaminoEnvironmentsResponse: - properties: - errors: - items: - $ref: '#/components/schemas/kaminoMessage' - type: array - messages: - items: - $ref: '#/components/schemas/kaminoMessage' - type: array - result: - $ref: '#/components/schemas/kaminoEnvironmentsResult' - success: - type: boolean - required: - - result - - success - - errors - - messages - type: object - kaminoEnvironmentsResult: - properties: - environments: - items: - $ref: '#/components/schemas/kaminoEnvironment' - type: array - required: - - environments - type: object - kaminoErrorResponse: - properties: - errors: - items: - $ref: '#/components/schemas/kaminoMessage' - type: array - messages: - items: - $ref: '#/components/schemas/kaminoMessage' - type: array - result: - nullable: true - type: object - success: - type: boolean - required: - - result - - success - - errors - - messages - type: object - kaminoMessage: - $ref: '#/components/schemas/responseInfo' - originMaxHttpVersion: - properties: - editable: - $ref: '#/components/schemas/cacheRulesEditable' - id: - description: The identifier of the caching setting. - type: string - x-auditable: true - enum: - - origin_max_http_version - modified_on: - $ref: '#/components/schemas/cacheRulesModifiedOn' - description: Last time this setting was modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Value of the Origin Max HTTP Version Setting. - type: string - x-auditable: true - enum: - - '2' - - '1' - required: - - id - - value - - editable - - id - type: object - title: Origin Max HTTP Version - responseInfo: - properties: - code: - minimum: 1000 - type: integer - message: - type: string - documentation_url: - type: string - source: - type: object - properties: - pointer: - type: string - required: - - code - - message - type: object - uniqueItems: true - rumApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/rumSchemasMessages' - messages: - example: [] - $ref: '#/components/schemas/rumSchemasMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - rumEditable: - example: true - type: boolean - rumId: - example: rum - type: string - x-auditable: true - rumMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - rumRumSite: - properties: - editable: - $ref: '#/components/schemas/rumEditable' - id: - $ref: '#/components/schemas/rumId' - value: - $ref: '#/components/schemas/rumValue' - type: object - rumRumSiteResponseSingle: - properties: - errors: - $ref: '#/components/schemas/rumMessages' - messages: - $ref: '#/components/schemas/rumMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - result: - $ref: '#/components/schemas/rumRumSite' - required: - - success - - errors - - messages - type: object - rumSchemasMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - rumToggleRumRequest: - properties: - value: - description: Value can either be On or Off. - example: 'on' - type: string - type: object - rumValue: - description: Current state of RUM. Returns On, Off, or Manual. - example: 'on' - type: string - x-auditable: true - smartshieldAddress: - description: The hostname or IP address of the origin server to run health checks on. - example: www.example.com - type: string - x-auditable: true - smartshieldApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/smartshieldMessages' - messages: - example: [] - $ref: '#/components/schemas/smartshieldMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - smartshieldCacheReserveClearEndTs: - description: The time that the latest Cache Reserve Clear operation completed. - example: '2023-10-02T12:00:00.12345Z' - format: date-time - type: string - x-auditable: true - smartshieldCacheReserveClearStartTs: - description: The time that the latest Cache Reserve Clear operation started. - example: '2023-10-02T10:00:00.12345Z' - format: date-time - type: string - x-auditable: true - smartshieldCacheReserveClearState: - description: The current state of the Cache Reserve Clear operation. - enum: - - In-progress - - Completed - example: In-progress - type: string - x-auditable: true - smartshieldCheckRegions: - description: >- - A list of regions from which to run health checks. Null means Cloudflare - will pick a default region. - example: - - WEU - - ENAM - items: - description: >- - WNAM: Western North America, ENAM: Eastern North America, WEU: Western - Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: - Southern South America, OC: Oceania, ME: Middle East, NAF: North - Africa, SAF: South Africa, IN: India, SEAS: South East Asia, NEAS: - North East Asia, ALL_REGIONS: all regions (BUSINESS and ENTERPRISE - customers only). - enum: - - WNAM - - ENAM - - WEU - - EEU - - NSAM - - SSAM - - OC - - ME - - NAF - - SAF - - IN - - SEAS - - NEAS - - ALL_REGIONS - type: string - nullable: true - type: array - x-auditable: true - smartshieldConsecutiveFails: - default: 1 - description: >- - The number of consecutive fails required from a health check before - changing the health to unhealthy. - type: integer - x-auditable: true - smartshieldConsecutiveSuccesses: - default: 1 - description: >- - The number of consecutive successes required from a health check before - changing the health to healthy. - type: integer - x-auditable: true - smartshieldDescription: - description: A human-readable description of the health check. - example: Health check for www.example.com - type: string - x-auditable: true - smartshieldFailureReason: - description: The current failure reason if status is unhealthy. - example: '' - readOnly: true - type: string - x-auditable: true - smartshieldHealthchecks: - properties: - address: - $ref: '#/components/schemas/smartshieldAddress' - check_regions: - $ref: '#/components/schemas/smartshieldCheckRegions' - consecutive_fails: - $ref: '#/components/schemas/smartshieldConsecutiveFails' - consecutive_successes: - $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' - created_on: - $ref: '#/components/schemas/smartshieldTimestamp' - readOnly: true - description: - $ref: '#/components/schemas/smartshieldDescription' - failure_reason: - $ref: '#/components/schemas/smartshieldFailureReason' - http_config: - $ref: '#/components/schemas/smartshieldHttpConfig' - id: - $ref: '#/components/schemas/smartshieldIdentifier' - interval: - $ref: '#/components/schemas/smartshieldInterval' - modified_on: - $ref: '#/components/schemas/smartshieldTimestamp' - readOnly: true - name: - $ref: '#/components/schemas/smartshieldName' - retries: - $ref: '#/components/schemas/smartshieldRetries' - status: - $ref: '#/components/schemas/smartshieldStatus' - suspended: - $ref: '#/components/schemas/smartshieldSuspended' - tcp_config: - $ref: '#/components/schemas/smartshieldTcpConfig' - timeout: - $ref: '#/components/schemas/smartshieldTimeout' - type: - $ref: '#/components/schemas/smartshieldType' - type: object - smartshieldHttpConfig: - description: Parameters specific to an HTTP or HTTPS health check. - nullable: true - properties: - allow_insecure: - default: false - description: Do not validate the certificate when the health check uses HTTPS. - type: boolean - x-auditable: true - expected_body: - description: >- - A case-insensitive sub-string to look for in the response body. If - this string is not found, the origin will be marked as unhealthy. - example: success - type: string - x-auditable: true - expected_codes: - description: >- - The expected HTTP response codes (e.g. "200") or code ranges (e.g. - "2xx" for all codes starting with 2) of the health check. - example: - - 2xx - - '302' - items: - type: string - nullable: true - type: array - x-auditable: true - follow_redirects: - default: false - description: Follow redirects if the origin returns a 3xx status code. - type: boolean - x-auditable: true - header: - description: >- - The HTTP request headers to send in the health check. It is - recommended you set a Host header by default. The User-Agent header - cannot be overridden. - example: - Host: - - example.com - X-App-ID: - - abc123 - nullable: true - type: object - method: - default: GET - description: The HTTP method to use for the health check. - enum: - - GET - - HEAD - type: string - x-auditable: true - path: - default: / - description: The endpoint path to health check against. - example: /health - type: string - x-auditable: true - port: - default: 80 - description: >- - Port number to connect to for the health check. Defaults to 80 if - type is HTTP or 443 if type is HTTPS. - type: integer - x-auditable: true - type: object - smartshieldIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - x-auditable: true - smartshieldInterval: - default: 60 - description: >- - The interval between each health check. Shorter intervals may give - quicker notifications if the origin status changes, but will increase - load on the origin as we check from multiple locations. - type: integer - x-auditable: true - smartshieldMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - smartshieldName: - description: >- - A short name to identify the health check. Only alphanumeric characters, - hyphens and underscores are allowed. - example: server-1 - type: string - x-auditable: true - smartshieldQueryHealthcheck: - properties: - address: - $ref: '#/components/schemas/smartshieldAddress' - check_regions: - $ref: '#/components/schemas/smartshieldCheckRegions' - consecutive_fails: - $ref: '#/components/schemas/smartshieldConsecutiveFails' - consecutive_successes: - $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' - description: - $ref: '#/components/schemas/smartshieldDescription' - http_config: - $ref: '#/components/schemas/smartshieldHttpConfig' - interval: - $ref: '#/components/schemas/smartshieldInterval' - name: - $ref: '#/components/schemas/smartshieldName' - retries: - $ref: '#/components/schemas/smartshieldRetries' - suspended: - $ref: '#/components/schemas/smartshieldSuspended' - tcp_config: - $ref: '#/components/schemas/smartshieldTcpConfig' - timeout: - $ref: '#/components/schemas/smartshieldTimeout' - type: - $ref: '#/components/schemas/smartshieldType' - required: - - name - - address - type: object - smartshieldResponseCollection: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - items: - $ref: '#/components/schemas/smartshieldHealthchecks' - nullable: true - type: array - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - result_info: - $ref: '#/components/schemas/smartshieldResultInfo' - required: - - success - - errors - - messages - - result - smartshieldResultInfo: - properties: - count: - description: Total number of results for the requested service - example: 1 - type: number - page: - description: Current page within paginated list of results - example: 1 - type: number - per_page: - description: Number of results per page of results - example: 20 - type: number - total_count: - description: Total results available without any search parameters - example: 2000 - type: number - type: object - smartshieldRetries: - default: 2 - description: >- - The number of retries to attempt in case of a timeout before marking the - origin as unhealthy. Retries are attempted immediately. - type: integer - x-auditable: true - smartshieldSingleHcIdResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - properties: - id: - $ref: '#/components/schemas/smartshieldIdentifier' - type: object - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - smartshieldSingleHcResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/smartshieldMessages' - messages: - $ref: '#/components/schemas/smartshieldMessages' - result: - $ref: '#/components/schemas/smartshieldHealthchecks' - success: - description: Whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - smartshieldSmartShieldSettingsGetResponse: - description: >- - A consolidated object containing settings from multiple APIs for partial - updates. - required: - - smart_tiered_cache - - smart_routing - - regional_tiered_cache - - cache_reserve - - healthchecks_count - type: object - properties: - cache_reserve: - properties: - editable: - description: Whether the setting is editable. - example: true - type: boolean - id: - description: The id of the Cache Reserve setting. - example: cache_reserve - type: string - value: - description: Specifies the enablement value of Cache Reserve. - enum: - - 'on' - - 'off' - example: 'off' - type: string - type: object - regional_tiered_cache: - properties: - editable: - description: Whether the setting is editable. - example: true - type: boolean - id: - description: The id of the Regional Tiered Cache setting. - example: regional_tiered_cache - type: string - value: - description: Specifies the enablement value of Cache Reserve. - enum: - - 'on' - - 'off' - example: 'off' - type: string - type: object - smart_routing: - properties: - editable: - description: Whether the setting is editable. - example: true - type: boolean - id: - description: The id of the Smart Routing setting. - example: smart_routing - type: string - value: - description: Specifies the enablement value of Argo Smart Routing. - enum: - - 'on' - - 'off' - example: 'off' - type: string - type: object - smart_tiered_cache: - properties: - editable: - description: Whether the setting is editable. - example: true - type: boolean - id: - description: The id of the Smart Tiered Cache setting. - example: smart_tiered_cache - type: string - modified_on: - description: The last time the setting was modified. - example: '2025-09-10T22:53:22.946098Z' - type: string - readOnly: true - value: - description: Specifies the enablement value of Tiered Cache. - enum: - - 'on' - - 'off' - example: 'on' - type: string - type: object - healthchecks_count: - description: The total number of health checks associated with the zone. - example: 5 - type: integer - smartshieldSmartShieldSettingsPatchBody: - description: The patch body for Smart Shield. - example: - smart_tiered_cache: - value: 'on' - properties: - cache_reserve: - properties: - value: - description: Specifies the enablement value of Cache Reserve. - enum: - - 'on' - - 'off' - example: 'on' - type: string - type: object - regional_tiered_cache: - properties: - value: - description: Specifies the enablement value of Regional Tiered Cache. - enum: - - 'on' - - 'off' - example: 'on' - type: string - type: object - smart_routing: - properties: - value: - description: Specifies the enablement value of Smart Routing. - enum: - - 'on' - - 'off' - example: 'on' - type: string - type: object - smart_tiered_cache: - properties: - value: - description: Specifies the enablement value of Smart Tiered Cache. - enum: - - 'on' - - 'off' - example: 'on' - type: string - type: object - type: object - smartshieldSmartShieldSettingsPatchResponse: - description: >- - A consolidated object containing settings from multiple APIs for partial - updates. - properties: - smart_tiered_cache: - properties: - editable: - description: Whether the setting is editable. - example: true - type: boolean - id: - description: The id of the Smart Tiered Cache setting. - example: smart_tiered_cache - type: string - modified_on: - description: The last time the setting was modified. - example: '2025-09-10T22:53:22.946098Z' - type: string - readOnly: true - value: - description: Specifies the enablement value of Tiered Cache. - enum: - - 'on' - - 'off' - example: 'on' - type: string - type: object - required: - - smart_tiered_cache - - smart_routing - - regional_tiered_cache - - cache_reserve - type: object - smartshieldStatus: - description: The current status of the origin server according to the health check. - enum: - - unknown - - healthy - - unhealthy - - suspended - example: healthy - readOnly: true - type: string - x-auditable: true - smartshieldSuspended: - default: false - description: If suspended, no health checks are sent to the origin. - type: boolean - x-auditable: true - smartshieldTcpConfig: - description: Parameters specific to TCP health check. - nullable: true - properties: - method: - default: connection_established - description: The TCP connection method to use for the health check. - enum: - - connection_established - type: string - x-auditable: true - port: - default: 80 - description: Port number to connect to for the health check. Defaults to 80. - type: integer - x-auditable: true - type: object - smartshieldTimeout: - default: 5 - description: The timeout (in seconds) before marking the health check as failed. - type: integer - x-auditable: true - smartshieldTimestamp: - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - x-auditable: true - smartshieldType: - default: HTTP - description: >- - The protocol to use for the health check. Currently supported protocols - are 'HTTP', 'HTTPS' and 'TCP'. - example: HTTPS - type: string - x-auditable: true - speedApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/speedMessages' - messages: - example: [] - $ref: '#/components/schemas/speedMessages' - result: - nullable: true - type: object - success: - description: Whether the API call was successful. - example: false - type: boolean - x-auditable: true - required: - - success - - errors - - messages - - result - type: object - speedCloudflareFonts: - description: >- - Enhance your website's font delivery with Cloudflare Fonts. Deliver - Google Hosted fonts from your own domain, boost performance, and enhance - user privacy. Refer to the Cloudflare Fonts documentation for more - information. - title: Cloudflare Fonts - properties: - editable: - default: true - description: >- - Whether or not this setting can be modified for this zone (based on - your Cloudflare plan level). - enum: - - true - - false - readOnly: true - type: boolean - x-auditable: true - id: - description: ID of the zone setting. - example: fonts - type: string - x-auditable: true - enum: - - fonts - modified_on: - description: last time this setting was modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: Current value of the zone setting. - enum: - - 'on' - - 'off' - example: 'on' - type: string - x-auditable: true - type: object - speedCloudflareFontsValue: - default: 'off' - description: Whether the feature is enabled or disabled. - enum: - - 'on' - - 'off' - type: string - x-auditable: true - speedCloudflareSpeedBrainResponse: - title: Cloudflare Speed Brain response - properties: - editable: - default: true - description: >- - Whether or not this setting can be modified for this zone (based on - your Cloudflare plan level). - enum: - - true - - false - readOnly: true - type: boolean - x-auditable: true - id: - description: Identifier of the zone setting. - example: development_mode - type: string - x-auditable: true - modified_on: - description: last time this setting was modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - nullable: true - readOnly: true - type: string - x-auditable: true - value: - description: >- - Whether the feature is enabled or disabled. Defaults to "on" for - Free plans, otherwise defaults to "off". - enum: - - 'on' - - 'off' - example: 'on' - type: string - x-auditable: true - type: object - speedMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d: - description: ID of the zone setting. - type: string - x-auditable: true - enum: - - cache_reserve_clear - example: cache_reserve_clear - unnamedSchemaRef34bb6e31800bc0207c083affa12d2775: - properties: - after: - example: yyy - type: string - x-auditable: true - before: - example: xxx - type: string - x-auditable: true - type: object - unnamedSchemaRef619309774d07ec6904f1e354560d6028: - items: - description: Unused - type: string - x-auditable: true - maxItems: 0 - type: array - enum: - - null - wafProductApiBundleCustomTopic: - properties: - label: - description: >- - Unique label identifier. Must contain only lowercase letters (a–z), - digits (0–9), and hyphens. - example: credit-cards - maxLength: 20 - minLength: 2 - type: string - topic: - description: >- - Description of the topic category. Must contain only printable ASCII - characters. - example: credit card numbers - maxLength: 50 - minLength: 2 - type: string - required: - - label - - topic - type: object - wafProductApiBundleCustomTopics: - properties: - topics: - description: Custom topic categories for Firewall for AI content detection. - items: - $ref: '#/components/schemas/wafProductApiBundleCustomTopic' - maxItems: 20 - type: array - type: object - wafProductApiBundleMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - wafProductApiBundleResponseCustomTopics: - type: object - properties: - errors: - $ref: '#/components/schemas/wafProductApiBundleMessages' - messages: - $ref: '#/components/schemas/wafProductApiBundleMessages' - result: - $ref: '#/components/schemas/wafProductApiBundleCustomTopics' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - wafProductApiBundleResponseSettings: - type: object - properties: - errors: - $ref: '#/components/schemas/wafProductApiBundleMessages' - messages: - $ref: '#/components/schemas/wafProductApiBundleMessages' - result: - $ref: '#/components/schemas/wafProductApiBundleSettings' - success: - description: Defines whether the API call was successful. - enum: - - true - example: true - type: boolean - required: - - success - - errors - - messages - - result - wafProductApiBundleSettings: - description: Firewall for AI enablement status for a zone. - properties: - enabled: - description: Whether Firewall for AI is enabled on the zone. - example: true - type: boolean - type: object - zoneActivationApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/zoneActivationMessages' - messages: - example: [] - $ref: '#/components/schemas/zoneActivationMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - zoneActivationIdentifier: - description: Identifier. - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - x-auditable: true - zoneActivationMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - zoneAnalyticsApiBandwidth: - description: Breakdown of totals for bandwidth in the form of bytes. - properties: - all: - description: The total number of bytes served within the time frame. - type: integer - cached: - description: The number of bytes that were cached (and served) by Cloudflare. - type: integer - content_type: - description: >- - A variable list of key/value pairs where the key represents the type - of content served, and the value is the number in bytes served. - example: - css: 237421 - gif: 1234242 - html: 1231290 - javascript: 123245 - jpeg: 784278 - type: object - country: - description: >- - A variable list of key/value pairs where the key is a two-digit - country code and the value is the number of bytes served to that - country. - example: - AG: 2342483 - GI: 984753 - US: 123145433 - type: object - ssl: - description: A break down of bytes served over HTTPS. - properties: - encrypted: - description: The number of bytes served over HTTPS. - type: integer - unencrypted: - description: The number of bytes served over HTTP. - type: integer - type: object - ssl_protocols: - description: A breakdown of requests by their SSL protocol. - properties: - TLSv1: - description: The number of requests served over TLS v1.0. - type: integer - TLSv1.1: - description: The number of requests served over TLS v1.1. - type: integer - TLSv1.2: - description: The number of requests served over TLS v1.2. - type: integer - TLSv1.3: - description: The number of requests served over TLS v1.3. - type: integer - none: - description: The number of requests served over HTTP. - type: integer - type: object - uncached: - description: >- - The number of bytes that were fetched and served from the origin - server. - type: integer - type: object - zoneAnalyticsApiBandwidthByColo: - description: Breakdown of totals for bandwidth in the form of bytes. - properties: - all: - description: The total number of bytes served within the time frame. - type: integer - cached: - description: The number of bytes that were cached (and served) by Cloudflare. - type: integer - uncached: - description: >- - The number of bytes that were fetched and served from the origin - server. - type: integer - type: object - zoneAnalyticsApiColoResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/zoneAnalyticsApiMessages' - messages: - $ref: '#/components/schemas/zoneAnalyticsApiMessages' - result: - $ref: '#/components/schemas/zoneAnalyticsApiDatacenters' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - query: - $ref: '#/components/schemas/zoneAnalyticsApiQueryResponse' - required: - - success - - errors - - messages - - result - zoneAnalyticsApiDashboard: - description: Totals and timeseries data. - properties: - timeseries: - $ref: '#/components/schemas/zoneAnalyticsApiTimeseries' - totals: - $ref: '#/components/schemas/zoneAnalyticsApiTotals' - title: Dashboard response - type: object - zoneAnalyticsApiDashboardResponse: - type: object - properties: - errors: - $ref: '#/components/schemas/zoneAnalyticsApiMessages' - messages: - $ref: '#/components/schemas/zoneAnalyticsApiMessages' - result: - $ref: '#/components/schemas/zoneAnalyticsApiDashboard' - success: - description: Whether the API call was successful - enum: - - true - example: true - type: boolean - query: - $ref: '#/components/schemas/zoneAnalyticsApiQueryResponse' - required: - - success - - errors - - messages - - result - zoneAnalyticsApiDatacenters: - description: >- - A breakdown of all dashboard analytics data by co-locations. This is - limited to Enterprise zones only. - items: - properties: - colo_id: - description: The airport code identifer for the co-location. - example: SFO - type: string - timeseries: - $ref: '#/components/schemas/zoneAnalyticsApiTimeseriesByColo' - totals: - $ref: '#/components/schemas/zoneAnalyticsApiTotalsByColo' - type: object - title: Analytics data by datacenter - type: array - zoneAnalyticsApiIdentifier: - description: Identifier - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - readOnly: true - type: string - zoneAnalyticsApiMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - zoneAnalyticsApiPageviews: - description: Breakdown of totals for pageviews. - properties: - all: - description: The total number of pageviews served within the time range. - type: integer - search_engine: - description: >- - A variable list of key/value pairs representing the search engine - and number of hits. - example: - baidubot: 1345 - bingbot: 5372 - googlebot: 35272 - pingdom: 13435 - type: object - type: object - zoneAnalyticsApiQueryResponse: - description: >- - The exact parameters/timestamps the analytics service used to return - data. - properties: - since: - $ref: '#/components/schemas/zoneAnalyticsApiSince' - time_delta: - description: >- - The amount of time (in minutes) that each data point in the - timeseries represents. The granularity of the time-series returned - (e.g. each bucket in the time series representing 1-minute vs 1-day) - is calculated by the API based on the time-range provided to the - API. - type: integer - until: - $ref: '#/components/schemas/zoneAnalyticsApiUntil' - readOnly: true - type: object - zoneAnalyticsApiRequests: - description: Breakdown of totals for requests. - properties: - all: - description: Total number of requests served. - type: integer - cached: - description: Total number of cached requests served. - type: integer - content_type: - description: >- - A variable list of key/value pairs where the key represents the type - of content served, and the value is the number of requests. - example: - css: 15343 - gif: 23178 - html: 1234213 - javascript: 318236 - jpeg: 1982048 - type: object - country: - description: >- - A variable list of key/value pairs where the key is a two-digit - country code and the value is the number of requests served to that - country. - example: - AG: 37298 - GI: 293846 - US: 4181364 - type: object - http_status: - description: >- - Key/value pairs where the key is a HTTP status code and the value is - the number of requests served with that code. - example: - '200': 13496983 - '301': 283 - '400': 187936 - '402': 1828 - '404': 1293 - type: object - ssl: - description: A break down of requests served over HTTPS. - properties: - encrypted: - description: The number of requests served over HTTPS. - type: integer - unencrypted: - description: The number of requests served over HTTP. - type: integer - type: object - ssl_protocols: - description: A breakdown of requests by their SSL protocol. - properties: - TLSv1: - description: The number of requests served over TLS v1.0. - type: integer - TLSv1.1: - description: The number of requests served over TLS v1.1. - type: integer - TLSv1.2: - description: The number of requests served over TLS v1.2. - type: integer - TLSv1.3: - description: The number of requests served over TLS v1.3. - type: integer - none: - description: The number of requests served over HTTP. - type: integer - type: object - uncached: - description: Total number of requests served from the origin. - type: integer - type: object - zoneAnalyticsApiRequestsByColo: - description: Breakdown of totals for requests. - properties: - all: - description: Total number of requests served. - type: integer - cached: - description: Total number of cached requests served. - type: integer - country: - description: >- - Key/value pairs where the key is a two-digit country code and the - value is the number of requests served to that country. - example: - AG: 37298 - GI: 293846 - US: 4181364 - type: object - http_status: - description: >- - A variable list of key/value pairs where the key is a HTTP status - code and the value is the number of requests with that code served. - example: - '200': 13496983 - '301': 283 - '400': 187936 - '402': 1828 - '404': 1293 - type: object - uncached: - description: Total number of requests served from the origin. - type: integer - type: object - zoneAnalyticsApiSince: - default: -10080 - description: >- - The (inclusive) beginning of the requested time frame. This value can be - a negative integer representing the number of minutes in the past - relative to time the request is made, or can be an absolute timestamp - that conforms to RFC 3339. At this point in time, it cannot exceed a - time in the past greater than one year. Ranges that the Cloudflare web - application provides will provide the following period length for each - point: - Last 60 minutes (from -59 to -1): 1 minute resolution - Last 7 - hours (from -419 to -60): 15 minutes resolution - Last 15 hours (from - -899 to -420): 30 minutes resolution - Last 72 hours (from -4320 to - -900): 1 hour resolution - Older than 3 days (-525600 to -4320): 1 day - resolution. - example: '2015-01-01T12:23:00Z' - type: string - zoneAnalyticsApiThreats: - description: Breakdown of totals for threats. - properties: - all: - description: >- - The total number of identifiable threats received over the time - frame. - type: integer - country: - description: >- - A list of key/value pairs where the key is a two-digit country code - and the value is the number of malicious requests received from that - country. - example: - AU: 91 - CN: 523423 - US: 123 - type: object - type: - description: >- - The list of key/value pairs where the key is a threat category and - the value is the number of requests. - example: - hot.ban.unknown: 5324 - macro.chl.captchaErr: 1341 - macro.chl.jschlErr: 5323 - user.ban.ip: 123 - type: object - type: object - zoneAnalyticsApiTimeseries: - description: >- - Time deltas containing metadata about each bucket of time. The number of - buckets (resolution) is determined by the amount of time between the - since and until parameters. - items: - properties: - bandwidth: - $ref: '#/components/schemas/zoneAnalyticsApiBandwidth' - pageviews: - $ref: '#/components/schemas/zoneAnalyticsApiPageviews' - requests: - $ref: '#/components/schemas/zoneAnalyticsApiRequests' - since: - $ref: '#/components/schemas/zoneAnalyticsApiSince' - threats: - $ref: '#/components/schemas/zoneAnalyticsApiThreats' - uniques: - $ref: '#/components/schemas/zoneAnalyticsApiUniques' - until: - $ref: '#/components/schemas/zoneAnalyticsApiUntil' - type: object - type: array - zoneAnalyticsApiTimeseriesByColo: - description: >- - Time deltas containing metadata about each bucket of time. The number of - buckets (resolution) is determined by the amount of time between the - since and until parameters. - items: - properties: - bandwidth: - $ref: '#/components/schemas/zoneAnalyticsApiBandwidthByColo' - requests: - $ref: '#/components/schemas/zoneAnalyticsApiRequestsByColo' - since: - $ref: '#/components/schemas/zoneAnalyticsApiSince' - threats: - $ref: '#/components/schemas/zoneAnalyticsApiThreats' - until: - $ref: '#/components/schemas/zoneAnalyticsApiUntil' - type: object - type: array - zoneAnalyticsApiTotals: - description: Breakdown of totals by data type. - properties: - bandwidth: - $ref: '#/components/schemas/zoneAnalyticsApiBandwidth' - pageviews: - $ref: '#/components/schemas/zoneAnalyticsApiPageviews' - requests: - $ref: '#/components/schemas/zoneAnalyticsApiRequests' - since: - $ref: '#/components/schemas/zoneAnalyticsApiSince' - threats: - $ref: '#/components/schemas/zoneAnalyticsApiThreats' - uniques: - $ref: '#/components/schemas/zoneAnalyticsApiUniques' - until: - $ref: '#/components/schemas/zoneAnalyticsApiUntil' - type: object - zoneAnalyticsApiTotalsByColo: - description: Breakdown of totals by data type. - properties: - bandwidth: - $ref: '#/components/schemas/zoneAnalyticsApiBandwidthByColo' - requests: - $ref: '#/components/schemas/zoneAnalyticsApiRequestsByColo' - since: - $ref: '#/components/schemas/zoneAnalyticsApiSince' - threats: - $ref: '#/components/schemas/zoneAnalyticsApiThreats' - until: - $ref: '#/components/schemas/zoneAnalyticsApiUntil' - type: object - zoneAnalyticsApiUniques: - properties: - all: - description: Total number of unique IP addresses within the time range. - type: integer - type: object - zoneAnalyticsApiUntil: - default: 0 - description: >- - The (exclusive) end of the requested time frame. This value can be a - negative integer representing the number of minutes in the past relative - to time the request is made, or can be an absolute timestamp that - conforms to RFC 3339. If omitted, the time of the request is used. - example: '2015-01-02T12:23:00Z' - type: string - zoneHold: - properties: - hold: - example: true - type: boolean - hold_after: - example: '2023-01-31T15:56:36+00:00' - type: string - include_subdomains: - type: string - type: object - zones0rttValue: - default: 'off' - description: Value of the 0-RTT setting. - enum: - - 'on' - - 'off' - type: string - zonesApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/zonesMessages' - messages: - example: [] - $ref: '#/components/schemas/zonesMessages' - result: - nullable: true - type: object - success: - description: Whether the API call was successful. - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - zonesApiResponseSingleId: - type: object - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - success: - description: Whether the API call was successful. - example: true - type: boolean - result: - nullable: true - properties: - id: - $ref: '#/components/schemas/zonesIdentifier' - required: - - id - type: object - required: - - success - - errors - - messages - zonesComponentsSchemasApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/zonesMessages' - messages: - example: [] - $ref: '#/components/schemas/zonesMessages' - result: - nullable: true - type: object - success: - description: Whether the API call was successful - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - zonesIdentifier: - description: Identifier - example: 023e105f4ecef8ad9ca31a8372d0c353 - maxLength: 32 - type: string - zonesMessages: - example: [] - items: - $ref: '#/components/schemas/responseInfo' - type: array - zonesMultipleSettings: - items: - type: object - title: 0-RTT Value - description: 0-RTT session resumption enabled for this zone. - properties: - editable: - default: true - description: >- - Whether or not this setting can be modified for this zone (based - on your Cloudflare plan level). - enum: - - true - - false - readOnly: true - type: boolean - id: - description: ID of the zone setting. - example: 0rtt - type: string - enum: - - 0rtt - modified_on: - description: last time this setting was modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - nullable: true - readOnly: true - type: string - value: - description: Current value of the zone setting. - example: 'on' - $ref: '#/components/schemas/zones0rttValue' - time_remaining: - description: >- - Value of the zone setting. Notes: The interval (in seconds) from - when development mode expires (positive integer) or last expired - (negative integer) for the domain. If development mode has never - been enabled, this value is false. - example: 3600 - readOnly: true - type: number - enabled: - $ref: '#/components/schemas/zonesSslRecommenderEnabled' - required: - - id - type: array - zonesName: - description: >- - The domain name. Per [RFC - 1035](https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4) the - overall zone name can be up to 253 characters, with each segment - ("label") not exceeding 63 characters. - example: example.com - maxLength: 253 - type: string - zonesPaused: - default: false - description: >- - Indicates whether the zone is only using Cloudflare DNS services. A true - value means the zone will not receive security or performance benefits. - type: boolean - zonesResultInfo: - properties: - count: - description: Total number of results for the requested service. - example: 1 - type: number - page: - description: Current page within paginated list of results. - example: 1 - type: number - per_page: - description: Number of results per page of results. - example: 20 - type: number - total_count: - description: Total results available without any search parameters. - example: 2000 - type: number - total_pages: - description: Total number of pages - example: 100 - type: number - type: object - zonesSchemasApiResponseCommonFailure: - properties: - errors: - example: - - code: 7003 - message: No route for the URI - minLength: 1 - $ref: '#/components/schemas/zonesSchemasMessages' - messages: - example: [] - $ref: '#/components/schemas/zonesSchemasMessages' - result: - enum: - - null - nullable: true - type: object - success: - description: Whether the API call was successful. - enum: - - false - example: false - type: boolean - required: - - success - - errors - - messages - - result - type: object - zonesSchemasMessages: - example: [] - items: - properties: - code: - minimum: 1000 - type: integer - documentation_url: - type: string - message: - type: string - source: - properties: - pointer: - type: string - type: object - required: - - code - - message - type: object - uniqueItems: true - type: array - zonesSetting: - type: object - title: 0-RTT Value - description: 0-RTT session resumption enabled for this zone. - properties: - editable: - default: true - description: >- - Whether or not this setting can be modified for this zone (based on - your Cloudflare plan level). - enum: - - true - - false - readOnly: true - type: boolean - id: - description: ID of the zone setting. - example: 0rtt - type: string - enum: - - 0rtt - modified_on: - description: last time this setting was modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - nullable: true - readOnly: true - type: string - value: - description: Current value of the zone setting. - example: 'on' - $ref: '#/components/schemas/zones0rttValue' - time_remaining: - description: >- - Value of the zone setting. Notes: The interval (in seconds) from - when development mode expires (positive integer) or last expired - (negative integer) for the domain. If development mode has never - been enabled, this value is false. - example: 3600 - readOnly: true - type: number - enabled: - $ref: '#/components/schemas/zonesSslRecommenderEnabled' - required: - - id - zonesSettingName: - description: Setting name - example: always_online - type: string - zonesSettingValue: - type: string - description: Value of the 0-RTT setting. - default: 'off' - enum: - - 'on' - - 'off' - properties: - enabled: - description: Whether the feature is enabled or not. - type: boolean - x-auditable: true - pool_id: - description: >- - Egress pool id which refers to a grouping of dedicated egress IPs - through which Cloudflare will connect to origin. - example: pool-id - type: string - x-auditable: true - cache_by_device_type: - description: >- - Indicates whether or not [cache by device - type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) - is enabled. - example: false - type: boolean - cf: - default: false - description: Indicates whether or not Cloudflare proxy is enabled. - example: true - type: boolean - hostnames: - description: >- - An array of hostnames where Automatic Platform Optimization for - WordPress is activated. - example: - - www.example.com - - example.com - - shop.example.com - items: - format: hostname - type: string - type: array - wordpress: - default: false - description: Indicates whether or not site is powered by WordPress. - example: true - type: boolean - wp_plugin: - default: false - description: >- - Indicates whether or not [Cloudflare for WordPress - plugin](https://wordpress.org/plugins/cloudflare/) is installed. - example: true - type: boolean - strict_transport_security: - description: Strict Transport Security. - properties: - enabled: - description: Whether or not strict transport security is enabled. - example: true - type: boolean - include_subdomains: - description: Include all subdomains for strict transport security. - example: true - type: boolean - max_age: - description: Max age in seconds of the strict transport security. - example: 86400 - type: number - nosniff: - description: >- - Whether or not to include 'X-Content-Type-Options: nosniff' - header. - example: true - type: boolean - preload: - description: Enable automatic preload of the HSTS configuration. - example: true - type: boolean - type: object - example: - - ECDHE-RSA-AES128-GCM-SHA256 - - AES128-SHA - items: - type: string - required: - - cache_by_device_type - - wp_plugin - - wordpress - - hostnames - - enabled - - cf - zonesSslRecommenderEnabled: - default: false - description: ssl-recommender enrollment setting. - type: boolean - zonesType: - default: full - description: >- - A full zone implies that DNS is hosted with Cloudflare. A partial zone - is typically a partner-hosted zone or a CNAME setup. - enum: - - full - - partial - - secondary - - internal - example: full - type: string - zonesVanityNameServers: - default: [] - description: >- - An array of domains used for custom name servers. This is only available - for Business and Enterprise plans. - example: - - ns1.example.com - - ns2.example.com - items: - format: hostname - maxLength: 253 - type: string - type: array - zonesZone: - properties: - account: - description: The account the zone belongs to. - properties: - id: - $ref: '#/components/schemas/zonesIdentifier' - name: - description: The name of the account. - example: Example Account Name - type: string - type: object - activated_on: - description: >- - The last time proof of ownership was detected and the zone was made - active. - example: '2014-01-02T00:01:00.12345Z' - format: date-time - nullable: true - readOnly: true - type: string - cname_suffix: - description: >- - Allows the customer to use a custom apex. *Tenants Only - Configuration*. - example: cdn.cloudflare.com - type: string - created_on: - description: When the zone was created. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - development_mode: - description: >- - The interval (in seconds) from when development mode expires - (positive integer) or last expired (negative integer) for the - domain. If development mode has never been enabled, this value is 0. - example: 7200 - readOnly: true - type: number - id: - $ref: '#/components/schemas/zonesIdentifier' - meta: - description: Metadata about the zone. - properties: - cdn_only: - description: The zone is only configured for CDN. - example: true - type: boolean - custom_certificate_quota: - description: Number of Custom Certificates the zone can have. - example: 1 - type: integer - dns_only: - description: The zone is only configured for DNS. - example: true - type: boolean - foundation_dns: - description: The zone is setup with Foundation DNS. - example: true - type: boolean - page_rule_quota: - description: Number of Page Rules a zone can have. - example: 100 - type: integer - phishing_detected: - description: The zone has been flagged for phishing. - example: false - type: boolean - step: - example: 2 - type: integer - type: object - modified_on: - description: When the zone was last modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - readOnly: true - type: string - name: - description: >- - The domain name. Per [RFC - 1035](https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4) - the overall zone name can be up to 253 characters, with each segment - ("label") not exceeding 63 characters. - example: example.com - maxLength: 253 - type: string - name_servers: - description: The name servers Cloudflare assigns to a zone. - example: - - bob.ns.cloudflare.com - - lola.ns.cloudflare.com - items: - format: hostname - type: string - readOnly: true - type: array - original_dnshost: - description: DNS host at the time of switching to Cloudflare. - example: NameCheap - maxLength: 50 - nullable: true - readOnly: true - type: string - original_name_servers: - description: Original name servers before moving to Cloudflare. - example: - - ns1.originaldnshost.com - - ns2.originaldnshost.com - items: - format: hostname - type: string - nullable: true - readOnly: true - type: array - original_registrar: - description: Registrar for the domain at the time of switching to Cloudflare. - example: GoDaddy - nullable: true - readOnly: true - type: string - owner: - description: The owner of the zone. - properties: - id: - $ref: '#/components/schemas/zonesIdentifier' - name: - description: Name of the owner. - example: Example Org - type: string - type: - description: The type of owner. - example: organization - type: string - type: object - paused: - $ref: '#/components/schemas/zonesPaused' - permissions: - deprecated: true - description: Legacy permissions based on legacy user membership information. - items: - example: '#worker:read' - type: string - type: array - x-stainless-deprecation-message: This has been replaced by Account memberships. - plan: - deprecated: true - description: A Zones subscription information. - properties: - can_subscribe: - description: States if the subscription can be activated. - example: false - type: boolean - currency: - description: The denomination of the customer. - example: USD - type: string - externally_managed: - description: If this Zone is managed by another company. - example: false - type: boolean - frequency: - description: How often the customer is billed. - example: monthly - type: string - id: - $ref: '#/components/schemas/zonesIdentifier' - is_subscribed: - description: States if the subscription active. - example: false - type: boolean - legacy_discount: - description: If the legacy discount applies to this Zone. - example: false - type: boolean - legacy_id: - description: The legacy name of the plan. - example: free - type: string - name: - description: Name of the owner. - example: Example Org - type: string - price: - description: How much the customer is paying. - example: 10.99 - type: number - x-stainless-deprecation-message: >- - Please use the `/zones/{zone_id}/subscription` API - - to update a zone's plan. Changing this value will create/cancel - - associated subscriptions. To view available plans for this zone, - - see [Zone - Plans](https://developers.cloudflare.com/api/resources/zones/subresources/plans/). - type: object - status: - description: The zone status on Cloudflare. - enum: - - initializing - - pending - - active - - moved - example: active - readOnly: true - type: string - tenant: - description: >- - The root organizational unit that this zone belongs to (such as a - tenant or organization). - properties: - id: - $ref: '#/components/schemas/zonesIdentifier' - name: - description: The name of the Tenant account. - example: Example Account Name - type: string - type: object - tenant_unit: - description: >- - The immediate parent organizational unit that this zone belongs to - (such as under a tenant or sub-organization). - properties: - id: - $ref: '#/components/schemas/zonesIdentifier' - type: object - type: - $ref: '#/components/schemas/zonesType' - vanity_name_servers: - default: [] - description: >- - An array of domains used for custom name servers. This is only - available for Business and Enterprise plans. - example: - - ns1.example.com - - ns2.example.com - items: - format: hostname - maxLength: 253 - type: string - type: array - verification_key: - description: Verification key for partial zone setup. - example: 284344499-1084221259 - readOnly: true - type: string - required: - - id - - name - - development_mode - - owner - - account - - meta - - name_servers - - original_name_servers - - original_registrar - - original_dnshost - - created_on - - modified_on - - activated_on - - plan - type: object - zonesZoneSettingsResponseCollection: - properties: - errors: - $ref: '#/components/schemas/zonesMessages' - messages: - $ref: '#/components/schemas/zonesMessages' - success: - description: Whether the API call was successful - example: true - type: boolean - result: - items: - $ref: >- - #/components/schemas/zonesZoneSettingsResponseCollection_result_item - type: array - required: - - success - - errors - - messages - type: object - zonesZoneSettingsResponseCollection_result_item: - type: object - title: 0-RTT Value - description: 0-RTT session resumption enabled for this zone. - properties: - editable: - default: true - description: >- - Whether or not this setting can be modified for this zone (based on - your Cloudflare plan level). - enum: - - true - - false - readOnly: true - type: boolean - id: - description: ID of the zone setting. - example: 0rtt - type: string - enum: - - 0rtt - modified_on: - description: last time this setting was modified. - example: '2014-01-01T05:20:00.12345Z' - format: date-time - nullable: true - readOnly: true - type: string - value: - description: Current value of the zone setting. - example: 'on' - $ref: '#/components/schemas/zones0rttValue' - time_remaining: - description: >- - Value of the zone setting. Notes: The interval (in seconds) from - when development mode expires (positive integer) or last expired - (negative integer) for the domain. If development mode has never - been enabled, this value is false. - example: 3600 - readOnly: true - type: number - enabled: - $ref: '#/components/schemas/zonesSslRecommenderEnabled' - required: - - id - zonesZoneSettingsSingleRequest: - type: object - properties: - enabled: - $ref: '#/components/schemas/zonesSslRecommenderEnabled' - value: - $ref: '#/components/schemas/zonesSettingValue' - securitySchemes: - api_email: - in: header - name: X-Auth-Email - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API, used in conjunction with a Global API key. - api_key: - in: header - name: X-Auth-Key - type: apiKey - description: >- - The previous authorization scheme for interacting with the Cloudflare - API. When possible, use API tokens instead of Global API keys. - api_token: - scheme: bearer - type: http - description: >- - The preferred authorization scheme for interacting with the Cloudflare - API. [Create a - token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). - user_service_key: - in: header - name: X-Auth-User-Service-Key - type: apiKey - description: >- - Used when interacting with the Origin CA certificates API. [View/change - your - key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). - x-stackQL-resources: - zones: - id: cloudflare.zones.zones - name: zones - title: Zones - methods: - list: - operation: - $ref: '#/paths/~1zones/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones/post' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - trigger_activation_check: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1activation_check/put' - response: - mediaType: application/json - openAPIDocKey: '200' - update_custom_ns: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1custom_ns/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/zones/methods/get' - - $ref: '#/components/x-stackQL-resources/zones/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/zones/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/zones/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/zones/methods/delete' - replace: [] - analytics_colos: - id: cloudflare.zones.analytics_colos - name: analytics_colos - title: Analytics Colos - methods: - list_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_identifier}~1analytics~1colos/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/analytics_colos/methods/list_by_zone - insert: [] - update: [] - delete: [] - replace: [] - dashboard: - id: cloudflare.zones.dashboard - name: dashboard - title: Dashboard - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_identifier}~1analytics~1dashboard/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/dashboard/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - latency: - id: cloudflare.zones.latency - name: latency - title: Latency - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1analytics~1latency/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/latency/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - latency_colos: - id: cloudflare.zones.latency_colos - name: latency_colos - title: Latency Colos - methods: - list_by_zone: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1analytics~1latency~1colos/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/latency_colos/methods/list_by_zone - insert: [] - update: [] - delete: [] - replace: [] - plans: - id: cloudflare.zones.plans - name: plans - title: Plans - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1available_plans/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1available_plans~1{plan_identifier}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/plans/methods/get' - - $ref: '#/components/x-stackQL-resources/plans/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - rate_plans: - id: cloudflare.zones.rate_plans - name: rate_plans - title: Rate Plans - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1available_rate_plans/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rate_plans/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - custom_nameservers: - id: cloudflare.zones.custom_nameservers - name: custom_nameservers - title: Custom Nameservers - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1custom_ns/get' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/custom_nameservers/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - environments: - id: cloudflare.zones.environments - name: environments - title: Environments - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1environments/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.environments - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1environments/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1environments/post' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1environments/put' - response: - mediaType: application/json - openAPIDocKey: '200' - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1environments~1{environment_id}/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - rollback: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1environments~1{environment_id}~1rollback/post - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/environments/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/environments/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/environments/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/environments/methods/delete' - replace: - - $ref: '#/components/x-stackQL-resources/environments/methods/update' - custom_topics: - id: cloudflare.zones.custom_topics - name: custom_topics - title: Custom Topics - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall-for-ai~1custom-topics/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result.topics - firewall_for_ai_custom_topics_put: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall-for-ai~1custom-topics/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/custom_topics/methods/list' - insert: [] - update: [] - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/custom_topics/methods/firewall_for_ai_custom_topics_put - firewall_for_ai_settings: - id: cloudflare.zones.firewall_for_ai_settings - name: firewall_for_ai_settings - title: Firewall For Ai Settings - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall-for-ai~1settings/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/firewall_for_ai_settings/methods/list - insert: [] - update: [] - delete: [] - replace: [] - settings: - id: cloudflare.zones.settings - name: settings - title: Settings - methods: - firewall_for_ai_settings_put: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1firewall-for-ai~1settings/put' - response: - mediaType: application/json - openAPIDocKey: '200' - zone_settings_edit_zone_settings_info: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1{setting_id}/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1{setting_id}/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/settings/methods/get' - insert: [] - update: - - $ref: '#/components/x-stackQL-resources/settings/methods/edit' - - $ref: >- - #/components/x-stackQL-resources/settings/methods/zone_settings_edit_zone_settings_info - delete: [] - replace: - - $ref: >- - #/components/x-stackQL-resources/settings/methods/firewall_for_ai_settings_put - holds: - id: cloudflare.zones.holds - name: holds - title: Holds - methods: - delete: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1hold/delete' - response: - mediaType: application/json - openAPIDocKey: '200' - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1hold/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - edit: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1hold/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - create: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1hold/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/holds/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/holds/methods/create' - update: - - $ref: '#/components/x-stackQL-resources/holds/methods/edit' - delete: - - $ref: '#/components/x-stackQL-resources/holds/methods/delete' - replace: [] - zones_settings: - id: cloudflare.zones.zones_settings - name: zones_settings - title: Zones Settings - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/zones_settings/methods/list' - insert: [] - update: [] - delete: [] - replace: [] - aegis: - id: cloudflare.zones.aegis - name: aegis - title: Aegis - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1aegis/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - zone_cache_settings_change_aegis_setting: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1aegis/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/aegis/methods/list' - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/aegis/methods/zone_cache_settings_change_aegis_setting - delete: [] - replace: [] - fonts: - id: cloudflare.zones.fonts - name: fonts - title: Fonts - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1fonts/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - zone_settings_change_fonts_setting: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1fonts/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/fonts/methods/list' - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/fonts/methods/zone_settings_change_fonts_setting - delete: [] - replace: [] - origin_h2_max_streams: - id: cloudflare.zones.origin_h2_max_streams - name: origin_h2_max_streams - title: Origin H2 Max Streams - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1origin_h2_max_streams/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - zone_cache_settings_change_origin_h2_max_streams_setting: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1origin_h2_max_streams/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/origin_h2_max_streams/methods/list - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/origin_h2_max_streams/methods/zone_cache_settings_change_origin_h2_max_streams_setting - delete: [] - replace: [] - origin_max_http_version: - id: cloudflare.zones.origin_max_http_version - name: origin_max_http_version - title: Origin Max Http Version - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1origin_max_http_version/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - zone_cache_settings_change_origin_max_http_version_setting: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1settings~1origin_max_http_version/patch - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: >- - #/components/x-stackQL-resources/origin_max_http_version/methods/list - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/origin_max_http_version/methods/zone_cache_settings_change_origin_max_http_version_setting - delete: [] - replace: [] - rum: - id: cloudflare.zones.rum - name: rum - title: Rum - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1rum/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - web_analytics_toggle_rum: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1rum/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/rum/methods/list' - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/rum/methods/web_analytics_toggle_rum - delete: [] - replace: [] - speed_brain: - id: cloudflare.zones.speed_brain - name: speed_brain - title: Speed Brain - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1speed_brain/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - zone_settings_change_speed_brain_setting: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1speed_brain/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/speed_brain/methods/list' - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/speed_brain/methods/zone_settings_change_speed_brain_setting - delete: [] - replace: [] - ssl_automatic_mode: - id: cloudflare.zones.ssl_automatic_mode - name: ssl_automatic_mode - title: Ssl Automatic Mode - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1ssl_automatic_mode/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - ssl_detector_automatic_mode_patch_enrollment: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1settings~1ssl_automatic_mode/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/ssl_automatic_mode/methods/list' - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/ssl_automatic_mode/methods/ssl_detector_automatic_mode_patch_enrollment - delete: [] - replace: [] - smart_shield: - id: cloudflare.zones.smart_shield - name: smart_shield - title: Smart Shield - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1smart_shield/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - smart_shield_patch_settings: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1smart_shield/patch' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/smart_shield/methods/list' - insert: [] - update: - - $ref: >- - #/components/x-stackQL-resources/smart_shield/methods/smart_shield_patch_settings - delete: [] - replace: [] - cache_reserve_clear: - id: cloudflare.zones.cache_reserve_clear - name: cache_reserve_clear - title: Cache Reserve Clear - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1cache_reserve_clear/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - smart_shield_settings_start_cache_reserve_clear: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1cache_reserve_clear/post' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/cache_reserve_clear/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/cache_reserve_clear/methods/smart_shield_settings_start_cache_reserve_clear - update: [] - delete: [] - replace: [] - healthchecks: - id: cloudflare.zones.healthchecks - name: healthchecks - title: Healthchecks - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - smart_shield_create_health_check: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks/post' - response: - mediaType: application/json - openAPIDocKey: '200' - smart_shield_delete_health_check: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks~1{healthcheck_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks~1{healthcheck_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - smart_shield_patch_health_check: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks~1{healthcheck_id}/patch - response: - mediaType: application/json - openAPIDocKey: '200' - smart_shield_update_health_check: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks~1{healthcheck_id}/put - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/healthchecks/methods/get' - - $ref: '#/components/x-stackQL-resources/healthchecks/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/healthchecks/methods/smart_shield_create_health_check - update: - - $ref: >- - #/components/x-stackQL-resources/healthchecks/methods/smart_shield_patch_health_check - delete: - - $ref: >- - #/components/x-stackQL-resources/healthchecks/methods/smart_shield_delete_health_check - replace: - - $ref: >- - #/components/x-stackQL-resources/healthchecks/methods/smart_shield_update_health_check - subscriptions: - id: cloudflare.zones.subscriptions - name: subscriptions - title: Subscriptions - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1subscription/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - create: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1subscription/post' - response: - mediaType: application/json - openAPIDocKey: '200' - update: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1subscription/put' - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/list' - insert: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/create' - update: [] - delete: [] - replace: - - $ref: '#/components/x-stackQL-resources/subscriptions/methods/update' - suppression: - id: cloudflare.zones.suppression - name: suppression - title: Suppression - methods: - list: - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1suppression/get' - response: - mediaType: application/json - openAPIDocKey: '200' - objectKey: $.result - post_zones_zone_id_email_sending_suppression: - config: - requestBodyTranslate: - algorithm: naive - operation: - $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1suppression/post' - response: - mediaType: application/json - openAPIDocKey: '200' - get: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1sending~1suppression~1{suppression_id}/get - response: - mediaType: application/json - openAPIDocKey: '200' - delete_zones_zone_id_email_sending_suppression_suppression_id: - operation: - $ref: >- - #/paths/~1zones~1{zone_id}~1email~1sending~1suppression~1{suppression_id}/delete - response: - mediaType: application/json - openAPIDocKey: '200' - sqlVerbs: - select: - - $ref: '#/components/x-stackQL-resources/suppression/methods/get' - - $ref: '#/components/x-stackQL-resources/suppression/methods/list' - insert: - - $ref: >- - #/components/x-stackQL-resources/suppression/methods/post_zones_zone_id_email_sending_suppression - update: [] - delete: - - $ref: >- - #/components/x-stackQL-resources/suppression/methods/delete_zones_zone_id_email_sending_suppression_suppression_id - replace: [] +openapi: 3.0.3 +info: + title: zones API + description: Welcome to Cloudflare's API documentation site. We are experimenting with an updated version of our API documentation - check out [developers.cloudflare.com/api-next/](https://developers.cloudflare.com/api-next/) to test out the new experience. To get started using Cloudflare's products and services via the API, refer to [how to interact with Cloudflare](https://developers.cloudflare.com/fundamentals/basic-tasks/interact-with-cloudflare/), which covers using tools like [Terraform](https://developers.cloudflare.com/terraform/#cloudflare-terraform) and the [official SDKs](https://developers.cloudflare.com/fundamentals/api/reference/sdks/) to maintain your Cloudflare resources. Using the Cloudflare API requires authentication so that Cloudflare knows who is making requests and what permissions you have. Create an API token to grant access to the API to perform actions. You can also authenticate with [API keys](https://developers.cloudflare.com/fundamentals/api/get-started/keys/), + but these keys have [several limitations](https://developers.cloudflare.com/fundamentals/api/get-started/keys/#limitations) that make them less secure than API tokens. Whenever possible, use API tokens to interact with the Cloudflare API. To create an API token, from the Cloudflare dashboard, go to My Profile > API Tokens and select Create Token. For more information on how to create and troubleshoot API tokens, refer to our [API fundamentals](https://developers.cloudflare.com/fundamentals/api/). For information regarding rate limits, refer to our [API Rate Limits](https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/platform/limits/#api-rate-limits). Totally new to Cloudflare? [Start here](https://developers.cloudflare.com/fundamentals/get-started/). + version: 4.0.0 + contact: + name: Cloudflare + url: https://www.cloudflare.com +servers: +- url: https://api.cloudflare.com/client/v4 +security: +- api_token: [] +paths: + /zones: + get: + description: Lists, searches, sorts, and filters your zones. Listing zones across more than 500 accounts is currently not allowed. + operationId: zones-get + parameters: + - in: query + name: name + schema: + description: 'A domain name. Optional filter operators can be provided to extend refine the search: * `equal` (default) * `not_equal` * `starts_with` * `ends_with` * `contains` * `starts_with_case_sensitive` * `ends_with_case_sensitive` * `contains_case_sensitive`' + maxLength: 253 + type: string + - in: query + name: status + schema: + description: Specify a zone status to filter by. + enum: + - initializing + - pending + - active + - moved + type: string + - in: query + name: account.id + schema: + description: Filter by an account ID. + type: string + - in: query + name: account.name + schema: + description: 'An account Name. Optional filter operators can be provided to extend refine the search: * `equal` (default) * `not_equal` * `starts_with` * `ends_with` * `contains` * `starts_with_case_sensitive` * `ends_with_case_sensitive` * `contains_case_sensitive`' + maxLength: 253 + type: string + - in: query + name: page + schema: + default: 1 + description: Page number of paginated results. + minimum: 1 + type: number + - in: query + name: per_page + schema: + default: 20 + description: Number of zones per page. + maximum: 50 + minimum: 5 + type: number + - in: query + name: order + schema: + description: Field to order zones by. + enum: + - name + - status + - account.id + - account.name + - plan.id + type: string + - in: query + name: direction + schema: + description: Direction to order zones. + enum: + - asc + - desc + type: string + - in: query + name: match + schema: + default: all + description: Whether to match all search requirements or at least one (any). + enum: + - any + - all + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + success: + description: Whether the API call was successful. + type: boolean + result_info: + $ref: '#/components/schemas/zonesResultInfo' + result: + items: + $ref: '#/components/schemas/zonesZone' + type: array + required: + - success + - errors + - messages + type: object + description: List Zones response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesApiResponseCommonFailure' + description: List Zones response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Zones + tags: + - Zone + x-api-token-group: + - Zone Zone Read + x-stackql-sdk: + service: zones + resource_chain: [] + method: list + post: + operationId: zones-post + requestBody: + content: + application/json: + schema: + properties: + account: + properties: + id: + $ref: '#/components/schemas/zonesIdentifier' + type: object + name: + $ref: '#/components/schemas/zonesName' + type: + $ref: '#/components/schemas/zonesType' + required: + - name + - account + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + success: + description: Whether the API call was successful. + type: boolean + result: + $ref: '#/components/schemas/zonesZone' + required: + - success + - errors + - messages + type: object + description: Create Zone response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesApiResponseCommonFailure' + description: Create Zone response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Zone + tags: + - Zone + x-api-token-group: + - Zone Zone Edit + - Zone DNS Edit + x-stackql-sdk: + service: zones + resource_chain: [] + method: create + /zones/{zone_id}: + delete: + description: Deletes an existing zone. + operationId: zones-0-delete + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zonesApiResponseSingleId' + description: Delete Zone response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesApiResponseCommonFailure' + description: Delete Zone response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Zone + tags: + - Zone + x-api-token-group: + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: zones + resource_chain: [] + method: delete + get: + operationId: zones-0-get + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + success: + description: Whether the API call was successful. + type: boolean + result: + $ref: '#/components/schemas/zonesZone' + required: + - success + - errors + - messages + type: object + description: Zone Details response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesApiResponseCommonFailure' + description: Zone Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Zone Details + tags: + - Zone + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + - 'Zero Trust: PII Read' + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + - 'Access: Apps and Policies Revoke' + - 'Access: Apps and Policies Write' + - 'Access: Apps and Policies Read' + - 'Access: Apps and Policies Revoke' + - 'Access: Mutual TLS Certificates Write' + - 'Access: Organizations, Identity Providers, and Groups Write' + - Zone Settings Write + - Zone Settings Read + - Zone Read + - DNS Read + - Workers Scripts Write + - Workers Scripts Read + - Zone Write + - Workers Routes Write + - Workers Routes Read + - Stream Write + - Stream Read + - SSL and Certificates Write + - SSL and Certificates Read + - Logs Write + - Logs Read + - Cache Purge + - Page Rules Write + - Page Rules Read + - Load Balancers Write + - Load Balancers Read + - Firewall Services Write + - Firewall Services Read + - DNS Write + - Apps Write + - Analytics Read + - 'Access: Apps and Policies Write' + - 'Access: Apps and Policies Read' + x-cfPermissionsRequired: + enum: + - '#zone:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: zones + resource_chain: [] + method: get + patch: + description: Edits a zone. Only one zone property can be changed at a time. + operationId: zones-0-patch + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + paused: + $ref: '#/components/schemas/zonesPaused' + type: + description: A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. This parameter is only available to Enterprise customers or if it has been explicitly enabled on a zone. + enum: + - full + - partial + - secondary + - internal + type: string + vanity_name_servers: + $ref: '#/components/schemas/zonesVanityNameServers' + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + success: + description: Whether the API call was successful. + type: boolean + result: + $ref: '#/components/schemas/zonesZone' + required: + - success + - errors + - messages + type: object + description: Edit Zone response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesApiResponseCommonFailure' + description: Edit Zone response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit Zone + tags: + - Zone + x-api-token-group: + - Zone Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: zones + resource_chain: [] + method: edit + /zones/{zone_id}/activation_check: + put: + description: Triggeres a new activation check for a PENDING Zone. This can be triggered every 5 min for paygo/ent customers, every hour for FREE Zones. + operationId: put-zones-zone_id-activation_check + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/zoneActivationMessages' + messages: + $ref: '#/components/schemas/zoneActivationMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + id: + $ref: '#/components/schemas/zoneActivationIdentifier' + type: object + required: + - success + - errors + - messages + description: Successful Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zoneActivationApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Rerun the Activation Check + tags: + - Zone + x-api-token-group: + - Zone Write + x-stackql-sdk: + service: zones + resource_chain: + - activation_check + method: trigger + /zones/{zone_id}/analytics/latency: + get: + description: Retrieves aggregate Argo Smart Routing analytics for a zone, including latency improvements, bandwidth savings, and routing statistics. + operationId: argo-analytics-for-zone-argo-analytics-for-a-zone + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: bins + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/argoAnalyticsResponseSingle' + description: Argo Analytics for a zone response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/argoAnalyticsMessages' + messages: + $ref: '#/components/schemas/argoAnalyticsMessages' + result: + type: object + enum: + - null + nullable: true + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Argo Analytics for a zone response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Argo Analytics for a zone + tags: + - Argo Analytics for Zone + x-api-token-group: + - Analytics Read + x-cfPermissionsRequired: + enum: + - '#analytics:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/analytics/latency/colos: + get: + description: Retrieves Argo Smart Routing analytics broken down by geographic points of presence (PoPs). Shows latency improvements and routing efficiency per location. + operationId: argo-analytics-for-geolocation-argo-analytics-for-a-zone-at-different-po-ps + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/argoAnalyticsResponseSingle' + description: Argo Analytics for a zone at different PoPs response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/argoAnalyticsMessages' + messages: + $ref: '#/components/schemas/argoAnalyticsMessages' + result: + type: object + enum: + - null + nullable: true + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Argo Analytics for a zone at different PoPs response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Argo Analytics for a zone at different PoPs + tags: + - Argo Analytics for Geolocation + x-api-token-group: + - Analytics Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/available_plans: + get: + description: Lists available plans the zone can subscribe to. + operationId: zone-rate-plan-list-available-plans + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + items: + $ref: '#/components/schemas/billSubsApiAvailableRatePlan' + nullable: true + type: array + success: + description: Whether the API call was successful + enum: + - true + type: boolean + result_info: + $ref: '#/components/schemas/billSubsApiResultInfo' + required: + - success + - errors + - messages + - result + description: List Available Plans response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + items: + $ref: '#/components/schemas/billSubsApiAvailableRatePlan' + nullable: true + type: array + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/billSubsApiResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Available Plans response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Available Plans + tags: + - Zone Rate Plan + x-api-token-group: + - Billing Write + - Billing Read + x-cfPermissionsRequired: + enum: + - '#billing:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: zones + resource_chain: + - plans + method: list + /zones/{zone_id}/available_plans/{plan_identifier}: + get: + description: Details of the available plan that the zone can subscribe to. + operationId: zone-rate-plan-available-plan-details + parameters: + - in: path + name: plan_identifier + schema: + $ref: '#/components/schemas/billSubsApiIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + $ref: '#/components/schemas/billSubsApiAvailableRatePlan' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Available Plan Details response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + properties: + can_subscribe: + $ref: '#/components/schemas/billSubsApiCanSubscribe' + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + externally_managed: + $ref: '#/components/schemas/billSubsApiExternallyManaged' + frequency: + $ref: '#/components/schemas/billSubsApiSchemasFrequency' + id: + $ref: '#/components/schemas/billSubsApiIdentifier' + is_subscribed: + $ref: '#/components/schemas/billSubsApiIsSubscribed' + legacy_discount: + $ref: '#/components/schemas/billSubsApiLegacyDiscount' + legacy_id: + $ref: '#/components/schemas/billSubsApiLegacyId' + name: + $ref: '#/components/schemas/billSubsApiSchemasName' + price: + $ref: '#/components/schemas/billSubsApiSchemasPrice' + type: object + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Available Plan Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Available Plan Details + tags: + - Zone Rate Plan + x-api-token-group: + - Billing Write + - Billing Read + x-cfPermissionsRequired: + enum: + - '#billing:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: zones + resource_chain: + - plans + method: get + /zones/{zone_id}/available_rate_plans: + get: + description: Lists all rate plans the zone can subscribe to. + operationId: zone-rate-plan-list-available-rate-plans + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiPlanResponseCollection' + description: List Available Rate Plans response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + items: + $ref: '#/components/schemas/billSubsApiSchemasRatePlan' + nullable: true + type: array + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/billSubsApiResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Available Rate Plans response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Available Rate Plans + tags: + - Zone Rate Plan + x-api-token-group: + - Billing Write + - Billing Read + x-cfPermissionsRequired: + enum: + - '#billing:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: zones + resource_chain: + - rate_plans + method: get + /zones/{zone_id}/custom_ns: + get: + deprecated: true + description: Get metadata for account-level custom nameservers on a zone. Deprecated in favor of [Show DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-a-zone-list-dns-settings). + operationId: account-level-custom-nameservers-usage-for-a-zone-get-account-custom-nameserver-related-zone-metadata + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/dnsCustomNameserversGetResponse' + description: Get Account Custom Nameserver Related Zone Metadata response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/dnsCustomNameserversMessages' + messages: + $ref: '#/components/schemas/dnsCustomNameserversMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + type: object + enabled: + description: Whether zone uses account-level custom nameservers. + type: boolean + x-auditable: true + ns_set: + default: 1 + description: The number of the name server set to assign to the zone. + maximum: 5 + minimum: 1 + type: number + x-auditable: true + result: + enum: + - null + nullable: true + type: object + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Get Account Custom Nameserver Related Zone Metadata response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Account Custom Nameserver Related Zone Metadata + tags: + - Account-Level Custom Nameservers Usage for a Zone + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + - 'Zero Trust: PII Read' + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + - 'Access: Apps and Policies Revoke' + - 'Access: Apps and Policies Write' + - 'Access: Apps and Policies Read' + - 'Access: Apps and Policies Revoke' + - 'Access: Mutual TLS Certificates Write' + - 'Access: Organizations, Identity Providers, and Groups Write' + - Zone Settings Write + - Zone Settings Read + - Zone Read + - DNS Read + - Workers Scripts Write + - Workers Scripts Read + - Zone Write + - Workers Routes Write + - Workers Routes Read + - Stream Write + - Stream Read + - SSL and Certificates Write + - SSL and Certificates Read + - Logs Write + - Logs Read + - Cache Purge + - Page Rules Write + - Page Rules Read + - Load Balancers Write + - Load Balancers Read + - Firewall Services Write + - Firewall Services Read + - DNS Write + - Apps Write + - Analytics Read + - 'Access: Apps and Policies Write' + - 'Access: Apps and Policies Read' + x-cfPermissionsRequired: + enum: + - '#zone:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: zones + resource_chain: + - custom_nameservers + method: update + put: + deprecated: true + description: Set metadata for account-level custom nameservers on a zone. If you would like new zones in the account to use account custom nameservers by default, use PUT /accounts/:identifier to set the account setting use_account_custom_ns_by_default to true. Deprecated in favor of [Update DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-a-zone-update-dns-settings). + operationId: account-level-custom-nameservers-usage-for-a-zone-set-account-custom-nameserver-related-zone-metadata + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/dnsCustomNameserversZoneMetadata' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/dnsCustomNameserversSchemasEmptyResponse' + description: Set Account Custom Nameserver Related Zone Metadata response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/dnsCustomNameserversMessages' + messages: + $ref: '#/components/schemas/dnsCustomNameserversMessages' + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + type: number + page: + description: Current page within paginated list of results. + type: number + per_page: + description: Number of results per page of results. + type: number + total_count: + description: Total results available without any search parameters. + type: number + type: object + result: + $ref: '#/components/schemas/unnamedSchemaRef619309774d07ec6904f1e354560d6028' + required: + - success + - errors + - messages + - success + - errors + - messages + - result + description: Set Account Custom Nameserver Related Zone Metadata response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Set Account Custom Nameserver Related Zone Metadata + tags: + - Account-Level Custom Nameservers Usage for a Zone + x-api-token-group: + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + /zones/{zone_id}/environments: + get: + operationId: zonesEnvironmentsList + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoEnvironmentsResponse' + description: Successfully listed zone environments. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoErrorResponse' + description: Client error response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List zone environments + tags: + - Zone Environments + x-api-token-group: + - Zone Versioning Write + - Zone Versioning Read + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: zones + resource_chain: + - environments + method: list + patch: + operationId: zonesEnvironmentsEdit + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoEnvironmentsRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoEnvironmentsResponse' + description: Successfully updated zone environments. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoErrorResponse' + description: Client error response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Partially update zone environments + tags: + - Zone Environments + x-api-token-group: + - Zone Versioning Write + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: zones + resource_chain: + - environments + method: edit + post: + operationId: zonesEnvironmentsCreate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoEnvironmentsRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoEnvironmentsResponse' + description: Successfully created zone environments. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoErrorResponse' + description: Client error response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create zone environments + tags: + - Zone Environments + x-api-token-group: + - Zone Versioning Write + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: zones + resource_chain: + - environments + method: create + put: + operationId: zonesEnvironmentsUpdate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoEnvironmentsRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoEnvironmentsResponse' + description: Successfully upserted zone environments. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoErrorResponse' + description: Client error response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Upsert zone environments + tags: + - Zone Environments + x-api-token-group: + - Zone Versioning Write + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + x-stackql-sdk: + service: zones + resource_chain: + - environments + method: update + /zones/{zone_id}/environments/{environment_id}: + delete: + operationId: zonesEnvironmentsDelete + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoEnvironmentsResponse' + description: Successfully deleted zone environment. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoErrorResponse' + description: Client error response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete zone environment + tags: + - Zone Environments + x-api-token-group: + - Zone Versioning Write + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Reference identifier for the environment. + in: path + name: environment_id + schema: + type: string + required: true + x-stackql-sdk: + service: zones + resource_chain: + - environments + method: delete + /zones/{zone_id}/environments/{environment_id}/rollback: + post: + operationId: zonesEnvironmentsRollback + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoEnvironmentsResponse' + description: Successfully rolled back zone environment. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/kaminoErrorResponse' + description: Client error response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Roll back zone environment + tags: + - Zone Environments + x-api-token-group: + - Zone Versioning Write + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Reference identifier for the environment. + in: path + name: environment_id + schema: + type: string + required: true + x-stackql-sdk: + service: zones + resource_chain: + - environments + method: rollback + /zones/{zone_id}/firewall-for-ai/custom-topics: + get: + description: Get the Firewall for AI custom topic categories for a zone. + operationId: firewall-for-ai-custom-topics-get + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/wafProductApiBundleResponseCustomTopics' + description: Get Firewall for AI custom topics response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafProductApiBundleMessages' + messages: + $ref: '#/components/schemas/wafProductApiBundleMessages' + result: + properties: + topics: + description: Custom topic categories for Firewall for AI content detection. + items: + $ref: '#/components/schemas/wafProductApiBundleCustomTopic' + maxItems: 20 + type: array + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get Firewall for AI custom topics failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Firewall for AI Custom Topics + tags: + - Firewall for AI + put: + description: "Set the Firewall for AI custom topic categories for a zone. A maximum of 20 custom topics can be configured per zone. Each topic label must be 2\u201320 characters using only lowercase letters (a\u2013z), digits (0\u20139), and hyphens. Each topic description must be 2\u201350 printable ASCII characters. Changes can take up to a minute to propagate to the zone." + operationId: firewall-for-ai-custom-topics-put + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/wafProductApiBundleCustomTopics' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/wafProductApiBundleResponseCustomTopics' + description: Set Firewall for AI custom topics response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafProductApiBundleMessages' + messages: + $ref: '#/components/schemas/wafProductApiBundleMessages' + result: + properties: + topics: + description: Custom topic categories for Firewall for AI content detection. + items: + $ref: '#/components/schemas/wafProductApiBundleCustomTopic' + maxItems: 20 + type: array + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Set Firewall for AI custom topics failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Set Firewall for AI Custom Topics + tags: + - Firewall for AI + /zones/{zone_id}/firewall-for-ai/settings: + get: + description: Get whether Firewall for AI is enabled or disabled for a zone. + operationId: firewall-for-ai-settings-get + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/wafProductApiBundleResponseSettings' + description: Get Firewall for AI status response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafProductApiBundleMessages' + messages: + $ref: '#/components/schemas/wafProductApiBundleMessages' + result: + description: Firewall for AI enablement status for a zone. + properties: + enabled: + description: Whether Firewall for AI is enabled on the zone. + type: boolean + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Get Firewall for AI status failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Firewall for AI Status + tags: + - Firewall for AI + x-api-token-group: + - Firewall for AI Write + - Firewall for AI Read + put: + description: Enable or disable Firewall for AI for a zone. Changes can take up to a minute to propagate to the zone. + operationId: firewall-for-ai-settings-put + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/wafProductApiBundleSettings' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/wafProductApiBundleResponseSettings' + description: Set Firewall for AI status response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/wafProductApiBundleMessages' + messages: + $ref: '#/components/schemas/wafProductApiBundleMessages' + result: + description: Firewall for AI enablement status for a zone. + properties: + enabled: + description: Whether Firewall for AI is enabled on the zone. + type: boolean + type: object + enum: + - null + success: + description: Defines whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Set Firewall for AI status failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Set Firewall for AI Status + tags: + - Firewall for AI + x-api-token-group: + - Firewall for AI Write + /zones/{zone_id}/hold: + delete: + description: Stop enforcement of a zone hold on the zone, permanently or temporarily, allowing the creation and activation of zones with this zone's hostname. + operationId: zones-0-hold-delete + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: If `hold_after` is provided, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely. + in: query + name: hold_after + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + result: + $ref: '#/components/schemas/zoneHold' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Successful Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Remove Zone Hold + tags: + - Zone Holds + x-api-token-group: + - Zone Write + x-stackql-sdk: + service: zones + resource_chain: + - holds + method: delete + get: + description: Retrieve whether the zone is subject to a zone hold, and metadata about the hold. + operationId: zones-0-hold-get + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + result: + $ref: '#/components/schemas/zoneHold' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Successful Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Zone Hold + tags: + - Zone Holds + x-api-token-group: + - Trust and Safety Write + - Trust and Safety Read + - 'Zero Trust: PII Read' + - Zaraz Edit + - Zaraz Read + - Zaraz Admin + - 'Access: Apps and Policies Revoke' + - 'Access: Apps and Policies Write' + - 'Access: Apps and Policies Read' + - 'Access: Apps and Policies Revoke' + - 'Access: Mutual TLS Certificates Write' + - 'Access: Organizations, Identity Providers, and Groups Write' + - Zone Settings Write + - Zone Settings Read + - Zone Read + - DNS Read + - Workers Scripts Write + - Workers Scripts Read + - Zone Write + - Workers Routes Write + - Workers Routes Read + - Stream Write + - Stream Read + - SSL and Certificates Write + - SSL and Certificates Read + - Logs Write + - Logs Read + - Cache Purge + - Page Rules Write + - Page Rules Read + - Load Balancers Write + - Load Balancers Read + - Firewall Services Write + - Firewall Services Read + - DNS Write + - Apps Write + - Analytics Read + - 'Access: Apps and Policies Write' + - 'Access: Apps and Policies Read' + x-stackql-sdk: + service: zones + resource_chain: + - holds + method: get + patch: + description: Update the `hold_after` and/or `include_subdomains` values on an existing zone hold. The hold is enabled if the `hold_after` date-time value is in the past. + operationId: zones-0-hold-patch + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + hold_after: + default: '' + description: If `hold_after` is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated `hold_after` value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time. + type: string + include_subdomains: + default: false + description: If `true`, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc. + type: boolean + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + result: + $ref: '#/components/schemas/zoneHold' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Successful Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Zone Hold + tags: + - Zone Holds + x-api-token-group: + - Zone Write + x-stackql-sdk: + service: zones + resource_chain: + - holds + method: edit + post: + description: Enforce a zone hold on the zone, blocking the creation and activation of zones with this zone's hostname. + operationId: zones-0-hold-post + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: If provided, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc. + in: query + name: include_subdomains + schema: + type: boolean + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + result: + $ref: '#/components/schemas/zoneHold' + success: + description: Whether the API call was successful + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Successful Response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesSchemasApiResponseCommonFailure' + description: Client Error + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Zone Hold + tags: + - Zone Holds + x-api-token-group: + - Zone Write + x-stackql-sdk: + service: zones + resource_chain: + - holds + method: create + /zones/{zone_id}/settings: + get: + deprecated: true + description: Available settings for your user in relation to a zone. + operationId: zone-settings-get-all-zone-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zonesZoneSettingsResponseCollection' + description: Get all Zone settings response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesComponentsSchemasApiResponseCommonFailure' + description: Get all Zone settings response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get all zone settings + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stainless-deprecation-message: This endpoint is deprecated. Zone settings should instead be managed individually. + patch: + deprecated: true + description: Edit settings for a zone. + operationId: zone-settings-edit-zone-settings-info + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesMultipleSettings' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/zonesZoneSettingsResponseCollection' + description: Edit zone settings info response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesComponentsSchemasApiResponseCommonFailure' + description: Edit zone settings info response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit multiple zone settings + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stainless-deprecation-message: This endpoint is deprecated. Zone settings should instead be managed individually. + /zones/{zone_id}/settings/aegis: + get: + description: Aegis provides dedicated egress IPs (from Cloudflare to your origin) for your layer 7 WAF and CDN services. The egress IPs are reserved exclusively for your account so that you can increase your origin security by only allowing traffic from a small list of IP addresses. + operationId: zone-cache-settings-get-aegis-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + description: The identifier of the caching setting. + type: string + x-auditable: true + enum: + - aegis + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the zone setting. + type: object + x-auditable: true + properties: + enabled: + description: Whether the feature is enabled or not. + type: boolean + x-auditable: true + pool_id: + description: Egress pool id which refers to a grouping of dedicated egress IPs through which Cloudflare will connect to origin. + type: string + x-auditable: true + required: + - id + - value + - editable + - id + type: object + title: Aegis + required: + - success + - errors + - messages + description: Get aegis setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Get aegis setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get aegis setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - Zone Read + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + patch: + description: Aegis provides dedicated egress IPs (from Cloudflare to your origin) for your layer 7 WAF and CDN services. The egress IPs are reserved exclusively for your account so that you can increase your origin security by only allowing traffic from a small list of IP addresses. + operationId: zone-cache-settings-change-aegis-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + value: + $ref: '#/components/schemas/cacheRulesAegisValue' + required: + - value + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + description: The identifier of the caching setting. + type: string + x-auditable: true + enum: + - aegis + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the zone setting. + type: object + x-auditable: true + properties: + enabled: + description: Whether the feature is enabled or not. + type: boolean + x-auditable: true + pool_id: + description: Egress pool id which refers to a grouping of dedicated egress IPs through which Cloudflare will connect to origin. + type: string + x-auditable: true + required: + - id + - value + - editable + - id + type: object + title: Aegis + required: + - success + - errors + - messages + description: Change aegis setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Change aegis setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Change aegis setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + /zones/{zone_id}/settings/fonts: + get: + description: Enhance your website's font delivery with Cloudflare Fonts. Deliver Google Hosted fonts from your own domain, boost performance, and enhance user privacy. Refer to the Cloudflare Fonts documentation for more information. + operationId: zone-settings-get-fonts-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/speedMessages' + messages: + $ref: '#/components/schemas/speedMessages' + success: + description: Whether the API call was successful. + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/speedCloudflareFonts' + required: + - success + - errors + - messages + type: object + description: Get Cloudflare Fonts setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/speedApiResponseCommonFailure' + description: Get Cloudflare Fonts setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Cloudflare Fonts setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + patch: + description: Enhance your website's font delivery with Cloudflare Fonts. Deliver Google Hosted fonts from your own domain, boost performance, and enhance user privacy. Refer to the Cloudflare Fonts documentation for more information. + operationId: zone-settings-change-fonts-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + value: + $ref: '#/components/schemas/speedCloudflareFontsValue' + required: + - value + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/speedMessages' + messages: + $ref: '#/components/schemas/speedMessages' + success: + description: Whether the API call was successful. + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/speedCloudflareFonts' + required: + - success + - errors + - messages + type: object + description: Change Cloudflare Fonts setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/speedApiResponseCommonFailure' + description: Change Cloudflare Fonts setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Change Cloudflare Fonts setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/settings/origin_h2_max_streams: + get: + description: Origin H2 Max Streams configures the max number of concurrent requests that Cloudflare will send within the same connection when communicating with the origin server, if the origin supports it. Note that if your origin does not support H2 multiplexing, 5xx errors may be observed, particularly 520s. Also note that the default value is `100` for all plan types except Enterprise where it is `1`. `1` means that H2 multiplexing is disabled. + operationId: zone-cache-settings-get-origin-h2-max-streams-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesOriginH2MaxStreamsResponseValue' + description: Get Origin H2 Max Streams setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Get Origin H2 Max Streams setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Origin H2 Max Streams Setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - Zone Read + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + patch: + description: Origin H2 Max Streams configures the max number of concurrent requests that Cloudflare will send within the same connection when communicating with the origin server, if the origin supports it. Note that if your origin does not support H2 multiplexing, 5xx errors may be observed, particularly 520s. Also note that the default value is `100` for all plan types except Enterprise where it is `1`. `1` means that H2 multiplexing is disabled. + operationId: zone-cache-settings-change-origin-h2-max-streams-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + value: + $ref: '#/components/schemas/cacheRulesOriginH2MaxStreamsValue' + required: + - value + type: object + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesOriginH2MaxStreamsResponseValue' + description: Change Origin H2 Max Streams setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Change Origin H2 Max Streams response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Change Origin H2 Max Streams Setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: false + enterprise: true + free: false + pro: false + /zones/{zone_id}/settings/origin_max_http_version: + get: + description: Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 requests to your origin. (Refer to [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), for more information.). The default value is "2" for all plan types except Enterprise where it is "1". + operationId: zone-cache-settings-get-origin-max-http-version-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/originMaxHttpVersion' + required: + - success + - errors + - messages + description: Get Origin Max HTTP Version setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Get Origin Max HTTP Version setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Origin Max HTTP Version Setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - Zone Read + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + patch: + description: Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 requests to your origin. (Refer to [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), for more information.). The default value is "2" for all plan types except Enterprise where it is "1". + operationId: zone-cache-settings-change-origin-max-http-version-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + value: + $ref: '#/components/schemas/cacheRulesOriginMaxHttpVersionValue' + required: + - value + type: object + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + result: + $ref: '#/components/schemas/originMaxHttpVersion' + required: + - success + - errors + - messages + description: Change Origin Max HTTP Version setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheRulesApiResponseCommonFailure' + description: Change Origin Max HTTP Version response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Change Origin Max HTTP Version Setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/settings/rum: + get: + description: Retrieves RUM status for a zone. + operationId: web-analytics-get-rum-status + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumRumSiteResponseSingle' + description: Rum Status. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get RUM status for a zone + tags: + - Web Analytics + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + patch: + description: Toggles RUM on/off for an existing zone. + operationId: web-analytics-toggle-rum + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/rumToggleRumRequest' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/rumRumSiteResponseSingle' + description: Rum toggled on/off for an existing zone. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/rumApiResponseCommonFailure' + description: Failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Toggle RUM on/off for a zone + tags: + - Web Analytics + x-api-token-group: + - Zone Settings Write + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/settings/speed_brain: + get: + description: Speed Brain lets compatible browsers speculate on content which can be prefetched or preloaded, making website navigation faster. Refer to the Cloudflare Speed Brain documentation for more information. + operationId: zone-settings-get-speed-brain-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/speedMessages' + messages: + $ref: '#/components/schemas/speedMessages' + success: + description: Whether the API call was successful. + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/speedCloudflareSpeedBrainResponse' + required: + - success + - errors + - messages + type: object + description: Get Cloudflare Speed Brain setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/speedApiResponseCommonFailure' + description: Get Cloudflare Speed Brain setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Cloudflare Speed Brain setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + patch: + description: Speed Brain lets compatible browsers speculate on content which can be prefetched or preloaded, making website navigation faster. Refer to the Cloudflare Speed Brain documentation for more information. + operationId: zone-settings-change-speed-brain-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + value: + description: Whether the feature is enabled or disabled. + enum: + - 'on' + - 'off' + type: string + required: + - value + type: object + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/speedMessages' + messages: + $ref: '#/components/schemas/speedMessages' + success: + description: Whether the API call was successful. + type: boolean + x-auditable: true + result: + $ref: '#/components/schemas/speedCloudflareSpeedBrainResponse' + required: + - success + - errors + - messages + type: object + description: Cloudflare Speed Brain setting response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/speedApiResponseCommonFailure' + description: Change Cloudflare Speed Brain setting response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Change Cloudflare Speed Brain setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/settings/ssl_automatic_mode: + get: + description: If the system is enabled, the response will include next_scheduled_scan, representing the next time this zone will be scanned and the zone's ssl/tls encryption mode is potentially upgraded by the system. If the system is disabled, next_scheduled_scan will not be present in the response body. + operationId: ssl-detector-automatic-mode-get-enrollment + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cacheApiResponseSingleId' + description: Get Automatic SSL/TLS Enrollment status response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheApiResponseCommonFailure' + description: Get Automatic SSL/TLS Enrollment status failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Automatic SSL/TLS enrollment status for the given zone + tags: + - Automatic SSL/TLS + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - SSL and Certificates Write + - SSL and Certificates Read + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + patch: + description: The automatic system is enabled when this endpoint is hit with value in the request body is set to "auto", and disabled when the request body value is set to "custom". + operationId: ssl-detector-automatic-mode-patch-enrollment + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheSchemasPatch' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/cacheApiResponseSingleId' + description: Patch Automatic SSL/TLS Enrollment status response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/cacheApiResponseCommonFailure' + description: Patch Automatic SSL/TLS Enrollment status failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Automatic SSL/TLS Enrollment status for given zone + tags: + - Automatic SSL/TLS + x-api-token-group: + - Zone Settings Write + - SSL and Certificates Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/settings/{setting_id}: + get: + description: Fetch a single zone setting by name + operationId: zone-settings-get-single-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: setting_id + schema: + $ref: '#/components/schemas/zonesSettingName' + required: true + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + success: + description: Whether the API call was successful + type: boolean + result: + $ref: '#/components/schemas/zonesSetting' + required: + - success + - errors + - messages + type: object + description: Get zone setting response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesComponentsSchemasApiResponseCommonFailure' + description: Get zone setting response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get zone setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: zones + resource_chain: + - settings + method: get + patch: + description: Updates a single zone setting by the identifier + operationId: zone-settings-edit-single-setting + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: setting_id + schema: + $ref: '#/components/schemas/zonesSettingName' + required: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesZoneSettingsSingleRequest' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + success: + description: Whether the API call was successful + type: boolean + result: + $ref: '#/components/schemas/zonesSetting' + required: + - success + - errors + - messages + type: object + description: Edit zone setting response + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/zonesComponentsSchemasApiResponseCommonFailure' + description: Edit zone settings info response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Edit zone setting + tags: + - Zone Settings + x-api-token-group: + - Zone Settings Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: false + x-stackql-sdk: + service: zones + resource_chain: + - settings + method: edit + /zones/{zone_id}/smart_shield: + get: + description: Retrieve Smart Shield Settings. + operationId: smart-shield-get-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + $ref: '#/components/schemas/smartshieldSmartShieldSettingsGetResponse' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Smart Shield Settings response. + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' + description: Get Smart Shield Settings response failure. + '502': + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' + description: Get Smart Shield Settings response failure. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' + description: Patch Smart Shield Settings response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Smart Shield Settings + tags: + - Smart Shield Settings + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - Zone Read + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + patch: + description: Set Smart Shield Settings. + operationId: smart-shield-patch-settings + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldSmartShieldSettingsPatchBody' + responses: + '200': + content: + application/json: + schema: + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + $ref: '#/components/schemas/smartshieldSmartShieldSettingsPatchResponse' + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + type: object + description: Smart Shield Settings response. + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' + description: Get Smart Shield Settings response failure. + '502': + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' + description: Smart Shield Settings response failure. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' + description: Patch Smart Shield Settings response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Smart Shield Settings + tags: + - Smart Shield Settings + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/smart_shield/cache_reserve_clear: + get: + description: You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation. + operationId: smart-shield-settings-get-cache-reserve-clear + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + type: object + description: You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation. + title: Cache Reserve Clear + properties: + id: + $ref: '#/components/schemas/unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d' + modified_on: + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + end_ts: + $ref: '#/components/schemas/smartshieldCacheReserveClearEndTs' + start_ts: + $ref: '#/components/schemas/smartshieldCacheReserveClearStartTs' + state: + $ref: '#/components/schemas/smartshieldCacheReserveClearState' + required: + - id + - state + - start_ts + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Get Cache Reserve Clear response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' + description: Get Cache Reserve Clear failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Get Cache Reserve Clear + tags: + - Cache Reserve Clear + x-api-token-group: + - Zone Settings Write + - Zone Settings Read + - Zone Read + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + post: + description: You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation. + operationId: smart-shield-settings-start-cache-reserve-clear + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: {} + description: The request body is currently not used. + responses: + '200': + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + type: object + description: You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation. + title: Cache Reserve Clear + properties: + id: + $ref: '#/components/schemas/unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d' + modified_on: + description: Last time this setting was modified. + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + end_ts: + $ref: '#/components/schemas/smartshieldCacheReserveClearEndTs' + start_ts: + $ref: '#/components/schemas/smartshieldCacheReserveClearStartTs' + state: + $ref: '#/components/schemas/smartshieldCacheReserveClearState' + required: + - id + - state + - start_ts + success: + description: Whether the API call was successful. + enum: + - true + type: boolean + required: + - success + - errors + - messages + - result + description: Start Cache Reserve Clear response. + 4XX: + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldApiResponseCommonFailure' + description: Start Cache Reserve Clear failure response. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Start Cache Reserve Clear + tags: + - Cache Reserve Clear + x-api-token-group: + - Zone Settings Write + - Zone Write + x-cfPermissionsRequired: + enum: + - '#zone_settings:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + /zones/{zone_id}/smart_shield/healthchecks: + get: + description: List configured health checks. + operationId: smart-shield-list-health-checks + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - description: Page number of paginated results. + in: query + name: page + schema: + default: 1 + minimum: 1 + type: number + - description: Maximum number of results per page. Must be a multiple of 5. + in: query + name: per_page + schema: + default: 25 + maximum: 1000 + minimum: 5 + type: number + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldResponseCollection' + description: List Health Checks response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + items: + $ref: '#/components/schemas/smartshieldHealthchecks' + nullable: true + type: array + enum: + - null + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + result_info: + $ref: '#/components/schemas/smartshieldResultInfo' + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: List Health Checks response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: List Health Checks + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + - Health Checks Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + post: + description: Create a new health check. + operationId: smart-shield-create-health-check + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldQueryHealthcheck' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldSingleHcResponse' + description: Create Health Check response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + properties: + address: + $ref: '#/components/schemas/smartshieldAddress' + check_regions: + $ref: '#/components/schemas/smartshieldCheckRegions' + consecutive_fails: + $ref: '#/components/schemas/smartshieldConsecutiveFails' + consecutive_successes: + $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' + created_on: + $ref: '#/components/schemas/smartshieldTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/smartshieldDescription' + failure_reason: + $ref: '#/components/schemas/smartshieldFailureReason' + http_config: + $ref: '#/components/schemas/smartshieldHttpConfig' + id: + $ref: '#/components/schemas/smartshieldIdentifier' + interval: + $ref: '#/components/schemas/smartshieldInterval' + modified_on: + $ref: '#/components/schemas/smartshieldTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/smartshieldName' + retries: + $ref: '#/components/schemas/smartshieldRetries' + status: + $ref: '#/components/schemas/smartshieldStatus' + suspended: + $ref: '#/components/schemas/smartshieldSuspended' + tcp_config: + $ref: '#/components/schemas/smartshieldTcpConfig' + timeout: + $ref: '#/components/schemas/smartshieldTimeout' + type: + $ref: '#/components/schemas/smartshieldType' + type: object + enum: + - null + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Health Check + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + /zones/{zone_id}/smart_shield/healthchecks/{healthcheck_id}: + delete: + description: Delete a health check. + operationId: smart-shield-delete-health-check + parameters: + - in: path + name: healthcheck_id + schema: + $ref: '#/components/schemas/smartshieldIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldSingleHcIdResponse' + description: Delete Health Check response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + properties: + id: + $ref: '#/components/schemas/smartshieldIdentifier' + type: object + enum: + - null + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Delete Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Delete Health Check + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + get: + description: Fetch a single configured health check. + operationId: smart-shield-health-check-details + parameters: + - in: path + name: healthcheck_id + schema: + $ref: '#/components/schemas/smartshieldIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldSingleHcResponse' + description: Health Check Details response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + properties: + address: + $ref: '#/components/schemas/smartshieldAddress' + check_regions: + $ref: '#/components/schemas/smartshieldCheckRegions' + consecutive_fails: + $ref: '#/components/schemas/smartshieldConsecutiveFails' + consecutive_successes: + $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' + created_on: + $ref: '#/components/schemas/smartshieldTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/smartshieldDescription' + failure_reason: + $ref: '#/components/schemas/smartshieldFailureReason' + http_config: + $ref: '#/components/schemas/smartshieldHttpConfig' + id: + $ref: '#/components/schemas/smartshieldIdentifier' + interval: + $ref: '#/components/schemas/smartshieldInterval' + modified_on: + $ref: '#/components/schemas/smartshieldTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/smartshieldName' + retries: + $ref: '#/components/schemas/smartshieldRetries' + status: + $ref: '#/components/schemas/smartshieldStatus' + suspended: + $ref: '#/components/schemas/smartshieldSuspended' + tcp_config: + $ref: '#/components/schemas/smartshieldTcpConfig' + timeout: + $ref: '#/components/schemas/smartshieldTimeout' + type: + $ref: '#/components/schemas/smartshieldType' + type: object + enum: + - null + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Health Check Details response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Health Check Details + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + - Health Checks Read + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + patch: + description: Patch a configured health check. + operationId: smart-shield-patch-health-check + parameters: + - in: path + name: healthcheck_id + schema: + $ref: '#/components/schemas/smartshieldIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldQueryHealthcheck' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldSingleHcResponse' + description: Patch Health Check response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + properties: + address: + $ref: '#/components/schemas/smartshieldAddress' + check_regions: + $ref: '#/components/schemas/smartshieldCheckRegions' + consecutive_fails: + $ref: '#/components/schemas/smartshieldConsecutiveFails' + consecutive_successes: + $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' + created_on: + $ref: '#/components/schemas/smartshieldTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/smartshieldDescription' + failure_reason: + $ref: '#/components/schemas/smartshieldFailureReason' + http_config: + $ref: '#/components/schemas/smartshieldHttpConfig' + id: + $ref: '#/components/schemas/smartshieldIdentifier' + interval: + $ref: '#/components/schemas/smartshieldInterval' + modified_on: + $ref: '#/components/schemas/smartshieldTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/smartshieldName' + retries: + $ref: '#/components/schemas/smartshieldRetries' + status: + $ref: '#/components/schemas/smartshieldStatus' + suspended: + $ref: '#/components/schemas/smartshieldSuspended' + tcp_config: + $ref: '#/components/schemas/smartshieldTcpConfig' + timeout: + $ref: '#/components/schemas/smartshieldTimeout' + type: + $ref: '#/components/schemas/smartshieldType' + type: object + enum: + - null + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Patch Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Patch Health Check + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + put: + description: Update a configured health check. + operationId: smart-shield-update-health-check + parameters: + - in: path + name: healthcheck_id + schema: + $ref: '#/components/schemas/smartshieldIdentifier' + required: true + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldSingleHcResponse' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/smartshieldSingleHcResponse' + description: Update Health Check response. + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + properties: + address: + $ref: '#/components/schemas/smartshieldAddress' + check_regions: + $ref: '#/components/schemas/smartshieldCheckRegions' + consecutive_fails: + $ref: '#/components/schemas/smartshieldConsecutiveFails' + consecutive_successes: + $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' + created_on: + $ref: '#/components/schemas/smartshieldTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/smartshieldDescription' + failure_reason: + $ref: '#/components/schemas/smartshieldFailureReason' + http_config: + $ref: '#/components/schemas/smartshieldHttpConfig' + id: + $ref: '#/components/schemas/smartshieldIdentifier' + interval: + $ref: '#/components/schemas/smartshieldInterval' + modified_on: + $ref: '#/components/schemas/smartshieldTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/smartshieldName' + retries: + $ref: '#/components/schemas/smartshieldRetries' + status: + $ref: '#/components/schemas/smartshieldStatus' + suspended: + $ref: '#/components/schemas/smartshieldSuspended' + tcp_config: + $ref: '#/components/schemas/smartshieldTcpConfig' + timeout: + $ref: '#/components/schemas/smartshieldTimeout' + type: + $ref: '#/components/schemas/smartshieldType' + type: object + enum: + - null + success: + description: Whether the API call was successful. + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update Health Check response failure. + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Health Check + tags: + - Health Checks + x-api-token-group: + - Health Checks Write + x-cfPlanAvailability: + business: true + enterprise: true + free: false + pro: true + /zones/{zone_id}/subscription: + get: + description: Lists zone subscription details. + operationId: zone-subscription-zone-subscription-details + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiZoneSubscriptionResponseSingle' + description: Zone Subscription Details response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + type: object + properties: + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + current_period_end: + $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' + current_period_start: + $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' + frequency: + description: How often the subscription is renewed automatically. + enum: + - weekly + - monthly + - quarterly + - yearly + - not-applicable + type: string + x-auditable: true + id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + price: + $ref: '#/components/schemas/billSubsApiPrice' + rate_plan: + $ref: '#/components/schemas/billSubsApiRatePlan_2' + state: + $ref: '#/components/schemas/billSubsApiState' + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Zone Subscription Details response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Zone Subscription Details + tags: + - Zone Subscription + x-api-token-group: + - Billing Write + - Billing Read + x-cfPermissionsRequired: + enum: + - '#billing:read' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: zones + resource_chain: + - subscriptions + method: get + post: + description: Create a zone subscription, either plan or add-ons. + operationId: zone-subscription-create-zone-subscription + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiSubscriptionV2' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiZoneSubscriptionResponseSingle' + description: Create Zone Subscription response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + type: object + properties: + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + current_period_end: + $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' + current_period_start: + $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' + frequency: + description: How often the subscription is renewed automatically. + enum: + - weekly + - monthly + - quarterly + - yearly + - not-applicable + type: string + x-auditable: true + id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + price: + $ref: '#/components/schemas/billSubsApiPrice' + rate_plan: + $ref: '#/components/schemas/billSubsApiRatePlan_2' + state: + $ref: '#/components/schemas/billSubsApiState' + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Create Zone Subscription response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Create Zone Subscription + tags: + - Zone Subscription + x-api-token-group: + - Billing Write + x-cfPermissionsRequired: + enum: + - '#billing:read' + - '#billing:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: zones + resource_chain: + - subscriptions + method: create + put: + description: Updates zone subscriptions, either plan or add-ons. + operationId: zone-subscription-update-zone-subscription + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiSubscriptionV2' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/billSubsApiZoneSubscriptionResponseSingle' + description: Update Zone Subscription response + 4XX: + content: + application/json: + schema: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + type: object + properties: + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + current_period_end: + $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' + current_period_start: + $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' + frequency: + description: How often the subscription is renewed automatically. + enum: + - weekly + - monthly + - quarterly + - yearly + - not-applicable + type: string + x-auditable: true + id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + price: + $ref: '#/components/schemas/billSubsApiPrice' + rate_plan: + $ref: '#/components/schemas/billSubsApiRatePlan_2' + state: + $ref: '#/components/schemas/billSubsApiState' + enum: + - null + success: + description: Whether the API call was successful + enum: + - true + - false + type: boolean + required: + - success + - errors + - messages + - result + - success + - errors + - messages + - result + description: Update Zone Subscription response failure + security: + - api_token: [] + - api_email: [] + api_key: [] + summary: Update Zone Subscription + tags: + - Zone Subscription + x-api-token-group: + - Billing Write + x-cfPermissionsRequired: + enum: + - '#billing:read' + - '#billing:edit' + x-cfPlanAvailability: + business: true + enterprise: true + free: true + pro: true + x-stackql-sdk: + service: zones + resource_chain: + - subscriptions + method: update + /zones/{zone_id}/email/sending/suppression: + get: + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: query + name: page + schema: + default: 1 + minimum: 0 + type: integer + - in: query + name: per_page + schema: + default: 100 + maximum: 1000 + minimum: 0 + type: integer + - in: query + name: order + schema: + default: created_at + enum: + - email + - expires_at + - created_at + type: string + - in: query + name: direction + schema: + default: desc + enum: + - asc + - desc + type: string + responses: + '200': + content: + application/json: + schema: + properties: + page: + type: integer + per_page: + type: integer + result: + items: + properties: + created_at: + format: date-time + type: string + readOnly: true + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + id: + format: uuid + type: string + reason: + type: string + zones: + default: [] + items: + type: string + type: array + required: + - id + - email + - reason + - created_at + - expires_at + type: object + type: array + total: + type: integer + required: + - page + - per_page + - total + - result + type: object + description: Returns suppressed emails. + '400': + content: + application/json: + schema: + properties: + errors: + items: + type: string + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Bad request. + security: + - bearerAuth: [] + summary: List account or zone email suppressions + tags: [] + operationId: get_zones_zone_id_email_sending_suppression + post: + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + required: + - email + type: object + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + id: + format: uuid + type: string + required: + - id + type: object + required: + - result + type: object + description: Returns suppression. + '400': + content: + application/json: + schema: + properties: + errors: + items: + type: string + type: array + success: + type: boolean + required: + - success + - errors + type: object + description: Bad request. + security: + - bearerAuth: [] + summary: Create account or zone email suppression + tags: [] + operationId: post_zones_zone_id_email_sending_suppression + /zones/{zone_id}/email/sending/suppression/{suppression_id}: + get: + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: suppression_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + result: + properties: + created_at: + format: date-time + type: string + readOnly: true + email: + format: email + type: string + expires_at: + format: date-time + nullable: true + type: string + id: + format: uuid + type: string + reason: + type: string + zones: + default: [] + items: + type: string + type: array + required: + - id + - email + - reason + - created_at + - expires_at + type: object + required: + - result + type: object + description: Returns suppression. + '404': + content: + application/json: + schema: + properties: + error: + type: string + success: + type: boolean + required: + - success + - error + type: object + description: Suppression not found. + security: + - bearerAuth: [] + summary: Get account or zone email suppression + tags: [] + operationId: get_zones_zone_id_email_sending_suppression_suppression_id + delete: + parameters: + - name: zone_id + in: path + required: true + description: The Cloudflare zone ID. + schema: + type: string + - in: path + name: suppression_id + schema: + type: string + required: true + responses: + '200': + content: + application/json: + schema: + properties: + success: + type: boolean + required: + - success + type: object + description: Deletes suppression. + '404': + content: + application/json: + schema: + properties: + error: + type: string + success: + type: boolean + required: + - success + - error + type: object + description: Suppression not found. + security: + - bearerAuth: [] + summary: Delete account or zone email suppression + tags: [] + operationId: delete_zones_zone_id_email_sending_suppression_suppression_id + /graphql/http_requests_adaptive_groups: + post: + operationId: graphql-http_requests_adaptive_groups-list + summary: HTTP request analytics for a zone with adaptive sampling, grouped by minute, client country, edge response status, and HTTP method + description: HTTP request analytics for a zone with adaptive sampling, grouped by minute, client country, edge response status, and HTTP method. Replaces the sunset REST endpoint /zones/{zone_id}/analytics/dashboard. Each row aggregates request count, byte volume, cache hits, and threat counts for one dimension tuple over the requested time window. + x-stackQL-graphQL: + url: https://api.cloudflare.com/client/v4/graphql + httpVerb: POST + responseSelection: + jsonPath: $.result[*] + cursor: + jsonPath: $.result[*].__no_cursor + query: "query {\n viewer {\n zones(filter: { zoneTag: \"{{ .zone_tag }}\" }, limit: 1) {\n httpRequestsAdaptiveGroups(\n filter: { datetime_geq: \"{{ .since }}\", datetime_lt: \"{{ .until }}\" }\n limit: {{ if .limit }}{{ .limit }}{{ else }}100{{ end }}\n orderBy: [datetimeMinute_ASC]\n ) {\n dimensions {\n datetime: datetimeMinute\n clientCountryName\n edgeResponseStatus\n clientRequestHTTPMethodName\n }\n sum {\n edgeResponseBytes\n visits\n }\n count\n }\n }\n }\n}\n" + x-stackql-protocol: graphql + parameters: + - name: zone_tag + in: path + required: true + schema: + type: string + description: Cloudflare zone ID (the 32-char hex tag). + - name: since + in: query + required: true + schema: + type: string + format: date-time + description: Lower bound (inclusive) of the time range. RFC3339 (e.g. 2026-05-28T00:00:00Z). + - name: until + in: query + required: true + schema: + type: string + format: date-time + description: Upper bound (exclusive) of the time range. RFC3339. + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + description: Maximum number of dimension-tuple rows to return per call. + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + datetime: + type: string + format: date-time + description: Minute-bucketed timestamp (RFC3339). + client_country_name: + type: string + description: ISO-3166 alpha-2 country code derived from client IP. + edge_response_status: + type: integer + description: HTTP status returned to the client. + client_request_http_method_name: + type: string + description: HTTP method (GET, POST, etc.). + requests: + type: integer + description: Total request count for this dimension tuple. + bytes: + type: integer + description: Total bytes served to the client from the edge. + visits: + type: integer + description: Requests by end-users that were initiated from a different website (i.e. the HTTP Referer header does not match the host in the HTTP Host header). A coarse "human visitor" heuristic. + /graphql/http_requests_1h_groups: + post: + operationId: graphql-http_requests_1h_groups-list + summary: Hourly-bucketed HTTP request totals for a zone + description: Hourly-bucketed HTTP request totals for a zone. One row per hour with totals for requests, bytes, threats, page views, cache hits/bytes, encrypted requests/bytes, and edge request bytes. Use for last-N-hours traffic dashboards and trend visualisations. + x-stackQL-graphQL: + url: https://api.cloudflare.com/client/v4/graphql + httpVerb: POST + responseSelection: + jsonPath: $.result[*] + cursor: + jsonPath: $.result[*].__no_cursor + query: "query {\n viewer {\n zones(filter: { zoneTag: \"{{ .zone_tag }}\" }, limit: 1) {\n httpRequests1hGroups(\n filter: { datetime_geq: \"{{ .since }}\", datetime_lt: \"{{ .until }}\" }\n limit: {{ if .limit }}{{ .limit }}{{ else }}168{{ end }}\n orderBy: [datetime_ASC]\n ) {\n dimensions {\n datetime\n date\n }\n sum {\n requests\n bytes\n threats\n pageViews\n cachedRequests\n cachedBytes\n encryptedRequests\n encryptedBytes\n edgeRequestBytes\n }\n }\n }\n }\n}\n" + x-stackql-protocol: graphql + parameters: + - name: zone_tag + in: path + required: true + schema: + type: string + description: Cloudflare zone ID (the 32-char hex tag). + - name: since + in: query + required: true + schema: + type: string + format: date-time + description: Lower bound (inclusive) of the time range. RFC3339 (e.g. 2026-05-29T00:00:00Z). + - name: until + in: query + required: true + schema: + type: string + format: date-time + description: Upper bound (exclusive) of the time range. RFC3339. + - name: limit + in: query + required: false + schema: + type: integer + default: 168 + description: Maximum hourly rows to return per call. Default 168 (one week of hourly buckets). + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + datetime: + type: string + format: date-time + description: Hour-bucketed timestamp (RFC3339). + date: + type: string + format: date + description: Date component of the hour bucket (YYYY-MM-DD). + requests: + type: integer + description: Total request count for the hour. + bytes: + type: integer + description: Total bytes served from the edge for the hour. + threats: + type: integer + description: Requests classified as threats for the hour. + page_views: + type: integer + description: Successful HTML content requests for the hour. + cached_requests: + type: integer + description: Requests served from cache for the hour. + cached_bytes: + type: integer + description: Bytes served from cache for the hour. + encrypted_requests: + type: integer + description: Requests served over TLS for the hour. + encrypted_bytes: + type: integer + description: Bytes served over TLS for the hour. + edge_request_bytes: + type: integer + description: Bytes received from the client over the hour. + /graphql/http_requests_overview_adaptive_groups: + post: + operationId: graphql-http_requests_overview_adaptive_groups-list + summary: HTTP request overview for a zone, adaptive-sampled, grouped by minute, client country, HTTP status, content type, and browser + description: HTTP request overview for a zone, adaptive-sampled, grouped by minute, client country, HTTP status, content type, and browser. Lighter-weight than zone_http_requests_adaptive_groups. Replaces the deprecated REST /zones/{zone_id}/analytics/colos endpoint. + x-stackQL-graphQL: + url: https://api.cloudflare.com/client/v4/graphql + httpVerb: POST + responseSelection: + jsonPath: $.result[*] + cursor: + jsonPath: $.result[*].__no_cursor + query: "query {\n viewer {\n zones(filter: { zoneTag: \"{{ .zone_tag }}\" }, limit: 1) {\n httpRequestsOverviewAdaptiveGroups(\n filter: { datetime_geq: \"{{ .since }}\", datetime_lt: \"{{ .until }}\" }\n limit: {{ if .limit }}{{ .limit }}{{ else }}100{{ end }}\n orderBy: [datetimeMinute_ASC]\n ) {\n dimensions {\n datetime: datetimeMinute\n clientCountryName\n edgeResponseStatus\n edgeResponseContentTypeName\n userAgentBrowser\n }\n sum {\n requests\n bytes\n cachedRequests\n cachedBytes\n pageViews\n visits\n }\n }\n }\n }\n}\n" + x-stackql-protocol: graphql + parameters: + - name: zone_tag + in: path + required: true + schema: + type: string + description: Cloudflare zone ID (the 32-char hex tag). + - name: since + in: query + required: true + schema: + type: string + format: date-time + description: Lower bound (inclusive). RFC3339. + - name: until + in: query + required: true + schema: + type: string + format: date-time + description: Upper bound (exclusive). RFC3339. + - name: limit + in: query + required: false + schema: + type: integer + default: 100 + description: Maximum dimension-tuple rows per call. + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + datetime: + type: string + format: date-time + description: Minute-bucketed timestamp. + client_country_name: + type: string + description: ISO-3166 alpha-2 country code. + edge_response_status: + type: integer + description: HTTP status returned to the client. + edge_response_content_type_name: + type: string + description: Response content type. + user_agent_browser: + type: string + description: Browser parsed from user agent. + requests: + type: integer + description: Total request count for the tuple. + bytes: + type: integer + description: Total bytes served. + cached_requests: + type: integer + description: Requests served from cache. + cached_bytes: + type: integer + description: Bytes served from cache. + page_views: + type: integer + description: Successful HTML content requests. + visits: + type: integer + description: Cross-referer visit count. +components: + schemas: + argoAnalyticsMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + argoAnalyticsResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/argoAnalyticsMessages' + messages: + $ref: '#/components/schemas/argoAnalyticsMessages' + result: + type: object + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + billSubsApiAvailableRatePlan: + properties: + can_subscribe: + $ref: '#/components/schemas/billSubsApiCanSubscribe' + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + externally_managed: + $ref: '#/components/schemas/billSubsApiExternallyManaged' + frequency: + $ref: '#/components/schemas/billSubsApiSchemasFrequency' + id: + $ref: '#/components/schemas/billSubsApiIdentifier' + is_subscribed: + $ref: '#/components/schemas/billSubsApiIsSubscribed' + legacy_discount: + $ref: '#/components/schemas/billSubsApiLegacyDiscount' + legacy_id: + $ref: '#/components/schemas/billSubsApiLegacyId' + name: + $ref: '#/components/schemas/billSubsApiSchemasName' + price: + $ref: '#/components/schemas/billSubsApiSchemasPrice' + type: object + billSubsApiCanSubscribe: + default: false + description: Indicates whether you can subscribe to this plan. + example: true + type: boolean + x-auditable: true + billSubsApiComponentValue: + properties: + default: + $ref: '#/components/schemas/billSubsApiDefault' + name: + $ref: '#/components/schemas/billSubsApiComponentsSchemasName' + unit_price: + $ref: '#/components/schemas/billSubsApiUnitPrice' + type: object + billSubsApiComponentsSchemasName: + description: The unique component. + enum: + - zones + - page_rules + - dedicated_certificates + - dedicated_certificates_custom + example: page_rules + x-auditable: true + type: string + billSubsApiCurrency: + description: The monetary unit in which pricing information is displayed. + example: USD + readOnly: true + type: string + x-auditable: true + billSubsApiCurrentPeriodEnd: + description: The end of the current period and also when the next billing is due. + example: '2014-03-31T12:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + billSubsApiCurrentPeriodStart: + description: When the current billing period started. May match initial_period_start if this is the first period. + example: '2014-05-11T12:20:00Z' + format: date-time + readOnly: true + type: string + x-auditable: true + billSubsApiDefault: + description: The default amount allocated. + example: 5 + type: number + x-auditable: true + billSubsApiDuration: + description: The duration of the plan subscription. + example: 1 + type: number + x-auditable: true + billSubsApiExternallyManaged: + default: false + description: Indicates whether this plan is managed externally. + example: false + type: boolean + x-auditable: true + billSubsApiFrequency: + description: How often the subscription is renewed automatically. + enum: + - weekly + - monthly + - quarterly + - yearly + example: monthly + type: string + x-auditable: true + billSubsApiIdentifier: + description: Identifier + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + billSubsApiIsSubscribed: + default: false + description: Indicates whether you are currently subscribed to this plan. + example: false + type: boolean + x-auditable: true + billSubsApiLegacyDiscount: + default: false + description: Indicates whether this plan has a legacy discount applied. + example: false + type: boolean + x-auditable: true + billSubsApiLegacyId: + description: The legacy identifier for this rate plan, if any. + example: free + readOnly: true + type: string + x-auditable: true + billSubsApiMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + billSubsApiPlanResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + items: + $ref: '#/components/schemas/billSubsApiSchemasRatePlan' + nullable: true + type: array + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/billSubsApiResultInfo' + required: + - success + - errors + - messages + - result + billSubsApiPrice: + description: The price of the subscription that will be billed, in US dollars. + example: 20 + readOnly: true + type: number + x-auditable: true + billSubsApiRatePlan: + properties: + components: + $ref: '#/components/schemas/billSubsApiSchemasComponentValues' + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + duration: + $ref: '#/components/schemas/billSubsApiDuration' + frequency: + $ref: '#/components/schemas/billSubsApiSchemasFrequency' + id: + $ref: '#/components/schemas/billSubsApiRatePlanComponentsSchemasIdentifier' + name: + $ref: '#/components/schemas/billSubsApiSchemasName' + type: object + billSubsApiRatePlanComponentsSchemasIdentifier: + description: Plan identifier tag. + example: free + readOnly: true + type: string + x-auditable: true + billSubsApiRatePlan_2: + description: The rate plan applied to the subscription. + properties: + currency: + description: The currency applied to the rate plan subscription. + example: USD + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + externally_managed: + description: Whether this rate plan is managed externally from Cloudflare. + example: false + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + id: + description: The ID of the rate plan. + example: free + type: string + x-auditable: true + enum: + - free + - lite + - pro + - pro_plus + - business + - enterprise + - partners_free + - partners_pro + - partners_business + - partners_enterprise + is_contract: + description: Whether a rate plan is enterprise-based (or newly adopted term contract). + example: false + type: boolean + x-auditable: true + x-stainless-terraform-configurability: computed_optional + public_name: + description: The full name of the rate plan. + example: Business Plan + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + scope: + description: The scope that this rate plan applies to. + example: zone + type: string + x-auditable: true + x-stainless-terraform-configurability: computed_optional + sets: + description: The list of sets this rate plan applies to. Returns array of strings. + example: [] + items: + type: string + x-auditable: true + type: array + x-stainless-terraform-configurability: optional + type: object + billSubsApiResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + billSubsApiSchemasComponentValues: + description: Array of available components values for the plan. + items: + $ref: '#/components/schemas/billSubsApiComponentValue' + type: array + billSubsApiSchemasFrequency: + description: The frequency at which you will be billed for this plan. + enum: + - weekly + - monthly + - quarterly + - yearly + example: monthly + readOnly: true + type: string + x-auditable: true + billSubsApiSchemasIdentifier: + description: Subscription identifier tag. + example: 506e3185e9c882d175a2d0cb0093d9f2 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + billSubsApiSchemasName: + description: The plan name. + example: Free Plan + maxLength: 80 + readOnly: true + type: string + x-auditable: true + billSubsApiSchemasPrice: + description: The amount you will be billed for this plan. + example: 0 + type: number + x-auditable: true + billSubsApiSchemasRatePlan: + type: object + $ref: '#/components/schemas/billSubsApiRatePlan' + billSubsApiState: + description: The state that the subscription is in. + enum: + - Trial + - Provisioned + - Paid + - AwaitingPayment + - Cancelled + - Failed + - Expired + example: Paid + readOnly: true + type: string + x-auditable: true + billSubsApiSubscriptionResponse: + type: object + properties: + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + current_period_end: + $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' + current_period_start: + $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' + frequency: + description: How often the subscription is renewed automatically. + enum: + - weekly + - monthly + - quarterly + - yearly + - not-applicable + example: monthly + type: string + x-auditable: true + id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + price: + $ref: '#/components/schemas/billSubsApiPrice' + rate_plan: + $ref: '#/components/schemas/billSubsApiRatePlan_2' + state: + $ref: '#/components/schemas/billSubsApiState' + billSubsApiSubscriptionV2: + properties: + currency: + $ref: '#/components/schemas/billSubsApiCurrency' + current_period_end: + $ref: '#/components/schemas/billSubsApiCurrentPeriodEnd' + current_period_start: + $ref: '#/components/schemas/billSubsApiCurrentPeriodStart' + frequency: + $ref: '#/components/schemas/billSubsApiFrequency' + id: + $ref: '#/components/schemas/billSubsApiSchemasIdentifier' + price: + $ref: '#/components/schemas/billSubsApiPrice' + rate_plan: + $ref: '#/components/schemas/billSubsApiRatePlan_2' + state: + $ref: '#/components/schemas/billSubsApiState' + type: object + billSubsApiUnitPrice: + description: The unit price of the addon. + example: 1 + readOnly: true + type: number + x-auditable: true + billSubsApiZoneSubscriptionResponseSingle: + type: object + properties: + errors: + $ref: '#/components/schemas/billSubsApiMessages' + messages: + $ref: '#/components/schemas/billSubsApiMessages' + result: + $ref: '#/components/schemas/billSubsApiSubscriptionResponse' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + cacheApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/cacheMessages' + messages: + example: [] + $ref: '#/components/schemas/cacheMessages' + result: + $ref: '#/components/schemas/cacheResult' + success: + description: Indicates the API call's success or failure. + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + cacheApiResponseSingleId: + properties: + errors: + $ref: '#/components/schemas/cacheMessages' + messages: + $ref: '#/components/schemas/cacheMessages' + result: + $ref: '#/components/schemas/cacheResult' + success: + description: Indicates the API call's success or failure. + example: true + type: boolean + required: + - success + - errors + - messages + - result + type: object + cacheMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + cacheResult: + properties: + editable: + description: Whether this setting can be updated or not. + readOnly: true + type: boolean + id: + example: ssl_automatic_mode + readOnly: true + type: string + modified_on: + description: Last time this setting was modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + next_scheduled_scan: + description: Next time this zone will be scanned by the Automatic SSL/TLS. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + nullable: true + readOnly: true + type: string + value: + description: Current setting of the automatic SSL/TLS. + enum: + - auto + - custom + example: auto + readOnly: true + type: string + required: + - id + - modified_on + - value + - editable + type: object + cacheRulesAegisValue: + description: Value of the zone setting. + properties: + enabled: + description: Whether the feature is enabled or not. + type: boolean + x-auditable: true + pool_id: + description: Egress pool id which refers to a grouping of dedicated egress IPs through which Cloudflare will connect to origin. + example: pool-id + type: string + x-auditable: true + type: object + cacheRulesApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + items: + type: object + minLength: 1 + type: array + $ref: '#/components/schemas/cacheRulesMessages' + messages: + example: [] + items: + type: object + type: array + $ref: '#/components/schemas/cacheRulesMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + cacheRulesEditable: + description: Whether the setting is editable. + type: boolean + x-auditable: true + cacheRulesMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + cacheRulesModifiedOn: + description: The time when the setting was last modified. + format: date-time + type: string + x-auditable: true + cacheRulesOriginH2MaxStreams: + description: Origin H2 Max Streams configures the max number of concurrent requests that Cloudflare will send within the same connection when communicating with the origin server, if the origin supports it. Note that if your origin does not support H2 multiplexing, 5xx errors may be observed, particularly 520s. Also note that the default value is `100` for all plan types except Enterprise where it is `1`. `1` means that H2 multiplexing is disabled. + title: Origin H2 Max Streams + type: object + properties: + id: + description: Value of the zone setting. + type: string + x-auditable: true + enum: + - origin_h2_max_streams + example: origin_h2_max_streams + modified_on: + description: Last time this setting was modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + $ref: '#/components/schemas/cacheRulesOriginH2MaxStreamsValue' + required: + - id + cacheRulesOriginH2MaxStreamsResponseValue: + properties: + errors: + $ref: '#/components/schemas/cacheRulesMessages' + messages: + $ref: '#/components/schemas/cacheRulesMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result: + $ref: '#/components/schemas/cacheRulesOriginH2MaxStreams' + required: + - success + - errors + - messages + type: object + cacheRulesOriginH2MaxStreamsValue: + description: Value of the Origin H2 Max Streams Setting. + example: 50 + maximum: 1000 + minimum: 1 + type: integer + x-auditable: true + cacheRulesOriginMaxHttpVersionValue: + description: Value of the Origin Max HTTP Version Setting. + enum: + - '2' + - '1' + type: string + x-auditable: true + cacheSchemasPatch: + description: Update enablement of Automatic SSL/TLS. + properties: + value: + $ref: '#/components/schemas/cacheSchemasValue' + required: + - value + type: object + cacheSchemasValue: + description: Controls enablement of Automatic SSL/TLS. + enum: + - auto + - custom + example: auto + type: string + dnsCustomNameserversGetResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/dnsCustomNameserversMessages' + messages: + $ref: '#/components/schemas/dnsCustomNameserversMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + type: object + enabled: + description: Whether zone uses account-level custom nameservers. + example: true + type: boolean + x-auditable: true + ns_set: + default: 1 + description: The number of the name server set to assign to the zone. + example: 1 + maximum: 5 + minimum: 1 + type: number + x-auditable: true + required: + - success + - errors + - messages + dnsCustomNameserversMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + dnsCustomNameserversSchemasEmptyResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/dnsCustomNameserversMessages' + messages: + $ref: '#/components/schemas/dnsCustomNameserversMessages' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + type: object + result: + items: + description: Unused + type: string + x-auditable: true + maxItems: 0 + type: array + required: + - success + - errors + - messages + dnsCustomNameserversZoneMetadata: + properties: + enabled: + description: Whether zone uses account-level custom nameservers. + example: true + type: boolean + x-auditable: true + ns_set: + default: 1 + description: The number of the name server set to assign to the zone. + example: 1 + maximum: 5 + minimum: 1 + type: number + x-auditable: true + type: object + kaminoEnvironment: + properties: + expression: + type: string + http_application_id: + nullable: true + type: string + locked_on_deployment: + nullable: true + type: boolean + name: + type: string + position: + $ref: '#/components/schemas/kaminoEnvironmentPosition' + ref: + type: string + version: + format: int64 + nullable: true + type: integer + required: + - name + - ref + - version + - expression + - locked_on_deployment + - position + type: object + kaminoEnvironmentPosition: + $ref: '#/components/schemas/unnamedSchemaRef34bb6e31800bc0207c083affa12d2775' + kaminoEnvironmentsRequest: + properties: + environments: + items: + $ref: '#/components/schemas/kaminoEnvironment' + type: array + required: + - environments + type: object + kaminoEnvironmentsResponse: + properties: + errors: + items: + $ref: '#/components/schemas/kaminoMessage' + type: array + messages: + items: + $ref: '#/components/schemas/kaminoMessage' + type: array + result: + $ref: '#/components/schemas/kaminoEnvironmentsResult' + success: + type: boolean + required: + - result + - success + - errors + - messages + type: object + kaminoEnvironmentsResult: + properties: + environments: + items: + $ref: '#/components/schemas/kaminoEnvironment' + type: array + required: + - environments + type: object + kaminoErrorResponse: + properties: + errors: + items: + $ref: '#/components/schemas/kaminoMessage' + type: array + messages: + items: + $ref: '#/components/schemas/kaminoMessage' + type: array + result: + nullable: true + type: object + success: + type: boolean + required: + - result + - success + - errors + - messages + type: object + kaminoMessage: + $ref: '#/components/schemas/responseInfo' + originMaxHttpVersion: + properties: + editable: + $ref: '#/components/schemas/cacheRulesEditable' + id: + description: The identifier of the caching setting. + type: string + x-auditable: true + enum: + - origin_max_http_version + modified_on: + $ref: '#/components/schemas/cacheRulesModifiedOn' + description: Last time this setting was modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Value of the Origin Max HTTP Version Setting. + type: string + x-auditable: true + enum: + - '2' + - '1' + required: + - id + - value + - editable + - id + type: object + title: Origin Max HTTP Version + responseInfo: + properties: + code: + minimum: 1000 + type: integer + message: + type: string + documentation_url: + type: string + source: + type: object + properties: + pointer: + type: string + required: + - code + - message + type: object + uniqueItems: true + rumApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/rumSchemasMessages' + messages: + example: [] + $ref: '#/components/schemas/rumSchemasMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + rumEditable: + example: true + type: boolean + rumId: + example: rum + type: string + x-auditable: true + rumMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + rumRumSite: + properties: + editable: + $ref: '#/components/schemas/rumEditable' + id: + $ref: '#/components/schemas/rumId' + value: + $ref: '#/components/schemas/rumValue' + type: object + rumRumSiteResponseSingle: + properties: + errors: + $ref: '#/components/schemas/rumMessages' + messages: + $ref: '#/components/schemas/rumMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + result: + $ref: '#/components/schemas/rumRumSite' + required: + - success + - errors + - messages + type: object + rumSchemasMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + rumToggleRumRequest: + properties: + value: + description: Value can either be On or Off. + example: 'on' + type: string + type: object + rumValue: + description: Current state of RUM. Returns On, Off, or Manual. + example: 'on' + type: string + x-auditable: true + smartshieldAddress: + description: The hostname or IP address of the origin server to run health checks on. + example: www.example.com + type: string + x-auditable: true + smartshieldApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/smartshieldMessages' + messages: + example: [] + $ref: '#/components/schemas/smartshieldMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + smartshieldCacheReserveClearEndTs: + description: The time that the latest Cache Reserve Clear operation completed. + example: '2023-10-02T12:00:00.12345Z' + format: date-time + type: string + x-auditable: true + smartshieldCacheReserveClearStartTs: + description: The time that the latest Cache Reserve Clear operation started. + example: '2023-10-02T10:00:00.12345Z' + format: date-time + type: string + x-auditable: true + smartshieldCacheReserveClearState: + description: The current state of the Cache Reserve Clear operation. + enum: + - In-progress + - Completed + example: In-progress + type: string + x-auditable: true + smartshieldCheckRegions: + description: A list of regions from which to run health checks. Null means Cloudflare will pick a default region. + example: + - WEU + - ENAM + items: + description: 'WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, IN: India, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (BUSINESS and ENTERPRISE customers only).' + enum: + - WNAM + - ENAM + - WEU + - EEU + - NSAM + - SSAM + - OC + - ME + - NAF + - SAF + - IN + - SEAS + - NEAS + - ALL_REGIONS + type: string + nullable: true + type: array + x-auditable: true + smartshieldConsecutiveFails: + default: 1 + description: The number of consecutive fails required from a health check before changing the health to unhealthy. + type: integer + x-auditable: true + smartshieldConsecutiveSuccesses: + default: 1 + description: The number of consecutive successes required from a health check before changing the health to healthy. + type: integer + x-auditable: true + smartshieldDescription: + description: A human-readable description of the health check. + example: Health check for www.example.com + type: string + x-auditable: true + smartshieldFailureReason: + description: The current failure reason if status is unhealthy. + example: '' + readOnly: true + type: string + x-auditable: true + smartshieldHealthchecks: + properties: + address: + $ref: '#/components/schemas/smartshieldAddress' + check_regions: + $ref: '#/components/schemas/smartshieldCheckRegions' + consecutive_fails: + $ref: '#/components/schemas/smartshieldConsecutiveFails' + consecutive_successes: + $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' + created_on: + $ref: '#/components/schemas/smartshieldTimestamp' + readOnly: true + description: + $ref: '#/components/schemas/smartshieldDescription' + failure_reason: + $ref: '#/components/schemas/smartshieldFailureReason' + http_config: + $ref: '#/components/schemas/smartshieldHttpConfig' + id: + $ref: '#/components/schemas/smartshieldIdentifier' + interval: + $ref: '#/components/schemas/smartshieldInterval' + modified_on: + $ref: '#/components/schemas/smartshieldTimestamp' + readOnly: true + name: + $ref: '#/components/schemas/smartshieldName' + retries: + $ref: '#/components/schemas/smartshieldRetries' + status: + $ref: '#/components/schemas/smartshieldStatus' + suspended: + $ref: '#/components/schemas/smartshieldSuspended' + tcp_config: + $ref: '#/components/schemas/smartshieldTcpConfig' + timeout: + $ref: '#/components/schemas/smartshieldTimeout' + type: + $ref: '#/components/schemas/smartshieldType' + type: object + smartshieldHttpConfig: + description: Parameters specific to an HTTP or HTTPS health check. + nullable: true + properties: + allow_insecure: + default: false + description: Do not validate the certificate when the health check uses HTTPS. + type: boolean + x-auditable: true + expected_body: + description: A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. + example: success + type: string + x-auditable: true + expected_codes: + description: The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check. + example: + - 2xx + - '302' + items: + type: string + nullable: true + type: array + x-auditable: true + follow_redirects: + default: false + description: Follow redirects if the origin returns a 3xx status code. + type: boolean + x-auditable: true + header: + description: The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. + example: + Host: + - example.com + X-App-ID: + - abc123 + nullable: true + type: object + method: + default: GET + description: The HTTP method to use for the health check. + enum: + - GET + - HEAD + type: string + x-auditable: true + path: + default: / + description: The endpoint path to health check against. + example: /health + type: string + x-auditable: true + port: + default: 80 + description: Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS. + type: integer + x-auditable: true + type: object + smartshieldIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + x-auditable: true + smartshieldInterval: + default: 60 + description: The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations. + type: integer + x-auditable: true + smartshieldMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + smartshieldName: + description: A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed. + example: server-1 + type: string + x-auditable: true + smartshieldQueryHealthcheck: + properties: + address: + $ref: '#/components/schemas/smartshieldAddress' + check_regions: + $ref: '#/components/schemas/smartshieldCheckRegions' + consecutive_fails: + $ref: '#/components/schemas/smartshieldConsecutiveFails' + consecutive_successes: + $ref: '#/components/schemas/smartshieldConsecutiveSuccesses' + description: + $ref: '#/components/schemas/smartshieldDescription' + http_config: + $ref: '#/components/schemas/smartshieldHttpConfig' + interval: + $ref: '#/components/schemas/smartshieldInterval' + name: + $ref: '#/components/schemas/smartshieldName' + retries: + $ref: '#/components/schemas/smartshieldRetries' + suspended: + $ref: '#/components/schemas/smartshieldSuspended' + tcp_config: + $ref: '#/components/schemas/smartshieldTcpConfig' + timeout: + $ref: '#/components/schemas/smartshieldTimeout' + type: + $ref: '#/components/schemas/smartshieldType' + required: + - name + - address + type: object + smartshieldResponseCollection: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + items: + $ref: '#/components/schemas/smartshieldHealthchecks' + nullable: true + type: array + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + result_info: + $ref: '#/components/schemas/smartshieldResultInfo' + required: + - success + - errors + - messages + - result + smartshieldResultInfo: + properties: + count: + description: Total number of results for the requested service + example: 1 + type: number + page: + description: Current page within paginated list of results + example: 1 + type: number + per_page: + description: Number of results per page of results + example: 20 + type: number + total_count: + description: Total results available without any search parameters + example: 2000 + type: number + type: object + smartshieldRetries: + default: 2 + description: The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. + type: integer + x-auditable: true + smartshieldSingleHcIdResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + properties: + id: + $ref: '#/components/schemas/smartshieldIdentifier' + type: object + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + smartshieldSingleHcResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/smartshieldMessages' + messages: + $ref: '#/components/schemas/smartshieldMessages' + result: + $ref: '#/components/schemas/smartshieldHealthchecks' + success: + description: Whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + smartshieldSmartShieldSettingsGetResponse: + description: A consolidated object containing settings from multiple APIs for partial updates. + required: + - smart_tiered_cache + - smart_routing + - regional_tiered_cache + - cache_reserve + - healthchecks_count + type: object + properties: + cache_reserve: + properties: + editable: + description: Whether the setting is editable. + example: true + type: boolean + id: + description: The id of the Cache Reserve setting. + example: cache_reserve + type: string + value: + description: Specifies the enablement value of Cache Reserve. + enum: + - 'on' + - 'off' + example: 'off' + type: string + type: object + regional_tiered_cache: + properties: + editable: + description: Whether the setting is editable. + example: true + type: boolean + id: + description: The id of the Regional Tiered Cache setting. + example: regional_tiered_cache + type: string + value: + description: Specifies the enablement value of Cache Reserve. + enum: + - 'on' + - 'off' + example: 'off' + type: string + type: object + smart_routing: + properties: + editable: + description: Whether the setting is editable. + example: true + type: boolean + id: + description: The id of the Smart Routing setting. + example: smart_routing + type: string + value: + description: Specifies the enablement value of Argo Smart Routing. + enum: + - 'on' + - 'off' + example: 'off' + type: string + type: object + smart_tiered_cache: + properties: + editable: + description: Whether the setting is editable. + example: true + type: boolean + id: + description: The id of the Smart Tiered Cache setting. + example: smart_tiered_cache + type: string + modified_on: + description: The last time the setting was modified. + example: '2025-09-10T22:53:22.946098Z' + type: string + readOnly: true + value: + description: Specifies the enablement value of Tiered Cache. + enum: + - 'on' + - 'off' + example: 'on' + type: string + type: object + healthchecks_count: + description: The total number of health checks associated with the zone. + example: 5 + type: integer + smartshieldSmartShieldSettingsPatchBody: + description: The patch body for Smart Shield. + example: + smart_tiered_cache: + value: 'on' + properties: + cache_reserve: + properties: + value: + description: Specifies the enablement value of Cache Reserve. + enum: + - 'on' + - 'off' + example: 'on' + type: string + type: object + regional_tiered_cache: + properties: + value: + description: Specifies the enablement value of Regional Tiered Cache. + enum: + - 'on' + - 'off' + example: 'on' + type: string + type: object + smart_routing: + properties: + value: + description: Specifies the enablement value of Smart Routing. + enum: + - 'on' + - 'off' + example: 'on' + type: string + type: object + smart_tiered_cache: + properties: + value: + description: Specifies the enablement value of Smart Tiered Cache. + enum: + - 'on' + - 'off' + example: 'on' + type: string + type: object + type: object + smartshieldSmartShieldSettingsPatchResponse: + description: A consolidated object containing settings from multiple APIs for partial updates. + properties: + smart_tiered_cache: + properties: + editable: + description: Whether the setting is editable. + example: true + type: boolean + id: + description: The id of the Smart Tiered Cache setting. + example: smart_tiered_cache + type: string + modified_on: + description: The last time the setting was modified. + example: '2025-09-10T22:53:22.946098Z' + type: string + readOnly: true + value: + description: Specifies the enablement value of Tiered Cache. + enum: + - 'on' + - 'off' + example: 'on' + type: string + type: object + required: + - smart_tiered_cache + - smart_routing + - regional_tiered_cache + - cache_reserve + type: object + smartshieldStatus: + description: The current status of the origin server according to the health check. + enum: + - unknown + - healthy + - unhealthy + - suspended + example: healthy + readOnly: true + type: string + x-auditable: true + smartshieldSuspended: + default: false + description: If suspended, no health checks are sent to the origin. + type: boolean + x-auditable: true + smartshieldTcpConfig: + description: Parameters specific to TCP health check. + nullable: true + properties: + method: + default: connection_established + description: The TCP connection method to use for the health check. + enum: + - connection_established + type: string + x-auditable: true + port: + default: 80 + description: Port number to connect to for the health check. Defaults to 80. + type: integer + x-auditable: true + type: object + smartshieldTimeout: + default: 5 + description: The timeout (in seconds) before marking the health check as failed. + type: integer + x-auditable: true + smartshieldTimestamp: + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + x-auditable: true + smartshieldType: + default: HTTP + description: The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. + example: HTTPS + type: string + x-auditable: true + speedApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/speedMessages' + messages: + example: [] + $ref: '#/components/schemas/speedMessages' + result: + nullable: true + type: object + success: + description: Whether the API call was successful. + example: false + type: boolean + x-auditable: true + required: + - success + - errors + - messages + - result + type: object + speedCloudflareFonts: + description: Enhance your website's font delivery with Cloudflare Fonts. Deliver Google Hosted fonts from your own domain, boost performance, and enhance user privacy. Refer to the Cloudflare Fonts documentation for more information. + title: Cloudflare Fonts + properties: + editable: + default: true + description: Whether or not this setting can be modified for this zone (based on your Cloudflare plan level). + enum: + - true + - false + readOnly: true + type: boolean + x-auditable: true + id: + description: ID of the zone setting. + example: fonts + type: string + x-auditable: true + enum: + - fonts + modified_on: + description: last time this setting was modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Current value of the zone setting. + enum: + - 'on' + - 'off' + example: 'on' + type: string + x-auditable: true + type: object + speedCloudflareFontsValue: + default: 'off' + description: Whether the feature is enabled or disabled. + enum: + - 'on' + - 'off' + type: string + x-auditable: true + speedCloudflareSpeedBrainResponse: + title: Cloudflare Speed Brain response + properties: + editable: + default: true + description: Whether or not this setting can be modified for this zone (based on your Cloudflare plan level). + enum: + - true + - false + readOnly: true + type: boolean + x-auditable: true + id: + description: Identifier of the zone setting. + example: development_mode + type: string + x-auditable: true + modified_on: + description: last time this setting was modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + nullable: true + readOnly: true + type: string + x-auditable: true + value: + description: Whether the feature is enabled or disabled. Defaults to "on" for Free plans, otherwise defaults to "off". + enum: + - 'on' + - 'off' + example: 'on' + type: string + x-auditable: true + type: object + speedMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + unnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d: + description: ID of the zone setting. + type: string + x-auditable: true + enum: + - cache_reserve_clear + example: cache_reserve_clear + unnamedSchemaRef34bb6e31800bc0207c083affa12d2775: + properties: + after: + example: yyy + type: string + x-auditable: true + before: + example: xxx + type: string + x-auditable: true + type: object + unnamedSchemaRef619309774d07ec6904f1e354560d6028: + items: + description: Unused + type: string + x-auditable: true + maxItems: 0 + type: array + enum: + - null + wafProductApiBundleCustomTopic: + properties: + label: + description: "Unique label identifier. Must contain only lowercase letters (a\u2013z), digits (0\u20139), and hyphens." + example: credit-cards + maxLength: 20 + minLength: 2 + type: string + topic: + description: Description of the topic category. Must contain only printable ASCII characters. + example: credit card numbers + maxLength: 50 + minLength: 2 + type: string + required: + - label + - topic + type: object + wafProductApiBundleCustomTopics: + properties: + topics: + description: Custom topic categories for Firewall for AI content detection. + items: + $ref: '#/components/schemas/wafProductApiBundleCustomTopic' + maxItems: 20 + type: array + type: object + wafProductApiBundleMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + wafProductApiBundleResponseCustomTopics: + type: object + properties: + errors: + $ref: '#/components/schemas/wafProductApiBundleMessages' + messages: + $ref: '#/components/schemas/wafProductApiBundleMessages' + result: + $ref: '#/components/schemas/wafProductApiBundleCustomTopics' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + wafProductApiBundleResponseSettings: + type: object + properties: + errors: + $ref: '#/components/schemas/wafProductApiBundleMessages' + messages: + $ref: '#/components/schemas/wafProductApiBundleMessages' + result: + $ref: '#/components/schemas/wafProductApiBundleSettings' + success: + description: Defines whether the API call was successful. + enum: + - true + example: true + type: boolean + required: + - success + - errors + - messages + - result + wafProductApiBundleSettings: + description: Firewall for AI enablement status for a zone. + properties: + enabled: + description: Whether Firewall for AI is enabled on the zone. + example: true + type: boolean + type: object + zoneActivationApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/zoneActivationMessages' + messages: + example: [] + $ref: '#/components/schemas/zoneActivationMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + zoneActivationIdentifier: + description: Identifier. + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + x-auditable: true + zoneActivationMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + zoneAnalyticsApiBandwidth: + description: Breakdown of totals for bandwidth in the form of bytes. + properties: + all: + description: The total number of bytes served within the time frame. + type: integer + cached: + description: The number of bytes that were cached (and served) by Cloudflare. + type: integer + content_type: + description: A variable list of key/value pairs where the key represents the type of content served, and the value is the number in bytes served. + example: + css: 237421 + gif: 1234242 + html: 1231290 + javascript: 123245 + jpeg: 784278 + type: object + country: + description: A variable list of key/value pairs where the key is a two-digit country code and the value is the number of bytes served to that country. + example: + AG: 2342483 + GI: 984753 + US: 123145433 + type: object + ssl: + description: A break down of bytes served over HTTPS. + properties: + encrypted: + description: The number of bytes served over HTTPS. + type: integer + unencrypted: + description: The number of bytes served over HTTP. + type: integer + type: object + ssl_protocols: + description: A breakdown of requests by their SSL protocol. + properties: + TLSv1: + description: The number of requests served over TLS v1.0. + type: integer + TLSv1.1: + description: The number of requests served over TLS v1.1. + type: integer + TLSv1.2: + description: The number of requests served over TLS v1.2. + type: integer + TLSv1.3: + description: The number of requests served over TLS v1.3. + type: integer + none: + description: The number of requests served over HTTP. + type: integer + type: object + uncached: + description: The number of bytes that were fetched and served from the origin server. + type: integer + type: object + zoneAnalyticsApiBandwidthByColo: + description: Breakdown of totals for bandwidth in the form of bytes. + properties: + all: + description: The total number of bytes served within the time frame. + type: integer + cached: + description: The number of bytes that were cached (and served) by Cloudflare. + type: integer + uncached: + description: The number of bytes that were fetched and served from the origin server. + type: integer + type: object + zoneAnalyticsApiColoResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/zoneAnalyticsApiMessages' + messages: + $ref: '#/components/schemas/zoneAnalyticsApiMessages' + result: + $ref: '#/components/schemas/zoneAnalyticsApiDatacenters' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + query: + $ref: '#/components/schemas/zoneAnalyticsApiQueryResponse' + required: + - success + - errors + - messages + - result + zoneAnalyticsApiDashboard: + description: Totals and timeseries data. + properties: + timeseries: + $ref: '#/components/schemas/zoneAnalyticsApiTimeseries' + totals: + $ref: '#/components/schemas/zoneAnalyticsApiTotals' + title: Dashboard response + type: object + zoneAnalyticsApiDashboardResponse: + type: object + properties: + errors: + $ref: '#/components/schemas/zoneAnalyticsApiMessages' + messages: + $ref: '#/components/schemas/zoneAnalyticsApiMessages' + result: + $ref: '#/components/schemas/zoneAnalyticsApiDashboard' + success: + description: Whether the API call was successful + enum: + - true + example: true + type: boolean + query: + $ref: '#/components/schemas/zoneAnalyticsApiQueryResponse' + required: + - success + - errors + - messages + - result + zoneAnalyticsApiDatacenters: + description: A breakdown of all dashboard analytics data by co-locations. This is limited to Enterprise zones only. + items: + properties: + colo_id: + description: The airport code identifer for the co-location. + example: SFO + type: string + timeseries: + $ref: '#/components/schemas/zoneAnalyticsApiTimeseriesByColo' + totals: + $ref: '#/components/schemas/zoneAnalyticsApiTotalsByColo' + type: object + title: Analytics data by datacenter + type: array + zoneAnalyticsApiIdentifier: + description: Identifier + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + readOnly: true + type: string + zoneAnalyticsApiMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + zoneAnalyticsApiPageviews: + description: Breakdown of totals for pageviews. + properties: + all: + description: The total number of pageviews served within the time range. + type: integer + search_engine: + description: A variable list of key/value pairs representing the search engine and number of hits. + example: + baidubot: 1345 + bingbot: 5372 + googlebot: 35272 + pingdom: 13435 + type: object + type: object + zoneAnalyticsApiQueryResponse: + description: The exact parameters/timestamps the analytics service used to return data. + properties: + since: + $ref: '#/components/schemas/zoneAnalyticsApiSince' + time_delta: + description: The amount of time (in minutes) that each data point in the timeseries represents. The granularity of the time-series returned (e.g. each bucket in the time series representing 1-minute vs 1-day) is calculated by the API based on the time-range provided to the API. + type: integer + until: + $ref: '#/components/schemas/zoneAnalyticsApiUntil' + readOnly: true + type: object + zoneAnalyticsApiRequests: + description: Breakdown of totals for requests. + properties: + all: + description: Total number of requests served. + type: integer + cached: + description: Total number of cached requests served. + type: integer + content_type: + description: A variable list of key/value pairs where the key represents the type of content served, and the value is the number of requests. + example: + css: 15343 + gif: 23178 + html: 1234213 + javascript: 318236 + jpeg: 1982048 + type: object + country: + description: A variable list of key/value pairs where the key is a two-digit country code and the value is the number of requests served to that country. + example: + AG: 37298 + GI: 293846 + US: 4181364 + type: object + http_status: + description: Key/value pairs where the key is a HTTP status code and the value is the number of requests served with that code. + example: + '200': 13496983 + '301': 283 + '400': 187936 + '402': 1828 + '404': 1293 + type: object + ssl: + description: A break down of requests served over HTTPS. + properties: + encrypted: + description: The number of requests served over HTTPS. + type: integer + unencrypted: + description: The number of requests served over HTTP. + type: integer + type: object + ssl_protocols: + description: A breakdown of requests by their SSL protocol. + properties: + TLSv1: + description: The number of requests served over TLS v1.0. + type: integer + TLSv1.1: + description: The number of requests served over TLS v1.1. + type: integer + TLSv1.2: + description: The number of requests served over TLS v1.2. + type: integer + TLSv1.3: + description: The number of requests served over TLS v1.3. + type: integer + none: + description: The number of requests served over HTTP. + type: integer + type: object + uncached: + description: Total number of requests served from the origin. + type: integer + type: object + zoneAnalyticsApiRequestsByColo: + description: Breakdown of totals for requests. + properties: + all: + description: Total number of requests served. + type: integer + cached: + description: Total number of cached requests served. + type: integer + country: + description: Key/value pairs where the key is a two-digit country code and the value is the number of requests served to that country. + example: + AG: 37298 + GI: 293846 + US: 4181364 + type: object + http_status: + description: A variable list of key/value pairs where the key is a HTTP status code and the value is the number of requests with that code served. + example: + '200': 13496983 + '301': 283 + '400': 187936 + '402': 1828 + '404': 1293 + type: object + uncached: + description: Total number of requests served from the origin. + type: integer + type: object + zoneAnalyticsApiSince: + default: -10080 + description: 'The (inclusive) beginning of the requested time frame. This value can be a negative integer representing the number of minutes in the past relative to time the request is made, or can be an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than one year. Ranges that the Cloudflare web application provides will provide the following period length for each point: - Last 60 minutes (from -59 to -1): 1 minute resolution - Last 7 hours (from -419 to -60): 15 minutes resolution - Last 15 hours (from -899 to -420): 30 minutes resolution - Last 72 hours (from -4320 to -900): 1 hour resolution - Older than 3 days (-525600 to -4320): 1 day resolution.' + example: '2015-01-01T12:23:00Z' + type: string + zoneAnalyticsApiThreats: + description: Breakdown of totals for threats. + properties: + all: + description: The total number of identifiable threats received over the time frame. + type: integer + country: + description: A list of key/value pairs where the key is a two-digit country code and the value is the number of malicious requests received from that country. + example: + AU: 91 + CN: 523423 + US: 123 + type: object + type: + description: The list of key/value pairs where the key is a threat category and the value is the number of requests. + example: + hot.ban.unknown: 5324 + macro.chl.captchaErr: 1341 + macro.chl.jschlErr: 5323 + user.ban.ip: 123 + type: object + type: object + zoneAnalyticsApiTimeseries: + description: Time deltas containing metadata about each bucket of time. The number of buckets (resolution) is determined by the amount of time between the since and until parameters. + items: + properties: + bandwidth: + $ref: '#/components/schemas/zoneAnalyticsApiBandwidth' + pageviews: + $ref: '#/components/schemas/zoneAnalyticsApiPageviews' + requests: + $ref: '#/components/schemas/zoneAnalyticsApiRequests' + since: + $ref: '#/components/schemas/zoneAnalyticsApiSince' + threats: + $ref: '#/components/schemas/zoneAnalyticsApiThreats' + uniques: + $ref: '#/components/schemas/zoneAnalyticsApiUniques' + until: + $ref: '#/components/schemas/zoneAnalyticsApiUntil' + type: object + type: array + zoneAnalyticsApiTimeseriesByColo: + description: Time deltas containing metadata about each bucket of time. The number of buckets (resolution) is determined by the amount of time between the since and until parameters. + items: + properties: + bandwidth: + $ref: '#/components/schemas/zoneAnalyticsApiBandwidthByColo' + requests: + $ref: '#/components/schemas/zoneAnalyticsApiRequestsByColo' + since: + $ref: '#/components/schemas/zoneAnalyticsApiSince' + threats: + $ref: '#/components/schemas/zoneAnalyticsApiThreats' + until: + $ref: '#/components/schemas/zoneAnalyticsApiUntil' + type: object + type: array + zoneAnalyticsApiTotals: + description: Breakdown of totals by data type. + properties: + bandwidth: + $ref: '#/components/schemas/zoneAnalyticsApiBandwidth' + pageviews: + $ref: '#/components/schemas/zoneAnalyticsApiPageviews' + requests: + $ref: '#/components/schemas/zoneAnalyticsApiRequests' + since: + $ref: '#/components/schemas/zoneAnalyticsApiSince' + threats: + $ref: '#/components/schemas/zoneAnalyticsApiThreats' + uniques: + $ref: '#/components/schemas/zoneAnalyticsApiUniques' + until: + $ref: '#/components/schemas/zoneAnalyticsApiUntil' + type: object + zoneAnalyticsApiTotalsByColo: + description: Breakdown of totals by data type. + properties: + bandwidth: + $ref: '#/components/schemas/zoneAnalyticsApiBandwidthByColo' + requests: + $ref: '#/components/schemas/zoneAnalyticsApiRequestsByColo' + since: + $ref: '#/components/schemas/zoneAnalyticsApiSince' + threats: + $ref: '#/components/schemas/zoneAnalyticsApiThreats' + until: + $ref: '#/components/schemas/zoneAnalyticsApiUntil' + type: object + zoneAnalyticsApiUniques: + properties: + all: + description: Total number of unique IP addresses within the time range. + type: integer + type: object + zoneAnalyticsApiUntil: + default: 0 + description: The (exclusive) end of the requested time frame. This value can be a negative integer representing the number of minutes in the past relative to time the request is made, or can be an absolute timestamp that conforms to RFC 3339. If omitted, the time of the request is used. + example: '2015-01-02T12:23:00Z' + type: string + zoneHold: + properties: + hold: + example: true + type: boolean + hold_after: + example: '2023-01-31T15:56:36+00:00' + type: string + include_subdomains: + type: string + type: object + zones0rttValue: + default: 'off' + description: Value of the 0-RTT setting. + enum: + - 'on' + - 'off' + type: string + zonesApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/zonesMessages' + messages: + example: [] + $ref: '#/components/schemas/zonesMessages' + result: + nullable: true + type: object + success: + description: Whether the API call was successful. + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + zonesApiResponseSingleId: + type: object + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + success: + description: Whether the API call was successful. + example: true + type: boolean + result: + nullable: true + properties: + id: + $ref: '#/components/schemas/zonesIdentifier' + required: + - id + type: object + required: + - success + - errors + - messages + zonesComponentsSchemasApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/zonesMessages' + messages: + example: [] + $ref: '#/components/schemas/zonesMessages' + result: + nullable: true + type: object + success: + description: Whether the API call was successful + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + zonesIdentifier: + description: Identifier + example: 023e105f4ecef8ad9ca31a8372d0c353 + maxLength: 32 + type: string + zonesMessages: + example: [] + items: + $ref: '#/components/schemas/responseInfo' + type: array + zonesMultipleSettings: + items: + type: object + title: 0-RTT Value + description: 0-RTT session resumption enabled for this zone. + properties: + editable: + default: true + description: Whether or not this setting can be modified for this zone (based on your Cloudflare plan level). + enum: + - true + - false + readOnly: true + type: boolean + id: + description: ID of the zone setting. + example: 0rtt + type: string + enum: + - 0rtt + modified_on: + description: last time this setting was modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + nullable: true + readOnly: true + type: string + value: + description: Current value of the zone setting. + example: 'on' + $ref: '#/components/schemas/zones0rttValue' + time_remaining: + description: 'Value of the zone setting. Notes: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is false.' + example: 3600 + readOnly: true + type: number + enabled: + $ref: '#/components/schemas/zonesSslRecommenderEnabled' + required: + - id + type: array + zonesName: + description: The domain name. Per [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4) the overall zone name can be up to 253 characters, with each segment ("label") not exceeding 63 characters. + example: example.com + maxLength: 253 + type: string + zonesPaused: + default: false + description: Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits. + type: boolean + zonesResultInfo: + properties: + count: + description: Total number of results for the requested service. + example: 1 + type: number + page: + description: Current page within paginated list of results. + example: 1 + type: number + per_page: + description: Number of results per page of results. + example: 20 + type: number + total_count: + description: Total results available without any search parameters. + example: 2000 + type: number + total_pages: + description: Total number of pages + example: 100 + type: number + type: object + zonesSchemasApiResponseCommonFailure: + properties: + errors: + example: + - code: 7003 + message: No route for the URI + minLength: 1 + $ref: '#/components/schemas/zonesSchemasMessages' + messages: + example: [] + $ref: '#/components/schemas/zonesSchemasMessages' + result: + enum: + - null + nullable: true + type: object + success: + description: Whether the API call was successful. + enum: + - false + example: false + type: boolean + required: + - success + - errors + - messages + - result + type: object + zonesSchemasMessages: + example: [] + items: + properties: + code: + minimum: 1000 + type: integer + documentation_url: + type: string + message: + type: string + source: + properties: + pointer: + type: string + type: object + required: + - code + - message + type: object + uniqueItems: true + type: array + zonesSetting: + type: object + title: 0-RTT Value + description: 0-RTT session resumption enabled for this zone. + properties: + editable: + default: true + description: Whether or not this setting can be modified for this zone (based on your Cloudflare plan level). + enum: + - true + - false + readOnly: true + type: boolean + id: + description: ID of the zone setting. + example: 0rtt + type: string + enum: + - 0rtt + modified_on: + description: last time this setting was modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + nullable: true + readOnly: true + type: string + value: + description: Current value of the zone setting. + example: 'on' + $ref: '#/components/schemas/zones0rttValue' + time_remaining: + description: 'Value of the zone setting. Notes: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is false.' + example: 3600 + readOnly: true + type: number + enabled: + $ref: '#/components/schemas/zonesSslRecommenderEnabled' + required: + - id + zonesSettingName: + description: Setting name + example: always_online + type: string + zonesSettingValue: + type: string + description: Value of the 0-RTT setting. + default: 'off' + enum: + - 'on' + - 'off' + properties: + enabled: + description: Whether the feature is enabled or not. + type: boolean + x-auditable: true + pool_id: + description: Egress pool id which refers to a grouping of dedicated egress IPs through which Cloudflare will connect to origin. + example: pool-id + type: string + x-auditable: true + cache_by_device_type: + description: Indicates whether or not [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) is enabled. + example: false + type: boolean + cf: + default: false + description: Indicates whether or not Cloudflare proxy is enabled. + example: true + type: boolean + hostnames: + description: An array of hostnames where Automatic Platform Optimization for WordPress is activated. + example: + - www.example.com + - example.com + - shop.example.com + items: + format: hostname + type: string + type: array + wordpress: + default: false + description: Indicates whether or not site is powered by WordPress. + example: true + type: boolean + wp_plugin: + default: false + description: Indicates whether or not [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is installed. + example: true + type: boolean + strict_transport_security: + description: Strict Transport Security. + properties: + enabled: + description: Whether or not strict transport security is enabled. + example: true + type: boolean + include_subdomains: + description: Include all subdomains for strict transport security. + example: true + type: boolean + max_age: + description: Max age in seconds of the strict transport security. + example: 86400 + type: number + nosniff: + description: 'Whether or not to include ''X-Content-Type-Options: nosniff'' header.' + example: true + type: boolean + preload: + description: Enable automatic preload of the HSTS configuration. + example: true + type: boolean + type: object + example: + - ECDHE-RSA-AES128-GCM-SHA256 + - AES128-SHA + items: + type: string + required: + - cache_by_device_type + - wp_plugin + - wordpress + - hostnames + - enabled + - cf + zonesSslRecommenderEnabled: + default: false + description: ssl-recommender enrollment setting. + type: boolean + zonesType: + default: full + description: A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. + enum: + - full + - partial + - secondary + - internal + example: full + type: string + zonesVanityNameServers: + default: [] + description: An array of domains used for custom name servers. This is only available for Business and Enterprise plans. + example: + - ns1.example.com + - ns2.example.com + items: + format: hostname + maxLength: 253 + type: string + type: array + zonesZone: + properties: + account: + description: The account the zone belongs to. + properties: + id: + $ref: '#/components/schemas/zonesIdentifier' + name: + description: The name of the account. + example: Example Account Name + type: string + type: object + activated_on: + description: The last time proof of ownership was detected and the zone was made active. + example: '2014-01-02T00:01:00.12345Z' + format: date-time + nullable: true + readOnly: true + type: string + cname_suffix: + description: Allows the customer to use a custom apex. *Tenants Only Configuration*. + example: cdn.cloudflare.com + type: string + created_on: + description: When the zone was created. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + development_mode: + description: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is 0. + example: 7200 + readOnly: true + type: number + id: + $ref: '#/components/schemas/zonesIdentifier' + meta: + description: Metadata about the zone. + properties: + cdn_only: + description: The zone is only configured for CDN. + example: true + type: boolean + custom_certificate_quota: + description: Number of Custom Certificates the zone can have. + example: 1 + type: integer + dns_only: + description: The zone is only configured for DNS. + example: true + type: boolean + foundation_dns: + description: The zone is setup with Foundation DNS. + example: true + type: boolean + page_rule_quota: + description: Number of Page Rules a zone can have. + example: 100 + type: integer + phishing_detected: + description: The zone has been flagged for phishing. + example: false + type: boolean + step: + example: 2 + type: integer + type: object + modified_on: + description: When the zone was last modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + readOnly: true + type: string + name: + description: The domain name. Per [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4) the overall zone name can be up to 253 characters, with each segment ("label") not exceeding 63 characters. + example: example.com + maxLength: 253 + type: string + name_servers: + description: The name servers Cloudflare assigns to a zone. + example: + - bob.ns.cloudflare.com + - lola.ns.cloudflare.com + items: + format: hostname + type: string + readOnly: true + type: array + original_dnshost: + description: DNS host at the time of switching to Cloudflare. + example: NameCheap + maxLength: 50 + nullable: true + readOnly: true + type: string + original_name_servers: + description: Original name servers before moving to Cloudflare. + example: + - ns1.originaldnshost.com + - ns2.originaldnshost.com + items: + format: hostname + type: string + nullable: true + readOnly: true + type: array + original_registrar: + description: Registrar for the domain at the time of switching to Cloudflare. + example: GoDaddy + nullable: true + readOnly: true + type: string + owner: + description: The owner of the zone. + properties: + id: + $ref: '#/components/schemas/zonesIdentifier' + name: + description: Name of the owner. + example: Example Org + type: string + type: + description: The type of owner. + example: organization + type: string + type: object + paused: + $ref: '#/components/schemas/zonesPaused' + permissions: + deprecated: true + description: Legacy permissions based on legacy user membership information. + items: + example: '#worker:read' + type: string + type: array + x-stainless-deprecation-message: This has been replaced by Account memberships. + plan: + deprecated: true + description: A Zones subscription information. + properties: + can_subscribe: + description: States if the subscription can be activated. + example: false + type: boolean + currency: + description: The denomination of the customer. + example: USD + type: string + externally_managed: + description: If this Zone is managed by another company. + example: false + type: boolean + frequency: + description: How often the customer is billed. + example: monthly + type: string + id: + $ref: '#/components/schemas/zonesIdentifier' + is_subscribed: + description: States if the subscription active. + example: false + type: boolean + legacy_discount: + description: If the legacy discount applies to this Zone. + example: false + type: boolean + legacy_id: + description: The legacy name of the plan. + example: free + type: string + name: + description: Name of the owner. + example: Example Org + type: string + price: + description: How much the customer is paying. + example: 10.99 + type: number + x-stainless-deprecation-message: 'Please use the `/zones/{zone_id}/subscription` API + + to update a zone''s plan. Changing this value will create/cancel + + associated subscriptions. To view available plans for this zone, + + see [Zone Plans](https://developers.cloudflare.com/api/resources/zones/subresources/plans/).' + type: object + status: + description: The zone status on Cloudflare. + enum: + - initializing + - pending + - active + - moved + example: active + readOnly: true + type: string + tenant: + description: The root organizational unit that this zone belongs to (such as a tenant or organization). + properties: + id: + $ref: '#/components/schemas/zonesIdentifier' + name: + description: The name of the Tenant account. + example: Example Account Name + type: string + type: object + tenant_unit: + description: The immediate parent organizational unit that this zone belongs to (such as under a tenant or sub-organization). + properties: + id: + $ref: '#/components/schemas/zonesIdentifier' + type: object + type: + $ref: '#/components/schemas/zonesType' + vanity_name_servers: + default: [] + description: An array of domains used for custom name servers. This is only available for Business and Enterprise plans. + example: + - ns1.example.com + - ns2.example.com + items: + format: hostname + maxLength: 253 + type: string + type: array + verification_key: + description: Verification key for partial zone setup. + example: 284344499-1084221259 + readOnly: true + type: string + required: + - id + - name + - development_mode + - owner + - account + - meta + - name_servers + - original_name_servers + - original_registrar + - original_dnshost + - created_on + - modified_on + - activated_on + - plan + type: object + zonesZoneSettingsResponseCollection: + properties: + errors: + $ref: '#/components/schemas/zonesMessages' + messages: + $ref: '#/components/schemas/zonesMessages' + success: + description: Whether the API call was successful + example: true + type: boolean + result: + items: + $ref: '#/components/schemas/zonesZoneSettingsResponseCollection_result_item' + type: array + required: + - success + - errors + - messages + type: object + zonesZoneSettingsResponseCollection_result_item: + type: object + title: 0-RTT Value + description: 0-RTT session resumption enabled for this zone. + properties: + editable: + default: true + description: Whether or not this setting can be modified for this zone (based on your Cloudflare plan level). + enum: + - true + - false + readOnly: true + type: boolean + id: + description: ID of the zone setting. + example: 0rtt + type: string + enum: + - 0rtt + modified_on: + description: last time this setting was modified. + example: '2014-01-01T05:20:00.12345Z' + format: date-time + nullable: true + readOnly: true + type: string + value: + description: Current value of the zone setting. + example: 'on' + $ref: '#/components/schemas/zones0rttValue' + time_remaining: + description: 'Value of the zone setting. Notes: The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is false.' + example: 3600 + readOnly: true + type: number + enabled: + $ref: '#/components/schemas/zonesSslRecommenderEnabled' + required: + - id + zonesZoneSettingsSingleRequest: + type: object + properties: + enabled: + $ref: '#/components/schemas/zonesSslRecommenderEnabled' + value: + $ref: '#/components/schemas/zonesSettingValue' + securitySchemes: + api_email: + in: header + name: X-Auth-Email + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key. + api_key: + in: header + name: X-Auth-Key + type: apiKey + description: The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys. + api_token: + scheme: bearer + type: http + description: The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + user_service_key: + in: header + name: X-Auth-User-Service-Key + type: apiKey + description: Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys). + x-stackQL-resources: + zones: + id: cloudflare.zones.zones + name: zones + title: Zones + methods: + list: + operation: + $ref: '#/paths/~1zones/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones/post' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + trigger_activation_check: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1activation_check/put' + response: + mediaType: application/json + openAPIDocKey: '200' + update_custom_ns: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_ns/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/zones/methods/get' + - $ref: '#/components/x-stackQL-resources/zones/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/zones/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/zones/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/zones/methods/delete' + replace: [] + latency: + id: cloudflare.zones.latency + name: latency + title: Latency + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1analytics~1latency/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/latency/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + latency_colos: + id: cloudflare.zones.latency_colos + name: latency_colos + title: Latency Colos + methods: + list_by_zone: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1analytics~1latency~1colos/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/latency_colos/methods/list_by_zone' + insert: [] + update: [] + delete: [] + replace: [] + plans: + id: cloudflare.zones.plans + name: plans + title: Plans + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1available_plans/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1available_plans~1{plan_identifier}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/plans/methods/get' + - $ref: '#/components/x-stackQL-resources/plans/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + rate_plans: + id: cloudflare.zones.rate_plans + name: rate_plans + title: Rate Plans + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1available_rate_plans/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rate_plans/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + custom_nameservers: + id: cloudflare.zones.custom_nameservers + name: custom_nameservers + title: Custom Nameservers + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1custom_ns/get' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/custom_nameservers/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + environments: + id: cloudflare.zones.environments + name: environments + title: Environments + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1environments/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.environments + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1environments/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1environments/post' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1environments/put' + response: + mediaType: application/json + openAPIDocKey: '200' + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1environments~1{environment_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + rollback: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1environments~1{environment_id}~1rollback/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/environments/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/environments/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/environments/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/environments/methods/delete' + replace: + - $ref: '#/components/x-stackQL-resources/environments/methods/update' + custom_topics: + id: cloudflare.zones.custom_topics + name: custom_topics + title: Custom Topics + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall-for-ai~1custom-topics/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result.topics + firewall_for_ai_custom_topics_put: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall-for-ai~1custom-topics/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/custom_topics/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/custom_topics/methods/firewall_for_ai_custom_topics_put' + firewall_for_ai_settings: + id: cloudflare.zones.firewall_for_ai_settings + name: firewall_for_ai_settings + title: Firewall For Ai Settings + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall-for-ai~1settings/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/firewall_for_ai_settings/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + settings: + id: cloudflare.zones.settings + name: settings + title: Settings + methods: + firewall_for_ai_settings_put: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1firewall-for-ai~1settings/put' + response: + mediaType: application/json + openAPIDocKey: '200' + zone_settings_edit_zone_settings_info: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1{setting_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1{setting_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/settings/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/settings/methods/edit' + - $ref: '#/components/x-stackQL-resources/settings/methods/zone_settings_edit_zone_settings_info' + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/settings/methods/firewall_for_ai_settings_put' + holds: + id: cloudflare.zones.holds + name: holds + title: Holds + methods: + delete: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1hold/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1hold/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + edit: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1hold/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + create: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1hold/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/holds/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/holds/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/holds/methods/edit' + delete: + - $ref: '#/components/x-stackQL-resources/holds/methods/delete' + replace: [] + zones_settings: + id: cloudflare.zones.zones_settings + name: zones_settings + title: Zones Settings + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/zones_settings/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + aegis: + id: cloudflare.zones.aegis + name: aegis + title: Aegis + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1aegis/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + zone_cache_settings_change_aegis_setting: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1aegis/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/aegis/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/aegis/methods/zone_cache_settings_change_aegis_setting' + delete: [] + replace: [] + fonts: + id: cloudflare.zones.fonts + name: fonts + title: Fonts + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1fonts/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + zone_settings_change_fonts_setting: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1fonts/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/fonts/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/fonts/methods/zone_settings_change_fonts_setting' + delete: [] + replace: [] + origin_h2_max_streams: + id: cloudflare.zones.origin_h2_max_streams + name: origin_h2_max_streams + title: Origin H2 Max Streams + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1origin_h2_max_streams/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + zone_cache_settings_change_origin_h2_max_streams_setting: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1origin_h2_max_streams/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/origin_h2_max_streams/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/origin_h2_max_streams/methods/zone_cache_settings_change_origin_h2_max_streams_setting' + delete: [] + replace: [] + origin_max_http_version: + id: cloudflare.zones.origin_max_http_version + name: origin_max_http_version + title: Origin Max Http Version + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1origin_max_http_version/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + zone_cache_settings_change_origin_max_http_version_setting: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1origin_max_http_version/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/origin_max_http_version/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/origin_max_http_version/methods/zone_cache_settings_change_origin_max_http_version_setting' + delete: [] + replace: [] + rum: + id: cloudflare.zones.rum + name: rum + title: Rum + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1rum/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + web_analytics_toggle_rum: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1rum/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/rum/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/rum/methods/web_analytics_toggle_rum' + delete: [] + replace: [] + speed_brain: + id: cloudflare.zones.speed_brain + name: speed_brain + title: Speed Brain + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1speed_brain/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + zone_settings_change_speed_brain_setting: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1speed_brain/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/speed_brain/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/speed_brain/methods/zone_settings_change_speed_brain_setting' + delete: [] + replace: [] + ssl_automatic_mode: + id: cloudflare.zones.ssl_automatic_mode + name: ssl_automatic_mode + title: Ssl Automatic Mode + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1ssl_automatic_mode/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + ssl_detector_automatic_mode_patch_enrollment: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1settings~1ssl_automatic_mode/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/ssl_automatic_mode/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/ssl_automatic_mode/methods/ssl_detector_automatic_mode_patch_enrollment' + delete: [] + replace: [] + smart_shield: + id: cloudflare.zones.smart_shield + name: smart_shield + title: Smart Shield + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1smart_shield/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + smart_shield_patch_settings: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1smart_shield/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/smart_shield/methods/list' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/smart_shield/methods/smart_shield_patch_settings' + delete: [] + replace: [] + cache_reserve_clear: + id: cloudflare.zones.cache_reserve_clear + name: cache_reserve_clear + title: Cache Reserve Clear + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1cache_reserve_clear/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + smart_shield_settings_start_cache_reserve_clear: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1cache_reserve_clear/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/cache_reserve_clear/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/cache_reserve_clear/methods/smart_shield_settings_start_cache_reserve_clear' + update: [] + delete: [] + replace: [] + healthchecks: + id: cloudflare.zones.healthchecks + name: healthchecks + title: Healthchecks + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + smart_shield_create_health_check: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks/post' + response: + mediaType: application/json + openAPIDocKey: '200' + smart_shield_delete_health_check: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks~1{healthcheck_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks~1{healthcheck_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + smart_shield_patch_health_check: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks~1{healthcheck_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + smart_shield_update_health_check: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1smart_shield~1healthchecks~1{healthcheck_id}/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/get' + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/smart_shield_create_health_check' + update: + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/smart_shield_patch_health_check' + delete: + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/smart_shield_delete_health_check' + replace: + - $ref: '#/components/x-stackQL-resources/healthchecks/methods/smart_shield_update_health_check' + subscriptions: + id: cloudflare.zones.subscriptions + name: subscriptions + title: Subscriptions + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1subscription/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1subscription/post' + response: + mediaType: application/json + openAPIDocKey: '200' + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1subscription/put' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/create' + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/subscriptions/methods/update' + suppression: + id: cloudflare.zones.suppression + name: suppression + title: Suppression + methods: + list: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1suppression/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + post_zones_zone_id_email_sending_suppression: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1suppression/post' + response: + mediaType: application/json + openAPIDocKey: '200' + get: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1suppression~1{suppression_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + delete_zones_zone_id_email_sending_suppression_suppression_id: + operation: + $ref: '#/paths/~1zones~1{zone_id}~1email~1sending~1suppression~1{suppression_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/suppression/methods/get' + - $ref: '#/components/x-stackQL-resources/suppression/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/suppression/methods/post_zones_zone_id_email_sending_suppression' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/suppression/methods/delete_zones_zone_id_email_sending_suppression_suppression_id' + replace: [] + http_requests_adaptive_groups: + id: cloudflare.zones.http_requests_adaptive_groups + name: http_requests_adaptive_groups + title: Http Requests Adaptive Groups + methods: + list: + operation: + $ref: '#/paths/~1graphql~1http_requests_adaptive_groups/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + transform: + type: golang_template_json_v0.3.0 + body: "{\n \"result\": [\n {{- $data := index . \"data\" }}\n {{- if $data }}\n {{- $viewer := index $data \"viewer\" }}\n {{- $zones := index $viewer \"zones\" }}\n {{- if and $zones (gt (len $zones) 0) }}\n {{- $rows := index (index $zones 0) \"httpRequestsAdaptiveGroups\" }}\n {{- $first := true -}}\n {{- range $i, $row := $rows }}\n {{- if not $first }},{{ end }}{{- $first = false }}\n {\n \"datetime\": {{ toJson (index $row \"dimensions\" \"datetime\") }},\n \"client_country_name\": {{ toJson (index $row \"dimensions\" \"clientCountryName\") }},\n \"edge_response_status\": {{ index $row \"dimensions\" \"edgeResponseStatus\" }},\n \"client_request_http_method_name\": {{ toJson (index $row \"dimensions\" \"clientRequestHTTPMethodName\") }},\n \"requests\": {{ index $row \"count\" }},\n \"bytes\": {{ index $row \"sum\"\ + \ \"edgeResponseBytes\" }},\n \"visits\": {{ index $row \"sum\" \"visits\" }}\n }\n {{- end }}\n {{- end }}\n {{- end }}\n ]\n}\n" + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/http_requests_adaptive_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + http_requests_1h_groups: + id: cloudflare.zones.http_requests_1h_groups + name: http_requests_1h_groups + title: Http Requests 1H Groups + methods: + list: + operation: + $ref: '#/paths/~1graphql~1http_requests_1h_groups/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + transform: + type: golang_template_json_v0.3.0 + body: "{\n \"result\": [\n {{- $data := index . \"data\" }}\n {{- if $data }}\n {{- $viewer := index $data \"viewer\" }}\n {{- $zones := index $viewer \"zones\" }}\n {{- if and $zones (gt (len $zones) 0) }}\n {{- $rows := index (index $zones 0) \"httpRequests1hGroups\" }}\n {{- $first := true -}}\n {{- range $i, $row := $rows }}\n {{- if not $first }},{{ end }}{{- $first = false }}\n {\n \"datetime\": {{ toJson (index $row \"dimensions\" \"datetime\") }},\n \"date\": {{ toJson (index $row \"dimensions\" \"date\") }},\n \"requests\": {{ index $row \"sum\" \"requests\" }},\n \"bytes\": {{ index $row \"sum\" \"bytes\" }},\n \"threats\": {{ index $row \"sum\" \"threats\" }},\n \"page_views\": {{ index $row \"sum\" \"pageViews\" }},\n \"cached_requests\": {{ index $row \"sum\" \"cachedRequests\" }},\n \"cached_bytes\": {{ index $row \"\ + sum\" \"cachedBytes\" }},\n \"encrypted_requests\": {{ index $row \"sum\" \"encryptedRequests\" }},\n \"encrypted_bytes\": {{ index $row \"sum\" \"encryptedBytes\" }},\n \"edge_request_bytes\": {{ index $row \"sum\" \"edgeRequestBytes\" }}\n }\n {{- end }}\n {{- end }}\n {{- end }}\n ]\n}\n" + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/http_requests_1h_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + http_requests_overview_adaptive_groups: + id: cloudflare.zones.http_requests_overview_adaptive_groups + name: http_requests_overview_adaptive_groups + title: Http Requests Overview Adaptive Groups + methods: + list: + operation: + $ref: '#/paths/~1graphql~1http_requests_overview_adaptive_groups/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.result + transform: + type: golang_template_json_v0.3.0 + body: "{\n \"result\": [\n {{- $data := index . \"data\" }}\n {{- if $data }}\n {{- $viewer := index $data \"viewer\" }}\n {{- $zones := index $viewer \"zones\" }}\n {{- if and $zones (gt (len $zones) 0) }}\n {{- $rows := index (index $zones 0) \"httpRequestsOverviewAdaptiveGroups\" }}\n {{- $first := true -}}\n {{- range $i, $row := $rows }}\n {{- if not $first }},{{ end }}{{- $first = false }}\n {\n \"datetime\": {{ toJson (index $row \"dimensions\" \"datetime\") }},\n \"client_country_name\": {{ toJson (index $row \"dimensions\" \"clientCountryName\") }},\n \"edge_response_status\": {{ index $row \"dimensions\" \"edgeResponseStatus\" }},\n \"user_agent_browser\": {{ toJson (index $row \"dimensions\" \"userAgentBrowser\") }},\n \"requests\": {{ index $row \"sum\" \"requests\" }},\n \"bytes\": {{ index $row \"sum\" \"bytes\" }},\n \"cached_requests\": {{ index $row\ + \ \"sum\" \"cachedRequests\" }},\n \"cached_bytes\": {{ index $row \"sum\" \"cachedBytes\" }},\n \"page_views\": {{ index $row \"sum\" \"pageViews\" }},\n \"visits\": {{ index $row \"sum\" \"visits\" }}\n }\n {{- end }}\n {{- end }}\n {{- end }}\n ]\n}\n" + x-stackql-protocol: graphql + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/http_requests_overview_adaptive_groups/methods/list' + insert: [] + update: [] + delete: [] + replace: []