Skip to main content
POST
Rename a model route

Authorizations

Authorization
string
header
required

A Barndoor API key, sent as Authorization: Bearer <key>. Keys are prefixed bdai_ and are opaque — do not attempt to decode one. Interchangeable with an OAuth 2.0 access token.

Body

application/json

POST /admin/model-routes/rename: rename a route in one step — every target, and the route's route-group memberships with it (BCP-4580).

model_alias
string
required

The route's current name.

new_model_alias
string
required

The new name. Any name no other route uses, including the name of a model one of its targets points at.

change_note
string | null

Optional note explaining the rename (BCP-3998), stamped on every target.

Response

The route was renamed

governance_targets_kept
integer<int64>
required

Budgets, rate limits and model-access policies that stayed on the old name, because a model enablement or routing policy still answers to it. Nonzero means those rows no longer apply to this route.

Required range: x >= 0
model_access_policies_retargeted
integer<int64>
required

How many model-access policies had a target renamed.

Required range: x >= 0
model_alias
string
required
rate_limit_policies_retargeted
integer<int64>
required

How many rate-limit policies now target the new name.

Required range: x >= 0
route_group_memberships_moved
integer<int64>
required

How many route-group memberships moved to the new name.

Required range: x >= 0
targets_renamed
integer<int64>
required

How many route targets were renamed.

Required range: x >= 0
token_budgets_retargeted
integer<int64>
required

How many token budgets now target the new name. Their usage so far this period moved with them.

Required range: x >= 0