---
title: Discovery
---

[Skip to content](#%5Ftop) 

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

[API Gateway](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway)

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/typescript/resources/api%5Fgateway/subresources/discovery/methods/get)

client.apiGateway.discovery.get(DiscoveryGetParams { zone\_id } params, RequestOptionsoptions?): [DiscoveryGetResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.discovery%20%3E%20%28model%29%20discovery%5Fget%5Fresponse%20%3E%20%28schema%29) { schemas, timestamp } 

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

##### ModelsExpand Collapse 

DiscoveryOperation { id, endpoint, host, 5 more } 

id: string

UUID.

maxLength36

minLength36

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

formaturi-template

maxLength4096

host: string

RFC3986-compliant host.

formathostname

maxLength255

last\_updated: string

formatdate-time

method: "GET" | "POST" | "HEAD" | 6 more

The HTTP method used to access the endpoint.

One of the following:

"GET"

"POST"

"HEAD"

"OPTIONS"

"PUT"

"DELETE"

"CONNECT"

"PATCH"

"TRACE"

origin: Array<"ML" | "SessionIdentifier" | "LabelDiscovery"\>

API discovery engine(s) that discovered this operation

One of the following:

"ML"

"SessionIdentifier"

"LabelDiscovery"

state: "review" | "saved" | "ignored"

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

One of the following:

"review"

"saved"

"ignored"

features?: Features { traffic\_stats } 

traffic\_stats?: TrafficStats { last\_updated, period\_seconds, requests } 

last\_updated: string

formatdate-time

period\_seconds: number

The period in seconds these statistics were computed over

requests: number

The average number of requests seen during this period

formatfloat

DiscoveryGetResponse { schemas, timestamp } 

schemas: Array<unknown\>

timestamp: string

formatdate-time

#### DiscoveryOperations

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

client.apiGateway.discovery.operations.list(OperationListParams { zone\_id, diff, direction, 8 more } params, RequestOptionsoptions?): V4PagePaginationArray<[DiscoveryOperation](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.discovery%20%3E%20%28model%29%20discovery%5Foperation%20%3E%20%28schema%29) { id, endpoint, host, 5 more } \>

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

##### [Edit discovered web and API operations](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway/subresources/discovery/subresources/operations/methods/bulk%5Fedit)

client.apiGateway.discovery.operations.bulkEdit(OperationBulkEditParams { zone\_id, body } params, RequestOptionsoptions?): [OperationBulkEditResponse](https://developers.cloudflare.com/api/typescript/resources/api%5Fgateway#%28resource%29%20api%5Fgateway.discovery.operations%20%3E%20%28model%29%20operation%5Fbulk%5Fedit%5Fresponse%20%3E%20%28schema%29) { state } 

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

##### ModelsExpand Collapse 

OperationBulkEditResponse \= Record<string, item\>

state?: "review" | "ignored"

Mark state of operation in API Discovery

* `review` \- Mark operation as for review
* `ignored` \- Mark operation as ignored

One of the following:

"review"

"ignored"