Skip to content
Start here

Retrieve all operations from a schema.

client.APIGateway.UserSchemas.Operations.List(ctx, schemaID, params) (*V4PagePaginationArray[UserSchemaOperationListResponse], error)
GET/zones/{zone_id}/api_gateway/user_schemas/{schema_id}/operations

Retrieves all operations from the schema. Operations that already exist in API Shield Endpoint Management will be returned as full operations.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

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

Example:X-Auth-Email: user@example.com

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

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Account API GatewayAccount API Gateway ReadDomain API GatewayDomain API Gateway Read
ParametersExpand Collapse
schemaID string
formatuuid
maxLength36
params UserSchemaOperationListParams
ZoneID param.Field[string]

Path param: Identifier.

maxLength32
Endpoint param.Field[string]Optional

Query param: Filter results to only include endpoints containing this pattern.

Feature param.Field[[]UserSchemaOperationListParamsFeature]Optional

Query param: 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.

const UserSchemaOperationListParamsFeatureThresholds UserSchemaOperationListParamsFeature = "thresholds"
const UserSchemaOperationListParamsFeatureParameterSchemas UserSchemaOperationListParamsFeature = "parameter_schemas"
const UserSchemaOperationListParamsFeatureSchemaInfo UserSchemaOperationListParamsFeature = "schema_info"
Host param.Field[[]string]Optional

Query param: Filter results to only include the specified hosts.

Method param.Field[[]string]Optional

Query param: Filter results to only include the specified HTTP methods.

OperationStatus param.Field[UserSchemaOperationListParamsOperationStatus]Optional

Query param: Filter results by whether operations exist in API Shield Endpoint Management or not. new will just return operations from the schema that do not exist in API Shield Endpoint Management. existing will just return operations from the schema that already exist in API Shield Endpoint Management.

const UserSchemaOperationListParamsOperationStatusNew UserSchemaOperationListParamsOperationStatus = "new"
const UserSchemaOperationListParamsOperationStatusExisting UserSchemaOperationListParamsOperationStatus = "existing"
Page param.Field[int64]Optional

Query param: Page number of paginated results.

minimum1
PerPage param.Field[int64]Optional

Query param: Maximum number of results per page.

maximum50
minimum5
ReturnsExpand Collapse
type UserSchemaOperationListResponse interface{…}
One of the following:
type UserSchemaOperationListResponseAPIShieldOperation struct{…}
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
LastUpdated Time
formatdate-time
Method UserSchemaOperationListResponseAPIShieldOperationMethod

The HTTP method used to access the endpoint.

One of the following:
const UserSchemaOperationListResponseAPIShieldOperationMethodGet UserSchemaOperationListResponseAPIShieldOperationMethod = "GET"
const UserSchemaOperationListResponseAPIShieldOperationMethodPost UserSchemaOperationListResponseAPIShieldOperationMethod = "POST"
const UserSchemaOperationListResponseAPIShieldOperationMethodHead UserSchemaOperationListResponseAPIShieldOperationMethod = "HEAD"
const UserSchemaOperationListResponseAPIShieldOperationMethodOptions UserSchemaOperationListResponseAPIShieldOperationMethod = "OPTIONS"
const UserSchemaOperationListResponseAPIShieldOperationMethodPut UserSchemaOperationListResponseAPIShieldOperationMethod = "PUT"
const UserSchemaOperationListResponseAPIShieldOperationMethodDelete UserSchemaOperationListResponseAPIShieldOperationMethod = "DELETE"
const UserSchemaOperationListResponseAPIShieldOperationMethodConnect UserSchemaOperationListResponseAPIShieldOperationMethod = "CONNECT"
const UserSchemaOperationListResponseAPIShieldOperationMethodPatch UserSchemaOperationListResponseAPIShieldOperationMethod = "PATCH"
const UserSchemaOperationListResponseAPIShieldOperationMethodTrace UserSchemaOperationListResponseAPIShieldOperationMethod = "TRACE"
OperationID string

UUID.

