Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -16204,6 +16204,11 @@
"desc"
],
"description": "Sort direction. Must be provided together with sort_by."
},
"metadata_cost_breakdown_key": {
"type": "string",
"nullable": true,
"description": "When provided, the analytics response includes a `metadataValueBreakdown` array with cost and request counts for each value of this metadata key. Omit or pass null to get an aggregate breakdown across the top metadata keys."
Comment on lines +16208 to +16211
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep analytics-only fields out of search schema

Adding this field to RequestLogQuery also adds it to SearchRequestLogsRequest, because the search request schema is an allOf over #/components/schemas/RequestLogQuery (openapi.json lines 16673-16679). That makes POST /api/public/v2/requests/search advertise an analytics-only option whose description talks about changing the analytics response, which is not the real search API contract and will surface confusing/generated docs for the search endpoint. Please put this parameter on an analytics-specific request schema instead of the shared search/analytics base.

Useful? React with 👍 / 👎.

}
},
"example": {
Expand Down Expand Up @@ -16633,6 +16638,35 @@
}
}
}
},
"metadataValueBreakdown": {
"type": "array",
"description": "Cost and request count breakdown by metadata key-value pairs. When `metadata_cost_breakdown_key` is set in the request, all entries share that key and the `label` equals the value. Otherwise entries span the top key-value combinations and `label` is `key = value`. Ordered by cost descending; up to 50 entries.",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "The metadata key."
},
"value": {
"type": "string",
"description": "The metadata value."
},
"label": {
"type": "string",
"description": "Display label. Equals `value` when filtered to a single key; equals `key = value` in the aggregate view."
},
"requests": {
"type": "integer",
"description": "Number of requests with this key-value pair."
},
"cost": {
"type": "number",
"description": "Total cost for requests with this key-value pair, in USD."
}
}
}
}
}
},
Expand Down Expand Up @@ -18421,4 +18455,4 @@
"ApiKeyAuth": []
}
]
}
}
Loading