Skip to main content

hosts

Creates, updates, deletes, gets or lists a hosts resource.

Overview

Namehosts
TypeResource
Idcloudflare.api_gateway.hosts

Fields

The following fields are returned by SELECT queries:

Retrieve schema hosts in a zone response

NameDatatypeDescription
namestringName of the schema (example: petstore schema)
schema_idstringUUID. (example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415)
created_atstring (date-time) (example: 2014-01-01T05:20:00.12345Z)
hostsarrayHosts serving the schema, e.g zone.host.com

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectzone_idpage, per_pageLists all unique hosts found in uploaded OpenAPI schemas for the zone. Useful for understanding which domains have schema coverage.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
zone_idstringThe Cloudflare zone ID.
pageintegerPage number of paginated results.
per_pageintegerMaximum number of results per page.

SELECT examples

Lists all unique hosts found in uploaded OpenAPI schemas for the zone. Useful for understanding which domains have schema coverage.

SELECT
name,
schema_id,
created_at,
hosts
FROM cloudflare.api_gateway.hosts
WHERE zone_id = '{{ zone_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;