Skip to main content

discovery_operations

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

Overview

Namediscovery_operations
TypeResource
Idcloudflare.api_gateway.discovery_operations

Fields

The following fields are returned by SELECT queries:

Retrieve discovered operations on a zone response

NameDatatypeDescription
idstringUUID. (example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415)
endpointstring (uri-template)The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with {varN}, starting with {var1}, during insertion. This will further be Cloudflare-normalized upon insertion. See: https://developers.cloudflare.com/rules/normalization/how-it-works/. (example: /api/v1/users/{var1})
featuresobject
hoststring (hostname)RFC3986-compliant host. (example: www.example.com)
last_updatedstring (date-time) (example: 2014-01-01T05:20:00.12345Z)
methodstringThe HTTP method used to access the endpoint. (GET, POST, HEAD, OPTIONS, PUT, DELETE, CONNECT, PATCH, TRACE) (example: GET)
originarrayAPI discovery engine(s) that discovered this operation
statestringState of operation in API Discovery * review - Operation is not saved into API Shield Endpoint Management * saved - Operation is saved into API Shield Endpoint Management * ignored - Operation is marked as ignored (review, saved, ignored)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectzone_idpage, per_page, host, method, endpoint, direction, order, diff, origin, stateRetrieve the most up to date view of discovered operations

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.
diffboolean
directionstring
endpointstring
hostarray
methodarray
orderstring
originstringFilter results to only include discovery results sourced from a particular discovery engine * ML - Discovered operations that were sourced using ML API Discovery * SessionIdentifier - Discovered operations that were sourced using Session Identifier API Discovery
pageintegerPage number of paginated results.
per_pageintegerMaximum number of results per page.
statestringFilter results to only include discovery results in a particular state. States are as follows * review - Discovered operations that are not saved into API Shield Endpoint Management * saved - Discovered operations that are already saved into API Shield Endpoint Management * ignored - Discovered operations that have been marked as ignored

SELECT examples

Retrieve the most up to date view of discovered operations

SELECT
id,
endpoint,
features,
host,
last_updated,
method,
origin,
state
FROM cloudflare.api_gateway.discovery_operations
WHERE zone_id = '{{ zone_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND host = '{{ host }}'
AND method = '{{ method }}'
AND endpoint = '{{ endpoint }}'
AND direction = '{{ direction }}'
AND order = '{{ order }}'
AND diff = '{{ diff }}'
AND origin = '{{ origin }}'
AND state = '{{ state }}'
;