Skip to content
Start here

List Evaluators

client.AIGateway.EvaluationTypes.List(ctx, params) (*V4PagePaginationArray[EvaluationTypeListResponse], error)
GET/accounts/{account_id}/ai-gateway/evaluation-types

List Evaluators

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)
AI Gateway WriteAI Gateway Read
ParametersExpand Collapse
params EvaluationTypeListParams
AccountID param.Field[string]

Path param

OrderBy param.Field[string]Optional

Query param

OrderByDirection param.Field[EvaluationTypeListParamsOrderByDirection]Optional

Query param

const EvaluationTypeListParamsOrderByDirectionAsc EvaluationTypeListParamsOrderByDirection = "asc"
const EvaluationTypeListParamsOrderByDirectionDesc EvaluationTypeListParamsOrderByDirection = "desc"
Page param.Field[int64]Optional

Query param

minimum1
PerPage param.Field[int64]Optional

Query param

maximum50
minimum5
ReturnsExpand Collapse
type EvaluationTypeListResponse struct{…}
ID string
CreatedAt Time
formatdate-time
Description string
Enable bool
Mandatory bool
ModifiedAt Time
formatdate-time
Name string
Type string

List Evaluators

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.AIGateway.EvaluationTypes.List(context.TODO(), ai_gateway.EvaluationTypeListParams{
    AccountID: cloudflare.F("0d37909e38d3e99c29fa2cd343ac421a"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "result": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "enable": true,
      "mandatory": true,
      "modified_at": "2019-12-27T18:11:19.117Z",
      "name": "name",
      "type": "type"
    }
  ],
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0
  },
  "success": true
}
Returns Examples
{
  "result": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "enable": true,
      "mandatory": true,
      "modified_at": "2019-12-27T18:11:19.117Z",
      "name": "name",
      "type": "type"
    }
  ],
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0
  },
  "success": true
}