Skip to main content

hosts

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

Overview

Namehosts
TypeResource
Idcloudflare.schema_validation.hosts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringName of the schema (example: petstore schema)
schema_idstring (uuid)A unique identifier of this schema (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.

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.

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