---
title: Operations
---

[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**

# Operations

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

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

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

##### [Get a web or API operation](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/methods/get)

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

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

##### [Create a web or API operation](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/methods/create)

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

POST/zones/{zone\_id}/api\_gateway/operations/item

##### [Delete a web or API operation](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/methods/delete)

client.APIGateway.Operations.Delete(ctx, operationID, body) (\*[OperationDeleteResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.operations%20%3E%20(model)%20OperationDeleteResponse%20%3E%20(schema)>), error)

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

##### [Create web or API operations](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/methods/bulk_create)

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

POST/zones/{zone\_id}/api\_gateway/operations

##### [Delete web or API operations](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/methods/bulk_delete)

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

DELETE/zones/{zone\_id}/api\_gateway/operations

##### ModelsExpand Collapse

<details>

<summary>

type APIShield struct{…}

</summary>

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

LastUpdated Time

formatdate-time

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

<details>

<summary>

Method APIShieldMethod

The HTTP method used to access the endpoint.

</summary>

One of the following:

const APIShieldMethodGet APIShieldMethod = "GET"

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

const APIShieldMethodPost APIShieldMethod = "POST"

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

const APIShieldMethodHead APIShieldMethod = "HEAD"

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

const APIShieldMethodOptions APIShieldMethod = "OPTIONS"

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

const APIShieldMethodPut APIShieldMethod = "PUT"

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

const APIShieldMethodDelete APIShieldMethod = "DELETE"

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

const APIShieldMethodConnect APIShieldMethod = "CONNECT"

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

const APIShieldMethodPatch APIShieldMethod = "PATCH"

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

const APIShieldMethodTrace APIShieldMethod = "TRACE"

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

OperationID string

UUID.

maxLength36

minLength36

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

</details>

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

#### OperationsLabels

##### [Replace labels on a web or API operation](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/subresources/labels/methods/update)

client.APIGateway.Operations.Labels.Update(ctx, operationID, params) (\*[OperationLabelUpdateResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.operations.labels%20%3E%20(model)%20OperationLabelUpdateResponse%20%3E%20(schema)>), error)

PUT/zones/{zone\_id}/api\_gateway/operations/{operation\_id}/labels

##### [Attach labels to a web or API operation](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/subresources/labels/methods/create)

client.APIGateway.Operations.Labels.New(ctx, operationID, params) (\*[OperationLabelNewResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.operations.labels%20%3E%20(model)%20OperationLabelNewResponse%20%3E%20(schema)>), error)

POST/zones/{zone\_id}/api\_gateway/operations/{operation\_id}/labels

##### [Remove labels from a web or API operation](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/subresources/labels/methods/delete)

client.APIGateway.Operations.Labels.Delete(ctx, operationID, body) (\*[OperationLabelDeleteResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.operations.labels%20%3E%20(model)%20OperationLabelDeleteResponse%20%3E%20(schema)>), error)

DELETE/zones/{zone\_id}/api\_gateway/operations/{operation\_id}/labels

##### [Replace labels on web or API operations](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/subresources/labels/methods/bulk_update)

client.APIGateway.Operations.Labels.BulkUpdate(ctx, params) (\*SinglePage\[[OperationLabelBulkUpdateResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.operations.labels%20%3E%20(model)%20OperationLabelBulkUpdateResponse%20%3E%20(schema)>)], error)

PUT/zones/{zone\_id}/api\_gateway/operations/labels

##### [Attach labels to web or API operations](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/subresources/labels/methods/bulk_create)

client.APIGateway.Operations.Labels.BulkNew(ctx, params) (\*SinglePage\[[OperationLabelBulkNewResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.operations.labels%20%3E%20(model)%20OperationLabelBulkNewResponse%20%3E%20(schema)>)], error)

POST/zones/{zone\_id}/api\_gateway/operations/labels

##### [Remove labels from web or API operations](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/subresources/labels/methods/bulk_delete)

client.APIGateway.Operations.Labels.BulkDelete(ctx, body) (\*SinglePage\[[OperationLabelBulkDeleteResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.operations.labels%20%3E%20(model)%20OperationLabelBulkDeleteResponse%20%3E%20(schema)>)], error)

DELETE/zones/{zone\_id}/api\_gateway/operations/labels

#### OperationsSchema Validation

##### [Retrieve operation-level schema validation settings](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/subresources/schema_validation/methods/get)

Deprecated

client.APIGateway.Operations.SchemaValidation.Get(ctx, operationID, query) (\*[OperationSchemaValidationGetResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.operations.schema_validation%20%3E%20(model)%20OperationSchemaValidationGetResponse%20%3E%20(schema)>), error)

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

##### [Update operation-level schema validation settings](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/subresources/schema_validation/methods/update)

Deprecated

client.APIGateway.Operations.SchemaValidation.Update(ctx, operationID, params) (\*[OperationSchemaValidationUpdateResponse](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.operations.schema_validation%20%3E%20(model)%20OperationSchemaValidationUpdateResponse%20%3E%20(schema)>), error)

PUT/zones/{zone\_id}/api\_gateway/operations/{operation\_id}/schema\_validation

##### [Update multiple operation-level schema validation settings](https://developers.cloudflare.com/api/go/resources/api_gateway/subresources/operations/subresources/schema_validation/methods/edit)

Deprecated

client.APIGateway.Operations.SchemaValidation.Edit(ctx, params) (\*[SettingsMultipleRequest](<https://developers.cloudflare.com/api/go/resources/api_gateway#(resource)%20api_gateway.operations.schema_validation%20%3E%20(model)%20settings_multiple_request%20%3E%20(schema)>), error)

PATCH/zones/{zone\_id}/api\_gateway/operations/schema\_validation

##### ModelsExpand Collapse

<details>

<summary>

type SettingsMultipleRequest map\[string, SettingsMultipleRequestItem]

</summary>

<details>

<summary>

MitigationAction SettingsMultipleRequestItemMitigationActionOptional

When set, this applies a mitigation action to this operation

- <code>log</code> log request when request does not conform to schema for this operation
- <code>block</code> deny access to the site when request does not conform to schema for this operation
- <code>none</code> will skip mitigation for this operation
- <code>null</code> indicates that no operation level mitigation is in place, see Zone Level Schema Validation Settings for mitigation action that will be applied

</summary>

One of the following:

const SettingsMultipleRequestItemMitigationActionLog SettingsMultipleRequestItemMitigationAction = "log"

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

const SettingsMultipleRequestItemMitigationActionBlock SettingsMultipleRequestItemMitigationAction = "block"

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

const SettingsMultipleRequestItemMitigationActionNone SettingsMultipleRequestItemMitigationAction = "none"

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

</details>

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

</details>

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