Skip to main content
GET
Get a routing policy

Authorizations

Authorization
string
header
required

A management key (mgmt-eden...) to manage the organization's routing policies, or your own API key (sk-eden...) or session token to manage your personal ones, sent as Authorization: Bearer <key>.

Path Parameters

name
string
required

The policy's handle, as called with @edenai/{name}.

Query Parameters

scope
enum<string>

Only policies of this scope: user for your personal ones, organization for the organization's. Without it, both. A management key only ever sees the organization's.

Available options:
organization,
user

Response

200 - application/json

A routing policy as the management API returns it.

name
string
required
read-only
scope
enum<string>
required

organization for a shared policy, user for a personal one.

  • organization - Organization
  • user - User
Available options:
organization,
user
description
string
required
read-only
enabled
boolean
required
read-only
strategy
required
  • fallback - Fallback
  • load_balance - Load balance
  • cheapest - Cheapest
  • fastest - Fastest
Available options:
fallback,
load_balance,
cheapest,
fastest
targets
object[] | null
required
read-only
defaults
object
required

Settings applied to every target unless the target overrides them.

lock
enum<string>[]
required
read-only
  • sort - sort
  • sticky - sticky
  • allow_fallbacks - allow_fallbacks
  • allowed_providers - allowed_providers
  • ignored_providers - ignored_providers
  • order - order
  • max_price - max_price
  • zero_data_retention - zero_data_retention
  • region - region
Available options:
sort,
sticky,
allow_fallbacks,
allowed_providers,
ignored_providers,
order,
max_price,
zero_data_retention,
region
fallbacks
string[]
required
read-only
version
integer
required
read-only
etag
string
required
read-only

The version, as the If-Match header expects it.

created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only
created_by
string<email> | null
required
read-only

Email of the creator, or null for an API write.

updated_by
string<email> | null
required
read-only

Email of the last editor, or null for an API write.