v2
OpenAPI 3.0.02026-08-051996591.2 MBReplace an alias's routing policy
Replaces the alias's routing policy and stickiness configuration in one atomic operation. The replacement is whole-object. Partial merging is not supported.
Use this endpoint to change canary weights, tenant routing, and similar settings. The change is atomic: in-flight sessions resolved before the change keep their resolved agent. Resolution happens once, when the session is created.
Path parameters
The unique key that identifies an alias. Alias keys are independent of agent keys. The same string can exist as both an alias key and an agent key in the same customer account. Calls to /v2/agent_aliases/{key}/... target the alias. Calls to /v2/agents/{key}/... target the agent.
Headers
The platform makes a best effort to complete the request in the specified seconds, or it times out.
The platform makes a best effort to complete the request in the specified milliseconds, or it times out.
Request body
Example request
{
"policy": {
"rules": [
{
"match": "(get('$.session.metadata.tenant') == 'us') and (get('$.session.metadata.tier') == 'gold')",
"targets": {
"partition_by": "get('$.session.metadata.user_id', '')"
}
}
]
}
}Response
The alias with its updated policy.
Example response
{
"key": "support",
"name": "Customer Support",
"policy": {
"rules": [
{
"match": "(get('$.session.metadata.tenant') == 'us') and (get('$.session.metadata.tier') == 'gold')",
"targets": {
"partition_by": "get('$.session.metadata.user_id', '')"
}
}
]
}
}