---
title: Discovery
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[API Gateway](https://developers.cloudflare.com/api/go/resources/api_gateway)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Discovery

##### [Export discovered API operations as OpenAPI schemas](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/discovery/methods/get)

client.APIGateway.Discovery.Get(ctx, query) (\*[DiscoveryGetResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.discovery%20%3E%20(model)%20DiscoveryGetResponse%20%3E%20(schema)>), error)

GET/zones/{zone\_id}/api\_gateway/discovery

##### ModelsExpand Collapse

<details>

<summary>

type DiscoveryOperation struct{…}

</summary>

ID string

UUID.

maxLength36

minLength36

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Endpoint string

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: <a href="https://developers.cloudflare.com/rules/normalization/how-it-works/">https://developers.cloudflare.com/rules/normalization/how-it-works/</a>.

formaturi-template

maxLength4096

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20endpoint">Link to this property</a>

Host string

RFC3986-compliant host.

formathostname

maxLength255

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20host">Link to this property</a>

LastUpdated Time

formatdate-time

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20last_updated">Link to this property</a>

<details>

<summary>

Method DiscoveryOperationMethod

The HTTP method used to access the endpoint.

</summary>

One of the following:

const DiscoveryOperationMethodGet DiscoveryOperationMethod = "GET"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%200">Link to this property</a>

const DiscoveryOperationMethodPost DiscoveryOperationMethod = "POST"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%201">Link to this property</a>

const DiscoveryOperationMethodHead DiscoveryOperationMethod = "HEAD"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%202">Link to this property</a>

const DiscoveryOperationMethodOptions DiscoveryOperationMethod = "OPTIONS"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%203">Link to this property</a>

const DiscoveryOperationMethodPut DiscoveryOperationMethod = "PUT"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%204">Link to this property</a>

const DiscoveryOperationMethodDelete DiscoveryOperationMethod = "DELETE"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%205">Link to this property</a>

const DiscoveryOperationMethodConnect DiscoveryOperationMethod = "CONNECT"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%206">Link to this property</a>

const DiscoveryOperationMethodPatch DiscoveryOperationMethod = "PATCH"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%207">Link to this property</a>

const DiscoveryOperationMethodTrace DiscoveryOperationMethod = "TRACE"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20method%20%3E%20(member)%208">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20method">Link to this property</a>

<details>

<summary>

Origin \[]DiscoveryOperationOrigin

API discovery engine(s) that discovered this operation

</summary>

One of the following:

const DiscoveryOperationOriginMl DiscoveryOperationOrigin = "ML"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

const DiscoveryOperationOriginSessionIdentifier DiscoveryOperationOrigin = "SessionIdentifier"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

const DiscoveryOperationOriginLabelDiscovery DiscoveryOperationOrigin = "LabelDiscovery"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20origin%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20origin">Link to this property</a>

<details>

<summary>

State DiscoveryOperationState

State of operation in API Discovery

- <code>review</code> - Operation is not saved into API Shield Endpoint Management
- <code>saved</code> - Operation is saved into API Shield Endpoint Management
- <code>ignored</code> - Operation is marked as ignored

</summary>

One of the following:

const DiscoveryOperationStateReview DiscoveryOperationState = "review"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20state%20%3E%20(member)%200">Link to this property</a>

const DiscoveryOperationStateSaved DiscoveryOperationState = "saved"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20state%20%3E%20(member)%201">Link to this property</a>

const DiscoveryOperationStateIgnored DiscoveryOperationState = "ignored"

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20state%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20state">Link to this property</a>

<details>

<summary>

Features DiscoveryOperationFeaturesOptional

</summary>

<details>

<summary>

TrafficStats DiscoveryOperationFeaturesTrafficStatsOptional

</summary>

LastUpdated Time

formatdate-time

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(property)%20traffic_stats%20%3E%20(property)%20last_updated">Link to this property</a>

PeriodSeconds int64

The period in seconds these statistics were computed over

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(property)%20traffic_stats%20%3E%20(property)%20period_seconds">Link to this property</a>

Requests float64

The average number of requests seen during this period

formatfloat

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(property)%20traffic_stats%20%3E%20(property)%20requests">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(property)%20traffic_stats">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)%20%3E%20(property)%20features">Link to this property</a>

</details>

[Link to this property](<#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)>)

#### DiscoveryOperations

##### [List discovered web and API operations](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/discovery/subresources/operations/methods/list)

client.APIGateway.Discovery.Operations.List(ctx, params) (\*V4PagePaginationArray\[[DiscoveryOperation](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.discovery%20%3E%20(model)%20discovery_operation%20%3E%20(schema)>)], error)

GET/zones/{zone\_id}/api\_gateway/discovery/operations

##### [Edit discovered web and API operations](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/discovery/subresources/operations/methods/bulk_edit)

client.APIGateway.Discovery.Operations.BulkEdit(ctx, params) (\*[DiscoveryOperationBulkEditResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.discovery.operations%20%3E%20(model)%20DiscoveryOperationBulkEditResponse%20%3E%20(schema)>), error)

PATCH/zones/{zone\_id}/api\_gateway/discovery/operations