maxLength36
minLength36
Features UserSchemaOperationListResponseAPIShieldOperationFeaturesOptional
One of the following:
type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholds struct{…}
Thresholds UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureThresholdsThresholdsOptional
AuthIDTokens int64Optional

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

DataPoints int64Optional

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

LastUpdated TimeOptional
formatdate-time
P50 int64Optional

The p50 quantile of requests (in period_seconds).

P90 int64Optional

The p90 quantile of requests (in period_seconds).

P99 int64Optional

The p99 quantile of requests (in period_seconds).

PeriodSeconds int64Optional

The period over which this threshold is suggested.

Requests int64Optional

The estimated number of requests covered by these calculations.

SuggestedThreshold int64Optional

The suggested threshold in requests done by the same auth_id or period_seconds.

type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemas struct{…}
ParameterSchemas UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas
LastUpdated TimeOptional
formatdate-time
ParameterSchemas UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasOptional

An operation schema object containing a response.

Parameters []unknownOptional

An array containing the learned parameter schemas.

Responses unknownOptional

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

type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRouting struct{…}
APIRouting UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingOptional

API Routing settings on endpoint.

LastUpdated TimeOptional
formatdate-time
Route stringOptional

Target route.

type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervals struct{…}
ConfidenceIntervals UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsOptional
LastUpdated TimeOptional
formatdate-time
SuggestedThreshold UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdOptional
ConfidenceIntervals UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsOptional
P90 UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90Optional

Upper and lower bound for percentile estimate

Lower float64Optional

Lower bound for percentile estimate

Upper float64Optional

Upper bound for percentile estimate

P95 UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95Optional

Upper and lower bound for percentile estimate

Lower float64Optional

Lower bound for percentile estimate

Upper float64Optional

Upper bound for percentile estimate

P99 UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99Optional

Upper and lower bound for percentile estimate

Lower float64Optional

Lower bound for percentile estimate

Upper float64Optional

Upper bound for percentile estimate

Mean float64Optional

Suggested threshold.

type UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfo struct{…}
SchemaInfo UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoOptional
ActiveSchema UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaOptional

Schema active on endpoint.

ID stringOptional

UUID.

maxLength36
minLength36
CreatedAt TimeOptional
formatdate-time
IsLearned boolOptional

True if schema is Cloudflare-provided.

Name stringOptional

Schema file name.

LearnedAvailable boolOptional

True if a Cloudflare-provided learned schema is available for this endpoint.

MitigationAction UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionOptional

Action taken on requests failing validation.

One of the following:
const UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "none"
const UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "log"
const UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock UserSchemaOperationListResponseAPIShieldOperationFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "block"
type UserSchemaOperationListResponseAPIShieldBasicOperation struct{…}
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
Method UserSchemaOperationListResponseAPIShieldBasicOperationMethod

The HTTP method used to access the endpoint.

One of the following:
const UserSchemaOperationListResponseAPIShieldBasicOperationMethodGet UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "GET"
const UserSchemaOperationListResponseAPIShieldBasicOperationMethodPost UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "POST"
const UserSchemaOperationListResponseAPIShieldBasicOperationMethodHead UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "HEAD"
const UserSchemaOperationListResponseAPIShieldBasicOperationMethodOptions UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "OPTIONS"
const UserSchemaOperationListResponseAPIShieldBasicOperationMethodPut UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "PUT"
const UserSchemaOperationListResponseAPIShieldBasicOperationMethodDelete UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "DELETE"
const UserSchemaOperationListResponseAPIShieldBasicOperationMethodConnect UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "CONNECT"
const UserSchemaOperationListResponseAPIShieldBasicOperationMethodPatch UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "PATCH"
const UserSchemaOperationListResponseAPIShieldBasicOperationMethodTrace UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "TRACE"

Retrieve all operations from a schema.

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/api_gateway"
  "github.com/stainless-sdks/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.APIGateway.UserSchemas.Operations.List(
    context.TODO(),
    "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    api_gateway.UserSchemaOperationListParams{
      ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "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"
        }
      }
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}
Returns Examples
{
  "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"
        }
      }
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000,
    "total_pages": 100
  }
}