---
title: Get a web or API operation
---

[Skip to content](#_top)

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

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

[Operations](https://developers.cloudflare.com/api/python/resources/api_gateway/subresources/operations)

Copy Markdown

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

---

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

# Get a web or API operation

api\_gateway.operations.get(stroperation\_id, OperationGetParams\*\*kwargs) -> [OperationGetResponse](<https://developers.cloudflare.com/api/python/resources/api_gateway#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)>)

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

Returns a web or API operation, including its schema validation settings and requested feature data.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Account API Gateway``Account API Gateway Read``Domain API Gateway``Domain API Gateway Read`

##### ParametersExpand Collapse

zone\_id: str

Identifier.

maxLength32

[Link to this property](<#(resource)%20api_gateway.operations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20zone_id%20%3E%20(schema)>)

operation\_id: str

UUID.

maxLength36

[Link to this property](<#(resource)%20api_gateway.operations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20operation_id%20%3E%20(schema)>)

<details>

<summary>

feature: Optional\[List\[Literal\["thresholds", "parameter\_schemas", "schema\_info", "confidence\_intervals"]]]

Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.

</summary>

One of the following:

"thresholds"

<a href="#(resource)%20api_gateway.operations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20feature%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"parameter\_schemas"

<a href="#(resource)%20api_gateway.operations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20feature%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"schema\_info"

<a href="#(resource)%20api_gateway.operations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20feature%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"confidence\_intervals"

<a href="#(resource)%20api_gateway.operations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20feature%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

</details>

[Link to this property](<#(resource)%20api_gateway.operations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20feature%20%3E%20(schema)>)

with\_schemas: Optional\[[bool](<https://developers.cloudflare.com/api/python/resources/api_gateway/subresources/operations/methods/get#(resource)%20api_gateway.operations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20with_schemas%20%3E%20(schema)>)]

When true, includes OpenAPI schemas (both uploaded and learned) for the operation in the response. Due to the conversion overhead, this parameter is only supported on single-operation retrieval.

[Link to this property](<#(resource)%20api_gateway.operations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20with_schemas%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class OperationGetResponse: …

</summary>

endpoint: str

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.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20endpoint">Link to this property</a>

host: str

RFC3986-compliant host.

formathostname

maxLength255

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

last\_updated: datetime

formatdate-time

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

<details>

<summary>

method: Literal\["GET", "POST", "HEAD", 6 more]

The HTTP method used to access the endpoint.

</summary>

One of the following:

"GET"

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

"POST"

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

"HEAD"

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

"OPTIONS"

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

"PUT"

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

"DELETE"

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

"CONNECT"

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

"PATCH"

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

"TRACE"

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%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.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20method">Link to this property</a>

operation\_id: str

UUID.

maxLength36

minLength36

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20operation_id">Link to this property</a>

<details>

<summary>

features: Optional\[Features]

</summary>

One of the following:

<details>

<summary>

class FeaturesAPIShieldOperationFeatureThresholds: …

</summary>

<details>

<summary>

thresholds: Optional\[FeaturesAPIShieldOperationFeatureThresholdsThresholds]

</summary>

auth\_id\_tokens: Optional\[int]

The total number of auth-ids seen across this calculation.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%200%20%3E%20(property)%20thresholds%20%3E%20(property)%20auth_id_tokens">Link to this property</a>

data\_points: Optional\[int]

The number of data points used for the threshold suggestion calculation.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%200%20%3E%20(property)%20thresholds%20%3E%20(property)%20data_points">Link to this property</a>

last\_updated: Optional\[datetime]

formatdate-time

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%200%20%3E%20(property)%20thresholds%20%3E%20(property)%20last_updated">Link to this property</a>

p50: Optional\[int]

The p50 quantile of requests (in period\_seconds).

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%200%20%3E%20(property)%20thresholds%20%3E%20(property)%20p50">Link to this property</a>

p90: Optional\[int]

The p90 quantile of requests (in period\_seconds).

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%200%20%3E%20(property)%20thresholds%20%3E%20(property)%20p90">Link to this property</a>

p99: Optional\[int]

The p99 quantile of requests (in period\_seconds).

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%200%20%3E%20(property)%20thresholds%20%3E%20(property)%20p99">Link to this property</a>

period\_seconds: Optional\[int]

The period over which this threshold is suggested.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%200%20%3E%20(property)%20thresholds%20%3E%20(property)%20period_seconds">Link to this property</a>

requests: Optional\[int]

The estimated number of requests covered by these calculations.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%200%20%3E%20(property)%20thresholds%20%3E%20(property)%20requests">Link to this property</a>

suggested\_threshold: Optional\[int]

The suggested threshold in requests done by the same auth\_id or period\_seconds.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%200%20%3E%20(property)%20thresholds%20%3E%20(property)%20suggested_threshold">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%200%20%3E%20(property)%20thresholds">Link to this property</a>

</details>

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

<details>

<summary>

class FeaturesAPIShieldOperationFeatureParameterSchemas: …

</summary>

<details>

<summary>

parameter\_schemas: FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas

</summary>

last\_updated: Optional\[datetime]

formatdate-time

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%201%20%3E%20(property)%20parameter_schemas%20%3E%20(property)%20last_updated">Link to this property</a>

<details>

<summary>

parameter\_schemas: Optional\[FeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas]

An operation schema object containing a response.

</summary>

parameters: Optional\[List\[object]]

An array containing the learned parameter schemas.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%201%20%3E%20(property)%20parameter_schemas%20%3E%20(property)%20parameter_schemas%20%3E%20(property)%20parameters">Link to this property</a>

responses: Optional\[object]

An empty response object. This field is required to yield a valid operation schema.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%201%20%3E%20(property)%20parameter_schemas%20%3E%20(property)%20parameter_schemas%20%3E%20(property)%20responses">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%201%20%3E%20(property)%20parameter_schemas%20%3E%20(property)%20parameter_schemas">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%201%20%3E%20(property)%20parameter_schemas">Link to this property</a>

</details>

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

<details>

<summary>

class FeaturesAPIShieldOperationFeatureAPIRouting: …

</summary>

<details>

<summary>

api\_routing: Optional\[FeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting]

API Routing settings on endpoint.

</summary>

last\_updated: Optional\[datetime]

formatdate-time

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%202%20%3E%20(property)%20api_routing%20%3E%20(property)%20last_updated">Link to this property</a>

route: Optional\[str]

Target route.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%202%20%3E%20(property)%20api_routing%20%3E%20(property)%20route">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%202%20%3E%20(property)%20api_routing">Link to this property</a>

</details>

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

<details>

<summary>

class FeaturesAPIShieldOperationFeatureConfidenceIntervals: …

</summary>

<details>

<summary>

confidence\_intervals: Optional\[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals]

</summary>

last\_updated: Optional\[datetime]

formatdate-time

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20last_updated">Link to this property</a>

<details>

<summary>

suggested\_threshold: Optional\[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold]

</summary>

<details>

<summary>

confidence\_intervals: Optional\[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals]

</summary>

<details>

<summary>

p90: Optional\[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90]

Upper and lower bound for percentile estimate

</summary>

lower: Optional\[float]

Lower bound for percentile estimate

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20p90%20%3E%20(property)%20lower">Link to this property</a>

upper: Optional\[float]

Upper bound for percentile estimate

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20p90%20%3E%20(property)%20upper">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20p90">Link to this property</a>

<details>

<summary>

p95: Optional\[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95]

Upper and lower bound for percentile estimate

</summary>

lower: Optional\[float]

Lower bound for percentile estimate

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20p95%20%3E%20(property)%20lower">Link to this property</a>

upper: Optional\[float]

Upper bound for percentile estimate

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20p95%20%3E%20(property)%20upper">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20p95">Link to this property</a>

<details>

<summary>

p99: Optional\[FeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99]

Upper and lower bound for percentile estimate

</summary>

lower: Optional\[float]

Lower bound for percentile estimate

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20p99%20%3E%20(property)%20lower">Link to this property</a>

upper: Optional\[float]

Upper bound for percentile estimate

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20p99%20%3E%20(property)%20upper">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20p99">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20confidence_intervals">Link to this property</a>

mean: Optional\[float]

Suggested threshold.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold%20%3E%20(property)%20mean">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals%20%3E%20(property)%20suggested_threshold">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%203%20%3E%20(property)%20confidence_intervals">Link to this property</a>

</details>

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

<details>

<summary>

class FeaturesAPIShieldOperationFeatureSchemaInfo: …

</summary>

<details>

<summary>

schema\_info: Optional\[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo]

</summary>

<details>

<summary>

active\_schema: Optional\[FeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema]

Schema active on endpoint.

</summary>

id: Optional\[str]

UUID.

maxLength36

minLength36

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%204%20%3E%20(property)%20schema_info%20%3E%20(property)%20active_schema%20%3E%20(property)%20id">Link to this property</a>

created\_at: Optional\[datetime]

formatdate-time

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%204%20%3E%20(property)%20schema_info%20%3E%20(property)%20active_schema%20%3E%20(property)%20created_at">Link to this property</a>

name: Optional\[str]

Schema file name.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%204%20%3E%20(property)%20schema_info%20%3E%20(property)%20active_schema%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%204%20%3E%20(property)%20schema_info%20%3E%20(property)%20active_schema">Link to this property</a>

<details>

<summary>

mitigation\_action: Optional\[Literal\["none", "log", "block"]]

Action taken on requests failing validation.

</summary>

One of the following:

"none"

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%204%20%3E%20(property)%20schema_info%20%3E%20(property)%20mitigation_action%20%3E%20(member)%200">Link to this property</a>

"log"

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%204%20%3E%20(property)%20schema_info%20%3E%20(property)%20mitigation_action%20%3E%20(member)%201">Link to this property</a>

"block"

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%204%20%3E%20(property)%20schema_info%20%3E%20(property)%20mitigation_action%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%204%20%3E%20(property)%20schema_info%20%3E%20(property)%20mitigation_action">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20features%20%3E%20(variant)%204%20%3E%20(property)%20schema_info">Link to this property</a>

</details>

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

</details>

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

<details>

<summary>

schemas: Optional\[Schemas]

OpenAPI JSON schemas for an operation, including both user-uploaded and Cloudflare-learned schemas.

</summary>

<details>

<summary>

learned: Optional\[SchemasLearned]

An OpenAPI operation object fragment containing schema information for an operation. May include parameter definitions, request body specifications, and a component schema extension.

</summary>

parameters: Optional\[List\[Dict\[str, object]]]

OpenAPI parameter objects describing path, query, header, or cookie parameters.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20schemas%20%3E%20(property)%20learned%20%3E%20(property)%20parameters">Link to this property</a>

request\_body: Optional\[Dict\[str, object]]

OpenAPI request body object describing the expected request payload.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20schemas%20%3E%20(property)%20learned%20%3E%20(property)%20requestBody">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20schemas%20%3E%20(property)%20learned">Link to this property</a>

<details>

<summary>

uploaded: Optional\[SchemasUploaded]

An OpenAPI operation object fragment containing schema information for an operation. May include parameter definitions, request body specifications, and a component schema extension.

</summary>

parameters: Optional\[List\[Dict\[str, object]]]

OpenAPI parameter objects describing path, query, header, or cookie parameters.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20schemas%20%3E%20(property)%20uploaded%20%3E%20(property)%20parameters">Link to this property</a>

request\_body: Optional\[Dict\[str, object]]

OpenAPI request body object describing the expected request payload.

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20schemas%20%3E%20(property)%20uploaded%20%3E%20(property)%20requestBody">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20schemas%20%3E%20(property)%20uploaded">Link to this property</a>

</details>

<a href="#(resource)%20api_gateway.operations%20%3E%20(model)%20operation_get_response%20%3E%20(schema)%20%3E%20(property)%20schemas">Link to this property</a>

</details>

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

### Get a web or API operation

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
operation = client.api_gateway.operations.get(
    operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(operation.operation_id)
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "endpoint": "/api/v1/users/{var1}",
    "host": "www.example.com",
    "last_updated": "2014-01-01T05:20:00.12345Z",
    "method": "GET",
    "operation_id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "features": {
      "api_routing": {
        "last_updated": "2014-01-01T05:20:00.12345Z",
        "route": "https://api.example.com/api/service"
      }
    },
    "schemas": {
      "learned": {
        "parameters": [
          {
            "foo": "bar"
          }
        ],
        "requestBody": {
          "foo": "bar"
        }
      },
      "uploaded": {
        "parameters": [
          {
            "foo": "bar"
          }
        ],
        "requestBody": {
          "foo": "bar"
        }
      }
    }
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": {
    "endpoint": "/api/v1/users/{var1}",
    "host": "www.example.com",
    "last_updated": "2014-01-01T05:20:00.12345Z",
    "method": "GET",
    "operation_id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    "features": {
      "api_routing": {
        "last_updated": "2014-01-01T05:20:00.12345Z",
        "route": "https://api.example.com/api/service"
      }
    },
    "schemas": {
      "learned": {
        "parameters": [
          {
            "foo": "bar"
          }
        ],
        "requestBody": {
          "foo": "bar"
        }
      },
      "uploaded": {
        "parameters": [
          {
            "foo": "bar"
          }
        ],
        "requestBody": {
          "foo": "bar"
        }
      }
    }
  },
  "success": true
}
```