Aggregate product statistics over a Scope selection
Authorization
BearerAuth AuthorizationBearer <token>
Static bearer token used when local Server authentication is enabled.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/stats" \ -H "Content-Type: application/json" \ -d '{ "selection": { "mode": "all" } }'{ "selection": { "mode": "all" }, "scope_ids": [ "string" ], "as_of": "2019-08-24T14:15:22Z", "inventory": { "sources": { "total": 0, "memory_processed": 0, "memory_pending": 0 }, "artifacts": { "total": 0, "by_family": [ { "family": "string", "total": 0 } ] }, "candidates": { "total": 0, "pending": 0, "approved": 0, "rejected": 0, "by_family": [ { "family": "experience", "total": 0, "pending": 0, "approved": 0, "rejected": 0 } ] }, "memory": { "entries": { "total": 0, "active": 0, "inactive": 0, "by_kind": [ { "kind": "string", "total": 0, "active": 0, "inactive": 0 } ] } } }, "usage": { "period": { "preset": "today", "start_date": "2019-08-24", "end_date": "2019-08-24", "timezone": "UTC" }, "totals": { "generation": { "requests": 0, "input_tokens": 0, "output_tokens": 0 }, "embedding": { "requests": 0, "input_tokens": 0, "output_tokens": 0 } }, "by_purpose": [ { "purpose": "string", "generation": { "requests": 0, "input_tokens": 0, "output_tokens": 0 }, "embedding": { "requests": 0, "input_tokens": 0, "output_tokens": 0 } } ], "daily": [ { "date": "2019-08-24", "generation": { "requests": 0, "input_tokens": 0, "output_tokens": 0 }, "embedding": { "requests": 0, "input_tokens": 0, "output_tokens": 0 }, "by_purpose": [ { "purpose": "string", "generation": { "requests": 0, "input_tokens": 0, "output_tokens": 0 }, "embedding": { "requests": 0, "input_tokens": 0, "output_tokens": 0 } } ] } ] }, "recall": { "period": { "preset": "today", "start_date": "2019-08-24", "end_date": "2019-08-24", "timezone": "UTC" }, "estimator": { "estimator_id": "string", "version": "string" }, "totals": { "preparations": 0, "ready_preparations": 0, "comparable_preparations": 0, "baseline_tokens": 0, "recalled_tokens": 0, "token_reduction": 0 }, "daily": [ { "date": "2019-08-24", "preparations": 0, "ready_preparations": 0, "comparable_preparations": 0, "baseline_tokens": 0, "recalled_tokens": 0, "token_reduction": 0 } ] }, "by_scope": [ { "scope_id": "string", "inventory": { "sources": { "total": 0, "memory_processed": 0, "memory_pending": 0 }, "artifacts": { "total": 0, "by_family": [ { "family": "string", "total": 0 } ] }, "candidates": { "total": 0, "pending": 0, "approved": 0, "rejected": 0, "by_family": [ { "family": "experience", "total": 0, "pending": 0, "approved": 0, "rejected": 0 } ] }, "memory": { "entries": { "total": 0, "active": 0, "inactive": 0, "by_kind": [ { "kind": "string", "total": 0, "active": 0, "inactive": 0 } ] } } }, "usage": { "period": { "preset": "today", "start_date": "2019-08-24", "end_date": "2019-08-24", "timezone": "UTC" }, "totals": { "generation": { "requests": 0, "input_tokens": 0, "output_tokens": 0 }, "embedding": { "requests": 0, "input_tokens": 0, "output_tokens": 0 } }, "by_purpose": [ { "purpose": "string", "generation": { "requests": 0, "input_tokens": 0, "output_tokens": 0 }, "embedding": { "requests": 0, "input_tokens": 0, "output_tokens": 0 } } ], "daily": [ { "date": "2019-08-24", "generation": { "requests": 0, "input_tokens": 0, "output_tokens": 0 }, "embedding": { "requests": 0, "input_tokens": 0, "output_tokens": 0 }, "by_purpose": [ { "purpose": "string", "generation": { "requests": 0, "input_tokens": 0, "output_tokens": 0 }, "embedding": { "requests": 0, "input_tokens": 0, "output_tokens": 0 } } ] } ] }, "recall": { "period": { "preset": "today", "start_date": "2019-08-24", "end_date": "2019-08-24", "timezone": "UTC" }, "estimator": { "estimator_id": "string", "version": "string" }, "totals": { "preparations": 0, "ready_preparations": 0, "comparable_preparations": 0, "baseline_tokens": 0, "recalled_tokens": 0, "token_reduction": 0 }, "daily": [ { "date": "2019-08-24", "preparations": 0, "ready_preparations": 0, "comparable_preparations": 0, "baseline_tokens": 0, "recalled_tokens": 0, "token_reduction": 0 } ] } } ]}
