discovery_operations
Creates, updates, deletes, gets or lists a discovery_operations resource.
Overview
| Name | discovery_operations |
| Type | Resource |
| Id | cloudflare.api_gateway.discovery_operations |
Fields
The following fields are returned by SELECT queries:
- list
Retrieve discovered operations on a zone response
| Name | Datatype | Description |
|---|---|---|
id | string | UUID. (example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415) |
endpoint | string (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}) |
features | object | |
host | string (hostname) | RFC3986-compliant host. (example: www.example.com) |
last_updated | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
method | string | The HTTP method used to access the endpoint. (GET, POST, HEAD, OPTIONS, PUT, DELETE, CONNECT, PATCH, TRACE) (example: GET) |
origin | array | API discovery engine(s) that discovered this operation |
state | string | State 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | zone_id | page, per_page, host, method, endpoint, direction, order, diff, origin, state | Retrieve 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.
| Name | Datatype | Description |
|---|---|---|
zone_id | string | The Cloudflare zone ID. |
diff | boolean | |
direction | string | |
endpoint | string | |
host | array | |
method | array | |
order | string | |
origin | string | Filter 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 |
page | integer | Page number of paginated results. |
per_page | integer | Maximum number of results per page. |
state | string | Filter 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
- list
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 }}'
;