From bdf2f7c9763de62d2c7d5c5e52a3aba77f294190 Mon Sep 17 00:00:00 2001 From: Noah Luna <15202580+ngrayluna@users.noreply.github.com> Date: Wed, 16 Jul 2025 15:36:48 -0700 Subject: [PATCH 1/3] mcp, llms-full.txt and claude code --- openapi.json | 4806 +++++++------------------------------------------- 1 file changed, 634 insertions(+), 4172 deletions(-) diff --git a/openapi.json b/openapi.json index bbab7d50..d72470f8 100644 --- a/openapi.json +++ b/openapi.json @@ -2,20 +2,38 @@ "openapi": "3.1.0", "servers": [ { - "url": "https://trace.wandb.ai" + "url": "https://trace.wandb.ai", + "description": "W&B Weave Service API" } ], "info": { - "title": "FastAPI", - "version": "0.1.0" + "title": "W&B Weave Service API", + "version": "0.1.0", + "description": "Comprehensive API for W&B Weave Service with MCP server integration for LLM tracking and monitoring.", + "contact": { + "name": "W&B Support", + "url": "https://wandb.ai/support", + "email": "support@wandb.ai" + }, + "license": { + "name": "MIT", + "url": "https://opensource.org/licenses/MIT" + } }, + "security": [ + { + "HTTPBasic": [] + }, + { + "BearerAuth": [] + } + ], "paths": { "/server_info": { "get": { - "tags": [ - "Service" - ], - "summary": "Server Info", + "tags": ["Service"], + "summary": "Get server information", + "description": "Retrieve server configuration and status information", "operationId": "server_info_server_info_get", "responses": { "200": { @@ -48,64 +66,49 @@ }, "/health": { "get": { - "tags": [ - "Service" - ], - "summary": "Read Root", - "operationId": "read_root_health_get", + "tags": ["Service"], + "summary": "Health check endpoint", + "description": "Check the health status of the service", + "operationId": "health_check_health_get", "responses": { "200": { - "description": "Successful Response", + "description": "Service is healthy", "content": { "application/json": { "schema": { - "additionalProperties": { - "type": "string" - }, "type": "object", - "title": "Response Read Root Health Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" + "properties": { + "status": { + "type": "string", + "example": "healthy" + } + } } } } } - }, - "security": [ - { - "HTTPBasic": [] - } - ] + } } }, "/call/start": { "post": { - "tags": [ - "Calls" - ], - "summary": "Call Start", + "tags": ["Calls"], + "summary": "Start a new call", + "description": "Initiate a new call session for tracking LLM interactions", "operationId": "call_start_call_start_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallStartReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Call started successfully", "content": { "application/json": { "schema": { @@ -134,24 +137,23 @@ }, "/call/end": { "post": { - "tags": [ - "Calls" - ], - "summary": "Call End", + "tags": ["Calls"], + "summary": "End a call", + "description": "Complete a call session and record final metrics", "operationId": "call_end_call_end_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallEndReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Call ended successfully", "content": { "application/json": { "schema": { @@ -178,30 +180,29 @@ ] } }, - "/call/upsert_batch": { + "/call/read": { "post": { - "tags": [ - "Calls" - ], - "summary": "Call Start Batch", - "operationId": "call_start_batch_call_upsert_batch_post", + "tags": ["Calls"], + "summary": "Read call data", + "description": "Retrieve call information and metrics", + "operationId": "call_read_call_read_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallCreateBatchReq" + "$ref": "#/components/schemas/CallReadReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Call data retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallCreateBatchRes" + "$ref": "#/components/schemas/CallReadRes" } } } @@ -224,30 +225,29 @@ ] } }, - "/calls/delete": { + "/call/update": { "post": { - "tags": [ - "Calls" - ], - "summary": "Calls Delete", - "operationId": "calls_delete_calls_delete_post", + "tags": ["Calls"], + "summary": "Update call data", + "description": "Update call information and metrics", + "operationId": "call_update_call_update_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallsDeleteReq" + "$ref": "#/components/schemas/CallUpdateReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Call updated successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallsDeleteRes" + "$ref": "#/components/schemas/CallUpdateRes" } } } @@ -270,30 +270,29 @@ ] } }, - "/call/update": { + "/call/upsert_batch": { "post": { - "tags": [ - "Calls" - ], - "summary": "Call Update", - "operationId": "call_update_call_update_post", + "tags": ["Calls"], + "summary": "Batch upsert calls", + "description": "Create or update multiple calls in a single batch operation", + "operationId": "call_start_batch_call_upsert_batch_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallUpdateReq" + "$ref": "#/components/schemas/CallUpsertBatchReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Batch operation completed successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallUpdateRes" + "$ref": "#/components/schemas/CallUpsertBatchRes" } } } @@ -316,30 +315,29 @@ ] } }, - "/call/read": { + "/calls/delete": { "post": { - "tags": [ - "Calls" - ], - "summary": "Call Read", - "operationId": "call_read_call_read_post", + "tags": ["Calls"], + "summary": "Delete calls", + "description": "Delete multiple calls based on specified criteria", + "operationId": "calls_delete_calls_delete_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallReadReq" + "$ref": "#/components/schemas/CallsDeleteReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Calls deleted successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallReadRes" + "$ref": "#/components/schemas/CallsDeleteRes" } } } @@ -364,24 +362,23 @@ }, "/calls/query_stats": { "post": { - "tags": [ - "Calls" - ], - "summary": "Calls Query Stats", + "tags": ["Calls"], + "summary": "Query call statistics", + "description": "Get aggregated statistics for calls based on query parameters", "operationId": "calls_query_stats_calls_query_stats_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallsQueryStatsReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Call statistics retrieved successfully", "content": { "application/json": { "schema": { @@ -410,89 +407,27 @@ }, "/calls/stream_query": { "post": { - "tags": [ - "Calls" - ], - "summary": "Calls Query Stream", + "tags": ["Calls"], + "summary": "Stream call query results", + "description": "Stream call data matching query parameters in real-time", "operationId": "calls_query_stream_calls_stream_query_post", - "security": [ - { - "HTTPBasic": [] - } - ], - "parameters": [ - { - "name": "accept", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "application/jsonl", - "title": "Accept" - } - } - ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallsQueryReq" - } - } - } - }, - "responses": { - "200": { - "description": "Stream of data in JSONL format", - "content": { - "application/jsonl": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Schema" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "$ref": "#/components/schemas/CallsStreamQueryReq" } } } - } - } - }, - "/obj/create": { - "post": { - "tags": [ - "Objects" - ], - "summary": "Obj Create", - "operationId": "obj_create_obj_create_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ObjCreateReq" - } - } - }, - "required": true }, "responses": { "200": { - "description": "Successful Response", + "description": "Stream established successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ObjCreateRes" + "$ref": "#/components/schemas/CallsStreamQueryRes" } } } @@ -515,30 +450,29 @@ ] } }, - "/obj/read": { + "/cost/create": { "post": { - "tags": [ - "Objects" - ], - "summary": "Obj Read", - "operationId": "obj_read_obj_read_post", + "tags": ["Costs"], + "summary": "Create cost record", + "description": "Record cost information for LLM usage tracking", + "operationId": "cost_create_cost_create_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ObjReadReq" + "$ref": "#/components/schemas/CostCreateReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Cost record created successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ObjReadRes" + "$ref": "#/components/schemas/CostCreateRes" } } } @@ -561,30 +495,29 @@ ] } }, - "/objs/query": { + "/cost/query": { "post": { - "tags": [ - "Objects" - ], - "summary": "Objs Query", - "operationId": "objs_query_objs_query_post", + "tags": ["Costs"], + "summary": "Query cost records", + "description": "Retrieve cost data based on query parameters", + "operationId": "cost_query_cost_query_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ObjQueryReq" + "$ref": "#/components/schemas/CostQueryReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Cost data retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ObjQueryRes" + "$ref": "#/components/schemas/CostQueryRes" } } } @@ -607,30 +540,29 @@ ] } }, - "/obj/delete": { + "/cost/purge": { "post": { - "tags": [ - "Objects" - ], - "summary": "Obj Delete", - "operationId": "obj_delete_obj_delete_post", + "tags": ["Costs"], + "summary": "Purge cost records", + "description": "Permanently delete cost records based on specified criteria", + "operationId": "cost_purge_cost_purge_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ObjDeleteReq" + "$ref": "#/components/schemas/CostPurgeReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Cost records purged successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ObjDeleteRes" + "$ref": "#/components/schemas/CostPurgeRes" } } } @@ -653,30 +585,29 @@ ] } }, - "/table/create": { + "/feedback/create": { "post": { - "tags": [ - "Tables" - ], - "summary": "Table Create", - "operationId": "table_create_table_create_post", + "tags": ["Feedback"], + "summary": "Create feedback", + "description": "Add feedback to a call or object for improving LLM performance", + "operationId": "feedback_create_feedback_create_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TableCreateReq" + "$ref": "#/components/schemas/FeedbackCreateReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Feedback created successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TableCreateRes" + "$ref": "#/components/schemas/FeedbackCreateRes" } } } @@ -699,30 +630,29 @@ ] } }, - "/table/update": { + "/feedback/query": { "post": { - "tags": [ - "Tables" - ], - "summary": "Table Update", - "operationId": "table_update_table_update_post", + "tags": ["Feedback"], + "summary": "Query feedback", + "description": "Retrieve feedback records based on query parameters", + "operationId": "feedback_query_feedback_query_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TableUpdateReq" + "$ref": "#/components/schemas/FeedbackQueryReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Feedback data retrieved successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TableUpdateRes" + "$ref": "#/components/schemas/FeedbackQueryRes" } } } @@ -745,30 +675,29 @@ ] } }, - "/table/query": { + "/feedback/purge": { "post": { - "tags": [ - "Tables" - ], - "summary": "Table Query", - "operationId": "table_query_table_query_post", + "tags": ["Feedback"], + "summary": "Purge feedback", + "description": "Permanently delete feedback records", + "operationId": "feedback_purge_feedback_purge_post", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TableQueryReq" + "$ref": "#/components/schemas/FeedbackPurgeReq" } } - }, - "required": true + } }, "responses": { "200": { - "description": "Successful Response", + "description": "Feedback purged successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TableQueryRes" + "$ref": "#/components/schemas/FeedbackPurgeRes" } } } @@ -790,4152 +719,685 @@ } ] } + } + }, + "components": { + "securitySchemes": { + "HTTPBasic": { + "type": "http", + "scheme": "basic" + }, + "BearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } }, - "/table/query_stream": { - "post": { - "summary": "Table Query Stream", - "operationId": "table_query_stream_table_query_stream_post", - "security": [ - { - "HTTPBasic": [] - } - ], - "parameters": [ - { - "name": "accept", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "application/jsonl", - "title": "Accept" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableQueryReq" - } - } + "schemas": { + "ServerInfoRes": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "API version" + }, + "environment": { + "type": "string", + "description": "Current environment" + }, + "features": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Available features" } }, - "responses": { - "200": { - "description": "Stream of data in JSONL format", - "content": { - "application/jsonl": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Schema" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } + "required": ["version", "environment"] + }, + "HTTPValidationError": { + "type": "object", + "properties": { + "detail": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValidationError" } } } - } - }, - "/table/query_stats": { - "post": { - "tags": [ - "Tables" - ], - "summary": "Table Query Stats", - "operationId": "table_query_stats_table_query_stats_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableQueryStatsReq" - } + }, + "ValidationError": { + "type": "object", + "properties": { + "loc": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] } }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableQueryStatsRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/refs/read_batch": { - "post": { - "tags": [ - "Refs" - ], - "summary": "Refs Read Batch", - "operationId": "refs_read_batch_refs_read_batch_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefsReadBatchReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefsReadBatchRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/file/create": { - "post": { - "tags": [ - "Files" - ], - "summary": "File Create", - "operationId": "file_create_file_create_post", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_file_create_file_create_post" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileCreateRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/file/content": { - "post": { - "tags": [ - "Files" - ], - "summary": "File Content", - "operationId": "file_content_file_content_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileContentReadReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Binary file content stream", - "content": { - "application/octet-stream": {} - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/cost/create": { - "post": { - "tags": [ - "Costs" - ], - "summary": "Cost Create", - "operationId": "cost_create_cost_create_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCreateReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCreateRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/cost/query": { - "post": { - "tags": [ - "Costs" - ], - "summary": "Cost Query", - "operationId": "cost_query_cost_query_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostQueryReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostQueryRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/cost/purge": { - "post": { - "tags": [ - "Costs" - ], - "summary": "Cost Purge", - "operationId": "cost_purge_cost_purge_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostPurgeReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostPurgeRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/feedback/create": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Feedback Create", - "description": "Add feedback to a call or object.", - "operationId": "feedback_create_feedback_create_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackCreateReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackCreateRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/feedback/query": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Feedback Query", - "description": "Query for feedback.", - "operationId": "feedback_query_feedback_query_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackQueryReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackQueryRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/feedback/purge": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Feedback Purge", - "description": "Permanently delete feedback.", - "operationId": "feedback_purge_feedback_purge_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackPurgeReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackPurgeRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/feedback/replace": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Feedback Replace", - "operationId": "feedback_replace_feedback_replace_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackReplaceReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackReplaceRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - } - }, - "components": { - "schemas": { - "AndOperation": { - "properties": { - "$and": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - "type": "array", - "title": "$And" - } - }, - "type": "object", - "required": [ - "$and" - ], - "title": "AndOperation" - }, - "Body_file_create_file_create_post": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "file": { - "type": "string", - "format": "binary", - "title": "File" - } - }, - "type": "object", - "required": [ - "project_id", - "file" - ], - "title": "Body_file_create_file_create_post" - }, - "CallBatchEndMode": { - "properties": { - "mode": { - "type": "string", - "title": "Mode", - "default": "end" - }, - "req": { - "$ref": "#/components/schemas/CallEndReq" - } - }, - "type": "object", - "required": [ - "req" - ], - "title": "CallBatchEndMode" - }, - "CallBatchStartMode": { - "properties": { - "mode": { - "type": "string", - "title": "Mode", - "default": "start" - }, - "req": { - "$ref": "#/components/schemas/CallStartReq" - } - }, - "type": "object", - "required": [ - "req" - ], - "title": "CallBatchStartMode" - }, - "CallCreateBatchReq": { - "properties": { - "batch": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/CallBatchStartMode" - }, - { - "$ref": "#/components/schemas/CallBatchEndMode" - } - ] - }, - "type": "array", - "title": "Batch" - } - }, - "type": "object", - "required": [ - "batch" - ], - "title": "CallCreateBatchReq" - }, - "CallCreateBatchRes": { - "properties": { - "res": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/CallStartRes" - }, - { - "$ref": "#/components/schemas/CallEndRes" - } - ] - }, - "type": "array", - "title": "Res" - } - }, - "type": "object", - "required": [ - "res" - ], - "title": "CallCreateBatchRes" - }, - "CallEndReq": { - "properties": { - "end": { - "$ref": "#/components/schemas/EndedCallSchemaForInsert" - } - }, - "type": "object", - "required": [ - "end" - ], - "title": "CallEndReq" - }, - "CallEndRes": { - "properties": {}, - "type": "object", - "title": "CallEndRes" - }, - "CallReadReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "id": { - "type": "string", - "title": "Id" - }, - "include_costs": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Include Costs", - "default": false - } - }, - "type": "object", - "required": [ - "project_id", - "id" - ], - "title": "CallReadReq" - }, - "CallReadRes": { - "properties": { - "call": { - "anyOf": [ - { - "$ref": "#/components/schemas/CallSchema" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "call" - ], - "title": "CallReadRes" - }, - "CallSchema": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "project_id": { - "type": "string", - "title": "Project Id" - }, - "op_name": { - "type": "string", - "title": "Op Name" - }, - "display_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Display Name" - }, - "trace_id": { - "type": "string", - "title": "Trace Id" - }, - "parent_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Parent Id" - }, - "started_at": { - "type": "string", - "format": "date-time", - "title": "Started At" - }, - "attributes": { - "type": "object", - "title": "Attributes" - }, - "inputs": { - "type": "object", - "title": "Inputs" - }, - "ended_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ended At" - }, - "exception": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Exception" - }, - "output": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "title": "Output" - }, - "summary": { - "type": "object" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id" - }, - "wb_run_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb Run Id" - }, - "deleted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Deleted At" - } - }, - "type": "object", - "required": [ - "id", - "project_id", - "op_name", - "trace_id", - "started_at", - "attributes", - "inputs" - ], - "title": "CallSchema" - }, - "CallStartReq": { - "properties": { - "start": { - "$ref": "#/components/schemas/StartedCallSchemaForInsert" - } - }, - "type": "object", - "required": [ - "start" - ], - "title": "CallStartReq" - }, - "CallStartRes": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "trace_id": { - "type": "string", - "title": "Trace Id" - } - }, - "type": "object", - "required": [ - "id", - "trace_id" - ], - "title": "CallStartRes" - }, - "CallUpdateReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "call_id": { - "type": "string", - "title": "Call Id" - }, - "display_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Display Name" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - } - }, - "type": "object", - "required": [ - "project_id", - "call_id" - ], - "title": "CallUpdateReq" - }, - "CallUpdateRes": { - "properties": {}, - "type": "object", - "title": "CallUpdateRes" - }, - "CallsDeleteReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "call_ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Call Ids" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - } - }, - "type": "object", - "required": [ - "project_id", - "call_ids" - ], - "title": "CallsDeleteReq" - }, - "CallsDeleteRes": { - "properties": {}, - "type": "object", - "title": "CallsDeleteRes" - }, - "CallsFilter": { - "properties": { - "op_names": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Op Names" - }, - "input_refs": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Input Refs" - }, - "output_refs": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Output Refs" - }, - "parent_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parent Ids" - }, - "trace_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Trace Ids" - }, - "call_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Call Ids" - }, - "trace_roots_only": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Trace Roots Only" - }, - "wb_user_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Wb User Ids" - }, - "wb_run_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Wb Run Ids" - } - }, - "type": "object", - "title": "CallsFilter" - }, - "CallsQueryReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "filter": { - "anyOf": [ - { - "$ref": "#/components/schemas/CallsFilter" - }, - { - "type": "null" - } - ] - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit" - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset" - }, - "sort_by": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SortBy" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Sort By" - }, - "query": { - "anyOf": [ - { - "$ref": "#/components/schemas/Query" - }, - { - "type": "null" - } - ] - }, - "include_costs": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Include Costs", - "description": "Beta, subject to change. If true, the response will include any model costs for each call.", - "default": false - }, - "include_feedback": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Include Feedback", - "description": "Beta, subject to change. If true, the response will include feedback for each call.", - "default": false - }, - "columns": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Columns" - }, - "expand_columns": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Expand Columns", - "description": "Columns to expand, i.e. refs to other objects", - "examples": [ - [ - "inputs.self.message", - "inputs.model.prompt" - ] - ] - } - }, - "type": "object", - "required": [ - "project_id" - ], - "title": "CallsQueryReq" - }, - "CallsQueryStatsReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "filter": { - "anyOf": [ - { - "$ref": "#/components/schemas/CallsFilter" - }, - { - "type": "null" - } - ] - }, - "query": { - "anyOf": [ - { - "$ref": "#/components/schemas/Query" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "project_id" - ], - "title": "CallsQueryStatsReq" - }, - "CallsQueryStatsRes": { - "properties": { - "count": { - "type": "integer", - "title": "Count" - } - }, - "type": "object", - "required": [ - "count" - ], - "title": "CallsQueryStatsRes" - }, - "ContainsOperation": { - "properties": { - "$contains": { - "$ref": "#/components/schemas/ContainsSpec" - } - }, - "type": "object", - "required": [ - "$contains" - ], - "title": "ContainsOperation" - }, - "ContainsSpec": { - "properties": { - "input": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ], - "title": "Input" - }, - "substr": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ], - "title": "Substr" - }, - "case_insensitive": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Case Insensitive", - "default": false - } - }, - "type": "object", - "required": [ - "input", - "substr" - ], - "title": "ContainsSpec" - }, - "ConvertOperation": { - "properties": { - "$convert": { - "$ref": "#/components/schemas/ConvertSpec" - } - }, - "type": "object", - "required": [ - "$convert" - ], - "title": "ConvertOperation" - }, - "ConvertSpec": { - "properties": { - "input": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ], - "title": "Input" - }, - "to": { - "type": "string", - "enum": [ - "double", - "string", - "int", - "bool", - "exists" - ], - "title": "To" - } - }, - "type": "object", - "required": [ - "input", - "to" - ], - "title": "ConvertSpec" - }, - "CostCreateInput": { - "properties": { - "prompt_token_cost": { - "type": "number", - "title": "Prompt Token Cost" - }, - "completion_token_cost": { - "type": "number", - "title": "Completion Token Cost" - }, - "prompt_token_cost_unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Prompt Token Cost Unit", - "description": "The unit of the cost for the prompt tokens", - "default": "USD" - }, - "completion_token_cost_unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Completion Token Cost Unit", - "description": "The unit of the cost for the completion tokens", - "default": "USD" - }, - "effective_date": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Effective Date", - "description": "The date after which the cost is effective for, will default to the current date if not provided" - }, - "provider_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Provider Id", - "description": "The provider of the LLM, e.g. 'openai' or 'mistral'. If not provided, the provider_id will be set to 'default'" - } - }, - "type": "object", - "required": [ - "prompt_token_cost", - "completion_token_cost" - ], - "title": "CostCreateInput" - }, - "CostCreateReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "costs": { - "additionalProperties": { - "$ref": "#/components/schemas/CostCreateInput" - }, - "type": "object", - "title": "Costs" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - } - }, - "type": "object", - "required": [ - "project_id", - "costs" - ], - "title": "CostCreateReq" - }, - "CostCreateRes": { - "properties": { - "ids": { - "items": { - "prefixItems": [ - { - "type": "string" - }, - { - "type": "string" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2 - }, - "type": "array", - "title": "Ids" - } - }, - "type": "object", - "required": [ - "ids" - ], - "title": "CostCreateRes" - }, - "CostPurgeReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "query": { - "$ref": "#/components/schemas/Query" - } - }, - "type": "object", - "required": [ - "project_id", - "query" - ], - "title": "CostPurgeReq" - }, - "CostPurgeRes": { - "properties": {}, - "type": "object", - "title": "CostPurgeRes" - }, - "CostQueryOutput": { - "properties": { - "id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Id", - "examples": [ - "2341-asdf-asdf" - ] - }, - "llm_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Llm Id", - "examples": [ - "gpt4" - ] - }, - "prompt_token_cost": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Prompt Token Cost", - "examples": [ - 1.0 - ] - }, - "completion_token_cost": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Completion Token Cost", - "examples": [ - 1.0 - ] - }, - "prompt_token_cost_unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Prompt Token Cost Unit", - "examples": [ - "USD" - ] - }, - "completion_token_cost_unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Completion Token Cost Unit", - "examples": [ - "USD" - ] - }, - "effective_date": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Effective Date", - "examples": [ - "2024-01-01T00:00:00Z" - ] - }, - "provider_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Provider Id", - "examples": [ - "openai" - ] - } - }, - "type": "object", - "title": "CostQueryOutput" - }, - "CostQueryReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "fields": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Fields", - "examples": [ - [ - "id", - "llm_id", - "prompt_token_cost", - "completion_token_cost", - "prompt_token_cost_unit", - "completion_token_cost_unit", - "effective_date", - "provider_id" - ] - ] - }, - "query": { - "anyOf": [ - { - "$ref": "#/components/schemas/Query" - }, - { - "type": "null" - } - ] - }, - "sort_by": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SortBy" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Sort By" - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "examples": [ - 10 - ] - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "examples": [ - 0 - ] - } - }, - "type": "object", - "required": [ - "project_id" - ], - "title": "CostQueryReq" - }, - "CostQueryRes": { - "properties": { - "results": { - "items": { - "$ref": "#/components/schemas/CostQueryOutput" - }, - "type": "array", - "title": "Results" - } - }, - "type": "object", - "required": [ - "results" - ], - "title": "CostQueryRes" - }, - "EndedCallSchemaForInsert": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "id": { - "type": "string", - "title": "Id" - }, - "ended_at": { - "type": "string", - "format": "date-time", - "title": "Ended At" - }, - "exception": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Exception" - }, - "output": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "title": "Output" - }, - "summary": { - "$ref": "#/components/schemas/SummaryInsertMap" - } - }, - "type": "object", - "required": [ - "project_id", - "id", - "ended_at", - "summary" - ], - "title": "EndedCallSchemaForInsert" - }, - "EqOperation": { - "properties": { - "$eq": { - "prefixItems": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2, - "title": "$Eq" - } - }, - "type": "object", - "required": [ - "$eq" - ], - "title": "EqOperation" - }, - "FeedbackCreateReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "weave_ref": { - "type": "string", - "title": "Weave Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "creator": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Creator", - "examples": [ - "Jane Smith" - ] - }, - "feedback_type": { - "type": "string", - "title": "Feedback Type", - "examples": [ - "custom" - ] - }, - "payload": { - "type": "object", - "title": "Payload", - "examples": [ - { - "key": "value" - } - ] - }, - "annotation_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Annotation Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "runnable_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Runnable Ref", - "examples": [ - "weave:///entity/project/op/name:digest" - ] - }, - "call_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Call Ref", - "examples": [ - "weave:///entity/project/call/call_id" - ] - }, - "trigger_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Trigger Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - } - }, - "type": "object", - "required": [ - "project_id", - "weave_ref", - "feedback_type", - "payload" - ], - "title": "FeedbackCreateReq" - }, - "FeedbackCreateRes": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "wb_user_id": { - "type": "string", - "title": "Wb User Id" - }, - "payload": { - "type": "object", - "title": "Payload" - } - }, - "type": "object", - "required": [ - "id", - "created_at", - "wb_user_id", - "payload" - ], - "title": "FeedbackCreateRes" - }, - "FeedbackPurgeReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "query": { - "$ref": "#/components/schemas/Query" - } - }, - "type": "object", - "required": [ - "project_id", - "query" - ], - "title": "FeedbackPurgeReq" - }, - "FeedbackPurgeRes": { - "properties": {}, - "type": "object", - "title": "FeedbackPurgeRes" - }, - "FeedbackQueryReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "fields": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Fields", - "examples": [ - [ - "id", - "feedback_type", - "payload.note" - ] - ] - }, - "query": { - "anyOf": [ - { - "$ref": "#/components/schemas/Query" - }, - { - "type": "null" - } - ] - }, - "sort_by": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SortBy" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Sort By" - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "examples": [ - 10 - ] - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "examples": [ - 0 - ] - } - }, - "type": "object", - "required": [ - "project_id" - ], - "title": "FeedbackQueryReq" - }, - "FeedbackQueryRes": { - "properties": { - "result": { - "items": { - "type": "object" - }, - "type": "array", - "title": "Result" - } - }, - "type": "object", - "required": [ - "result" - ], - "title": "FeedbackQueryRes" - }, - "FeedbackReplaceReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "weave_ref": { - "type": "string", - "title": "Weave Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "creator": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Creator", - "examples": [ - "Jane Smith" - ] - }, - "feedback_type": { - "type": "string", - "title": "Feedback Type", - "examples": [ - "custom" - ] - }, - "payload": { - "type": "object", - "title": "Payload", - "examples": [ - { - "key": "value" - } - ] - }, - "annotation_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Annotation Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "runnable_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Runnable Ref", - "examples": [ - "weave:///entity/project/op/name:digest" - ] - }, - "call_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Call Ref", - "examples": [ - "weave:///entity/project/call/call_id" - ] - }, - "trigger_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Trigger Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - }, - "feedback_id": { - "type": "string", - "title": "Feedback Id" - } - }, - "type": "object", - "required": [ - "project_id", - "weave_ref", - "feedback_type", - "payload", - "feedback_id" - ], - "title": "FeedbackReplaceReq" - }, - "FeedbackReplaceRes": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "wb_user_id": { - "type": "string", - "title": "Wb User Id" - }, - "payload": { - "type": "object", - "title": "Payload" - } - }, - "type": "object", - "required": [ - "id", - "created_at", - "wb_user_id", - "payload" - ], - "title": "FeedbackReplaceRes" - }, - "FileContentReadReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "digest": { - "type": "string", - "title": "Digest" - } - }, - "type": "object", - "required": [ - "project_id", - "digest" - ], - "title": "FileContentReadReq" - }, - "FileCreateRes": { - "properties": { - "digest": { - "type": "string", - "title": "Digest" - } - }, - "type": "object", - "required": [ - "digest" - ], - "title": "FileCreateRes" - }, - "GetFieldOperator": { - "properties": { - "$getField": { - "type": "string", - "title": "$Getfield" - } - }, - "type": "object", - "required": [ - "$getField" - ], - "title": "GetFieldOperator" - }, - "GtOperation": { - "properties": { - "$gt": { - "prefixItems": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2, - "title": "$Gt" - } - }, - "type": "object", - "required": [ - "$gt" - ], - "title": "GtOperation" - }, - "GteOperation": { - "properties": { - "$gte": { - "prefixItems": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2, - "title": "$Gte" - } - }, - "type": "object", - "required": [ - "$gte" - ], - "title": "GteOperation" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" + "msg": { + "type": "string" + }, + "type": { + "type": "string" } }, - "type": "object", - "title": "HTTPValidationError" + "required": ["loc", "msg", "type"] }, - "InOperation": { - "properties": { - "$in": { - "prefixItems": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - "type": "array" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2, - "title": "$In" - } - }, + "CallStartReq": { "type": "object", - "required": [ - "$in" - ], - "title": "InOperation" - }, - "LLMUsageSchema": { "properties": { - "prompt_tokens": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Prompt Tokens" - }, - "input_tokens": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Input Tokens" + "project_id": { + "type": "string", + "description": "Project identifier" }, - "completion_tokens": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Completion Tokens" + "parent_id": { + "type": "string", + "description": "Parent call identifier" }, - "output_tokens": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Output Tokens" + "op_name": { + "type": "string", + "description": "Operation name" }, - "requests": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Requests" + "inputs": { + "type": "object", + "description": "Input parameters for the call" }, - "total_tokens": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Total Tokens" + "attributes": { + "type": "object", + "description": "Additional attributes" } }, - "type": "object", - "title": "LLMUsageSchema" + "required": ["project_id", "op_name"] }, - "LiteralOperation": { - "properties": { - "$literal": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "additionalProperties": { - "$ref": "#/components/schemas/LiteralOperation" - }, - "type": "object" - }, - { - "items": { - "$ref": "#/components/schemas/LiteralOperation" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "$Literal" - } - }, + "CallStartRes": { "type": "object", - "required": [ - "$literal" - ], - "title": "LiteralOperation" - }, - "NotOperation": { "properties": { - "$not": { - "prefixItems": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - } - ], - "type": "array", - "maxItems": 1, - "minItems": 1, - "title": "$Not" + "call_id": { + "type": "string", + "description": "Unique identifier for the created call" + }, + "trace_id": { + "type": "string", + "description": "Trace identifier" } }, - "type": "object", - "required": [ - "$not" - ], - "title": "NotOperation" + "required": ["call_id"] }, - "ObjCreateReq": { - "properties": { - "obj": { - "$ref": "#/components/schemas/ObjSchemaForInsert" - } - }, + "CallEndReq": { "type": "object", - "required": [ - "obj" - ], - "title": "ObjCreateReq" - }, - "ObjCreateRes": { "properties": { - "digest": { + "call_id": { "type": "string", - "title": "Digest" + "description": "Call identifier to end" + }, + "outputs": { + "type": "object", + "description": "Output results from the call" + }, + "summary": { + "type": "object", + "description": "Call summary information" } }, - "type": "object", - "required": [ - "digest" - ], - "title": "ObjCreateRes" + "required": ["call_id"] }, - "ObjDeleteReq": { + "CallEndRes": { + "type": "object", "properties": { - "project_id": { + "call_id": { "type": "string", - "title": "Project Id" + "description": "Identifier of the ended call" }, - "object_id": { + "ended_at": { "type": "string", - "title": "Object Id" - }, - "digests": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Digests", - "description": "List of digests to delete. If not provided, all digests for the object will be deleted." + "format": "date-time", + "description": "Timestamp when call ended" } }, - "type": "object", - "required": [ - "project_id", - "object_id" - ], - "title": "ObjDeleteReq" + "required": ["call_id", "ended_at"] }, - "ObjDeleteRes": { + "CallReadReq": { + "type": "object", "properties": { - "num_deleted": { - "type": "integer", - "title": "Num Deleted" + "call_id": { + "type": "string", + "description": "Call identifier to read" + }, + "include_costs": { + "type": "boolean", + "description": "Whether to include cost information" } }, - "type": "object", - "required": [ - "num_deleted" - ], - "title": "ObjDeleteRes" + "required": ["call_id"] }, - "ObjQueryReq": { + "CallReadRes": { + "type": "object", "properties": { + "call_id": { + "type": "string", + "description": "Call identifier" + }, "project_id": { "type": "string", - "title": "Project Id", - "description": "The ID of the project to query", - "examples": [ - "user/project" - ] + "description": "Project identifier" }, - "filter": { - "anyOf": [ - { - "$ref": "#/components/schemas/ObjectVersionFilter" - }, - { - "type": "null" - } - ], - "description": "Filter criteria for the query. See `ObjectVersionFilter`", - "examples": [ - { - "latest_only": true, - "object_ids": [ - "my_favorite_model" - ] - } - ] + "op_name": { + "type": "string", + "description": "Operation name" }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "description": "Maximum number of results to return", - "examples": [ - 100 - ] + "inputs": { + "type": "object", + "description": "Input parameters" }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "description": "Number of results to skip before returning", - "examples": [ - 0 - ] + "outputs": { + "type": "object", + "description": "Output results" }, - "sort_by": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SortBy" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Sort By", - "description": "Sorting criteria for the query results. Currently only supports 'object_id' and 'created_at'.", - "examples": [ - [ - { - "direction": "desc", - "field": "created_at" - } - ] - ] + "started_at": { + "type": "string", + "format": "date-time", + "description": "Start timestamp" }, - "metadata_only": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Metadata Only", - "description": "If true, the `val` column is not read from the database and is empty.All other fields are returned.", - "default": false - } - }, - "type": "object", - "required": [ - "project_id" - ], - "title": "ObjQueryReq" - }, - "ObjQueryRes": { - "properties": { - "objs": { + "ended_at": { + "type": "string", + "format": "date-time", + "description": "End timestamp" + }, + "costs": { + "type": "array", "items": { - "$ref": "#/components/schemas/ObjSchema" + "$ref": "#/components/schemas/CostInfo" }, - "type": "array", - "title": "Objs" + "description": "Associated cost information" } }, - "type": "object", - "required": [ - "objs" - ], - "title": "ObjQueryRes" + "required": ["call_id", "project_id", "op_name"] }, - "ObjReadReq": { + "CallUpdateReq": { + "type": "object", "properties": { - "project_id": { + "call_id": { "type": "string", - "title": "Project Id" + "description": "Call identifier to update" }, - "object_id": { - "type": "string", - "title": "Object Id" + "inputs": { + "type": "object", + "description": "Updated input parameters" }, - "digest": { - "type": "string", - "title": "Digest" + "outputs": { + "type": "object", + "description": "Updated output results" }, - "metadata_only": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Metadata Only", - "description": "If true, the `val` column is not read from the database and is empty.All other fields are returned.", - "default": false + "attributes": { + "type": "object", + "description": "Updated attributes" } }, - "type": "object", - "required": [ - "project_id", - "object_id", - "digest" - ], - "title": "ObjReadReq" + "required": ["call_id"] }, - "ObjReadRes": { - "properties": { - "obj": { - "$ref": "#/components/schemas/ObjSchema" - } - }, + "CallUpdateRes": { "type": "object", - "required": [ - "obj" - ], - "title": "ObjReadRes" - }, - "ObjSchema": { "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "object_id": { + "call_id": { "type": "string", - "title": "Object Id" + "description": "Updated call identifier" }, - "created_at": { + "updated_at": { "type": "string", "format": "date-time", - "title": "Created At" - }, - "deleted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Deleted At" - }, - "digest": { - "type": "string", - "title": "Digest" - }, - "version_index": { - "type": "integer", - "title": "Version Index" - }, - "is_latest": { - "type": "integer", - "title": "Is Latest" - }, - "kind": { - "type": "string", - "title": "Kind" - }, - "base_object_class": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Base Object Class" - }, - "val": { - "title": "Val" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." + "description": "Update timestamp" } }, + "required": ["call_id", "updated_at"] + }, + "CallUpsertBatchReq": { "type": "object", - "required": [ - "project_id", - "object_id", - "created_at", - "digest", - "version_index", - "is_latest", - "kind", - "base_object_class", - "val" - ], - "title": "ObjSchema" + "properties": { + "calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallUpsertItem" + }, + "description": "List of calls to upsert" + } + }, + "required": ["calls"] }, - "ObjSchemaForInsert": { + "CallUpsertItem": { + "type": "object", "properties": { - "project_id": { + "call_id": { "type": "string", - "title": "Project Id" + "description": "Call identifier" }, - "object_id": { + "project_id": { "type": "string", - "title": "Object Id" - }, - "val": { - "title": "Val" + "description": "Project identifier" }, - "builtin_object_class": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Builtin Object Class" + "op_name": { + "type": "string", + "description": "Operation name" }, - "set_base_object_class": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Set Base Object Class", - "deprecated": true + "inputs": { + "type": "object", + "description": "Input parameters" }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." + "outputs": { + "type": "object", + "description": "Output results" } }, - "type": "object", - "required": [ - "project_id", - "object_id", - "val" - ], - "title": "ObjSchemaForInsert" + "required": ["project_id", "op_name"] }, - "ObjectVersionFilter": { + "CallUpsertBatchRes": { + "type": "object", "properties": { - "base_object_classes": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Base Object Classes", - "description": "Filter objects by their base classes", - "examples": [ - [ - "Model" - ], - [ - "Dataset" - ] - ] - }, - "object_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Object Ids", - "description": "Filter objects by their IDs", - "examples": [ - "my_favorite_model", - "my_favorite_dataset" - ] + "processed": { + "type": "integer", + "description": "Number of calls processed" }, - "is_op": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Is Op", - "description": "Filter objects based on whether they are weave.ops or not. `True` will only return ops, `False` will return non-ops, and `None` will return all objects", - "examples": [ - true, - false, - null - ] + "created": { + "type": "integer", + "description": "Number of calls created" }, - "latest_only": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Latest Only", - "description": "If True, return only the latest version of each object. `False` and `None` will return all versions", - "examples": [ - true, - false - ] + "updated": { + "type": "integer", + "description": "Number of calls updated" } }, - "type": "object", - "title": "ObjectVersionFilter" + "required": ["processed", "created", "updated"] }, - "OrOperation": { + "CallsDeleteReq": { + "type": "object", "properties": { - "$or": { + "call_ids": { + "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] + "type": "string" }, - "type": "array", - "title": "$Or" + "description": "List of call identifiers to delete" + }, + "project_id": { + "type": "string", + "description": "Project identifier filter" + }, + "before": { + "type": "string", + "format": "date-time", + "description": "Delete calls before this timestamp" } - }, - "type": "object", - "required": [ - "$or" - ], - "title": "OrOperation" + } }, - "Query": { + "CallsDeleteRes": { + "type": "object", "properties": { - "$expr": { - "anyOf": [ - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ], - "title": "$Expr" + "deleted": { + "type": "integer", + "description": "Number of calls deleted" } }, - "type": "object", - "required": [ - "$expr" - ], - "title": "Query" + "required": ["deleted"] }, - "RefsReadBatchReq": { + "CallsQueryStatsReq": { + "type": "object", "properties": { - "refs": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Refs" + "project_id": { + "type": "string", + "description": "Project identifier filter" + }, + "op_name": { + "type": "string", + "description": "Operation name filter" + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "Start time filter" + }, + "end_time": { + "type": "string", + "format": "date-time", + "description": "End time filter" } - }, - "type": "object", - "required": [ - "refs" - ], - "title": "RefsReadBatchReq" + } }, - "RefsReadBatchRes": { + "CallsQueryStatsRes": { + "type": "object", "properties": { - "vals": { - "items": {}, - "type": "array", - "title": "Vals" + "total_calls": { + "type": "integer", + "description": "Total number of calls" + }, + "total_cost": { + "type": "number", + "format": "float", + "description": "Total cost" + }, + "avg_duration": { + "type": "number", + "format": "float", + "description": "Average duration in seconds" + }, + "success_rate": { + "type": "number", + "format": "float", + "description": "Success rate percentage" } }, - "type": "object", - "required": [ - "vals" - ], - "title": "RefsReadBatchRes" + "required": ["total_calls"] }, - "ServerInfoRes": { + "CallsStreamQueryReq": { + "type": "object", "properties": { - "min_required_weave_python_version": { + "project_id": { "type": "string", - "title": "Min Required Weave Python Version" + "description": "Project identifier filter" + }, + "op_name": { + "type": "string", + "description": "Operation name filter" + }, + "limit": { + "type": "integer", + "description": "Maximum number of results" } - }, - "type": "object", - "required": [ - "min_required_weave_python_version" - ], - "title": "ServerInfoRes" + } }, - "SortBy": { + "CallsStreamQueryRes": { + "type": "object", "properties": { - "field": { - "type": "string", - "title": "Field" + "calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallReadRes" + }, + "description": "Stream of call results" }, - "direction": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "title": "Direction" + "has_more": { + "type": "boolean", + "description": "Whether more results are available" } }, - "type": "object", - "required": [ - "field", - "direction" - ], - "title": "SortBy" + "required": ["calls", "has_more"] }, - "StartedCallSchemaForInsert": { + "CostCreateReq": { + "type": "object", "properties": { - "project_id": { + "call_id": { "type": "string", - "title": "Project Id" + "description": "Associated call identifier" }, - "id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Id" - }, - "op_name": { + "cost_type": { "type": "string", - "title": "Op Name" - }, - "display_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Display Name" - }, - "trace_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Trace Id" + "description": "Type of cost (e.g., 'llm_tokens', 'compute')" }, - "parent_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Parent Id" + "amount": { + "type": "number", + "format": "float", + "description": "Cost amount" }, - "started_at": { + "currency": { "type": "string", - "format": "date-time", - "title": "Started At" + "description": "Currency code (e.g., 'USD')" }, - "attributes": { - "type": "object", - "title": "Attributes" + "provider": { + "type": "string", + "description": "Service provider" }, - "inputs": { + "metadata": { "type": "object", - "title": "Inputs" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - }, - "wb_run_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb Run Id" + "description": "Additional cost metadata" } }, - "type": "object", - "required": [ - "project_id", - "op_name", - "started_at", - "attributes", - "inputs" - ], - "title": "StartedCallSchemaForInsert" + "required": ["call_id", "cost_type", "amount"] }, - "SummaryInsertMap": { - "properties": { - "usage": { - "additionalProperties": { - "$ref": "#/components/schemas/LLMUsageSchema" - }, - "type": "object", - "title": "Usage" - } - }, - "additionalProperties": true, + "CostCreateRes": { "type": "object", - "title": "SummaryInsertMap" - }, - "TableAppendSpec": { "properties": { - "append": { - "$ref": "#/components/schemas/TableAppendSpecPayload" + "cost_id": { + "type": "string", + "description": "Created cost record identifier" } }, - "type": "object", - "required": [ - "append" - ], - "title": "TableAppendSpec" + "required": ["cost_id"] }, - "TableAppendSpecPayload": { + "CostQueryReq": { + "type": "object", "properties": { - "row": { - "type": "object", - "title": "Row" + "call_id": { + "type": "string", + "description": "Filter by call identifier" + }, + "cost_type": { + "type": "string", + "description": "Filter by cost type" + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "Start time filter" + }, + "end_time": { + "type": "string", + "format": "date-time", + "description": "End time filter" } - }, - "type": "object", - "required": [ - "row" - ], - "title": "TableAppendSpecPayload" + } }, - "TableCreateReq": { + "CostQueryRes": { + "type": "object", "properties": { - "table": { - "$ref": "#/components/schemas/TableSchemaForInsert" + "costs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CostInfo" + }, + "description": "List of cost records" + }, + "total_amount": { + "type": "number", + "format": "float", + "description": "Total cost amount" } }, - "type": "object", - "required": [ - "table" - ], - "title": "TableCreateReq" + "required": ["costs"] }, - "TableCreateRes": { + "CostPurgeReq": { + "type": "object", "properties": { - "digest": { + "before": { "type": "string", - "title": "Digest" + "format": "date-time", + "description": "Delete costs before this timestamp" }, - "row_digests": { + "call_ids": { + "type": "array", "items": { "type": "string" }, - "type": "array", - "title": "Row Digests", - "description": "The digests of the rows that were created" + "description": "Delete costs for specific call IDs" } - }, - "type": "object", - "required": [ - "digest" - ], - "title": "TableCreateRes" + } }, - "TableInsertSpec": { - "properties": { - "insert": { - "$ref": "#/components/schemas/TableInsertSpecPayload" - } - }, + "CostPurgeRes": { "type": "object", - "required": [ - "insert" - ], - "title": "TableInsertSpec" - }, - "TableInsertSpecPayload": { "properties": { - "index": { + "deleted": { "type": "integer", - "title": "Index" - }, - "row": { - "type": "object", - "title": "Row" + "description": "Number of cost records deleted" } }, - "type": "object", - "required": [ - "index", - "row" - ], - "title": "TableInsertSpecPayload" - }, - "TablePopSpec": { - "properties": { - "pop": { - "$ref": "#/components/schemas/TablePopSpecPayload" - } - }, - "type": "object", - "required": [ - "pop" - ], - "title": "TablePopSpec" + "required": ["deleted"] }, - "TablePopSpecPayload": { - "properties": { - "index": { - "type": "integer", - "title": "Index" - } - }, + "CostInfo": { "type": "object", - "required": [ - "index" - ], - "title": "TablePopSpecPayload" - }, - "TableQueryReq": { "properties": { - "project_id": { + "cost_id": { "type": "string", - "title": "Project Id", - "description": "The ID of the project", - "examples": [ - "my_entity/my_project" - ] + "description": "Cost record identifier" }, - "digest": { + "call_id": { "type": "string", - "title": "Digest", - "description": "The digest of the table to query", - "examples": [ - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" - ] + "description": "Associated call identifier" }, - "filter": { - "anyOf": [ - { - "$ref": "#/components/schemas/TableRowFilter" - }, - { - "type": "null" - } - ], - "description": "Optional filter to apply to the query. See `TableRowFilter` for more details.", - "examples": [ - { - "row_digests": [ - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims", - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" - ] - } - ] + "cost_type": { + "type": "string", + "description": "Type of cost" }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "description": "Maximum number of rows to return", - "examples": [ - 100 - ] + "amount": { + "type": "number", + "format": "float", + "description": "Cost amount" }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "description": "Number of rows to skip before starting to return rows", - "examples": [ - 10 - ] + "currency": { + "type": "string", + "description": "Currency code" }, - "sort_by": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SortBy" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Sort By", - "description": "List of fields to sort by. Fields can be dot-separated to access dictionary values. No sorting uses the default table order (insertion order).", - "examples": [ - [ - { - "field": "col_a.prop_b", - "order": "desc" - } - ] - ] + "provider": { + "type": "string", + "description": "Service provider" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp" } }, - "type": "object", - "required": [ - "project_id", - "digest" - ], - "title": "TableQueryReq" + "required": ["cost_id", "call_id", "cost_type", "amount"] }, - "TableQueryRes": { - "properties": { - "rows": { - "items": { - "$ref": "#/components/schemas/TableRowSchema" - }, - "type": "array", - "title": "Rows" - } - }, + "FeedbackCreateReq": { "type": "object", - "required": [ - "rows" - ], - "title": "TableQueryRes" - }, - "TableQueryStatsReq": { "properties": { - "project_id": { + "call_id": { + "type": "string", + "description": "Associated call identifier" + }, + "feedback_type": { "type": "string", - "title": "Project Id", - "description": "The ID of the project", - "examples": [ - "my_entity/my_project" - ] + "description": "Type of feedback (e.g., 'rating', 'correction')" + }, + "value": { + "type": "object", + "description": "Feedback value" }, - "digest": { + "note": { "type": "string", - "title": "Digest", - "description": "The digest of the table to query", - "examples": [ - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" - ] + "description": "Additional feedback note" } }, - "type": "object", - "required": [ - "project_id", - "digest" - ], - "title": "TableQueryStatsReq" + "required": ["call_id", "feedback_type", "value"] }, - "TableQueryStatsRes": { - "properties": { - "count": { - "type": "integer", - "title": "Count" - } - }, + "FeedbackCreateRes": { "type": "object", - "required": [ - "count" - ], - "title": "TableQueryStatsRes" - }, - "TableRowFilter": { "properties": { - "row_digests": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Row Digests", - "description": "List of row digests to filter by", - "examples": [ - [ - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims", - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" - ] - ] + "feedback_id": { + "type": "string", + "description": "Created feedback identifier" } }, - "type": "object", - "title": "TableRowFilter" + "required": ["feedback_id"] }, - "TableRowSchema": { + "FeedbackQueryReq": { + "type": "object", "properties": { - "digest": { + "call_id": { "type": "string", - "title": "Digest" + "description": "Filter by call identifier" }, - "val": { - "title": "Val" + "feedback_type": { + "type": "string", + "description": "Filter by feedback type" }, - "original_index": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Original Index" - } - }, - "type": "object", - "required": [ - "digest", - "val" - ], - "title": "TableRowSchema" - }, - "TableSchemaForInsert": { - "properties": { - "project_id": { + "start_time": { "type": "string", - "title": "Project Id" + "format": "date-time", + "description": "Start time filter" }, - "rows": { - "items": { - "type": "object" - }, - "type": "array", - "title": "Rows" + "end_time": { + "type": "string", + "format": "date-time", + "description": "End time filter" } - }, - "type": "object", - "required": [ - "project_id", - "rows" - ], - "title": "TableSchemaForInsert" + } }, - "TableUpdateReq": { + "FeedbackQueryRes": { + "type": "object", "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "base_digest": { - "type": "string", - "title": "Base Digest" - }, - "updates": { + "feedback": { + "type": "array", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/TableAppendSpec" - }, - { - "$ref": "#/components/schemas/TablePopSpec" - }, - { - "$ref": "#/components/schemas/TableInsertSpec" - } - ] + "$ref": "#/components/schemas/FeedbackInfo" }, - "type": "array", - "title": "Updates" + "description": "List of feedback records" } }, - "type": "object", - "required": [ - "project_id", - "base_digest", - "updates" - ], - "title": "TableUpdateReq" + "required": ["feedback"] }, - "TableUpdateRes": { + "FeedbackPurgeReq": { + "type": "object", "properties": { - "digest": { - "type": "string", - "title": "Digest" - }, - "updated_row_digests": { + "feedback_ids": { + "type": "array", "items": { "type": "string" }, - "type": "array", - "title": "Updated Row Digests", - "description": "The digests of the rows that were updated" + "description": "List of feedback identifiers to delete" + }, + "before": { + "type": "string", + "format": "date-time", + "description": "Delete feedback before this timestamp" } - }, + } + }, + "FeedbackPurgeRes": { "type": "object", - "required": [ - "digest" - ], - "title": "TableUpdateRes" + "properties": { + "deleted": { + "type": "integer", + "description": "Number of feedback records deleted" + } + }, + "required": ["deleted"] }, - "ValidationError": { + "FeedbackInfo": { + "type": "object", "properties": { - "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "type": "array", - "title": "Location" + "feedback_id": { + "type": "string", + "description": "Feedback identifier" }, - "msg": { + "call_id": { "type": "string", - "title": "Message" + "description": "Associated call identifier" }, - "type": { + "feedback_type": { + "type": "string", + "description": "Type of feedback" + }, + "value": { + "type": "object", + "description": "Feedback value" + }, + "note": { + "type": "string", + "description": "Additional feedback note" + }, + "created_at": { "type": "string", - "title": "Error Type" + "format": "date-time", + "description": "Creation timestamp" } }, - "type": "object", - "required": [ - "loc", - "msg", - "type" - ], - "title": "ValidationError" - } - }, - "securitySchemes": { - "HTTPBasic": { - "type": "http", - "scheme": "basic" + "required": ["feedback_id", "call_id", "feedback_type", "value"] } } } From bf345b1cb66a2e0e4782b2615fd25ed8658a8078 Mon Sep 17 00:00:00 2001 From: Noah Luna <15202580+ngrayluna@users.noreply.github.com> Date: Wed, 16 Jul 2025 16:01:55 -0700 Subject: [PATCH 2/3] all the reference --- api-reference/openapi.json | 4986 +++++++++++++++++++++++++++++++++++- 1 file changed, 4869 insertions(+), 117 deletions(-) diff --git a/api-reference/openapi.json b/api-reference/openapi.json index da5326ef..63f3d56e 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -1,72 +1,107 @@ { "openapi": "3.1.0", - "info": { - "title": "OpenAPI Plant Store", - "description": "A sample API that uses a plant store as an example to demonstrate features in the OpenAPI specification", - "license": { - "name": "MIT" - }, - "version": "1.0.0" - }, "servers": [ { - "url": "http://sandbox.mintlify.com" - } - ], - "security": [ - { - "bearerAuth": [] + "url": "https://trace.wandb.ai" } ], + "info": { + "title": "Weave Tracing API", + "version": "0.1.0", + "description": "Weave Tracing API provides comprehensive observability and monitoring capabilities for AI/ML applications. It enables tracing of calls, managing objects, handling costs, collecting feedback, and storing tables for machine learning workflows. This API integrates with Model Context Protocol (MCP) servers and clients to provide end-to-end visibility into AI application interactions." + }, "paths": { - "/plants": { + "/server_info": { "get": { - "description": "Returns all plants from the system that the user has access to", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "The maximum number of results to return", - "schema": { - "type": "integer", - "format": "int32" + "tags": [ + "Service" + ], + "summary": "Server Info", + "description": "Retrieve server information including version, capabilities, and configuration details. This endpoint provides essential metadata about the Weave tracing server.", + "operationId": "server_info_server_info_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServerInfoRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } } } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/health": { + "get": { + "tags": [ + "Service" ], + "summary": "Health Check", + "description": "Perform a health check on the Weave tracing server. Returns the current operational status and basic system information.", + "operationId": "read_root_health_get", "responses": { "200": { - "description": "Plant response", + "description": "Successful Response", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Plant" - } + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Response Read Root Health Get" } } } }, - "400": { - "description": "Unexpected error", + "422": { + "description": "Validation Error", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/HTTPValidationError" } } } } - } - }, + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/call/start": { "post": { - "description": "Creates a new plant in the store", + "tags": [ + "Calls" + ], + "summary": "Call Start", + "description": "Start a new tracing call. This endpoint initiates tracking for a function call, API request, or operation within your MCP server or client application. Essential for observability and performance monitoring.", + "operationId": "call_start_call_start_post", "requestBody": { - "description": "Plant to add to the store", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewPlant" + "$ref": "#/components/schemas/CallStartReq" } } }, @@ -74,143 +109,4860 @@ }, "responses": { "200": { - "description": "plant response", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Plant" + "$ref": "#/components/schemas/CallStartRes" } } } }, - "400": { - "description": "unexpected error", + "422": { + "description": "Validation Error", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/HTTPValidationError" } } } } - } + }, + "security": [ + { + "HTTPBasic": [] + } + ] } }, - "/plants/{id}": { - "delete": { - "description": "Deletes a single plant based on the ID supplied", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of plant to delete", - "required": true, - "schema": { - "type": "integer", - "format": "int64" + "/call/end": { + "post": { + "tags": [ + "Calls" + ], + "summary": "Call End", + "description": "End a tracing call and record its completion. This endpoint finalizes the tracking of a function call or operation, capturing execution time, outputs, and any error states.", + "operationId": "call_end_call_end_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallEndReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallEndRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } } } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/call/upsert_batch": { + "post": { + "tags": [ + "Calls" ], + "summary": "Call Start Batch", + "description": "Start multiple tracing calls in a single batch operation. This endpoint enables efficient bulk creation of call traces, ideal for high-throughput applications or bulk data processing.", + "operationId": "call_start_batch_call_upsert_batch_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallCreateBatchReq" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "Plant deleted", - "content": {} + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallCreateBatchRes" + } + } + } }, - "400": { - "description": "unexpected error", + "422": { + "description": "Validation Error", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/HTTPValidationError" } } } } - } + }, + "security": [ + { + "HTTPBasic": [] + } + ] } - } - }, - "webhooks": { - "/plant/webhook": { + }, + "/calls/delete": { "post": { - "description": "Information about a new plant added to the store", + "tags": [ + "Calls" + ], + "summary": "Calls Delete", + "description": "Delete one or more tracing calls from the system. This endpoint removes call records and associated trace data, useful for data cleanup or privacy compliance.", + "operationId": "calls_delete_calls_delete_post", "requestBody": { - "description": "Plant added to the store", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewPlant" + "$ref": "#/components/schemas/CallsDeleteReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Return a 200 status to indicate that the data was received successfully" + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallsDeleteRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } } - } + }, + "security": [ + { + "HTTPBasic": [] + } + ] } - } - }, - "components": { - "schemas": { - "Plant": { - "required": [ - "name" + }, + "/call/update": { + "post": { + "tags": [ + "Calls" ], - "type": "object", - "properties": { - "name": { - "description": "The name of the plant", - "type": "string" + "summary": "Call Update", + "description": "Update an existing tracing call with new information. This endpoint allows modification of call metadata, outputs, or status after the call has been started.", + "operationId": "call_update_call_update_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallUpdateReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallUpdateRes" + } + } + } }, - "tag": { - "description": "Tag to specify the type", - "type": "string" + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } } - } - }, - "NewPlant": { - "allOf": [ + }, + "security": [ { - "$ref": "#/components/schemas/Plant" + "HTTPBasic": [] + } + ] + } + }, + "/call/read": { + "post": { + "tags": [ + "Calls" + ], + "summary": "Call Read", + "description": "Retrieve detailed information about a specific tracing call. This endpoint returns complete call data including inputs, outputs, execution time, and trace metadata.", + "operationId": "call_read_call_read_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallReadReq" + } + } }, - { - "required": [ - "id" - ], - "type": "object", - "properties": { - "id": { - "description": "Identification number of the plant", - "type": "integer", - "format": "int64" + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallReadRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } } } } + }, + "security": [ + { + "HTTPBasic": [] + } ] - }, - "Error": { - "required": [ - "error", - "message" + } + }, + "/calls/query_stats": { + "post": { + "tags": [ + "Calls" ], - "type": "object", - "properties": { - "error": { - "type": "integer", - "format": "int32" + "summary": "Calls Query Stats", + "description": "Query statistical information about tracing calls. This endpoint provides aggregated metrics, performance statistics, and analytical data about call patterns and execution trends.", + "operationId": "calls_query_stats_calls_query_stats_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallsQueryStatsReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallsQueryStatsRes" + } + } + } }, - "message": { - "type": "string" + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } } - } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/calls/stream_query": { + "post": { + "tags": [ + "Calls" + ], + "summary": "Calls Query Stream", + "description": "Query tracing calls with streaming response. This endpoint returns call data in a continuous stream format (JSONL), ideal for real-time monitoring and large dataset processing.", + "operationId": "calls_query_stream_calls_stream_query_post", + "security": [ + { + "HTTPBasic": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "default": "application/jsonl", + "title": "Accept" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CallsQueryReq" + } + } + } + }, + "responses": { + "200": { + "description": "Stream of data in JSONL format", + "content": { + "application/jsonl": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schema" + } + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/obj/create": { + "post": { + "tags": [ + "Objects" + ], + "summary": "Object Create", + "description": "Create a new object in the Weave system. Objects represent any data structure, model, or artifact that needs to be tracked and versioned within your ML workflows.", + "operationId": "obj_create_obj_create_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjCreateReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjCreateRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/obj/read": { + "post": { + "tags": [ + "Objects" + ], + "summary": "Object Read", + "description": "Retrieve an object from the Weave system. This endpoint fetches object data, metadata, and version information for analysis and processing.", + "operationId": "obj_read_obj_read_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjReadReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjReadRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/objs/query": { + "post": { + "tags": [ + "Objects" + ], + "summary": "Objects Query", + "description": "Query and search for objects in the Weave system. This endpoint supports filtering, sorting, and pagination to find specific objects based on various criteria.", + "operationId": "objs_query_objs_query_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjQueryReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjQueryRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/obj/delete": { + "post": { + "tags": [ + "Objects" + ], + "summary": "Object Delete", + "description": "Delete an object from the Weave system. This endpoint removes the object and its associated metadata while maintaining referential integrity.", + "operationId": "obj_delete_obj_delete_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjDeleteReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjDeleteRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/table/create": { + "post": { + "tags": [ + "Tables" + ], + "summary": "Table Create", + "description": "Create a new table in the Weave system. Tables store structured data, datasets, or tabular information that can be queried and analyzed within your ML workflows.", + "operationId": "table_create_table_create_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableCreateReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableCreateRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/table/update": { + "post": { + "tags": [ + "Tables" + ], + "summary": "Table Update", + "description": "Update an existing table in the Weave system. This endpoint allows modification of table schema, data, or metadata while preserving data integrity.", + "operationId": "table_update_table_update_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableUpdateReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableUpdateRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/table/query": { + "post": { + "tags": [ + "Tables" + ], + "summary": "Table Query", + "description": "Query data from tables in the Weave system. This endpoint supports filtering, sorting, and pagination to retrieve specific rows and columns from stored tables.", + "operationId": "table_query_table_query_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableQueryReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableQueryRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/table/query_stream": { + "post": { + "summary": "Table Query Stream", + "description": "Query table data with streaming response. This endpoint returns table rows in a continuous stream format (JSONL), ideal for processing large datasets efficiently.", + "operationId": "table_query_stream_table_query_stream_post", + "security": [ + { + "HTTPBasic": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "default": "application/jsonl", + "title": "Accept" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableQueryReq" + } + } + } + }, + "responses": { + "200": { + "description": "Stream of data in JSONL format", + "content": { + "application/jsonl": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schema" + } + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/table/query_stats": { + "post": { + "tags": [ + "Tables" + ], + "summary": "Table Query Stats", + "description": "Query statistical information about tables. This endpoint provides aggregated metrics, row counts, and analytical data about table contents and usage patterns.", + "operationId": "table_query_stats_table_query_stats_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableQueryStatsReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableQueryStatsRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/refs/read_batch": { + "post": { + "tags": [ + "Refs" + ], + "summary": "References Read Batch", + "description": "Read multiple object references in a single batch operation. This endpoint efficiently retrieves reference information for multiple objects, enabling bulk data processing.", + "operationId": "refs_read_batch_refs_read_batch_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefsReadBatchReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefsReadBatchRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/file/create": { + "post": { + "tags": [ + "Files" + ], + "summary": "File Create", + "description": "Create and upload a file to the Weave system. This endpoint handles file storage for artifacts, models, datasets, or any other binary content related to your ML workflows.", + "operationId": "file_create_file_create_post", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_file_create_file_create_post" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileCreateRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/file/content": { + "post": { + "tags": [ + "Files" + ], + "summary": "File Content", + "description": "Retrieve the content of a file from the Weave system. This endpoint downloads file data and metadata for processing or analysis.", + "operationId": "file_content_file_content_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileContentReadReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Binary file content stream", + "content": { + "application/octet-stream": {} + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/cost/create": { + "post": { + "tags": [ + "Costs" + ], + "summary": "Cost Create", + "description": "Record cost information for API calls, model inference, or other billable operations. This endpoint tracks spending and usage metrics for budget management and analysis.", + "operationId": "cost_create_cost_create_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostCreateReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostCreateRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/cost/query": { + "post": { + "tags": [ + "Costs" + ], + "summary": "Cost Query", + "description": "Query cost data and spending metrics. This endpoint retrieves cost information with filtering and aggregation capabilities for financial analysis and reporting.", + "operationId": "cost_query_cost_query_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostQueryReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostQueryRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/cost/purge": { + "post": { + "tags": [ + "Costs" + ], + "summary": "Cost Purge", + "description": "Delete cost records from the system. This endpoint removes historical cost data based on specified criteria, useful for data cleanup and privacy compliance.", + "operationId": "cost_purge_cost_purge_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostPurgeReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostPurgeRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/feedback/create": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Feedback Create", + "description": "Add feedback to a call or object.", + "operationId": "feedback_create_feedback_create_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackCreateReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackCreateRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/feedback/query": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Feedback Query", + "description": "Query for feedback.", + "operationId": "feedback_query_feedback_query_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackQueryReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackQueryRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/feedback/purge": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Feedback Purge", + "description": "Permanently delete feedback.", + "operationId": "feedback_purge_feedback_purge_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackPurgeReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackPurgeRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/feedback/replace": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Feedback Replace", + "description": "Replace existing feedback records with new feedback data. This endpoint updates feedback entries while maintaining historical tracking.", + "operationId": "feedback_replace_feedback_replace_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackReplaceReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackReplaceRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + } + }, + "components": { + "schemas": { + "AndOperation": { + "properties": { + "$and": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + "type": "array", + "title": "$And" + } + }, + "type": "object", + "required": [ + "$and" + ], + "title": "AndOperation" + }, + "Body_file_create_file_create_post": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "file": { + "type": "string", + "format": "binary", + "title": "File" + } + }, + "type": "object", + "required": [ + "project_id", + "file" + ], + "title": "Body_file_create_file_create_post" + }, + "CallBatchEndMode": { + "properties": { + "mode": { + "type": "string", + "title": "Mode", + "default": "end" + }, + "req": { + "$ref": "#/components/schemas/CallEndReq" + } + }, + "type": "object", + "required": [ + "req" + ], + "title": "CallBatchEndMode" + }, + "CallBatchStartMode": { + "properties": { + "mode": { + "type": "string", + "title": "Mode", + "default": "start" + }, + "req": { + "$ref": "#/components/schemas/CallStartReq" + } + }, + "type": "object", + "required": [ + "req" + ], + "title": "CallBatchStartMode" + }, + "CallCreateBatchReq": { + "properties": { + "batch": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallBatchStartMode" + }, + { + "$ref": "#/components/schemas/CallBatchEndMode" + } + ] + }, + "type": "array", + "title": "Batch" + } + }, + "type": "object", + "required": [ + "batch" + ], + "title": "CallCreateBatchReq" + }, + "CallCreateBatchRes": { + "properties": { + "res": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallStartRes" + }, + { + "$ref": "#/components/schemas/CallEndRes" + } + ] + }, + "type": "array", + "title": "Res" + } + }, + "type": "object", + "required": [ + "res" + ], + "title": "CallCreateBatchRes" + }, + "CallEndReq": { + "properties": { + "end": { + "$ref": "#/components/schemas/EndedCallSchemaForInsert" + } + }, + "type": "object", + "required": [ + "end" + ], + "title": "CallEndReq" + }, + "CallEndRes": { + "properties": {}, + "type": "object", + "title": "CallEndRes" + }, + "CallReadReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "id": { + "type": "string", + "title": "Id" + }, + "include_costs": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Costs", + "default": false + } + }, + "type": "object", + "required": [ + "project_id", + "id" + ], + "title": "CallReadReq" + }, + "CallReadRes": { + "properties": { + "call": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallSchema" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "call" + ], + "title": "CallReadRes" + }, + "CallSchema": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "op_name": { + "type": "string", + "title": "Op Name" + }, + "display_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Name" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + }, + "started_at": { + "type": "string", + "format": "date-time", + "title": "Started At" + }, + "attributes": { + "type": "object", + "title": "Attributes" + }, + "inputs": { + "type": "object", + "title": "Inputs" + }, + "ended_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Ended At" + }, + "exception": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Exception" + }, + "output": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Output" + }, + "summary": { + "type": "object" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id" + }, + "wb_run_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb Run Id" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + } + }, + "type": "object", + "required": [ + "id", + "project_id", + "op_name", + "trace_id", + "started_at", + "attributes", + "inputs" + ], + "title": "CallSchema" + }, + "CallStartReq": { + "properties": { + "start": { + "$ref": "#/components/schemas/StartedCallSchemaForInsert" + } + }, + "type": "object", + "required": [ + "start" + ], + "title": "CallStartReq" + }, + "CallStartRes": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + } + }, + "type": "object", + "required": [ + "id", + "trace_id" + ], + "title": "CallStartRes" + }, + "CallUpdateReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "call_id": { + "type": "string", + "title": "Call Id" + }, + "display_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Name" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "project_id", + "call_id" + ], + "title": "CallUpdateReq" + }, + "CallUpdateRes": { + "properties": {}, + "type": "object", + "title": "CallUpdateRes" + }, + "CallsDeleteReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "call_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Call Ids" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "project_id", + "call_ids" + ], + "title": "CallsDeleteReq" + }, + "CallsDeleteRes": { + "properties": {}, + "type": "object", + "title": "CallsDeleteRes" + }, + "CallsFilter": { + "properties": { + "op_names": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Op Names" + }, + "input_refs": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Input Refs" + }, + "output_refs": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Output Refs" + }, + "parent_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parent Ids" + }, + "trace_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Trace Ids" + }, + "call_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Call Ids" + }, + "trace_roots_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Trace Roots Only" + }, + "wb_user_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Wb User Ids" + }, + "wb_run_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Wb Run Ids" + } + }, + "type": "object", + "title": "CallsFilter" + }, + "CallsQueryReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallsFilter" + }, + { + "type": "null" + } + ] + }, + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + }, + "offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Offset" + }, + "sort_by": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SortBy" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sort By" + }, + "query": { + "anyOf": [ + { + "$ref": "#/components/schemas/Query" + }, + { + "type": "null" + } + ] + }, + "include_costs": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Costs", + "description": "Beta, subject to change. If true, the response will include any model costs for each call.", + "default": false + }, + "include_feedback": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Feedback", + "description": "Beta, subject to change. If true, the response will include feedback for each call.", + "default": false + }, + "columns": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Columns" + }, + "expand_columns": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Expand Columns", + "description": "Columns to expand, i.e. refs to other objects", + "examples": [ + [ + "inputs.self.message", + "inputs.model.prompt" + ] + ] + } + }, + "type": "object", + "required": [ + "project_id" + ], + "title": "CallsQueryReq" + }, + "CallsQueryStatsReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallsFilter" + }, + { + "type": "null" + } + ] + }, + "query": { + "anyOf": [ + { + "$ref": "#/components/schemas/Query" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "project_id" + ], + "title": "CallsQueryStatsReq" + }, + "CallsQueryStatsRes": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + } + }, + "type": "object", + "required": [ + "count" + ], + "title": "CallsQueryStatsRes" + }, + "ContainsOperation": { + "properties": { + "$contains": { + "$ref": "#/components/schemas/ContainsSpec" + } + }, + "type": "object", + "required": [ + "$contains" + ], + "title": "ContainsOperation" + }, + "ContainsSpec": { + "properties": { + "input": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ], + "title": "Input" + }, + "substr": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ], + "title": "Substr" + }, + "case_insensitive": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Case Insensitive", + "default": false + } + }, + "type": "object", + "required": [ + "input", + "substr" + ], + "title": "ContainsSpec" + }, + "ConvertOperation": { + "properties": { + "$convert": { + "$ref": "#/components/schemas/ConvertSpec" + } + }, + "type": "object", + "required": [ + "$convert" + ], + "title": "ConvertOperation" + }, + "ConvertSpec": { + "properties": { + "input": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ], + "title": "Input" + }, + "to": { + "type": "string", + "enum": [ + "double", + "string", + "int", + "bool", + "exists" + ], + "title": "To" + } + }, + "type": "object", + "required": [ + "input", + "to" + ], + "title": "ConvertSpec" + }, + "CostCreateInput": { + "properties": { + "prompt_token_cost": { + "type": "number", + "title": "Prompt Token Cost" + }, + "completion_token_cost": { + "type": "number", + "title": "Completion Token Cost" + }, + "prompt_token_cost_unit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt Token Cost Unit", + "description": "The unit of the cost for the prompt tokens", + "default": "USD" + }, + "completion_token_cost_unit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Completion Token Cost Unit", + "description": "The unit of the cost for the completion tokens", + "default": "USD" + }, + "effective_date": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Effective Date", + "description": "The date after which the cost is effective for, will default to the current date if not provided" + }, + "provider_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Provider Id", + "description": "The provider of the LLM, e.g. 'openai' or 'mistral'. If not provided, the provider_id will be set to 'default'" + } + }, + "type": "object", + "required": [ + "prompt_token_cost", + "completion_token_cost" + ], + "title": "CostCreateInput" + }, + "CostCreateReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "costs": { + "additionalProperties": { + "$ref": "#/components/schemas/CostCreateInput" + }, + "type": "object", + "title": "Costs" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "project_id", + "costs" + ], + "title": "CostCreateReq" + }, + "CostCreateRes": { + "properties": { + "ids": { + "items": { + "prefixItems": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2 + }, + "type": "array", + "title": "Ids" + } + }, + "type": "object", + "required": [ + "ids" + ], + "title": "CostCreateRes" + }, + "CostPurgeReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "query": { + "$ref": "#/components/schemas/Query" + } + }, + "type": "object", + "required": [ + "project_id", + "query" + ], + "title": "CostPurgeReq" + }, + "CostPurgeRes": { + "properties": {}, + "type": "object", + "title": "CostPurgeRes" + }, + "CostQueryOutput": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id", + "examples": [ + "2341-asdf-asdf" + ] + }, + "llm_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Id", + "examples": [ + "gpt4" + ] + }, + "prompt_token_cost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Prompt Token Cost", + "examples": [ + 1.0 + ] + }, + "completion_token_cost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Completion Token Cost", + "examples": [ + 1.0 + ] + }, + "prompt_token_cost_unit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt Token Cost Unit", + "examples": [ + "USD" + ] + }, + "completion_token_cost_unit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Completion Token Cost Unit", + "examples": [ + "USD" + ] + }, + "effective_date": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Effective Date", + "examples": [ + "2024-01-01T00:00:00Z" + ] + }, + "provider_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Provider Id", + "examples": [ + "openai" + ] + } + }, + "type": "object", + "title": "CostQueryOutput" + }, + "CostQueryReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "fields": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Fields", + "examples": [ + [ + "id", + "llm_id", + "prompt_token_cost", + "completion_token_cost", + "prompt_token_cost_unit", + "completion_token_cost_unit", + "effective_date", + "provider_id" + ] + ] + }, + "query": { + "anyOf": [ + { + "$ref": "#/components/schemas/Query" + }, + { + "type": "null" + } + ] + }, + "sort_by": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SortBy" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sort By" + }, + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit", + "examples": [ + 10 + ] + }, + "offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Offset", + "examples": [ + 0 + ] + } + }, + "type": "object", + "required": [ + "project_id" + ], + "title": "CostQueryReq" + }, + "CostQueryRes": { + "properties": { + "results": { + "items": { + "$ref": "#/components/schemas/CostQueryOutput" + }, + "type": "array", + "title": "Results" + } + }, + "type": "object", + "required": [ + "results" + ], + "title": "CostQueryRes" + }, + "EndedCallSchemaForInsert": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "id": { + "type": "string", + "title": "Id" + }, + "ended_at": { + "type": "string", + "format": "date-time", + "title": "Ended At" + }, + "exception": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Exception" + }, + "output": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Output" + }, + "summary": { + "$ref": "#/components/schemas/SummaryInsertMap" + } + }, + "type": "object", + "required": [ + "project_id", + "id", + "ended_at", + "summary" + ], + "title": "EndedCallSchemaForInsert" + }, + "EqOperation": { + "properties": { + "$eq": { + "prefixItems": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2, + "title": "$Eq" + } + }, + "type": "object", + "required": [ + "$eq" + ], + "title": "EqOperation" + }, + "FeedbackCreateReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "weave_ref": { + "type": "string", + "title": "Weave Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "creator": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Creator", + "examples": [ + "Jane Smith" + ] + }, + "feedback_type": { + "type": "string", + "title": "Feedback Type", + "examples": [ + "custom" + ] + }, + "payload": { + "type": "object", + "title": "Payload", + "examples": [ + { + "key": "value" + } + ] + }, + "annotation_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Annotation Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "runnable_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Runnable Ref", + "examples": [ + "weave:///entity/project/op/name:digest" + ] + }, + "call_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Call Ref", + "examples": [ + "weave:///entity/project/call/call_id" + ] + }, + "trigger_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Trigger Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "project_id", + "weave_ref", + "feedback_type", + "payload" + ], + "title": "FeedbackCreateReq" + }, + "FeedbackCreateRes": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "wb_user_id": { + "type": "string", + "title": "Wb User Id" + }, + "payload": { + "type": "object", + "title": "Payload" + } + }, + "type": "object", + "required": [ + "id", + "created_at", + "wb_user_id", + "payload" + ], + "title": "FeedbackCreateRes" + }, + "FeedbackPurgeReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "query": { + "$ref": "#/components/schemas/Query" + } + }, + "type": "object", + "required": [ + "project_id", + "query" + ], + "title": "FeedbackPurgeReq" + }, + "FeedbackPurgeRes": { + "properties": {}, + "type": "object", + "title": "FeedbackPurgeRes" + }, + "FeedbackQueryReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "fields": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Fields", + "examples": [ + [ + "id", + "feedback_type", + "payload.note" + ] + ] + }, + "query": { + "anyOf": [ + { + "$ref": "#/components/schemas/Query" + }, + { + "type": "null" + } + ] + }, + "sort_by": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SortBy" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sort By" + }, + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit", + "examples": [ + 10 + ] + }, + "offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Offset", + "examples": [ + 0 + ] + } + }, + "type": "object", + "required": [ + "project_id" + ], + "title": "FeedbackQueryReq" + }, + "FeedbackQueryRes": { + "properties": { + "result": { + "items": { + "type": "object" + }, + "type": "array", + "title": "Result" + } + }, + "type": "object", + "required": [ + "result" + ], + "title": "FeedbackQueryRes" + }, + "FeedbackReplaceReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "weave_ref": { + "type": "string", + "title": "Weave Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "creator": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Creator", + "examples": [ + "Jane Smith" + ] + }, + "feedback_type": { + "type": "string", + "title": "Feedback Type", + "examples": [ + "custom" + ] + }, + "payload": { + "type": "object", + "title": "Payload", + "examples": [ + { + "key": "value" + } + ] + }, + "annotation_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Annotation Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "runnable_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Runnable Ref", + "examples": [ + "weave:///entity/project/op/name:digest" + ] + }, + "call_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Call Ref", + "examples": [ + "weave:///entity/project/call/call_id" + ] + }, + "trigger_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Trigger Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + }, + "feedback_id": { + "type": "string", + "title": "Feedback Id" + } + }, + "type": "object", + "required": [ + "project_id", + "weave_ref", + "feedback_type", + "payload", + "feedback_id" + ], + "title": "FeedbackReplaceReq" + }, + "FeedbackReplaceRes": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "wb_user_id": { + "type": "string", + "title": "Wb User Id" + }, + "payload": { + "type": "object", + "title": "Payload" + } + }, + "type": "object", + "required": [ + "id", + "created_at", + "wb_user_id", + "payload" + ], + "title": "FeedbackReplaceRes" + }, + "FileContentReadReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "digest": { + "type": "string", + "title": "Digest" + } + }, + "type": "object", + "required": [ + "project_id", + "digest" + ], + "title": "FileContentReadReq" + }, + "FileCreateRes": { + "properties": { + "digest": { + "type": "string", + "title": "Digest" + } + }, + "type": "object", + "required": [ + "digest" + ], + "title": "FileCreateRes" + }, + "GetFieldOperator": { + "properties": { + "$getField": { + "type": "string", + "title": "$Getfield" + } + }, + "type": "object", + "required": [ + "$getField" + ], + "title": "GetFieldOperator" + }, + "GtOperation": { + "properties": { + "$gt": { + "prefixItems": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2, + "title": "$Gt" + } + }, + "type": "object", + "required": [ + "$gt" + ], + "title": "GtOperation" + }, + "GteOperation": { + "properties": { + "$gte": { + "prefixItems": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2, + "title": "$Gte" + } + }, + "type": "object", + "required": [ + "$gte" + ], + "title": "GteOperation" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "InOperation": { + "properties": { + "$in": { + "prefixItems": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + "type": "array" + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2, + "title": "$In" + } + }, + "type": "object", + "required": [ + "$in" + ], + "title": "InOperation" + }, + "LLMUsageSchema": { + "properties": { + "prompt_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Prompt Tokens" + }, + "input_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Input Tokens" + }, + "completion_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Completion Tokens" + }, + "output_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Output Tokens" + }, + "requests": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Requests" + }, + "total_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Total Tokens" + } + }, + "type": "object", + "title": "LLMUsageSchema" + }, + "LiteralOperation": { + "properties": { + "$literal": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "additionalProperties": { + "$ref": "#/components/schemas/LiteralOperation" + }, + "type": "object" + }, + { + "items": { + "$ref": "#/components/schemas/LiteralOperation" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "$Literal" + } + }, + "type": "object", + "required": [ + "$literal" + ], + "title": "LiteralOperation" + }, + "NotOperation": { + "properties": { + "$not": { + "prefixItems": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + } + ], + "type": "array", + "maxItems": 1, + "minItems": 1, + "title": "$Not" + } + }, + "type": "object", + "required": [ + "$not" + ], + "title": "NotOperation" + }, + "ObjCreateReq": { + "properties": { + "obj": { + "$ref": "#/components/schemas/ObjSchemaForInsert" + } + }, + "type": "object", + "required": [ + "obj" + ], + "title": "ObjCreateReq" + }, + "ObjCreateRes": { + "properties": { + "digest": { + "type": "string", + "title": "Digest" + } + }, + "type": "object", + "required": [ + "digest" + ], + "title": "ObjCreateRes" + }, + "ObjDeleteReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "object_id": { + "type": "string", + "title": "Object Id" + }, + "digests": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Digests", + "description": "List of digests to delete. If not provided, all digests for the object will be deleted." + } + }, + "type": "object", + "required": [ + "project_id", + "object_id" + ], + "title": "ObjDeleteReq" + }, + "ObjDeleteRes": { + "properties": { + "num_deleted": { + "type": "integer", + "title": "Num Deleted" + } + }, + "type": "object", + "required": [ + "num_deleted" + ], + "title": "ObjDeleteRes" + }, + "ObjQueryReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the project to query", + "examples": [ + "user/project" + ] + }, + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectVersionFilter" + }, + { + "type": "null" + } + ], + "description": "Filter criteria for the query. See `ObjectVersionFilter`", + "examples": [ + { + "latest_only": true, + "object_ids": [ + "my_favorite_model" + ] + } + ] + }, + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit", + "description": "Maximum number of results to return", + "examples": [ + 100 + ] + }, + "offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Offset", + "description": "Number of results to skip before returning", + "examples": [ + 0 + ] + }, + "sort_by": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SortBy" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sort By", + "description": "Sorting criteria for the query results. Currently only supports 'object_id' and 'created_at'.", + "examples": [ + [ + { + "direction": "desc", + "field": "created_at" + } + ] + ] + }, + "metadata_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Metadata Only", + "description": "If true, the `val` column is not read from the database and is empty.All other fields are returned.", + "default": false + } + }, + "type": "object", + "required": [ + "project_id" + ], + "title": "ObjQueryReq" + }, + "ObjQueryRes": { + "properties": { + "objs": { + "items": { + "$ref": "#/components/schemas/ObjSchema" + }, + "type": "array", + "title": "Objs" + } + }, + "type": "object", + "required": [ + "objs" + ], + "title": "ObjQueryRes" + }, + "ObjReadReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "object_id": { + "type": "string", + "title": "Object Id" + }, + "digest": { + "type": "string", + "title": "Digest" + }, + "metadata_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Metadata Only", + "description": "If true, the `val` column is not read from the database and is empty.All other fields are returned.", + "default": false + } + }, + "type": "object", + "required": [ + "project_id", + "object_id", + "digest" + ], + "title": "ObjReadReq" + }, + "ObjReadRes": { + "properties": { + "obj": { + "$ref": "#/components/schemas/ObjSchema" + } + }, + "type": "object", + "required": [ + "obj" + ], + "title": "ObjReadRes" + }, + "ObjSchema": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "object_id": { + "type": "string", + "title": "Object Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "digest": { + "type": "string", + "title": "Digest" + }, + "version_index": { + "type": "integer", + "title": "Version Index" + }, + "is_latest": { + "type": "integer", + "title": "Is Latest" + }, + "kind": { + "type": "string", + "title": "Kind" + }, + "base_object_class": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Object Class" + }, + "val": { + "title": "Val" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "project_id", + "object_id", + "created_at", + "digest", + "version_index", + "is_latest", + "kind", + "base_object_class", + "val" + ], + "title": "ObjSchema" + }, + "ObjSchemaForInsert": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "object_id": { + "type": "string", + "title": "Object Id" + }, + "val": { + "title": "Val" + }, + "builtin_object_class": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Builtin Object Class" + }, + "set_base_object_class": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Set Base Object Class", + "deprecated": true + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "project_id", + "object_id", + "val" + ], + "title": "ObjSchemaForInsert" + }, + "ObjectVersionFilter": { + "properties": { + "base_object_classes": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Base Object Classes", + "description": "Filter objects by their base classes", + "examples": [ + [ + "Model" + ], + [ + "Dataset" + ] + ] + }, + "object_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Object Ids", + "description": "Filter objects by their IDs", + "examples": [ + "my_favorite_model", + "my_favorite_dataset" + ] + }, + "is_op": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Op", + "description": "Filter objects based on whether they are weave.ops or not. `True` will only return ops, `False` will return non-ops, and `None` will return all objects", + "examples": [ + true, + false, + null + ] + }, + "latest_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Latest Only", + "description": "If True, return only the latest version of each object. `False` and `None` will return all versions", + "examples": [ + true, + false + ] + } + }, + "type": "object", + "title": "ObjectVersionFilter" + }, + "OrOperation": { + "properties": { + "$or": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + "type": "array", + "title": "$Or" + } + }, + "type": "object", + "required": [ + "$or" + ], + "title": "OrOperation" + }, + "Query": { + "properties": { + "$expr": { + "anyOf": [ + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ], + "title": "$Expr" + } + }, + "type": "object", + "required": [ + "$expr" + ], + "title": "Query" + }, + "RefsReadBatchReq": { + "properties": { + "refs": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Refs" + } + }, + "type": "object", + "required": [ + "refs" + ], + "title": "RefsReadBatchReq" + }, + "RefsReadBatchRes": { + "properties": { + "vals": { + "items": {}, + "type": "array", + "title": "Vals" + } + }, + "type": "object", + "required": [ + "vals" + ], + "title": "RefsReadBatchRes" + }, + "ServerInfoRes": { + "properties": { + "min_required_weave_python_version": { + "type": "string", + "title": "Min Required Weave Python Version" + } + }, + "type": "object", + "required": [ + "min_required_weave_python_version" + ], + "title": "ServerInfoRes" + }, + "SortBy": { + "properties": { + "field": { + "type": "string", + "title": "Field" + }, + "direction": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" + } + }, + "type": "object", + "required": [ + "field", + "direction" + ], + "title": "SortBy" + }, + "StartedCallSchemaForInsert": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "op_name": { + "type": "string", + "title": "Op Name" + }, + "display_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Name" + }, + "trace_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Trace Id" + }, + "parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + }, + "started_at": { + "type": "string", + "format": "date-time", + "title": "Started At" + }, + "attributes": { + "type": "object", + "title": "Attributes" + }, + "inputs": { + "type": "object", + "title": "Inputs" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + }, + "wb_run_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb Run Id" + } + }, + "type": "object", + "required": [ + "project_id", + "op_name", + "started_at", + "attributes", + "inputs" + ], + "title": "StartedCallSchemaForInsert" + }, + "SummaryInsertMap": { + "properties": { + "usage": { + "additionalProperties": { + "$ref": "#/components/schemas/LLMUsageSchema" + }, + "type": "object", + "title": "Usage" + } + }, + "additionalProperties": true, + "type": "object", + "title": "SummaryInsertMap" + }, + "TableAppendSpec": { + "properties": { + "append": { + "$ref": "#/components/schemas/TableAppendSpecPayload" + } + }, + "type": "object", + "required": [ + "append" + ], + "title": "TableAppendSpec" + }, + "TableAppendSpecPayload": { + "properties": { + "row": { + "type": "object", + "title": "Row" + } + }, + "type": "object", + "required": [ + "row" + ], + "title": "TableAppendSpecPayload" + }, + "TableCreateReq": { + "properties": { + "table": { + "$ref": "#/components/schemas/TableSchemaForInsert" + } + }, + "type": "object", + "required": [ + "table" + ], + "title": "TableCreateReq" + }, + "TableCreateRes": { + "properties": { + "digest": { + "type": "string", + "title": "Digest" + }, + "row_digests": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Row Digests", + "description": "The digests of the rows that were created" + } + }, + "type": "object", + "required": [ + "digest" + ], + "title": "TableCreateRes" + }, + "TableInsertSpec": { + "properties": { + "insert": { + "$ref": "#/components/schemas/TableInsertSpecPayload" + } + }, + "type": "object", + "required": [ + "insert" + ], + "title": "TableInsertSpec" + }, + "TableInsertSpecPayload": { + "properties": { + "index": { + "type": "integer", + "title": "Index" + }, + "row": { + "type": "object", + "title": "Row" + } + }, + "type": "object", + "required": [ + "index", + "row" + ], + "title": "TableInsertSpecPayload" + }, + "TablePopSpec": { + "properties": { + "pop": { + "$ref": "#/components/schemas/TablePopSpecPayload" + } + }, + "type": "object", + "required": [ + "pop" + ], + "title": "TablePopSpec" + }, + "TablePopSpecPayload": { + "properties": { + "index": { + "type": "integer", + "title": "Index" + } + }, + "type": "object", + "required": [ + "index" + ], + "title": "TablePopSpecPayload" + }, + "TableQueryReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the project", + "examples": [ + "my_entity/my_project" + ] + }, + "digest": { + "type": "string", + "title": "Digest", + "description": "The digest of the table to query", + "examples": [ + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" + ] + }, + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/TableRowFilter" + }, + { + "type": "null" + } + ], + "description": "Optional filter to apply to the query. See `TableRowFilter` for more details.", + "examples": [ + { + "row_digests": [ + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims", + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" + ] + } + ] + }, + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit", + "description": "Maximum number of rows to return", + "examples": [ + 100 + ] + }, + "offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Offset", + "description": "Number of rows to skip before starting to return rows", + "examples": [ + 10 + ] + }, + "sort_by": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SortBy" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sort By", + "description": "List of fields to sort by. Fields can be dot-separated to access dictionary values. No sorting uses the default table order (insertion order).", + "examples": [ + [ + { + "field": "col_a.prop_b", + "order": "desc" + } + ] + ] + } + }, + "type": "object", + "required": [ + "project_id", + "digest" + ], + "title": "TableQueryReq" + }, + "TableQueryRes": { + "properties": { + "rows": { + "items": { + "$ref": "#/components/schemas/TableRowSchema" + }, + "type": "array", + "title": "Rows" + } + }, + "type": "object", + "required": [ + "rows" + ], + "title": "TableQueryRes" + }, + "TableQueryStatsReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "description": "The ID of the project", + "examples": [ + "my_entity/my_project" + ] + }, + "digest": { + "type": "string", + "title": "Digest", + "description": "The digest of the table to query", + "examples": [ + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" + ] + } + }, + "type": "object", + "required": [ + "project_id", + "digest" + ], + "title": "TableQueryStatsReq" + }, + "TableQueryStatsRes": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + } + }, + "type": "object", + "required": [ + "count" + ], + "title": "TableQueryStatsRes" + }, + "TableRowFilter": { + "properties": { + "row_digests": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Row Digests", + "description": "List of row digests to filter by", + "examples": [ + [ + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims", + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" + ] + ] + } + }, + "type": "object", + "title": "TableRowFilter" + }, + "TableRowSchema": { + "properties": { + "digest": { + "type": "string", + "title": "Digest" + }, + "val": { + "title": "Val" + }, + "original_index": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Original Index" + } + }, + "type": "object", + "required": [ + "digest", + "val" + ], + "title": "TableRowSchema" + }, + "TableSchemaForInsert": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "rows": { + "items": { + "type": "object" + }, + "type": "array", + "title": "Rows" + } + }, + "type": "object", + "required": [ + "project_id", + "rows" + ], + "title": "TableSchemaForInsert" + }, + "TableUpdateReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "base_digest": { + "type": "string", + "title": "Base Digest" + }, + "updates": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TableAppendSpec" + }, + { + "$ref": "#/components/schemas/TablePopSpec" + }, + { + "$ref": "#/components/schemas/TableInsertSpec" + } + ] + }, + "type": "array", + "title": "Updates" + } + }, + "type": "object", + "required": [ + "project_id", + "base_digest", + "updates" + ], + "title": "TableUpdateReq" + }, + "TableUpdateRes": { + "properties": { + "digest": { + "type": "string", + "title": "Digest" + }, + "updated_row_digests": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Updated Row Digests", + "description": "The digests of the rows that were updated" + } + }, + "type": "object", + "required": [ + "digest" + ], + "title": "TableUpdateRes" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" } }, "securitySchemes": { - "bearerAuth": { + "HTTPBasic": { "type": "http", - "scheme": "bearer" + "scheme": "basic" } } } From d09d85b641f8f5914d8927f6f45935459d709bd2 Mon Sep 17 00:00:00 2001 From: Noah Luna <15202580+ngrayluna@users.noreply.github.com> Date: Wed, 16 Jul 2025 16:08:51 -0700 Subject: [PATCH 3/3] removed created file --- api-reference/openapi.json | 4969 ------------------------------------ openapi.json | 4843 ++++++++++++++++++++++++++++++----- 2 files changed, 4204 insertions(+), 5608 deletions(-) delete mode 100644 api-reference/openapi.json diff --git a/api-reference/openapi.json b/api-reference/openapi.json deleted file mode 100644 index 63f3d56e..00000000 --- a/api-reference/openapi.json +++ /dev/null @@ -1,4969 +0,0 @@ -{ - "openapi": "3.1.0", - "servers": [ - { - "url": "https://trace.wandb.ai" - } - ], - "info": { - "title": "Weave Tracing API", - "version": "0.1.0", - "description": "Weave Tracing API provides comprehensive observability and monitoring capabilities for AI/ML applications. It enables tracing of calls, managing objects, handling costs, collecting feedback, and storing tables for machine learning workflows. This API integrates with Model Context Protocol (MCP) servers and clients to provide end-to-end visibility into AI application interactions." - }, - "paths": { - "/server_info": { - "get": { - "tags": [ - "Service" - ], - "summary": "Server Info", - "description": "Retrieve server information including version, capabilities, and configuration details. This endpoint provides essential metadata about the Weave tracing server.", - "operationId": "server_info_server_info_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerInfoRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/health": { - "get": { - "tags": [ - "Service" - ], - "summary": "Health Check", - "description": "Perform a health check on the Weave tracing server. Returns the current operational status and basic system information.", - "operationId": "read_root_health_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "string" - }, - "type": "object", - "title": "Response Read Root Health Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/call/start": { - "post": { - "tags": [ - "Calls" - ], - "summary": "Call Start", - "description": "Start a new tracing call. This endpoint initiates tracking for a function call, API request, or operation within your MCP server or client application. Essential for observability and performance monitoring.", - "operationId": "call_start_call_start_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallStartReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallStartRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/call/end": { - "post": { - "tags": [ - "Calls" - ], - "summary": "Call End", - "description": "End a tracing call and record its completion. This endpoint finalizes the tracking of a function call or operation, capturing execution time, outputs, and any error states.", - "operationId": "call_end_call_end_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallEndReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallEndRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/call/upsert_batch": { - "post": { - "tags": [ - "Calls" - ], - "summary": "Call Start Batch", - "description": "Start multiple tracing calls in a single batch operation. This endpoint enables efficient bulk creation of call traces, ideal for high-throughput applications or bulk data processing.", - "operationId": "call_start_batch_call_upsert_batch_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallCreateBatchReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallCreateBatchRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/calls/delete": { - "post": { - "tags": [ - "Calls" - ], - "summary": "Calls Delete", - "description": "Delete one or more tracing calls from the system. This endpoint removes call records and associated trace data, useful for data cleanup or privacy compliance.", - "operationId": "calls_delete_calls_delete_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallsDeleteReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallsDeleteRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/call/update": { - "post": { - "tags": [ - "Calls" - ], - "summary": "Call Update", - "description": "Update an existing tracing call with new information. This endpoint allows modification of call metadata, outputs, or status after the call has been started.", - "operationId": "call_update_call_update_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallUpdateReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallUpdateRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/call/read": { - "post": { - "tags": [ - "Calls" - ], - "summary": "Call Read", - "description": "Retrieve detailed information about a specific tracing call. This endpoint returns complete call data including inputs, outputs, execution time, and trace metadata.", - "operationId": "call_read_call_read_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallReadReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallReadRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/calls/query_stats": { - "post": { - "tags": [ - "Calls" - ], - "summary": "Calls Query Stats", - "description": "Query statistical information about tracing calls. This endpoint provides aggregated metrics, performance statistics, and analytical data about call patterns and execution trends.", - "operationId": "calls_query_stats_calls_query_stats_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallsQueryStatsReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallsQueryStatsRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/calls/stream_query": { - "post": { - "tags": [ - "Calls" - ], - "summary": "Calls Query Stream", - "description": "Query tracing calls with streaming response. This endpoint returns call data in a continuous stream format (JSONL), ideal for real-time monitoring and large dataset processing.", - "operationId": "calls_query_stream_calls_stream_query_post", - "security": [ - { - "HTTPBasic": [] - } - ], - "parameters": [ - { - "name": "accept", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "application/jsonl", - "title": "Accept" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CallsQueryReq" - } - } - } - }, - "responses": { - "200": { - "description": "Stream of data in JSONL format", - "content": { - "application/jsonl": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Schema" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/obj/create": { - "post": { - "tags": [ - "Objects" - ], - "summary": "Object Create", - "description": "Create a new object in the Weave system. Objects represent any data structure, model, or artifact that needs to be tracked and versioned within your ML workflows.", - "operationId": "obj_create_obj_create_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ObjCreateReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ObjCreateRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/obj/read": { - "post": { - "tags": [ - "Objects" - ], - "summary": "Object Read", - "description": "Retrieve an object from the Weave system. This endpoint fetches object data, metadata, and version information for analysis and processing.", - "operationId": "obj_read_obj_read_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ObjReadReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ObjReadRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/objs/query": { - "post": { - "tags": [ - "Objects" - ], - "summary": "Objects Query", - "description": "Query and search for objects in the Weave system. This endpoint supports filtering, sorting, and pagination to find specific objects based on various criteria.", - "operationId": "objs_query_objs_query_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ObjQueryReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ObjQueryRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/obj/delete": { - "post": { - "tags": [ - "Objects" - ], - "summary": "Object Delete", - "description": "Delete an object from the Weave system. This endpoint removes the object and its associated metadata while maintaining referential integrity.", - "operationId": "obj_delete_obj_delete_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ObjDeleteReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ObjDeleteRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/table/create": { - "post": { - "tags": [ - "Tables" - ], - "summary": "Table Create", - "description": "Create a new table in the Weave system. Tables store structured data, datasets, or tabular information that can be queried and analyzed within your ML workflows.", - "operationId": "table_create_table_create_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableCreateReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableCreateRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/table/update": { - "post": { - "tags": [ - "Tables" - ], - "summary": "Table Update", - "description": "Update an existing table in the Weave system. This endpoint allows modification of table schema, data, or metadata while preserving data integrity.", - "operationId": "table_update_table_update_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableUpdateReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableUpdateRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/table/query": { - "post": { - "tags": [ - "Tables" - ], - "summary": "Table Query", - "description": "Query data from tables in the Weave system. This endpoint supports filtering, sorting, and pagination to retrieve specific rows and columns from stored tables.", - "operationId": "table_query_table_query_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableQueryReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableQueryRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/table/query_stream": { - "post": { - "summary": "Table Query Stream", - "description": "Query table data with streaming response. This endpoint returns table rows in a continuous stream format (JSONL), ideal for processing large datasets efficiently.", - "operationId": "table_query_stream_table_query_stream_post", - "security": [ - { - "HTTPBasic": [] - } - ], - "parameters": [ - { - "name": "accept", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "application/jsonl", - "title": "Accept" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableQueryReq" - } - } - } - }, - "responses": { - "200": { - "description": "Stream of data in JSONL format", - "content": { - "application/jsonl": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Schema" - } - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/table/query_stats": { - "post": { - "tags": [ - "Tables" - ], - "summary": "Table Query Stats", - "description": "Query statistical information about tables. This endpoint provides aggregated metrics, row counts, and analytical data about table contents and usage patterns.", - "operationId": "table_query_stats_table_query_stats_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableQueryStatsReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TableQueryStatsRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/refs/read_batch": { - "post": { - "tags": [ - "Refs" - ], - "summary": "References Read Batch", - "description": "Read multiple object references in a single batch operation. This endpoint efficiently retrieves reference information for multiple objects, enabling bulk data processing.", - "operationId": "refs_read_batch_refs_read_batch_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefsReadBatchReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefsReadBatchRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/file/create": { - "post": { - "tags": [ - "Files" - ], - "summary": "File Create", - "description": "Create and upload a file to the Weave system. This endpoint handles file storage for artifacts, models, datasets, or any other binary content related to your ML workflows.", - "operationId": "file_create_file_create_post", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_file_create_file_create_post" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileCreateRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/file/content": { - "post": { - "tags": [ - "Files" - ], - "summary": "File Content", - "description": "Retrieve the content of a file from the Weave system. This endpoint downloads file data and metadata for processing or analysis.", - "operationId": "file_content_file_content_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileContentReadReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Binary file content stream", - "content": { - "application/octet-stream": {} - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/cost/create": { - "post": { - "tags": [ - "Costs" - ], - "summary": "Cost Create", - "description": "Record cost information for API calls, model inference, or other billable operations. This endpoint tracks spending and usage metrics for budget management and analysis.", - "operationId": "cost_create_cost_create_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCreateReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostCreateRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/cost/query": { - "post": { - "tags": [ - "Costs" - ], - "summary": "Cost Query", - "description": "Query cost data and spending metrics. This endpoint retrieves cost information with filtering and aggregation capabilities for financial analysis and reporting.", - "operationId": "cost_query_cost_query_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostQueryReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostQueryRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/cost/purge": { - "post": { - "tags": [ - "Costs" - ], - "summary": "Cost Purge", - "description": "Delete cost records from the system. This endpoint removes historical cost data based on specified criteria, useful for data cleanup and privacy compliance.", - "operationId": "cost_purge_cost_purge_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostPurgeReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CostPurgeRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/feedback/create": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Feedback Create", - "description": "Add feedback to a call or object.", - "operationId": "feedback_create_feedback_create_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackCreateReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackCreateRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/feedback/query": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Feedback Query", - "description": "Query for feedback.", - "operationId": "feedback_query_feedback_query_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackQueryReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackQueryRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/feedback/purge": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Feedback Purge", - "description": "Permanently delete feedback.", - "operationId": "feedback_purge_feedback_purge_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackPurgeReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackPurgeRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - }, - "/feedback/replace": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Feedback Replace", - "description": "Replace existing feedback records with new feedback data. This endpoint updates feedback entries while maintaining historical tracking.", - "operationId": "feedback_replace_feedback_replace_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackReplaceReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackReplaceRes" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBasic": [] - } - ] - } - } - }, - "components": { - "schemas": { - "AndOperation": { - "properties": { - "$and": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - "type": "array", - "title": "$And" - } - }, - "type": "object", - "required": [ - "$and" - ], - "title": "AndOperation" - }, - "Body_file_create_file_create_post": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "file": { - "type": "string", - "format": "binary", - "title": "File" - } - }, - "type": "object", - "required": [ - "project_id", - "file" - ], - "title": "Body_file_create_file_create_post" - }, - "CallBatchEndMode": { - "properties": { - "mode": { - "type": "string", - "title": "Mode", - "default": "end" - }, - "req": { - "$ref": "#/components/schemas/CallEndReq" - } - }, - "type": "object", - "required": [ - "req" - ], - "title": "CallBatchEndMode" - }, - "CallBatchStartMode": { - "properties": { - "mode": { - "type": "string", - "title": "Mode", - "default": "start" - }, - "req": { - "$ref": "#/components/schemas/CallStartReq" - } - }, - "type": "object", - "required": [ - "req" - ], - "title": "CallBatchStartMode" - }, - "CallCreateBatchReq": { - "properties": { - "batch": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/CallBatchStartMode" - }, - { - "$ref": "#/components/schemas/CallBatchEndMode" - } - ] - }, - "type": "array", - "title": "Batch" - } - }, - "type": "object", - "required": [ - "batch" - ], - "title": "CallCreateBatchReq" - }, - "CallCreateBatchRes": { - "properties": { - "res": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/CallStartRes" - }, - { - "$ref": "#/components/schemas/CallEndRes" - } - ] - }, - "type": "array", - "title": "Res" - } - }, - "type": "object", - "required": [ - "res" - ], - "title": "CallCreateBatchRes" - }, - "CallEndReq": { - "properties": { - "end": { - "$ref": "#/components/schemas/EndedCallSchemaForInsert" - } - }, - "type": "object", - "required": [ - "end" - ], - "title": "CallEndReq" - }, - "CallEndRes": { - "properties": {}, - "type": "object", - "title": "CallEndRes" - }, - "CallReadReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "id": { - "type": "string", - "title": "Id" - }, - "include_costs": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Include Costs", - "default": false - } - }, - "type": "object", - "required": [ - "project_id", - "id" - ], - "title": "CallReadReq" - }, - "CallReadRes": { - "properties": { - "call": { - "anyOf": [ - { - "$ref": "#/components/schemas/CallSchema" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "call" - ], - "title": "CallReadRes" - }, - "CallSchema": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "project_id": { - "type": "string", - "title": "Project Id" - }, - "op_name": { - "type": "string", - "title": "Op Name" - }, - "display_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Display Name" - }, - "trace_id": { - "type": "string", - "title": "Trace Id" - }, - "parent_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Parent Id" - }, - "started_at": { - "type": "string", - "format": "date-time", - "title": "Started At" - }, - "attributes": { - "type": "object", - "title": "Attributes" - }, - "inputs": { - "type": "object", - "title": "Inputs" - }, - "ended_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Ended At" - }, - "exception": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Exception" - }, - "output": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "title": "Output" - }, - "summary": { - "type": "object" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id" - }, - "wb_run_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb Run Id" - }, - "deleted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Deleted At" - } - }, - "type": "object", - "required": [ - "id", - "project_id", - "op_name", - "trace_id", - "started_at", - "attributes", - "inputs" - ], - "title": "CallSchema" - }, - "CallStartReq": { - "properties": { - "start": { - "$ref": "#/components/schemas/StartedCallSchemaForInsert" - } - }, - "type": "object", - "required": [ - "start" - ], - "title": "CallStartReq" - }, - "CallStartRes": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "trace_id": { - "type": "string", - "title": "Trace Id" - } - }, - "type": "object", - "required": [ - "id", - "trace_id" - ], - "title": "CallStartRes" - }, - "CallUpdateReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "call_id": { - "type": "string", - "title": "Call Id" - }, - "display_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Display Name" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - } - }, - "type": "object", - "required": [ - "project_id", - "call_id" - ], - "title": "CallUpdateReq" - }, - "CallUpdateRes": { - "properties": {}, - "type": "object", - "title": "CallUpdateRes" - }, - "CallsDeleteReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "call_ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Call Ids" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - } - }, - "type": "object", - "required": [ - "project_id", - "call_ids" - ], - "title": "CallsDeleteReq" - }, - "CallsDeleteRes": { - "properties": {}, - "type": "object", - "title": "CallsDeleteRes" - }, - "CallsFilter": { - "properties": { - "op_names": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Op Names" - }, - "input_refs": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Input Refs" - }, - "output_refs": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Output Refs" - }, - "parent_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Parent Ids" - }, - "trace_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Trace Ids" - }, - "call_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Call Ids" - }, - "trace_roots_only": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Trace Roots Only" - }, - "wb_user_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Wb User Ids" - }, - "wb_run_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Wb Run Ids" - } - }, - "type": "object", - "title": "CallsFilter" - }, - "CallsQueryReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "filter": { - "anyOf": [ - { - "$ref": "#/components/schemas/CallsFilter" - }, - { - "type": "null" - } - ] - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit" - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset" - }, - "sort_by": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SortBy" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Sort By" - }, - "query": { - "anyOf": [ - { - "$ref": "#/components/schemas/Query" - }, - { - "type": "null" - } - ] - }, - "include_costs": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Include Costs", - "description": "Beta, subject to change. If true, the response will include any model costs for each call.", - "default": false - }, - "include_feedback": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Include Feedback", - "description": "Beta, subject to change. If true, the response will include feedback for each call.", - "default": false - }, - "columns": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Columns" - }, - "expand_columns": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Expand Columns", - "description": "Columns to expand, i.e. refs to other objects", - "examples": [ - [ - "inputs.self.message", - "inputs.model.prompt" - ] - ] - } - }, - "type": "object", - "required": [ - "project_id" - ], - "title": "CallsQueryReq" - }, - "CallsQueryStatsReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "filter": { - "anyOf": [ - { - "$ref": "#/components/schemas/CallsFilter" - }, - { - "type": "null" - } - ] - }, - "query": { - "anyOf": [ - { - "$ref": "#/components/schemas/Query" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": [ - "project_id" - ], - "title": "CallsQueryStatsReq" - }, - "CallsQueryStatsRes": { - "properties": { - "count": { - "type": "integer", - "title": "Count" - } - }, - "type": "object", - "required": [ - "count" - ], - "title": "CallsQueryStatsRes" - }, - "ContainsOperation": { - "properties": { - "$contains": { - "$ref": "#/components/schemas/ContainsSpec" - } - }, - "type": "object", - "required": [ - "$contains" - ], - "title": "ContainsOperation" - }, - "ContainsSpec": { - "properties": { - "input": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ], - "title": "Input" - }, - "substr": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ], - "title": "Substr" - }, - "case_insensitive": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Case Insensitive", - "default": false - } - }, - "type": "object", - "required": [ - "input", - "substr" - ], - "title": "ContainsSpec" - }, - "ConvertOperation": { - "properties": { - "$convert": { - "$ref": "#/components/schemas/ConvertSpec" - } - }, - "type": "object", - "required": [ - "$convert" - ], - "title": "ConvertOperation" - }, - "ConvertSpec": { - "properties": { - "input": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ], - "title": "Input" - }, - "to": { - "type": "string", - "enum": [ - "double", - "string", - "int", - "bool", - "exists" - ], - "title": "To" - } - }, - "type": "object", - "required": [ - "input", - "to" - ], - "title": "ConvertSpec" - }, - "CostCreateInput": { - "properties": { - "prompt_token_cost": { - "type": "number", - "title": "Prompt Token Cost" - }, - "completion_token_cost": { - "type": "number", - "title": "Completion Token Cost" - }, - "prompt_token_cost_unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Prompt Token Cost Unit", - "description": "The unit of the cost for the prompt tokens", - "default": "USD" - }, - "completion_token_cost_unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Completion Token Cost Unit", - "description": "The unit of the cost for the completion tokens", - "default": "USD" - }, - "effective_date": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Effective Date", - "description": "The date after which the cost is effective for, will default to the current date if not provided" - }, - "provider_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Provider Id", - "description": "The provider of the LLM, e.g. 'openai' or 'mistral'. If not provided, the provider_id will be set to 'default'" - } - }, - "type": "object", - "required": [ - "prompt_token_cost", - "completion_token_cost" - ], - "title": "CostCreateInput" - }, - "CostCreateReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "costs": { - "additionalProperties": { - "$ref": "#/components/schemas/CostCreateInput" - }, - "type": "object", - "title": "Costs" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - } - }, - "type": "object", - "required": [ - "project_id", - "costs" - ], - "title": "CostCreateReq" - }, - "CostCreateRes": { - "properties": { - "ids": { - "items": { - "prefixItems": [ - { - "type": "string" - }, - { - "type": "string" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2 - }, - "type": "array", - "title": "Ids" - } - }, - "type": "object", - "required": [ - "ids" - ], - "title": "CostCreateRes" - }, - "CostPurgeReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "query": { - "$ref": "#/components/schemas/Query" - } - }, - "type": "object", - "required": [ - "project_id", - "query" - ], - "title": "CostPurgeReq" - }, - "CostPurgeRes": { - "properties": {}, - "type": "object", - "title": "CostPurgeRes" - }, - "CostQueryOutput": { - "properties": { - "id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Id", - "examples": [ - "2341-asdf-asdf" - ] - }, - "llm_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Llm Id", - "examples": [ - "gpt4" - ] - }, - "prompt_token_cost": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Prompt Token Cost", - "examples": [ - 1.0 - ] - }, - "completion_token_cost": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Completion Token Cost", - "examples": [ - 1.0 - ] - }, - "prompt_token_cost_unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Prompt Token Cost Unit", - "examples": [ - "USD" - ] - }, - "completion_token_cost_unit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Completion Token Cost Unit", - "examples": [ - "USD" - ] - }, - "effective_date": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Effective Date", - "examples": [ - "2024-01-01T00:00:00Z" - ] - }, - "provider_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Provider Id", - "examples": [ - "openai" - ] - } - }, - "type": "object", - "title": "CostQueryOutput" - }, - "CostQueryReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "fields": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Fields", - "examples": [ - [ - "id", - "llm_id", - "prompt_token_cost", - "completion_token_cost", - "prompt_token_cost_unit", - "completion_token_cost_unit", - "effective_date", - "provider_id" - ] - ] - }, - "query": { - "anyOf": [ - { - "$ref": "#/components/schemas/Query" - }, - { - "type": "null" - } - ] - }, - "sort_by": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SortBy" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Sort By" - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "examples": [ - 10 - ] - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "examples": [ - 0 - ] - } - }, - "type": "object", - "required": [ - "project_id" - ], - "title": "CostQueryReq" - }, - "CostQueryRes": { - "properties": { - "results": { - "items": { - "$ref": "#/components/schemas/CostQueryOutput" - }, - "type": "array", - "title": "Results" - } - }, - "type": "object", - "required": [ - "results" - ], - "title": "CostQueryRes" - }, - "EndedCallSchemaForInsert": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "id": { - "type": "string", - "title": "Id" - }, - "ended_at": { - "type": "string", - "format": "date-time", - "title": "Ended At" - }, - "exception": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Exception" - }, - "output": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "title": "Output" - }, - "summary": { - "$ref": "#/components/schemas/SummaryInsertMap" - } - }, - "type": "object", - "required": [ - "project_id", - "id", - "ended_at", - "summary" - ], - "title": "EndedCallSchemaForInsert" - }, - "EqOperation": { - "properties": { - "$eq": { - "prefixItems": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2, - "title": "$Eq" - } - }, - "type": "object", - "required": [ - "$eq" - ], - "title": "EqOperation" - }, - "FeedbackCreateReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "weave_ref": { - "type": "string", - "title": "Weave Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "creator": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Creator", - "examples": [ - "Jane Smith" - ] - }, - "feedback_type": { - "type": "string", - "title": "Feedback Type", - "examples": [ - "custom" - ] - }, - "payload": { - "type": "object", - "title": "Payload", - "examples": [ - { - "key": "value" - } - ] - }, - "annotation_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Annotation Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "runnable_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Runnable Ref", - "examples": [ - "weave:///entity/project/op/name:digest" - ] - }, - "call_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Call Ref", - "examples": [ - "weave:///entity/project/call/call_id" - ] - }, - "trigger_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Trigger Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - } - }, - "type": "object", - "required": [ - "project_id", - "weave_ref", - "feedback_type", - "payload" - ], - "title": "FeedbackCreateReq" - }, - "FeedbackCreateRes": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "wb_user_id": { - "type": "string", - "title": "Wb User Id" - }, - "payload": { - "type": "object", - "title": "Payload" - } - }, - "type": "object", - "required": [ - "id", - "created_at", - "wb_user_id", - "payload" - ], - "title": "FeedbackCreateRes" - }, - "FeedbackPurgeReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "query": { - "$ref": "#/components/schemas/Query" - } - }, - "type": "object", - "required": [ - "project_id", - "query" - ], - "title": "FeedbackPurgeReq" - }, - "FeedbackPurgeRes": { - "properties": {}, - "type": "object", - "title": "FeedbackPurgeRes" - }, - "FeedbackQueryReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "fields": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Fields", - "examples": [ - [ - "id", - "feedback_type", - "payload.note" - ] - ] - }, - "query": { - "anyOf": [ - { - "$ref": "#/components/schemas/Query" - }, - { - "type": "null" - } - ] - }, - "sort_by": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SortBy" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Sort By" - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "examples": [ - 10 - ] - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "examples": [ - 0 - ] - } - }, - "type": "object", - "required": [ - "project_id" - ], - "title": "FeedbackQueryReq" - }, - "FeedbackQueryRes": { - "properties": { - "result": { - "items": { - "type": "object" - }, - "type": "array", - "title": "Result" - } - }, - "type": "object", - "required": [ - "result" - ], - "title": "FeedbackQueryRes" - }, - "FeedbackReplaceReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "examples": [ - "entity/project" - ] - }, - "weave_ref": { - "type": "string", - "title": "Weave Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "creator": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Creator", - "examples": [ - "Jane Smith" - ] - }, - "feedback_type": { - "type": "string", - "title": "Feedback Type", - "examples": [ - "custom" - ] - }, - "payload": { - "type": "object", - "title": "Payload", - "examples": [ - { - "key": "value" - } - ] - }, - "annotation_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Annotation Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "runnable_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Runnable Ref", - "examples": [ - "weave:///entity/project/op/name:digest" - ] - }, - "call_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Call Ref", - "examples": [ - "weave:///entity/project/call/call_id" - ] - }, - "trigger_ref": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Trigger Ref", - "examples": [ - "weave:///entity/project/object/name:digest" - ] - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - }, - "feedback_id": { - "type": "string", - "title": "Feedback Id" - } - }, - "type": "object", - "required": [ - "project_id", - "weave_ref", - "feedback_type", - "payload", - "feedback_id" - ], - "title": "FeedbackReplaceReq" - }, - "FeedbackReplaceRes": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "wb_user_id": { - "type": "string", - "title": "Wb User Id" - }, - "payload": { - "type": "object", - "title": "Payload" - } - }, - "type": "object", - "required": [ - "id", - "created_at", - "wb_user_id", - "payload" - ], - "title": "FeedbackReplaceRes" - }, - "FileContentReadReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "digest": { - "type": "string", - "title": "Digest" - } - }, - "type": "object", - "required": [ - "project_id", - "digest" - ], - "title": "FileContentReadReq" - }, - "FileCreateRes": { - "properties": { - "digest": { - "type": "string", - "title": "Digest" - } - }, - "type": "object", - "required": [ - "digest" - ], - "title": "FileCreateRes" - }, - "GetFieldOperator": { - "properties": { - "$getField": { - "type": "string", - "title": "$Getfield" - } - }, - "type": "object", - "required": [ - "$getField" - ], - "title": "GetFieldOperator" - }, - "GtOperation": { - "properties": { - "$gt": { - "prefixItems": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2, - "title": "$Gt" - } - }, - "type": "object", - "required": [ - "$gt" - ], - "title": "GtOperation" - }, - "GteOperation": { - "properties": { - "$gte": { - "prefixItems": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2, - "title": "$Gte" - } - }, - "type": "object", - "required": [ - "$gte" - ], - "title": "GteOperation" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "InOperation": { - "properties": { - "$in": { - "prefixItems": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - "type": "array" - } - ], - "type": "array", - "maxItems": 2, - "minItems": 2, - "title": "$In" - } - }, - "type": "object", - "required": [ - "$in" - ], - "title": "InOperation" - }, - "LLMUsageSchema": { - "properties": { - "prompt_tokens": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Prompt Tokens" - }, - "input_tokens": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Input Tokens" - }, - "completion_tokens": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Completion Tokens" - }, - "output_tokens": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Output Tokens" - }, - "requests": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Requests" - }, - "total_tokens": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Total Tokens" - } - }, - "type": "object", - "title": "LLMUsageSchema" - }, - "LiteralOperation": { - "properties": { - "$literal": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "additionalProperties": { - "$ref": "#/components/schemas/LiteralOperation" - }, - "type": "object" - }, - { - "items": { - "$ref": "#/components/schemas/LiteralOperation" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "$Literal" - } - }, - "type": "object", - "required": [ - "$literal" - ], - "title": "LiteralOperation" - }, - "NotOperation": { - "properties": { - "$not": { - "prefixItems": [ - { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - } - ], - "type": "array", - "maxItems": 1, - "minItems": 1, - "title": "$Not" - } - }, - "type": "object", - "required": [ - "$not" - ], - "title": "NotOperation" - }, - "ObjCreateReq": { - "properties": { - "obj": { - "$ref": "#/components/schemas/ObjSchemaForInsert" - } - }, - "type": "object", - "required": [ - "obj" - ], - "title": "ObjCreateReq" - }, - "ObjCreateRes": { - "properties": { - "digest": { - "type": "string", - "title": "Digest" - } - }, - "type": "object", - "required": [ - "digest" - ], - "title": "ObjCreateRes" - }, - "ObjDeleteReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "object_id": { - "type": "string", - "title": "Object Id" - }, - "digests": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Digests", - "description": "List of digests to delete. If not provided, all digests for the object will be deleted." - } - }, - "type": "object", - "required": [ - "project_id", - "object_id" - ], - "title": "ObjDeleteReq" - }, - "ObjDeleteRes": { - "properties": { - "num_deleted": { - "type": "integer", - "title": "Num Deleted" - } - }, - "type": "object", - "required": [ - "num_deleted" - ], - "title": "ObjDeleteRes" - }, - "ObjQueryReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "description": "The ID of the project to query", - "examples": [ - "user/project" - ] - }, - "filter": { - "anyOf": [ - { - "$ref": "#/components/schemas/ObjectVersionFilter" - }, - { - "type": "null" - } - ], - "description": "Filter criteria for the query. See `ObjectVersionFilter`", - "examples": [ - { - "latest_only": true, - "object_ids": [ - "my_favorite_model" - ] - } - ] - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "description": "Maximum number of results to return", - "examples": [ - 100 - ] - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "description": "Number of results to skip before returning", - "examples": [ - 0 - ] - }, - "sort_by": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SortBy" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Sort By", - "description": "Sorting criteria for the query results. Currently only supports 'object_id' and 'created_at'.", - "examples": [ - [ - { - "direction": "desc", - "field": "created_at" - } - ] - ] - }, - "metadata_only": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Metadata Only", - "description": "If true, the `val` column is not read from the database and is empty.All other fields are returned.", - "default": false - } - }, - "type": "object", - "required": [ - "project_id" - ], - "title": "ObjQueryReq" - }, - "ObjQueryRes": { - "properties": { - "objs": { - "items": { - "$ref": "#/components/schemas/ObjSchema" - }, - "type": "array", - "title": "Objs" - } - }, - "type": "object", - "required": [ - "objs" - ], - "title": "ObjQueryRes" - }, - "ObjReadReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "object_id": { - "type": "string", - "title": "Object Id" - }, - "digest": { - "type": "string", - "title": "Digest" - }, - "metadata_only": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Metadata Only", - "description": "If true, the `val` column is not read from the database and is empty.All other fields are returned.", - "default": false - } - }, - "type": "object", - "required": [ - "project_id", - "object_id", - "digest" - ], - "title": "ObjReadReq" - }, - "ObjReadRes": { - "properties": { - "obj": { - "$ref": "#/components/schemas/ObjSchema" - } - }, - "type": "object", - "required": [ - "obj" - ], - "title": "ObjReadRes" - }, - "ObjSchema": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "object_id": { - "type": "string", - "title": "Object Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "deleted_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Deleted At" - }, - "digest": { - "type": "string", - "title": "Digest" - }, - "version_index": { - "type": "integer", - "title": "Version Index" - }, - "is_latest": { - "type": "integer", - "title": "Is Latest" - }, - "kind": { - "type": "string", - "title": "Kind" - }, - "base_object_class": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Base Object Class" - }, - "val": { - "title": "Val" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - } - }, - "type": "object", - "required": [ - "project_id", - "object_id", - "created_at", - "digest", - "version_index", - "is_latest", - "kind", - "base_object_class", - "val" - ], - "title": "ObjSchema" - }, - "ObjSchemaForInsert": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "object_id": { - "type": "string", - "title": "Object Id" - }, - "val": { - "title": "Val" - }, - "builtin_object_class": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Builtin Object Class" - }, - "set_base_object_class": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Set Base Object Class", - "deprecated": true - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - } - }, - "type": "object", - "required": [ - "project_id", - "object_id", - "val" - ], - "title": "ObjSchemaForInsert" - }, - "ObjectVersionFilter": { - "properties": { - "base_object_classes": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Base Object Classes", - "description": "Filter objects by their base classes", - "examples": [ - [ - "Model" - ], - [ - "Dataset" - ] - ] - }, - "object_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Object Ids", - "description": "Filter objects by their IDs", - "examples": [ - "my_favorite_model", - "my_favorite_dataset" - ] - }, - "is_op": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Is Op", - "description": "Filter objects based on whether they are weave.ops or not. `True` will only return ops, `False` will return non-ops, and `None` will return all objects", - "examples": [ - true, - false, - null - ] - }, - "latest_only": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Latest Only", - "description": "If True, return only the latest version of each object. `False` and `None` will return all versions", - "examples": [ - true, - false - ] - } - }, - "type": "object", - "title": "ObjectVersionFilter" - }, - "OrOperation": { - "properties": { - "$or": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/LiteralOperation" - }, - { - "$ref": "#/components/schemas/GetFieldOperator" - }, - { - "$ref": "#/components/schemas/ConvertOperation" - }, - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ] - }, - "type": "array", - "title": "$Or" - } - }, - "type": "object", - "required": [ - "$or" - ], - "title": "OrOperation" - }, - "Query": { - "properties": { - "$expr": { - "anyOf": [ - { - "$ref": "#/components/schemas/AndOperation" - }, - { - "$ref": "#/components/schemas/OrOperation" - }, - { - "$ref": "#/components/schemas/NotOperation" - }, - { - "$ref": "#/components/schemas/EqOperation" - }, - { - "$ref": "#/components/schemas/GtOperation" - }, - { - "$ref": "#/components/schemas/GteOperation" - }, - { - "$ref": "#/components/schemas/InOperation" - }, - { - "$ref": "#/components/schemas/ContainsOperation" - } - ], - "title": "$Expr" - } - }, - "type": "object", - "required": [ - "$expr" - ], - "title": "Query" - }, - "RefsReadBatchReq": { - "properties": { - "refs": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Refs" - } - }, - "type": "object", - "required": [ - "refs" - ], - "title": "RefsReadBatchReq" - }, - "RefsReadBatchRes": { - "properties": { - "vals": { - "items": {}, - "type": "array", - "title": "Vals" - } - }, - "type": "object", - "required": [ - "vals" - ], - "title": "RefsReadBatchRes" - }, - "ServerInfoRes": { - "properties": { - "min_required_weave_python_version": { - "type": "string", - "title": "Min Required Weave Python Version" - } - }, - "type": "object", - "required": [ - "min_required_weave_python_version" - ], - "title": "ServerInfoRes" - }, - "SortBy": { - "properties": { - "field": { - "type": "string", - "title": "Field" - }, - "direction": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "title": "Direction" - } - }, - "type": "object", - "required": [ - "field", - "direction" - ], - "title": "SortBy" - }, - "StartedCallSchemaForInsert": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Id" - }, - "op_name": { - "type": "string", - "title": "Op Name" - }, - "display_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Display Name" - }, - "trace_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Trace Id" - }, - "parent_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Parent Id" - }, - "started_at": { - "type": "string", - "format": "date-time", - "title": "Started At" - }, - "attributes": { - "type": "object", - "title": "Attributes" - }, - "inputs": { - "type": "object", - "title": "Inputs" - }, - "wb_user_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb User Id", - "description": "Do not set directly. Server will automatically populate this field." - }, - "wb_run_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Wb Run Id" - } - }, - "type": "object", - "required": [ - "project_id", - "op_name", - "started_at", - "attributes", - "inputs" - ], - "title": "StartedCallSchemaForInsert" - }, - "SummaryInsertMap": { - "properties": { - "usage": { - "additionalProperties": { - "$ref": "#/components/schemas/LLMUsageSchema" - }, - "type": "object", - "title": "Usage" - } - }, - "additionalProperties": true, - "type": "object", - "title": "SummaryInsertMap" - }, - "TableAppendSpec": { - "properties": { - "append": { - "$ref": "#/components/schemas/TableAppendSpecPayload" - } - }, - "type": "object", - "required": [ - "append" - ], - "title": "TableAppendSpec" - }, - "TableAppendSpecPayload": { - "properties": { - "row": { - "type": "object", - "title": "Row" - } - }, - "type": "object", - "required": [ - "row" - ], - "title": "TableAppendSpecPayload" - }, - "TableCreateReq": { - "properties": { - "table": { - "$ref": "#/components/schemas/TableSchemaForInsert" - } - }, - "type": "object", - "required": [ - "table" - ], - "title": "TableCreateReq" - }, - "TableCreateRes": { - "properties": { - "digest": { - "type": "string", - "title": "Digest" - }, - "row_digests": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Row Digests", - "description": "The digests of the rows that were created" - } - }, - "type": "object", - "required": [ - "digest" - ], - "title": "TableCreateRes" - }, - "TableInsertSpec": { - "properties": { - "insert": { - "$ref": "#/components/schemas/TableInsertSpecPayload" - } - }, - "type": "object", - "required": [ - "insert" - ], - "title": "TableInsertSpec" - }, - "TableInsertSpecPayload": { - "properties": { - "index": { - "type": "integer", - "title": "Index" - }, - "row": { - "type": "object", - "title": "Row" - } - }, - "type": "object", - "required": [ - "index", - "row" - ], - "title": "TableInsertSpecPayload" - }, - "TablePopSpec": { - "properties": { - "pop": { - "$ref": "#/components/schemas/TablePopSpecPayload" - } - }, - "type": "object", - "required": [ - "pop" - ], - "title": "TablePopSpec" - }, - "TablePopSpecPayload": { - "properties": { - "index": { - "type": "integer", - "title": "Index" - } - }, - "type": "object", - "required": [ - "index" - ], - "title": "TablePopSpecPayload" - }, - "TableQueryReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "description": "The ID of the project", - "examples": [ - "my_entity/my_project" - ] - }, - "digest": { - "type": "string", - "title": "Digest", - "description": "The digest of the table to query", - "examples": [ - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" - ] - }, - "filter": { - "anyOf": [ - { - "$ref": "#/components/schemas/TableRowFilter" - }, - { - "type": "null" - } - ], - "description": "Optional filter to apply to the query. See `TableRowFilter` for more details.", - "examples": [ - { - "row_digests": [ - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims", - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" - ] - } - ] - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "description": "Maximum number of rows to return", - "examples": [ - 100 - ] - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "description": "Number of rows to skip before starting to return rows", - "examples": [ - 10 - ] - }, - "sort_by": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SortBy" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Sort By", - "description": "List of fields to sort by. Fields can be dot-separated to access dictionary values. No sorting uses the default table order (insertion order).", - "examples": [ - [ - { - "field": "col_a.prop_b", - "order": "desc" - } - ] - ] - } - }, - "type": "object", - "required": [ - "project_id", - "digest" - ], - "title": "TableQueryReq" - }, - "TableQueryRes": { - "properties": { - "rows": { - "items": { - "$ref": "#/components/schemas/TableRowSchema" - }, - "type": "array", - "title": "Rows" - } - }, - "type": "object", - "required": [ - "rows" - ], - "title": "TableQueryRes" - }, - "TableQueryStatsReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id", - "description": "The ID of the project", - "examples": [ - "my_entity/my_project" - ] - }, - "digest": { - "type": "string", - "title": "Digest", - "description": "The digest of the table to query", - "examples": [ - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" - ] - } - }, - "type": "object", - "required": [ - "project_id", - "digest" - ], - "title": "TableQueryStatsReq" - }, - "TableQueryStatsRes": { - "properties": { - "count": { - "type": "integer", - "title": "Count" - } - }, - "type": "object", - "required": [ - "count" - ], - "title": "TableQueryStatsRes" - }, - "TableRowFilter": { - "properties": { - "row_digests": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Row Digests", - "description": "List of row digests to filter by", - "examples": [ - [ - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims", - "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" - ] - ] - } - }, - "type": "object", - "title": "TableRowFilter" - }, - "TableRowSchema": { - "properties": { - "digest": { - "type": "string", - "title": "Digest" - }, - "val": { - "title": "Val" - }, - "original_index": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Original Index" - } - }, - "type": "object", - "required": [ - "digest", - "val" - ], - "title": "TableRowSchema" - }, - "TableSchemaForInsert": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "rows": { - "items": { - "type": "object" - }, - "type": "array", - "title": "Rows" - } - }, - "type": "object", - "required": [ - "project_id", - "rows" - ], - "title": "TableSchemaForInsert" - }, - "TableUpdateReq": { - "properties": { - "project_id": { - "type": "string", - "title": "Project Id" - }, - "base_digest": { - "type": "string", - "title": "Base Digest" - }, - "updates": { - "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/TableAppendSpec" - }, - { - "$ref": "#/components/schemas/TablePopSpec" - }, - { - "$ref": "#/components/schemas/TableInsertSpec" - } - ] - }, - "type": "array", - "title": "Updates" - } - }, - "type": "object", - "required": [ - "project_id", - "base_digest", - "updates" - ], - "title": "TableUpdateReq" - }, - "TableUpdateRes": { - "properties": { - "digest": { - "type": "string", - "title": "Digest" - }, - "updated_row_digests": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Updated Row Digests", - "description": "The digests of the rows that were updated" - } - }, - "type": "object", - "required": [ - "digest" - ], - "title": "TableUpdateRes" - }, - "ValidationError": { - "properties": { - "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "type": "array", - "title": "Location" - }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" - } - }, - "type": "object", - "required": [ - "loc", - "msg", - "type" - ], - "title": "ValidationError" - } - }, - "securitySchemes": { - "HTTPBasic": { - "type": "http", - "scheme": "basic" - } - } - } -} \ No newline at end of file diff --git a/openapi.json b/openapi.json index d72470f8..63f3d56e 100644 --- a/openapi.json +++ b/openapi.json @@ -2,38 +2,22 @@ "openapi": "3.1.0", "servers": [ { - "url": "https://trace.wandb.ai", - "description": "W&B Weave Service API" + "url": "https://trace.wandb.ai" } ], "info": { - "title": "W&B Weave Service API", + "title": "Weave Tracing API", "version": "0.1.0", - "description": "Comprehensive API for W&B Weave Service with MCP server integration for LLM tracking and monitoring.", - "contact": { - "name": "W&B Support", - "url": "https://wandb.ai/support", - "email": "support@wandb.ai" - }, - "license": { - "name": "MIT", - "url": "https://opensource.org/licenses/MIT" - } + "description": "Weave Tracing API provides comprehensive observability and monitoring capabilities for AI/ML applications. It enables tracing of calls, managing objects, handling costs, collecting feedback, and storing tables for machine learning workflows. This API integrates with Model Context Protocol (MCP) servers and clients to provide end-to-end visibility into AI application interactions." }, - "security": [ - { - "HTTPBasic": [] - }, - { - "BearerAuth": [] - } - ], "paths": { "/server_info": { "get": { - "tags": ["Service"], - "summary": "Get server information", - "description": "Retrieve server configuration and status information", + "tags": [ + "Service" + ], + "summary": "Server Info", + "description": "Retrieve server information including version, capabilities, and configuration details. This endpoint provides essential metadata about the Weave tracing server.", "operationId": "server_info_server_info_get", "responses": { "200": { @@ -66,49 +50,66 @@ }, "/health": { "get": { - "tags": ["Service"], - "summary": "Health check endpoint", - "description": "Check the health status of the service", - "operationId": "health_check_health_get", + "tags": [ + "Service" + ], + "summary": "Health Check", + "description": "Perform a health check on the Weave tracing server. Returns the current operational status and basic system information.", + "operationId": "read_root_health_get", "responses": { "200": { - "description": "Service is healthy", + "description": "Successful Response", "content": { "application/json": { "schema": { + "additionalProperties": { + "type": "string" + }, "type": "object", - "properties": { - "status": { - "type": "string", - "example": "healthy" - } - } + "title": "Response Read Root Health Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" } } } } - } + }, + "security": [ + { + "HTTPBasic": [] + } + ] } }, "/call/start": { "post": { - "tags": ["Calls"], - "summary": "Start a new call", - "description": "Initiate a new call session for tracking LLM interactions", + "tags": [ + "Calls" + ], + "summary": "Call Start", + "description": "Start a new tracing call. This endpoint initiates tracking for a function call, API request, or operation within your MCP server or client application. Essential for observability and performance monitoring.", "operationId": "call_start_call_start_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallStartReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Call started successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { @@ -137,23 +138,25 @@ }, "/call/end": { "post": { - "tags": ["Calls"], - "summary": "End a call", - "description": "Complete a call session and record final metrics", + "tags": [ + "Calls" + ], + "summary": "Call End", + "description": "End a tracing call and record its completion. This endpoint finalizes the tracking of a function call or operation, capturing execution time, outputs, and any error states.", "operationId": "call_end_call_end_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallEndReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Call ended successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { @@ -180,29 +183,31 @@ ] } }, - "/call/read": { + "/call/upsert_batch": { "post": { - "tags": ["Calls"], - "summary": "Read call data", - "description": "Retrieve call information and metrics", - "operationId": "call_read_call_read_post", + "tags": [ + "Calls" + ], + "summary": "Call Start Batch", + "description": "Start multiple tracing calls in a single batch operation. This endpoint enables efficient bulk creation of call traces, ideal for high-throughput applications or bulk data processing.", + "operationId": "call_start_batch_call_upsert_batch_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallReadReq" + "$ref": "#/components/schemas/CallCreateBatchReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Call data retrieved successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallReadRes" + "$ref": "#/components/schemas/CallCreateBatchRes" } } } @@ -225,29 +230,31 @@ ] } }, - "/call/update": { + "/calls/delete": { "post": { - "tags": ["Calls"], - "summary": "Update call data", - "description": "Update call information and metrics", - "operationId": "call_update_call_update_post", + "tags": [ + "Calls" + ], + "summary": "Calls Delete", + "description": "Delete one or more tracing calls from the system. This endpoint removes call records and associated trace data, useful for data cleanup or privacy compliance.", + "operationId": "calls_delete_calls_delete_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallUpdateReq" + "$ref": "#/components/schemas/CallsDeleteReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Call updated successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallUpdateRes" + "$ref": "#/components/schemas/CallsDeleteRes" } } } @@ -270,29 +277,31 @@ ] } }, - "/call/upsert_batch": { + "/call/update": { "post": { - "tags": ["Calls"], - "summary": "Batch upsert calls", - "description": "Create or update multiple calls in a single batch operation", - "operationId": "call_start_batch_call_upsert_batch_post", + "tags": [ + "Calls" + ], + "summary": "Call Update", + "description": "Update an existing tracing call with new information. This endpoint allows modification of call metadata, outputs, or status after the call has been started.", + "operationId": "call_update_call_update_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallUpsertBatchReq" + "$ref": "#/components/schemas/CallUpdateReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Batch operation completed successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallUpsertBatchRes" + "$ref": "#/components/schemas/CallUpdateRes" } } } @@ -315,29 +324,31 @@ ] } }, - "/calls/delete": { + "/call/read": { "post": { - "tags": ["Calls"], - "summary": "Delete calls", - "description": "Delete multiple calls based on specified criteria", - "operationId": "calls_delete_calls_delete_post", + "tags": [ + "Calls" + ], + "summary": "Call Read", + "description": "Retrieve detailed information about a specific tracing call. This endpoint returns complete call data including inputs, outputs, execution time, and trace metadata.", + "operationId": "call_read_call_read_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallsDeleteReq" + "$ref": "#/components/schemas/CallReadReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Calls deleted successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallsDeleteRes" + "$ref": "#/components/schemas/CallReadRes" } } } @@ -362,23 +373,25 @@ }, "/calls/query_stats": { "post": { - "tags": ["Calls"], - "summary": "Query call statistics", - "description": "Get aggregated statistics for calls based on query parameters", + "tags": [ + "Calls" + ], + "summary": "Calls Query Stats", + "description": "Query statistical information about tracing calls. This endpoint provides aggregated metrics, performance statistics, and analytical data about call patterns and execution trends.", "operationId": "calls_query_stats_calls_query_stats_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallsQueryStatsReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Call statistics retrieved successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { @@ -407,27 +420,91 @@ }, "/calls/stream_query": { "post": { - "tags": ["Calls"], - "summary": "Stream call query results", - "description": "Stream call data matching query parameters in real-time", + "tags": [ + "Calls" + ], + "summary": "Calls Query Stream", + "description": "Query tracing calls with streaming response. This endpoint returns call data in a continuous stream format (JSONL), ideal for real-time monitoring and large dataset processing.", "operationId": "calls_query_stream_calls_stream_query_post", + "security": [ + { + "HTTPBasic": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "default": "application/jsonl", + "title": "Accept" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallsStreamQueryReq" + "$ref": "#/components/schemas/CallsQueryReq" + } + } + } + }, + "responses": { + "200": { + "description": "Stream of data in JSONL format", + "content": { + "application/jsonl": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schema" + } + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } } } } + } + } + }, + "/obj/create": { + "post": { + "tags": [ + "Objects" + ], + "summary": "Object Create", + "description": "Create a new object in the Weave system. Objects represent any data structure, model, or artifact that needs to be tracked and versioned within your ML workflows.", + "operationId": "obj_create_obj_create_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjCreateReq" + } + } + }, + "required": true }, "responses": { "200": { - "description": "Stream established successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CallsStreamQueryRes" + "$ref": "#/components/schemas/ObjCreateRes" } } } @@ -450,29 +527,31 @@ ] } }, - "/cost/create": { + "/obj/read": { "post": { - "tags": ["Costs"], - "summary": "Create cost record", - "description": "Record cost information for LLM usage tracking", - "operationId": "cost_create_cost_create_post", + "tags": [ + "Objects" + ], + "summary": "Object Read", + "description": "Retrieve an object from the Weave system. This endpoint fetches object data, metadata, and version information for analysis and processing.", + "operationId": "obj_read_obj_read_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CostCreateReq" + "$ref": "#/components/schemas/ObjReadReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Cost record created successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CostCreateRes" + "$ref": "#/components/schemas/ObjReadRes" } } } @@ -495,29 +574,31 @@ ] } }, - "/cost/query": { + "/objs/query": { "post": { - "tags": ["Costs"], - "summary": "Query cost records", - "description": "Retrieve cost data based on query parameters", - "operationId": "cost_query_cost_query_post", + "tags": [ + "Objects" + ], + "summary": "Objects Query", + "description": "Query and search for objects in the Weave system. This endpoint supports filtering, sorting, and pagination to find specific objects based on various criteria.", + "operationId": "objs_query_objs_query_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CostQueryReq" + "$ref": "#/components/schemas/ObjQueryReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Cost data retrieved successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CostQueryRes" + "$ref": "#/components/schemas/ObjQueryRes" } } } @@ -540,29 +621,31 @@ ] } }, - "/cost/purge": { + "/obj/delete": { "post": { - "tags": ["Costs"], - "summary": "Purge cost records", - "description": "Permanently delete cost records based on specified criteria", - "operationId": "cost_purge_cost_purge_post", + "tags": [ + "Objects" + ], + "summary": "Object Delete", + "description": "Delete an object from the Weave system. This endpoint removes the object and its associated metadata while maintaining referential integrity.", + "operationId": "obj_delete_obj_delete_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CostPurgeReq" + "$ref": "#/components/schemas/ObjDeleteReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Cost records purged successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CostPurgeRes" + "$ref": "#/components/schemas/ObjDeleteRes" } } } @@ -585,29 +668,31 @@ ] } }, - "/feedback/create": { + "/table/create": { "post": { - "tags": ["Feedback"], - "summary": "Create feedback", - "description": "Add feedback to a call or object for improving LLM performance", - "operationId": "feedback_create_feedback_create_post", + "tags": [ + "Tables" + ], + "summary": "Table Create", + "description": "Create a new table in the Weave system. Tables store structured data, datasets, or tabular information that can be queried and analyzed within your ML workflows.", + "operationId": "table_create_table_create_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackCreateReq" + "$ref": "#/components/schemas/TableCreateReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Feedback created successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackCreateRes" + "$ref": "#/components/schemas/TableCreateRes" } } } @@ -630,29 +715,31 @@ ] } }, - "/feedback/query": { + "/table/update": { "post": { - "tags": ["Feedback"], - "summary": "Query feedback", - "description": "Retrieve feedback records based on query parameters", - "operationId": "feedback_query_feedback_query_post", + "tags": [ + "Tables" + ], + "summary": "Table Update", + "description": "Update an existing table in the Weave system. This endpoint allows modification of table schema, data, or metadata while preserving data integrity.", + "operationId": "table_update_table_update_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackQueryReq" + "$ref": "#/components/schemas/TableUpdateReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Feedback data retrieved successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackQueryRes" + "$ref": "#/components/schemas/TableUpdateRes" } } } @@ -675,29 +762,31 @@ ] } }, - "/feedback/purge": { + "/table/query": { "post": { - "tags": ["Feedback"], - "summary": "Purge feedback", - "description": "Permanently delete feedback records", - "operationId": "feedback_purge_feedback_purge_post", + "tags": [ + "Tables" + ], + "summary": "Table Query", + "description": "Query data from tables in the Weave system. This endpoint supports filtering, sorting, and pagination to retrieve specific rows and columns from stored tables.", + "operationId": "table_query_table_query_post", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackPurgeReq" + "$ref": "#/components/schemas/TableQueryReq" } } - } + }, + "required": true }, "responses": { "200": { - "description": "Feedback purged successfully", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackPurgeRes" + "$ref": "#/components/schemas/TableQueryRes" } } } @@ -719,685 +808,4161 @@ } ] } - } - }, - "components": { - "securitySchemes": { - "HTTPBasic": { - "type": "http", - "scheme": "basic" - }, - "BearerAuth": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } }, - "schemas": { - "ServerInfoRes": { - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "API version" - }, - "environment": { - "type": "string", - "description": "Current environment" - }, - "features": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Available features" + "/table/query_stream": { + "post": { + "summary": "Table Query Stream", + "description": "Query table data with streaming response. This endpoint returns table rows in a continuous stream format (JSONL), ideal for processing large datasets efficiently.", + "operationId": "table_query_stream_table_query_stream_post", + "security": [ + { + "HTTPBasic": [] } - }, - "required": ["version", "environment"] - }, - "HTTPValidationError": { - "type": "object", - "properties": { - "detail": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValidationError" + ], + "parameters": [ + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "default": "application/jsonl", + "title": "Accept" } } - } - }, - "ValidationError": { - "type": "object", - "properties": { - "loc": { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableQueryReq" + } } - }, - "msg": { - "type": "string" - }, - "type": { - "type": "string" } }, - "required": ["loc", "msg", "type"] - }, - "CallStartReq": { - "type": "object", - "properties": { - "project_id": { - "type": "string", - "description": "Project identifier" - }, - "parent_id": { - "type": "string", - "description": "Parent call identifier" - }, - "op_name": { - "type": "string", - "description": "Operation name" - }, - "inputs": { - "type": "object", - "description": "Input parameters for the call" + "responses": { + "200": { + "description": "Stream of data in JSONL format", + "content": { + "application/jsonl": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schema" + } + } + } + } }, - "attributes": { + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/table/query_stats": { + "post": { + "tags": [ + "Tables" + ], + "summary": "Table Query Stats", + "description": "Query statistical information about tables. This endpoint provides aggregated metrics, row counts, and analytical data about table contents and usage patterns.", + "operationId": "table_query_stats_table_query_stats_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableQueryStatsReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TableQueryStatsRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/refs/read_batch": { + "post": { + "tags": [ + "Refs" + ], + "summary": "References Read Batch", + "description": "Read multiple object references in a single batch operation. This endpoint efficiently retrieves reference information for multiple objects, enabling bulk data processing.", + "operationId": "refs_read_batch_refs_read_batch_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefsReadBatchReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefsReadBatchRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/file/create": { + "post": { + "tags": [ + "Files" + ], + "summary": "File Create", + "description": "Create and upload a file to the Weave system. This endpoint handles file storage for artifacts, models, datasets, or any other binary content related to your ML workflows.", + "operationId": "file_create_file_create_post", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_file_create_file_create_post" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileCreateRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/file/content": { + "post": { + "tags": [ + "Files" + ], + "summary": "File Content", + "description": "Retrieve the content of a file from the Weave system. This endpoint downloads file data and metadata for processing or analysis.", + "operationId": "file_content_file_content_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileContentReadReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Binary file content stream", + "content": { + "application/octet-stream": {} + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/cost/create": { + "post": { + "tags": [ + "Costs" + ], + "summary": "Cost Create", + "description": "Record cost information for API calls, model inference, or other billable operations. This endpoint tracks spending and usage metrics for budget management and analysis.", + "operationId": "cost_create_cost_create_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostCreateReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostCreateRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/cost/query": { + "post": { + "tags": [ + "Costs" + ], + "summary": "Cost Query", + "description": "Query cost data and spending metrics. This endpoint retrieves cost information with filtering and aggregation capabilities for financial analysis and reporting.", + "operationId": "cost_query_cost_query_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostQueryReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostQueryRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/cost/purge": { + "post": { + "tags": [ + "Costs" + ], + "summary": "Cost Purge", + "description": "Delete cost records from the system. This endpoint removes historical cost data based on specified criteria, useful for data cleanup and privacy compliance.", + "operationId": "cost_purge_cost_purge_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostPurgeReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CostPurgeRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/feedback/create": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Feedback Create", + "description": "Add feedback to a call or object.", + "operationId": "feedback_create_feedback_create_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackCreateReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackCreateRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/feedback/query": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Feedback Query", + "description": "Query for feedback.", + "operationId": "feedback_query_feedback_query_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackQueryReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackQueryRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/feedback/purge": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Feedback Purge", + "description": "Permanently delete feedback.", + "operationId": "feedback_purge_feedback_purge_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackPurgeReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackPurgeRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + }, + "/feedback/replace": { + "post": { + "tags": [ + "Feedback" + ], + "summary": "Feedback Replace", + "description": "Replace existing feedback records with new feedback data. This endpoint updates feedback entries while maintaining historical tracking.", + "operationId": "feedback_replace_feedback_replace_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackReplaceReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackReplaceRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBasic": [] + } + ] + } + } + }, + "components": { + "schemas": { + "AndOperation": { + "properties": { + "$and": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + "type": "array", + "title": "$And" + } + }, + "type": "object", + "required": [ + "$and" + ], + "title": "AndOperation" + }, + "Body_file_create_file_create_post": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "file": { + "type": "string", + "format": "binary", + "title": "File" + } + }, + "type": "object", + "required": [ + "project_id", + "file" + ], + "title": "Body_file_create_file_create_post" + }, + "CallBatchEndMode": { + "properties": { + "mode": { + "type": "string", + "title": "Mode", + "default": "end" + }, + "req": { + "$ref": "#/components/schemas/CallEndReq" + } + }, + "type": "object", + "required": [ + "req" + ], + "title": "CallBatchEndMode" + }, + "CallBatchStartMode": { + "properties": { + "mode": { + "type": "string", + "title": "Mode", + "default": "start" + }, + "req": { + "$ref": "#/components/schemas/CallStartReq" + } + }, + "type": "object", + "required": [ + "req" + ], + "title": "CallBatchStartMode" + }, + "CallCreateBatchReq": { + "properties": { + "batch": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallBatchStartMode" + }, + { + "$ref": "#/components/schemas/CallBatchEndMode" + } + ] + }, + "type": "array", + "title": "Batch" + } + }, + "type": "object", + "required": [ + "batch" + ], + "title": "CallCreateBatchReq" + }, + "CallCreateBatchRes": { + "properties": { + "res": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallStartRes" + }, + { + "$ref": "#/components/schemas/CallEndRes" + } + ] + }, + "type": "array", + "title": "Res" + } + }, + "type": "object", + "required": [ + "res" + ], + "title": "CallCreateBatchRes" + }, + "CallEndReq": { + "properties": { + "end": { + "$ref": "#/components/schemas/EndedCallSchemaForInsert" + } + }, + "type": "object", + "required": [ + "end" + ], + "title": "CallEndReq" + }, + "CallEndRes": { + "properties": {}, + "type": "object", + "title": "CallEndRes" + }, + "CallReadReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "id": { + "type": "string", + "title": "Id" + }, + "include_costs": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Costs", + "default": false + } + }, + "type": "object", + "required": [ + "project_id", + "id" + ], + "title": "CallReadReq" + }, + "CallReadRes": { + "properties": { + "call": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallSchema" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "call" + ], + "title": "CallReadRes" + }, + "CallSchema": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "op_name": { + "type": "string", + "title": "Op Name" + }, + "display_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Name" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + }, + "parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + }, + "started_at": { + "type": "string", + "format": "date-time", + "title": "Started At" + }, + "attributes": { + "type": "object", + "title": "Attributes" + }, + "inputs": { + "type": "object", + "title": "Inputs" + }, + "ended_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Ended At" + }, + "exception": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Exception" + }, + "output": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Output" + }, + "summary": { + "type": "object" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id" + }, + "wb_run_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb Run Id" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + } + }, + "type": "object", + "required": [ + "id", + "project_id", + "op_name", + "trace_id", + "started_at", + "attributes", + "inputs" + ], + "title": "CallSchema" + }, + "CallStartReq": { + "properties": { + "start": { + "$ref": "#/components/schemas/StartedCallSchemaForInsert" + } + }, + "type": "object", + "required": [ + "start" + ], + "title": "CallStartReq" + }, + "CallStartRes": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "trace_id": { + "type": "string", + "title": "Trace Id" + } + }, + "type": "object", + "required": [ + "id", + "trace_id" + ], + "title": "CallStartRes" + }, + "CallUpdateReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "call_id": { + "type": "string", + "title": "Call Id" + }, + "display_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Name" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "project_id", + "call_id" + ], + "title": "CallUpdateReq" + }, + "CallUpdateRes": { + "properties": {}, + "type": "object", + "title": "CallUpdateRes" + }, + "CallsDeleteReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "call_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Call Ids" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "project_id", + "call_ids" + ], + "title": "CallsDeleteReq" + }, + "CallsDeleteRes": { + "properties": {}, + "type": "object", + "title": "CallsDeleteRes" + }, + "CallsFilter": { + "properties": { + "op_names": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Op Names" + }, + "input_refs": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Input Refs" + }, + "output_refs": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Output Refs" + }, + "parent_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Parent Ids" + }, + "trace_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Trace Ids" + }, + "call_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Call Ids" + }, + "trace_roots_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Trace Roots Only" + }, + "wb_user_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Wb User Ids" + }, + "wb_run_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Wb Run Ids" + } + }, + "type": "object", + "title": "CallsFilter" + }, + "CallsQueryReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallsFilter" + }, + { + "type": "null" + } + ] + }, + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + }, + "offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Offset" + }, + "sort_by": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SortBy" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sort By" + }, + "query": { + "anyOf": [ + { + "$ref": "#/components/schemas/Query" + }, + { + "type": "null" + } + ] + }, + "include_costs": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Costs", + "description": "Beta, subject to change. If true, the response will include any model costs for each call.", + "default": false + }, + "include_feedback": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Feedback", + "description": "Beta, subject to change. If true, the response will include feedback for each call.", + "default": false + }, + "columns": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Columns" + }, + "expand_columns": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Expand Columns", + "description": "Columns to expand, i.e. refs to other objects", + "examples": [ + [ + "inputs.self.message", + "inputs.model.prompt" + ] + ] + } + }, + "type": "object", + "required": [ + "project_id" + ], + "title": "CallsQueryReq" + }, + "CallsQueryStatsReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/CallsFilter" + }, + { + "type": "null" + } + ] + }, + "query": { + "anyOf": [ + { + "$ref": "#/components/schemas/Query" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "project_id" + ], + "title": "CallsQueryStatsReq" + }, + "CallsQueryStatsRes": { + "properties": { + "count": { + "type": "integer", + "title": "Count" + } + }, + "type": "object", + "required": [ + "count" + ], + "title": "CallsQueryStatsRes" + }, + "ContainsOperation": { + "properties": { + "$contains": { + "$ref": "#/components/schemas/ContainsSpec" + } + }, + "type": "object", + "required": [ + "$contains" + ], + "title": "ContainsOperation" + }, + "ContainsSpec": { + "properties": { + "input": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ], + "title": "Input" + }, + "substr": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ], + "title": "Substr" + }, + "case_insensitive": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Case Insensitive", + "default": false + } + }, + "type": "object", + "required": [ + "input", + "substr" + ], + "title": "ContainsSpec" + }, + "ConvertOperation": { + "properties": { + "$convert": { + "$ref": "#/components/schemas/ConvertSpec" + } + }, + "type": "object", + "required": [ + "$convert" + ], + "title": "ConvertOperation" + }, + "ConvertSpec": { + "properties": { + "input": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ], + "title": "Input" + }, + "to": { + "type": "string", + "enum": [ + "double", + "string", + "int", + "bool", + "exists" + ], + "title": "To" + } + }, + "type": "object", + "required": [ + "input", + "to" + ], + "title": "ConvertSpec" + }, + "CostCreateInput": { + "properties": { + "prompt_token_cost": { + "type": "number", + "title": "Prompt Token Cost" + }, + "completion_token_cost": { + "type": "number", + "title": "Completion Token Cost" + }, + "prompt_token_cost_unit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt Token Cost Unit", + "description": "The unit of the cost for the prompt tokens", + "default": "USD" + }, + "completion_token_cost_unit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Completion Token Cost Unit", + "description": "The unit of the cost for the completion tokens", + "default": "USD" + }, + "effective_date": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Effective Date", + "description": "The date after which the cost is effective for, will default to the current date if not provided" + }, + "provider_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Provider Id", + "description": "The provider of the LLM, e.g. 'openai' or 'mistral'. If not provided, the provider_id will be set to 'default'" + } + }, + "type": "object", + "required": [ + "prompt_token_cost", + "completion_token_cost" + ], + "title": "CostCreateInput" + }, + "CostCreateReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "costs": { + "additionalProperties": { + "$ref": "#/components/schemas/CostCreateInput" + }, + "type": "object", + "title": "Costs" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "project_id", + "costs" + ], + "title": "CostCreateReq" + }, + "CostCreateRes": { + "properties": { + "ids": { + "items": { + "prefixItems": [ + { + "type": "string" + }, + { + "type": "string" + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2 + }, + "type": "array", + "title": "Ids" + } + }, + "type": "object", + "required": [ + "ids" + ], + "title": "CostCreateRes" + }, + "CostPurgeReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "query": { + "$ref": "#/components/schemas/Query" + } + }, + "type": "object", + "required": [ + "project_id", + "query" + ], + "title": "CostPurgeReq" + }, + "CostPurgeRes": { + "properties": {}, + "type": "object", + "title": "CostPurgeRes" + }, + "CostQueryOutput": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id", + "examples": [ + "2341-asdf-asdf" + ] + }, + "llm_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Id", + "examples": [ + "gpt4" + ] + }, + "prompt_token_cost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Prompt Token Cost", + "examples": [ + 1.0 + ] + }, + "completion_token_cost": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Completion Token Cost", + "examples": [ + 1.0 + ] + }, + "prompt_token_cost_unit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt Token Cost Unit", + "examples": [ + "USD" + ] + }, + "completion_token_cost_unit": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Completion Token Cost Unit", + "examples": [ + "USD" + ] + }, + "effective_date": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Effective Date", + "examples": [ + "2024-01-01T00:00:00Z" + ] + }, + "provider_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Provider Id", + "examples": [ + "openai" + ] + } + }, + "type": "object", + "title": "CostQueryOutput" + }, + "CostQueryReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "fields": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Fields", + "examples": [ + [ + "id", + "llm_id", + "prompt_token_cost", + "completion_token_cost", + "prompt_token_cost_unit", + "completion_token_cost_unit", + "effective_date", + "provider_id" + ] + ] + }, + "query": { + "anyOf": [ + { + "$ref": "#/components/schemas/Query" + }, + { + "type": "null" + } + ] + }, + "sort_by": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SortBy" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sort By" + }, + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit", + "examples": [ + 10 + ] + }, + "offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Offset", + "examples": [ + 0 + ] + } + }, + "type": "object", + "required": [ + "project_id" + ], + "title": "CostQueryReq" + }, + "CostQueryRes": { + "properties": { + "results": { + "items": { + "$ref": "#/components/schemas/CostQueryOutput" + }, + "type": "array", + "title": "Results" + } + }, + "type": "object", + "required": [ + "results" + ], + "title": "CostQueryRes" + }, + "EndedCallSchemaForInsert": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "id": { + "type": "string", + "title": "Id" + }, + "ended_at": { + "type": "string", + "format": "date-time", + "title": "Ended At" + }, + "exception": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Exception" + }, + "output": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Output" + }, + "summary": { + "$ref": "#/components/schemas/SummaryInsertMap" + } + }, + "type": "object", + "required": [ + "project_id", + "id", + "ended_at", + "summary" + ], + "title": "EndedCallSchemaForInsert" + }, + "EqOperation": { + "properties": { + "$eq": { + "prefixItems": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2, + "title": "$Eq" + } + }, + "type": "object", + "required": [ + "$eq" + ], + "title": "EqOperation" + }, + "FeedbackCreateReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "weave_ref": { + "type": "string", + "title": "Weave Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "creator": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Creator", + "examples": [ + "Jane Smith" + ] + }, + "feedback_type": { + "type": "string", + "title": "Feedback Type", + "examples": [ + "custom" + ] + }, + "payload": { + "type": "object", + "title": "Payload", + "examples": [ + { + "key": "value" + } + ] + }, + "annotation_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Annotation Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "runnable_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Runnable Ref", + "examples": [ + "weave:///entity/project/op/name:digest" + ] + }, + "call_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Call Ref", + "examples": [ + "weave:///entity/project/call/call_id" + ] + }, + "trigger_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Trigger Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "project_id", + "weave_ref", + "feedback_type", + "payload" + ], + "title": "FeedbackCreateReq" + }, + "FeedbackCreateRes": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "wb_user_id": { + "type": "string", + "title": "Wb User Id" + }, + "payload": { + "type": "object", + "title": "Payload" + } + }, + "type": "object", + "required": [ + "id", + "created_at", + "wb_user_id", + "payload" + ], + "title": "FeedbackCreateRes" + }, + "FeedbackPurgeReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "query": { + "$ref": "#/components/schemas/Query" + } + }, + "type": "object", + "required": [ + "project_id", + "query" + ], + "title": "FeedbackPurgeReq" + }, + "FeedbackPurgeRes": { + "properties": {}, + "type": "object", + "title": "FeedbackPurgeRes" + }, + "FeedbackQueryReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "fields": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Fields", + "examples": [ + [ + "id", + "feedback_type", + "payload.note" + ] + ] + }, + "query": { + "anyOf": [ + { + "$ref": "#/components/schemas/Query" + }, + { + "type": "null" + } + ] + }, + "sort_by": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SortBy" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sort By" + }, + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit", + "examples": [ + 10 + ] + }, + "offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Offset", + "examples": [ + 0 + ] + } + }, + "type": "object", + "required": [ + "project_id" + ], + "title": "FeedbackQueryReq" + }, + "FeedbackQueryRes": { + "properties": { + "result": { + "items": { + "type": "object" + }, + "type": "array", + "title": "Result" + } + }, + "type": "object", + "required": [ + "result" + ], + "title": "FeedbackQueryRes" + }, + "FeedbackReplaceReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id", + "examples": [ + "entity/project" + ] + }, + "weave_ref": { + "type": "string", + "title": "Weave Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "creator": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Creator", + "examples": [ + "Jane Smith" + ] + }, + "feedback_type": { + "type": "string", + "title": "Feedback Type", + "examples": [ + "custom" + ] + }, + "payload": { + "type": "object", + "title": "Payload", + "examples": [ + { + "key": "value" + } + ] + }, + "annotation_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Annotation Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "runnable_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Runnable Ref", + "examples": [ + "weave:///entity/project/op/name:digest" + ] + }, + "call_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Call Ref", + "examples": [ + "weave:///entity/project/call/call_id" + ] + }, + "trigger_ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Trigger Ref", + "examples": [ + "weave:///entity/project/object/name:digest" + ] + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + }, + "feedback_id": { + "type": "string", + "title": "Feedback Id" + } + }, + "type": "object", + "required": [ + "project_id", + "weave_ref", + "feedback_type", + "payload", + "feedback_id" + ], + "title": "FeedbackReplaceReq" + }, + "FeedbackReplaceRes": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "wb_user_id": { + "type": "string", + "title": "Wb User Id" + }, + "payload": { "type": "object", - "description": "Additional attributes" + "title": "Payload" + } + }, + "type": "object", + "required": [ + "id", + "created_at", + "wb_user_id", + "payload" + ], + "title": "FeedbackReplaceRes" + }, + "FileContentReadReq": { + "properties": { + "project_id": { + "type": "string", + "title": "Project Id" + }, + "digest": { + "type": "string", + "title": "Digest" + } + }, + "type": "object", + "required": [ + "project_id", + "digest" + ], + "title": "FileContentReadReq" + }, + "FileCreateRes": { + "properties": { + "digest": { + "type": "string", + "title": "Digest" + } + }, + "type": "object", + "required": [ + "digest" + ], + "title": "FileCreateRes" + }, + "GetFieldOperator": { + "properties": { + "$getField": { + "type": "string", + "title": "$Getfield" + } + }, + "type": "object", + "required": [ + "$getField" + ], + "title": "GetFieldOperator" + }, + "GtOperation": { + "properties": { + "$gt": { + "prefixItems": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2, + "title": "$Gt" + } + }, + "type": "object", + "required": [ + "$gt" + ], + "title": "GtOperation" + }, + "GteOperation": { + "properties": { + "$gte": { + "prefixItems": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2, + "title": "$Gte" + } + }, + "type": "object", + "required": [ + "$gte" + ], + "title": "GteOperation" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" } }, - "required": ["project_id", "op_name"] - }, - "CallStartRes": { "type": "object", + "title": "HTTPValidationError" + }, + "InOperation": { "properties": { - "call_id": { - "type": "string", - "description": "Unique identifier for the created call" - }, - "trace_id": { - "type": "string", - "description": "Trace identifier" + "$in": { + "prefixItems": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + "type": "array" + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2, + "title": "$In" } }, - "required": ["call_id"] - }, - "CallEndReq": { "type": "object", + "required": [ + "$in" + ], + "title": "InOperation" + }, + "LLMUsageSchema": { "properties": { - "call_id": { - "type": "string", - "description": "Call identifier to end" + "prompt_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Prompt Tokens" }, - "outputs": { - "type": "object", - "description": "Output results from the call" + "input_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Input Tokens" }, - "summary": { - "type": "object", - "description": "Call summary information" + "completion_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Completion Tokens" + }, + "output_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Output Tokens" + }, + "requests": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Requests" + }, + "total_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Total Tokens" } }, - "required": ["call_id"] + "type": "object", + "title": "LLMUsageSchema" }, - "CallEndRes": { + "LiteralOperation": { + "properties": { + "$literal": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "additionalProperties": { + "$ref": "#/components/schemas/LiteralOperation" + }, + "type": "object" + }, + { + "items": { + "$ref": "#/components/schemas/LiteralOperation" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "$Literal" + } + }, "type": "object", + "required": [ + "$literal" + ], + "title": "LiteralOperation" + }, + "NotOperation": { "properties": { - "call_id": { - "type": "string", - "description": "Identifier of the ended call" - }, - "ended_at": { - "type": "string", - "format": "date-time", - "description": "Timestamp when call ended" + "$not": { + "prefixItems": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + } + ], + "type": "array", + "maxItems": 1, + "minItems": 1, + "title": "$Not" } }, - "required": ["call_id", "ended_at"] + "type": "object", + "required": [ + "$not" + ], + "title": "NotOperation" }, - "CallReadReq": { + "ObjCreateReq": { + "properties": { + "obj": { + "$ref": "#/components/schemas/ObjSchemaForInsert" + } + }, "type": "object", + "required": [ + "obj" + ], + "title": "ObjCreateReq" + }, + "ObjCreateRes": { "properties": { - "call_id": { + "digest": { "type": "string", - "description": "Call identifier to read" - }, - "include_costs": { - "type": "boolean", - "description": "Whether to include cost information" + "title": "Digest" } }, - "required": ["call_id"] - }, - "CallReadRes": { "type": "object", + "required": [ + "digest" + ], + "title": "ObjCreateRes" + }, + "ObjDeleteReq": { "properties": { - "call_id": { - "type": "string", - "description": "Call identifier" - }, "project_id": { "type": "string", - "description": "Project identifier" - }, - "op_name": { - "type": "string", - "description": "Operation name" - }, - "inputs": { - "type": "object", - "description": "Input parameters" - }, - "outputs": { - "type": "object", - "description": "Output results" - }, - "started_at": { - "type": "string", - "format": "date-time", - "description": "Start timestamp" + "title": "Project Id" }, - "ended_at": { + "object_id": { "type": "string", - "format": "date-time", - "description": "End timestamp" + "title": "Object Id" }, - "costs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CostInfo" - }, - "description": "Associated cost information" + "digests": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Digests", + "description": "List of digests to delete. If not provided, all digests for the object will be deleted." } }, - "required": ["call_id", "project_id", "op_name"] - }, - "CallUpdateReq": { "type": "object", + "required": [ + "project_id", + "object_id" + ], + "title": "ObjDeleteReq" + }, + "ObjDeleteRes": { "properties": { - "call_id": { - "type": "string", - "description": "Call identifier to update" - }, - "inputs": { - "type": "object", - "description": "Updated input parameters" - }, - "outputs": { - "type": "object", - "description": "Updated output results" - }, - "attributes": { - "type": "object", - "description": "Updated attributes" + "num_deleted": { + "type": "integer", + "title": "Num Deleted" } }, - "required": ["call_id"] - }, - "CallUpdateRes": { "type": "object", + "required": [ + "num_deleted" + ], + "title": "ObjDeleteRes" + }, + "ObjQueryReq": { "properties": { - "call_id": { + "project_id": { "type": "string", - "description": "Updated call identifier" + "title": "Project Id", + "description": "The ID of the project to query", + "examples": [ + "user/project" + ] }, - "updated_at": { - "type": "string", - "format": "date-time", - "description": "Update timestamp" + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/ObjectVersionFilter" + }, + { + "type": "null" + } + ], + "description": "Filter criteria for the query. See `ObjectVersionFilter`", + "examples": [ + { + "latest_only": true, + "object_ids": [ + "my_favorite_model" + ] + } + ] + }, + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit", + "description": "Maximum number of results to return", + "examples": [ + 100 + ] + }, + "offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Offset", + "description": "Number of results to skip before returning", + "examples": [ + 0 + ] + }, + "sort_by": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SortBy" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sort By", + "description": "Sorting criteria for the query results. Currently only supports 'object_id' and 'created_at'.", + "examples": [ + [ + { + "direction": "desc", + "field": "created_at" + } + ] + ] + }, + "metadata_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Metadata Only", + "description": "If true, the `val` column is not read from the database and is empty.All other fields are returned.", + "default": false } }, - "required": ["call_id", "updated_at"] - }, - "CallUpsertBatchReq": { "type": "object", + "required": [ + "project_id" + ], + "title": "ObjQueryReq" + }, + "ObjQueryRes": { "properties": { - "calls": { - "type": "array", + "objs": { "items": { - "$ref": "#/components/schemas/CallUpsertItem" + "$ref": "#/components/schemas/ObjSchema" }, - "description": "List of calls to upsert" + "type": "array", + "title": "Objs" } }, - "required": ["calls"] - }, - "CallUpsertItem": { "type": "object", + "required": [ + "objs" + ], + "title": "ObjQueryRes" + }, + "ObjReadReq": { "properties": { - "call_id": { - "type": "string", - "description": "Call identifier" - }, "project_id": { "type": "string", - "description": "Project identifier" + "title": "Project Id" }, - "op_name": { + "object_id": { "type": "string", - "description": "Operation name" + "title": "Object Id" }, - "inputs": { - "type": "object", - "description": "Input parameters" + "digest": { + "type": "string", + "title": "Digest" }, - "outputs": { - "type": "object", - "description": "Output results" + "metadata_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Metadata Only", + "description": "If true, the `val` column is not read from the database and is empty.All other fields are returned.", + "default": false } }, - "required": ["project_id", "op_name"] - }, - "CallUpsertBatchRes": { "type": "object", + "required": [ + "project_id", + "object_id", + "digest" + ], + "title": "ObjReadReq" + }, + "ObjReadRes": { "properties": { - "processed": { - "type": "integer", - "description": "Number of calls processed" - }, - "created": { - "type": "integer", - "description": "Number of calls created" - }, - "updated": { - "type": "integer", - "description": "Number of calls updated" + "obj": { + "$ref": "#/components/schemas/ObjSchema" } }, - "required": ["processed", "created", "updated"] - }, - "CallsDeleteReq": { "type": "object", + "required": [ + "obj" + ], + "title": "ObjReadRes" + }, + "ObjSchema": { "properties": { - "call_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of call identifiers to delete" - }, "project_id": { "type": "string", - "description": "Project identifier filter" + "title": "Project Id" + }, + "object_id": { + "type": "string", + "title": "Object Id" }, - "before": { + "created_at": { "type": "string", "format": "date-time", - "description": "Delete calls before this timestamp" - } - } - }, - "CallsDeleteRes": { - "type": "object", - "properties": { - "deleted": { + "title": "Created At" + }, + "deleted_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Deleted At" + }, + "digest": { + "type": "string", + "title": "Digest" + }, + "version_index": { + "type": "integer", + "title": "Version Index" + }, + "is_latest": { "type": "integer", - "description": "Number of calls deleted" + "title": "Is Latest" + }, + "kind": { + "type": "string", + "title": "Kind" + }, + "base_object_class": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Object Class" + }, + "val": { + "title": "Val" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." } }, - "required": ["deleted"] - }, - "CallsQueryStatsReq": { "type": "object", + "required": [ + "project_id", + "object_id", + "created_at", + "digest", + "version_index", + "is_latest", + "kind", + "base_object_class", + "val" + ], + "title": "ObjSchema" + }, + "ObjSchemaForInsert": { "properties": { "project_id": { "type": "string", - "description": "Project identifier filter" + "title": "Project Id" }, - "op_name": { + "object_id": { "type": "string", - "description": "Operation name filter" + "title": "Object Id" }, - "start_time": { - "type": "string", - "format": "date-time", - "description": "Start time filter" + "val": { + "title": "Val" }, - "end_time": { - "type": "string", - "format": "date-time", - "description": "End time filter" + "builtin_object_class": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Builtin Object Class" + }, + "set_base_object_class": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Set Base Object Class", + "deprecated": true + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." } - } - }, - "CallsQueryStatsRes": { + }, "type": "object", + "required": [ + "project_id", + "object_id", + "val" + ], + "title": "ObjSchemaForInsert" + }, + "ObjectVersionFilter": { "properties": { - "total_calls": { - "type": "integer", - "description": "Total number of calls" + "base_object_classes": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Base Object Classes", + "description": "Filter objects by their base classes", + "examples": [ + [ + "Model" + ], + [ + "Dataset" + ] + ] }, - "total_cost": { - "type": "number", - "format": "float", - "description": "Total cost" + "object_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Object Ids", + "description": "Filter objects by their IDs", + "examples": [ + "my_favorite_model", + "my_favorite_dataset" + ] }, - "avg_duration": { - "type": "number", - "format": "float", - "description": "Average duration in seconds" + "is_op": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Is Op", + "description": "Filter objects based on whether they are weave.ops or not. `True` will only return ops, `False` will return non-ops, and `None` will return all objects", + "examples": [ + true, + false, + null + ] }, - "success_rate": { - "type": "number", - "format": "float", - "description": "Success rate percentage" + "latest_only": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Latest Only", + "description": "If True, return only the latest version of each object. `False` and `None` will return all versions", + "examples": [ + true, + false + ] + } + }, + "type": "object", + "title": "ObjectVersionFilter" + }, + "OrOperation": { + "properties": { + "$or": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/LiteralOperation" + }, + { + "$ref": "#/components/schemas/GetFieldOperator" + }, + { + "$ref": "#/components/schemas/ConvertOperation" + }, + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ] + }, + "type": "array", + "title": "$Or" + } + }, + "type": "object", + "required": [ + "$or" + ], + "title": "OrOperation" + }, + "Query": { + "properties": { + "$expr": { + "anyOf": [ + { + "$ref": "#/components/schemas/AndOperation" + }, + { + "$ref": "#/components/schemas/OrOperation" + }, + { + "$ref": "#/components/schemas/NotOperation" + }, + { + "$ref": "#/components/schemas/EqOperation" + }, + { + "$ref": "#/components/schemas/GtOperation" + }, + { + "$ref": "#/components/schemas/GteOperation" + }, + { + "$ref": "#/components/schemas/InOperation" + }, + { + "$ref": "#/components/schemas/ContainsOperation" + } + ], + "title": "$Expr" + } + }, + "type": "object", + "required": [ + "$expr" + ], + "title": "Query" + }, + "RefsReadBatchReq": { + "properties": { + "refs": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Refs" } }, - "required": ["total_calls"] + "type": "object", + "required": [ + "refs" + ], + "title": "RefsReadBatchReq" }, - "CallsStreamQueryReq": { + "RefsReadBatchRes": { + "properties": { + "vals": { + "items": {}, + "type": "array", + "title": "Vals" + } + }, "type": "object", + "required": [ + "vals" + ], + "title": "RefsReadBatchRes" + }, + "ServerInfoRes": { "properties": { - "project_id": { + "min_required_weave_python_version": { "type": "string", - "description": "Project identifier filter" - }, - "op_name": { - "type": "string", - "description": "Operation name filter" - }, - "limit": { - "type": "integer", - "description": "Maximum number of results" + "title": "Min Required Weave Python Version" } - } - }, - "CallsStreamQueryRes": { + }, "type": "object", + "required": [ + "min_required_weave_python_version" + ], + "title": "ServerInfoRes" + }, + "SortBy": { "properties": { - "calls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CallReadRes" - }, - "description": "Stream of call results" + "field": { + "type": "string", + "title": "Field" }, - "has_more": { - "type": "boolean", - "description": "Whether more results are available" + "direction": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "title": "Direction" } }, - "required": ["calls", "has_more"] - }, - "CostCreateReq": { "type": "object", + "required": [ + "field", + "direction" + ], + "title": "SortBy" + }, + "StartedCallSchemaForInsert": { "properties": { - "call_id": { + "project_id": { "type": "string", - "description": "Associated call identifier" + "title": "Project Id" }, - "cost_type": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "op_name": { "type": "string", - "description": "Type of cost (e.g., 'llm_tokens', 'compute')" + "title": "Op Name" }, - "amount": { - "type": "number", - "format": "float", - "description": "Cost amount" + "display_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Display Name" }, - "currency": { - "type": "string", - "description": "Currency code (e.g., 'USD')" + "trace_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Trace Id" }, - "provider": { + "parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + }, + "started_at": { "type": "string", - "description": "Service provider" + "format": "date-time", + "title": "Started At" + }, + "attributes": { + "type": "object", + "title": "Attributes" }, - "metadata": { + "inputs": { "type": "object", - "description": "Additional cost metadata" + "title": "Inputs" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + }, + "wb_run_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb Run Id" } }, - "required": ["call_id", "cost_type", "amount"] - }, - "CostCreateRes": { "type": "object", + "required": [ + "project_id", + "op_name", + "started_at", + "attributes", + "inputs" + ], + "title": "StartedCallSchemaForInsert" + }, + "SummaryInsertMap": { "properties": { - "cost_id": { - "type": "string", - "description": "Created cost record identifier" + "usage": { + "additionalProperties": { + "$ref": "#/components/schemas/LLMUsageSchema" + }, + "type": "object", + "title": "Usage" } }, - "required": ["cost_id"] - }, - "CostQueryReq": { + "additionalProperties": true, "type": "object", + "title": "SummaryInsertMap" + }, + "TableAppendSpec": { "properties": { - "call_id": { - "type": "string", - "description": "Filter by call identifier" - }, - "cost_type": { - "type": "string", - "description": "Filter by cost type" - }, - "start_time": { - "type": "string", - "format": "date-time", - "description": "Start time filter" - }, - "end_time": { - "type": "string", - "format": "date-time", - "description": "End time filter" + "append": { + "$ref": "#/components/schemas/TableAppendSpecPayload" } - } - }, - "CostQueryRes": { + }, "type": "object", + "required": [ + "append" + ], + "title": "TableAppendSpec" + }, + "TableAppendSpecPayload": { "properties": { - "costs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CostInfo" - }, - "description": "List of cost records" - }, - "total_amount": { - "type": "number", - "format": "float", - "description": "Total cost amount" + "row": { + "type": "object", + "title": "Row" } }, - "required": ["costs"] + "type": "object", + "required": [ + "row" + ], + "title": "TableAppendSpecPayload" }, - "CostPurgeReq": { + "TableCreateReq": { + "properties": { + "table": { + "$ref": "#/components/schemas/TableSchemaForInsert" + } + }, "type": "object", + "required": [ + "table" + ], + "title": "TableCreateReq" + }, + "TableCreateRes": { "properties": { - "before": { + "digest": { "type": "string", - "format": "date-time", - "description": "Delete costs before this timestamp" + "title": "Digest" }, - "call_ids": { - "type": "array", + "row_digests": { "items": { "type": "string" }, - "description": "Delete costs for specific call IDs" + "type": "array", + "title": "Row Digests", + "description": "The digests of the rows that were created" } - } + }, + "type": "object", + "required": [ + "digest" + ], + "title": "TableCreateRes" }, - "CostPurgeRes": { + "TableInsertSpec": { + "properties": { + "insert": { + "$ref": "#/components/schemas/TableInsertSpecPayload" + } + }, "type": "object", + "required": [ + "insert" + ], + "title": "TableInsertSpec" + }, + "TableInsertSpecPayload": { "properties": { - "deleted": { + "index": { "type": "integer", - "description": "Number of cost records deleted" + "title": "Index" + }, + "row": { + "type": "object", + "title": "Row" } }, - "required": ["deleted"] + "type": "object", + "required": [ + "index", + "row" + ], + "title": "TableInsertSpecPayload" }, - "CostInfo": { + "TablePopSpec": { + "properties": { + "pop": { + "$ref": "#/components/schemas/TablePopSpecPayload" + } + }, "type": "object", + "required": [ + "pop" + ], + "title": "TablePopSpec" + }, + "TablePopSpecPayload": { "properties": { - "cost_id": { - "type": "string", - "description": "Cost record identifier" - }, - "call_id": { + "index": { + "type": "integer", + "title": "Index" + } + }, + "type": "object", + "required": [ + "index" + ], + "title": "TablePopSpecPayload" + }, + "TableQueryReq": { + "properties": { + "project_id": { "type": "string", - "description": "Associated call identifier" + "title": "Project Id", + "description": "The ID of the project", + "examples": [ + "my_entity/my_project" + ] }, - "cost_type": { + "digest": { "type": "string", - "description": "Type of cost" + "title": "Digest", + "description": "The digest of the table to query", + "examples": [ + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" + ] }, - "amount": { - "type": "number", - "format": "float", - "description": "Cost amount" + "filter": { + "anyOf": [ + { + "$ref": "#/components/schemas/TableRowFilter" + }, + { + "type": "null" + } + ], + "description": "Optional filter to apply to the query. See `TableRowFilter` for more details.", + "examples": [ + { + "row_digests": [ + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims", + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" + ] + } + ] }, - "currency": { - "type": "string", - "description": "Currency code" + "limit": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit", + "description": "Maximum number of rows to return", + "examples": [ + 100 + ] }, - "provider": { - "type": "string", - "description": "Service provider" + "offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Offset", + "description": "Number of rows to skip before starting to return rows", + "examples": [ + 10 + ] }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "Creation timestamp" + "sort_by": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/SortBy" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sort By", + "description": "List of fields to sort by. Fields can be dot-separated to access dictionary values. No sorting uses the default table order (insertion order).", + "examples": [ + [ + { + "field": "col_a.prop_b", + "order": "desc" + } + ] + ] } }, - "required": ["cost_id", "call_id", "cost_type", "amount"] + "type": "object", + "required": [ + "project_id", + "digest" + ], + "title": "TableQueryReq" }, - "FeedbackCreateReq": { + "TableQueryRes": { + "properties": { + "rows": { + "items": { + "$ref": "#/components/schemas/TableRowSchema" + }, + "type": "array", + "title": "Rows" + } + }, "type": "object", + "required": [ + "rows" + ], + "title": "TableQueryRes" + }, + "TableQueryStatsReq": { "properties": { - "call_id": { - "type": "string", - "description": "Associated call identifier" - }, - "feedback_type": { + "project_id": { "type": "string", - "description": "Type of feedback (e.g., 'rating', 'correction')" - }, - "value": { - "type": "object", - "description": "Feedback value" + "title": "Project Id", + "description": "The ID of the project", + "examples": [ + "my_entity/my_project" + ] }, - "note": { + "digest": { "type": "string", - "description": "Additional feedback note" + "title": "Digest", + "description": "The digest of the table to query", + "examples": [ + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" + ] } }, - "required": ["call_id", "feedback_type", "value"] - }, - "FeedbackCreateRes": { "type": "object", + "required": [ + "project_id", + "digest" + ], + "title": "TableQueryStatsReq" + }, + "TableQueryStatsRes": { "properties": { - "feedback_id": { - "type": "string", - "description": "Created feedback identifier" + "count": { + "type": "integer", + "title": "Count" } }, - "required": ["feedback_id"] + "type": "object", + "required": [ + "count" + ], + "title": "TableQueryStatsRes" }, - "FeedbackQueryReq": { + "TableRowFilter": { + "properties": { + "row_digests": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Row Digests", + "description": "List of row digests to filter by", + "examples": [ + [ + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims", + "aonareimsvtl13apimtalpa4435rpmgnaemrpgmarltarstaorsnte134avrims" + ] + ] + } + }, "type": "object", + "title": "TableRowFilter" + }, + "TableRowSchema": { "properties": { - "call_id": { + "digest": { "type": "string", - "description": "Filter by call identifier" + "title": "Digest" }, - "feedback_type": { - "type": "string", - "description": "Filter by feedback type" - }, - "start_time": { - "type": "string", - "format": "date-time", - "description": "Start time filter" + "val": { + "title": "Val" }, - "end_time": { - "type": "string", - "format": "date-time", - "description": "End time filter" + "original_index": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Original Index" } - } - }, - "FeedbackQueryRes": { + }, "type": "object", + "required": [ + "digest", + "val" + ], + "title": "TableRowSchema" + }, + "TableSchemaForInsert": { "properties": { - "feedback": { - "type": "array", + "project_id": { + "type": "string", + "title": "Project Id" + }, + "rows": { "items": { - "$ref": "#/components/schemas/FeedbackInfo" + "type": "object" }, - "description": "List of feedback records" + "type": "array", + "title": "Rows" } }, - "required": ["feedback"] - }, - "FeedbackPurgeReq": { "type": "object", + "required": [ + "project_id", + "rows" + ], + "title": "TableSchemaForInsert" + }, + "TableUpdateReq": { "properties": { - "feedback_ids": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of feedback identifiers to delete" + "project_id": { + "type": "string", + "title": "Project Id" }, - "before": { + "base_digest": { "type": "string", - "format": "date-time", - "description": "Delete feedback before this timestamp" + "title": "Base Digest" + }, + "updates": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TableAppendSpec" + }, + { + "$ref": "#/components/schemas/TablePopSpec" + }, + { + "$ref": "#/components/schemas/TableInsertSpec" + } + ] + }, + "type": "array", + "title": "Updates" } - } - }, - "FeedbackPurgeRes": { + }, "type": "object", + "required": [ + "project_id", + "base_digest", + "updates" + ], + "title": "TableUpdateReq" + }, + "TableUpdateRes": { "properties": { - "deleted": { - "type": "integer", - "description": "Number of feedback records deleted" + "digest": { + "type": "string", + "title": "Digest" + }, + "updated_row_digests": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Updated Row Digests", + "description": "The digests of the rows that were updated" } }, - "required": ["deleted"] - }, - "FeedbackInfo": { "type": "object", + "required": [ + "digest" + ], + "title": "TableUpdateRes" + }, + "ValidationError": { "properties": { - "feedback_id": { - "type": "string", - "description": "Feedback identifier" - }, - "call_id": { - "type": "string", - "description": "Associated call identifier" - }, - "feedback_type": { - "type": "string", - "description": "Type of feedback" - }, - "value": { - "type": "object", - "description": "Feedback value" + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" }, - "note": { + "msg": { "type": "string", - "description": "Additional feedback note" + "title": "Message" }, - "created_at": { + "type": { "type": "string", - "format": "date-time", - "description": "Creation timestamp" + "title": "Error Type" } }, - "required": ["feedback_id", "call_id", "feedback_type", "value"] + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + } + }, + "securitySchemes": { + "HTTPBasic": { + "type": "http", + "scheme": "basic" } } }