get_rescued_requests_analytics
Retrieves rescued-request time-series data to show how often retry or fallback handling recovered requests, helping measure resilience effectiveness. Requires Enterprise access.
Instructions
Get rescued-request time-series data showing requests recovered by retry or fallback handling. Use this only when your configs include resilience features, and use it to measure how often recovery logic saved requests. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"time_of_generation_min": "<time_of_generation_min>",
"time_of_generation_max": "<time_of_generation_max>"
},
"name": "get_rescued_requests_analytics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| configs | No | Legacy Portkey query param for config slugs. Comma-separated string; prefer config_slugs for structured inputs. | |
| span_id | No | Legacy Portkey query param for span IDs. Comma-separated string; prefer span_ids for structured inputs. | |
| cost_max | No | Maximum cost in cents to filter by | |
| cost_min | No | Minimum cost in cents to filter by | |
| metadata | No | Legacy Portkey query param for metadata filtering. Stringified JSON object, e.g. '{"env":"prod","app":"myapp"}'; prefer metadata_filter for structured inputs. | |
| span_ids | No | Structured alias for span_id. Use an array of span IDs; normalized to the legacy comma-separated Portkey query param. | |
| trace_id | No | Legacy Portkey query param for trace IDs. Comma-separated string; prefer trace_ids for structured inputs. | |
| trace_ids | No | Structured alias for trace_id. Use an array of trace IDs; normalized to the legacy comma-separated Portkey query param. | |
| api_key_ids | No | Legacy Portkey query param for API key UUIDs. Comma-separated string; request_analytics also accepts an array and normalizes it to this form. | |
| prompt_slug | No | Filter by prompt slug | |
| status_code | No | Legacy Portkey query param for HTTP status codes. Comma-separated string; prefer status_codes for structured inputs. | |
| ai_org_model | No | Legacy Portkey query param for provider/model pairs. Format: 'provider__model' with double underscore, e.g. 'openai__gpt-4' or 'anthropic__claude-3-opus'. Comma-separated string; prefer provider_models for structured inputs. | |
| config_slugs | No | Structured alias for configs. Use an array of config slugs; normalized to the legacy comma-separated Portkey query param. | |
| status_codes | No | Structured alias for status_code. Use an array of HTTP status codes; normalized to the legacy comma-separated Portkey query param. | |
| virtual_keys | No | Legacy Portkey query param for virtual key slugs. Comma-separated string; prefer virtual_key_slugs for structured inputs. | |
| deployment_id | No | Comma-separated list of deployment IDs (UUIDs) to filter by. Prefer deployment_ids for structured inputs. | |
| deployment_ids | No | Structured alias for deployment_id. Use an array of deployment UUIDs; normalized to the comma-separated Portkey query param. | |
| workspace_slug | No | Filter by one workspace. Takes precedence over include_all_workspaces and exclude_workspace_slugs when provided. | |
| metadata_filter | No | Structured alias for metadata. Use an object such as { env: 'prod' }; normalized to a JSON string before the request is sent. | |
| provider_models | No | Structured alias for ai_org_model. Use provider__model strings in an array; normalized to the legacy comma-separated Portkey query param. | |
| total_units_max | No | Maximum number of total tokens to filter by | |
| total_units_min | No | Minimum number of total tokens to filter by | |
| prompt_token_max | No | Maximum number of prompt tokens | |
| prompt_token_min | No | Minimum number of prompt tokens | |
| virtual_key_slugs | No | Structured alias for virtual_keys. Use an array of virtual key slugs; normalized to the legacy comma-separated Portkey query param. | |
| completion_token_max | No | Maximum number of completion tokens | |
| completion_token_min | No | Minimum number of completion tokens | |
| weighted_feedback_max | No | Maximum weighted feedback score (-10 to 10) | |
| weighted_feedback_min | No | Minimum weighted feedback score (-10 to 10) | |
| include_all_workspaces | No | Aggregate across all organisation workspaces with an organisation API key. Ignored for workspace API keys or when workspace_slug is provided. Supply workspace_slug, include_all_workspaces=true, or exclude_workspace_slugs to choose a scope. | |
| time_of_generation_max | Yes | End time for the analytics period (ISO8601 format, e.g., '2024-02-01T00:00:00Z') | |
| time_of_generation_min | Yes | Start time for the analytics period (ISO8601 format, e.g., '2024-01-01T00:00:00Z') | |
| exclude_workspace_slugs | No | Comma-separated workspace slugs to exclude from organisation-wide analytics, for example ws-legacy,ws-archived. Only applies to organisation API keys; workspace_slug takes precedence. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Call succeeded | |
| data | No | Success payload | |
| error | No | Failure details |