hosts
Creates, updates, deletes, gets or lists a hosts resource.
Overview
| Name | hosts |
| Type | Resource |
| Id | cloudflare.schema_validation.hosts |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Name of the schema (example: petstore schema) |
schema_id | string (uuid) | A unique identifier of this schema (example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415) |
created_at | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
hosts | array | Hosts serving the schema, e.g zone.host.com |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | zone_id | page, per_page | Lists 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.
| Name | Datatype | Description |
|---|---|---|
zone_id | string | The Cloudflare zone ID. |
page | integer | Page number of paginated results. |
per_page | integer | Maximum number of results per page. |
SELECT examples
- list
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 }}'
;