Dry-run routing preview for a model route pool
Generated from the checked-in source. Do not edit this reference by hand.
POST /api/v1/pools/{reference}/preview
Evaluates a pool’s ordered routing rules, candidate eligibility, priority tiers, and normalized traffic weights for a simulated request without dispatching upstream traffic.
Operation: previewPool.
Authentication
Section titled “Authentication”Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.
[ { "bearerAuth": [] }]HTTP request
Section titled “HTTP request”Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.
curl --fail-with-body -X POST "$NIU_ORIGIN/api/v1/pools/{reference}/preview" \ -H "Authorization: Bearer $NIU_BEARER_TOKEN" \ -H 'Content-Type: application/json' \ --data @request.jsonParameters
Section titled “Parameters”reference
Section titled “reference”Location: path. Required. Unpadded base64url encoding of the exact ASCII pool alias.
{ "type": "string", "minLength": 2, "maxLength": 267, "pattern": "^[A-Za-z0-9_-]+$"}Request body
Section titled “Request body”application/json
Section titled “application/json”Required.
{ "type": "object", "additionalProperties": false, "properties": { "protocol": { "type": "string", "enum": [ "chat", "responses", "messages" ] }, "streaming": { "type": "boolean" }, "vision": { "type": "boolean" }, "tools": { "type": "boolean" }, "structured_output": { "type": "boolean" }, "reasoning": { "type": "boolean" }, "input_tokens": { "type": [ "integer", "null" ], "minimum": 1 }, "output_tokens": { "type": [ "integer", "null" ], "minimum": 1 }, "candidates": { "type": "array", "items": { "type": "object" } }, "rules": { "type": "array", "items": { "type": "object" } }, "default_action": { "type": "string", "enum": [ "candidates", "reject" ] } }}Responses
Section titled “Responses”HTTP 200
Section titled “HTTP 200”Dry-run routing preview result
Content type: application/json.
{ "type": "object", "required": [ "data" ], "properties": { "data": { "type": "object" } }}HTTP 400
Section titled “HTTP 400”Invalid reference or preview parameters
HTTP 401
Section titled “HTTP 401”Authentication required
HTTP 403
Section titled “HTTP 403”Platform administration required
HTTP 404
Section titled “HTTP 404”Pool not found
Behavior and supported scope
Section titled “Behavior and supported scope”Evaluates a pool’s ordered routing rules, candidate eligibility, priority tiers, and normalized traffic weights for a simulated request without dispatching upstream traffic.
Supported scope: implemented