From c4ab10e50fa982c3c0a4f9a7044ad33f3392a17f Mon Sep 17 00:00:00 2001 From: "braintrust-bot[bot]" <215900051+braintrust-bot[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 17:29:01 +0000 Subject: [PATCH] chore: sync OpenAPI spec --- openapi/spec.json | 8029 ++++++++++++++++++++++++++++++++++----------- openapi/spec.yaml | 3417 +++++++++++++++++-- 2 files changed, 9201 insertions(+), 2245 deletions(-) diff --git a/openapi/spec.json b/openapi/spec.json index 750f8bc..fa9f4e5 100644 --- a/openapi/spec.json +++ b/openapi/spec.json @@ -64,6 +64,11 @@ "format": "uuid", "description": "Group id" }, + "ProjectGroupIdParam": { + "type": "string", + "format": "uuid", + "description": "ProjectGroup id" + }, "AclIdParam": { "type": "string", "format": "uuid", @@ -74,11 +79,21 @@ "format": "uuid", "description": "User id" }, + "AgentIdParam": { + "type": "string", + "format": "uuid", + "description": "Agent id" + }, "ProjectAutomationIdParam": { "type": "string", "format": "uuid", "description": "ProjectAutomation id" }, + "OrgAutomationIdParam": { + "type": "string", + "format": "uuid", + "description": "OrgAutomation id" + }, "ProjectScoreIdParam": { "type": "string", "format": "uuid", @@ -172,10 +187,22 @@ "type": "string", "description": "Name of the group to search for" }, + "ProjectGroupName": { + "type": "string", + "description": "Name of the project_group to search for" + }, + "AgentName": { + "type": "string", + "description": "Name of the agent to search for" + }, "ProjectAutomationName": { "type": "string", "description": "Name of the project_automation to search for" }, + "OrgAutomationName": { + "type": "string", + "description": "Name of the org_automation to search for" + }, "ProjectScoreName": { "type": "string", "description": "Name of the project_score to search for" @@ -387,7 +414,9 @@ "role", "org_member", "project_log", - "org_project" + "org_project", + "org_audit_logs", + "project_group" ], "description": "The object type that the ACL applies to" }, @@ -409,7 +438,9 @@ "role", "org_member", "project_log", - "org_project" + "org_project", + "org_audit_logs", + "project_group" ], "description": "The object type that the ACL applies to" }, @@ -455,7 +486,9 @@ "role", "org_member", "project_log", - "org_project" + "org_project", + "org_audit_logs", + "project_group" ], "description": "The object type that the ACL applies to" }, @@ -664,6 +697,11 @@ "nullable": true, "description": "If true, disable real-time queries for this project. This can improve query performance for high-volume logs." }, + "monitor_charts_use_metrics_start": { + "type": "boolean", + "nullable": true, + "description": "If true, use metrics.start rather than created for monitor chart time bucket dimensions." + }, "default_preprocessor": { "$ref": "#/components/schemas/NullableSavedFunctionId" } @@ -3237,6 +3275,13 @@ "enum": [ "ephemeral" ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] } }, "required": [ @@ -3269,6 +3314,13 @@ "enum": [ "ephemeral" ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] } }, "required": [ @@ -3325,6 +3377,27 @@ "enum": [ "image_url" ] + }, + "cache_control": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ephemeral" + ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] + } + }, + "required": [ + "type" + ] } }, "required": [ @@ -3359,6 +3432,27 @@ "enum": [ "file" ] + }, + "cache_control": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ephemeral" + ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] + } + }, + "required": [ + "type" + ] } }, "required": [ @@ -4121,6 +4215,10 @@ }, "position": { "type": "string" + }, + "endpoint_name": { + "type": "string", + "nullable": true } } }, @@ -4156,6 +4254,10 @@ "allow_no_match": { "type": "boolean", "description": "If true, adds a 'No match' option. When selected, no tag is deposited." + }, + "allow_skip": { + "type": "boolean", + "description": "If true, adds a 'Skip' option. When selected, the scorer returns null." } }, "required": [ @@ -4163,6 +4265,64 @@ "use_cot" ] }, + "PreprocessorSavedFunctionId": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ] + }, + "id": { + "type": "string" + }, + "version": { + "type": "string", + "description": "The version of the function" + } + }, + "required": [ + "type", + "id" + ], + "title": "function" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "global" + ] + }, + "name": { + "type": "string" + }, + "function_type": { + "type": "string", + "enum": [ + "preprocessor" + ], + "default": "preprocessor", + "description": "The type of global function. Defaults to 'preprocessor'." + } + }, + "required": [ + "type", + "name" + ], + "title": "preprocessor_global" + }, + { + "type": "null" + } + ], + "description": "For prompt-backed scorers: the preprocessor function to use for trace template variables. Set to null to disable preprocessing. If omitted, the traced project's default preprocessor will be used, falling back to the global 'thread' preprocessor." + }, "PromptDataNullish": { "type": "object", "nullable": true, @@ -4176,6 +4336,9 @@ "parser": { "$ref": "#/components/schemas/PromptParserNullish" }, + "preprocessor": { + "$ref": "#/components/schemas/PreprocessorSavedFunctionId" + }, "tool_functions": { "type": "array", "nullable": true, @@ -4883,6 +5046,123 @@ } } }, + "ProjectGroup": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the project group" + }, + "org_id": { + "type": "string", + "format": "uuid", + "description": "Unique id for the organization that the project group belongs under\n\nIt is forbidden to change the org after creating a project group" + }, + "user_id": { + "type": "string", + "nullable": true, + "format": "uuid", + "description": "Identifies the user who created the project group" + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of project group creation" + }, + "name": { + "type": "string", + "description": "Name of the project group" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the project group" + }, + "deleted_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of project group deletion, or null if the project group is still active" + }, + "member_projects": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 10000, + "description": "Sorted ids of active projects in this project group" + } + }, + "required": [ + "id", + "org_id", + "name", + "member_projects" + ], + "description": "A project group is a collection of projects which can inherit access from project-group ACLs" + }, + "CreateProjectGroup": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "description": "Name of the project group" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the project group" + }, + "org_name": { + "type": "string", + "nullable": true, + "description": "For nearly all users, this parameter should be unnecessary. But in the rare case that your API key belongs to multiple organizations, you may specify the name of the organization the project group belongs in." + } + }, + "required": [ + "name" + ] + }, + "PatchProjectGroup": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "minLength": 1, + "description": "Name of the project group" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the project group" + }, + "add_member_projects": { + "type": "array", + "nullable": true, + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 1000, + "description": "A list of project IDs to add to the project group" + }, + "remove_member_projects": { + "type": "array", + "nullable": true, + "items": { + "type": "string", + "format": "uuid" + }, + "maxItems": 1000, + "description": "A list of project IDs to remove from the project group" + } + } + }, "Acl": { "type": "object", "properties": { @@ -5072,50 +5352,165 @@ "id" ] }, - "AutomationStatus": { - "type": "string", - "enum": [ - "active", - "paused" - ], - "description": "Whether the automation is active or paused." - }, - "SpanScope": { + "Agent": { "type": "object", "properties": { - "type": { + "id": { "type": "string", - "enum": [ - "span" - ] - } - }, - "required": [ - "type" - ], - "description": "Process individual spans" - }, - "TraceScope": { - "type": "object", - "properties": { - "type": { + "format": "uuid", + "description": "Unique identifier for the agent" + }, + "project_id": { "type": "string", - "enum": [ - "trace" - ] + "format": "uuid", + "description": "Unique identifier for the project that the agent belongs under" }, - "idle_seconds": { - "type": "number", - "description": "Consider trace complete after this many seconds of inactivity (default: 30)" - } - }, - "required": [ - "type" - ], - "description": "Process entire traces (all spans sharing the same root_span_id)" - }, - "GroupScope": { - "type": "object", + "user_id": { + "type": "string", + "format": "uuid" + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of agent creation" + }, + "name": { + "type": "string", + "description": "Name of the agent. Within a project, agent names are unique" + }, + "slug": { + "type": "string", + "description": "Stable, URL-safe identifier for the agent, unique within its project." + }, + "kind": { + "type": "string", + "description": "Agent classification: 'custom' for customer-defined agents, 'loop' for built-in Loop agents." + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the agent" + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "User-controlled metadata about the agent" + } + }, + "required": [ + "id", + "project_id", + "user_id", + "name", + "slug", + "kind" + ], + "description": "An agent is a project-scoped durable object that identifies an AI agent or service emitting spans" + }, + "CreateAgent": { + "type": "object", + "properties": { + "project_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the project that the agent belongs under" + }, + "name": { + "type": "string", + "description": "Name of the agent. Within a project, agent names are unique" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the agent" + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "User-controlled metadata about the agent" + } + }, + "required": [ + "project_id", + "name" + ], + "description": "An agent is a project-scoped durable object that identifies an AI agent or service emitting spans" + }, + "PatchAgent": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "Name of the agent. Within a project, agent names are unique" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the agent" + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "User-controlled metadata about the agent" + } + }, + "description": "An agent is a project-scoped durable object that identifies an AI agent or service emitting spans" + }, + "AutomationStatus": { + "type": "string", + "enum": [ + "active", + "paused" + ], + "description": "Whether the automation is active or paused." + }, + "SpanScope": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "span" + ] + } + }, + "required": [ + "type" + ], + "description": "Process individual spans" + }, + "TraceScope": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "trace" + ] + }, + "idle_seconds": { + "type": "number", + "description": "Consider trace complete after this many seconds of inactivity (default: 30)" + } + }, + "required": [ + "type" + ], + "description": "Process entire traces (all spans sharing the same root_span_id)" + }, + "GroupScope": { + "type": "object", "properties": { "type": { "type": "string", @@ -5167,114 +5562,471 @@ ], "description": "The object type that the retention policy applies to" }, - "TopicAutomationFacetModel": { - "type": "string", - "nullable": true, - "enum": [ - "brain-facet-latest", - "brain-facet-1", - "brain-facet-2", - null - ], - "description": "Optional facet model override for topic automation" - }, - "TopicMapFunctionAutomation": { + "WindowedAutomationConfig": { "type": "object", "properties": { - "function": { - "allOf": [ - { - "$ref": "#/components/schemas/SavedFunctionId" - }, - { - "anyOf": [ + "event_type": { + "type": "string", + "enum": [ + "windowed" + ], + "description": "The type of automation." + }, + "product_origin": { + "type": "string", + "nullable": true, + "enum": [ + "patterns", + null + ], + "description": "The product surface that created and manages the automation" + }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "threshold": { + "type": "object", + "properties": { + "calculation": { + "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "function" + "btql" ] }, - "id": { - "type": "string" - }, - "version": { + "btql_query": { "type": "string", - "description": "The version of the function" + "minLength": 1, + "description": "A project-scoped BTQL or SQL query without runtime-owned evaluation time bounds" + }, + "output": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "scalar" + ] + }, + "value_column": { + "type": "string", + "minLength": 1, + "description": "The numeric result column produced by the query" + } + }, + "required": [ + "type", + "value_column" + ] } }, "required": [ "type", - "id" - ], - "title": "function" - }, - { + "btql_query", + "output" + ] + } + ], + "description": "The calculation evaluated for each window" + }, + "policy": { + "type": "object", + "properties": { + "condition": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "global" + "threshold" ] }, - "name": { - "type": "string" + "operator": { + "type": "string", + "enum": [ + "lt", + "lte", + "gt", + "gte", + "eq", + "neq" + ] }, - "function_type": { - "$ref": "#/components/schemas/FunctionTypeEnum" + "threshold": { + "type": "number" } }, "required": [ "type", - "name" + "operator", + "threshold" + ] + }, + "pending_seconds": { + "type": "integer", + "minimum": 0, + "maximum": 2592000, + "description": "How long the condition must remain breached before firing" + }, + "no_data_behavior": { + "type": "string", + "enum": [ + "keep_last", + "resolve", + "alert" ], - "title": "global" + "description": "How the lifecycle changes when the calculation returns no data" + }, + "renotify_interval_seconds": { + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 2592000, + "description": "Optional reminder interval while the automation is firing" + }, + "notify_on_recovery": { + "type": "boolean", + "default": true, + "description": "Whether to deliver actions when a firing automation recovers" } + }, + "required": [ + "condition", + "pending_seconds", + "no_data_behavior" ], - "description": "Topic map function" - } - ] - }, - "btql_filter": { - "type": "string", - "nullable": true, - "description": "Per-topic-map BTQL filter. For trace scope, a topic map runs when max(filter) over the trace is truthy. For span scope, it runs when the current span matches." - } - }, - "required": [ - "function" - ] - }, - "TopicAutomationDataScope": { - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "project_logs" - ] + "description": "The lifecycle policy applied to each calculation result" } }, "required": [ - "type" - ] + "calculation", + "policy" + ], + "description": "Optional calculation and lifecycle policy that gate scheduled delivery" }, - { + "window": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "project_experiments" - ] - } - }, - "required": [ + "window_seconds": { + "type": "integer", + "minimum": 1, + "maximum": 2592000, + "description": "How much recent data each scheduled run covers" + }, + "schedule": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "interval" + ] + }, + "evaluation_interval_seconds": { + "type": "integer", + "minimum": 1, + "maximum": 2592000, + "description": "How often the automation runs" + } + }, + "required": [ + "type", + "evaluation_interval_seconds" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "cron" + ] + }, + "cron_expression": { + "type": "string", + "minLength": 1, + "description": "A standard five-field cron expression (minute hour day-of-month month day-of-week) controlling when the automation runs" + }, + "timezone": { + "type": "string", + "nullable": true, + "minLength": 1, + "description": "IANA timezone used to interpret the cron expression (defaults to UTC)" + } + }, + "required": [ + "type", + "cron_expression" + ] + } + ], + "description": "How often the windowed automation runs: at a fixed interval or on a cron schedule" + }, + "evaluation_delay_seconds": { + "type": "integer", + "minimum": 0, + "maximum": 2592000, + "description": "How far behind the present each evaluation window ends" + } + }, + "required": [ + "window_seconds", + "schedule", + "evaluation_delay_seconds" + ] + }, + "loop": { + "type": "object", + "properties": { + "prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for the Loop agent" + }, + "include_trigger_input": { + "type": "boolean", + "default": false, + "description": "Whether to include the automation trigger payload as input" + }, + "agent_slug": { + "type": "string", + "minLength": 1, + "description": "The Loop agent to run" + }, + "auto_approve_tools": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "default": [], + "description": "Write tools that may run without interactive approval" + }, + "harness": { + "type": "string", + "enum": [ + "native", + "codex", + "claude-code" + ] + }, + "model": { + "type": "string", + "minLength": 1 + }, + "reasoning_effort": { + "type": "string", + "enum": [ + "none", + "minimal", + "low", + "medium", + "high", + "xhigh", + "max" + ] + } + }, + "required": [ + "prompt", + "agent_slug" + ], + "description": "Optional Loop agent to run for each triggered window" + }, + "actions": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "webhook" + ], + "description": "The type of action to take" + }, + "url": { + "type": "string", + "description": "The webhook URL to send the request to" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" + } + }, + "required": [ + "type", + "url" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "slack" + ], + "description": "The type of action to take" + }, + "workspace_id": { + "type": "string", + "description": "The Slack workspace ID to post to" + }, + "channel": { + "type": "string", + "description": "The Slack channel ID to post to" + }, + "message_template": { + "type": "string", + "description": "Custom message template for the alert" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" + } + }, + "required": [ + "type", + "workspace_id", + "channel" + ] + } + ], + "description": "A delivery action available to an automation" + }, + "maxItems": 20, + "default": [], + "description": "Delivery actions exposed to Loop as tools, or run directly when Loop is not configured" + } + }, + "required": [ + "event_type", + "window" + ] + }, + "TopicAutomationFacetModel": { + "type": "string", + "nullable": true, + "enum": [ + "brain-facet-latest", + "brain-facet-1", + "brain-facet-2", + null + ], + "description": "Optional facet model override for topic automation" + }, + "TopicMapFunctionAutomation": { + "type": "object", + "properties": { + "function": { + "allOf": [ + { + "$ref": "#/components/schemas/SavedFunctionId" + }, + { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ] + }, + "id": { + "type": "string" + }, + "version": { + "type": "string", + "description": "The version of the function" + } + }, + "required": [ + "type", + "id" + ], + "title": "function" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "global" + ] + }, + "name": { + "type": "string" + }, + "function_type": { + "$ref": "#/components/schemas/FunctionTypeEnum" + } + }, + "required": [ + "type", + "name" + ], + "title": "global" + } + ], + "description": "Topic map function" + } + ] + }, + "btql_filter": { + "type": "string", + "nullable": true, + "description": "Per-topic-map BTQL filter. For trace scope, a topic map runs when max(filter) over the trace is truthy. For span scope, it runs when the current span matches." + } + }, + "required": [ + "function" + ] + }, + "TopicAutomationDataScope": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "project_logs" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "project_experiments" + ] + } + }, + "required": [ "type" ] }, @@ -5462,26 +6214,103 @@ "topic_map_functions" ] }, - "ProjectAutomation": { + "TopicDigestAutomationConfig": { "type": "object", "properties": { - "id": { + "event_type": { "type": "string", - "format": "uuid", - "description": "Unique identifier for the project automation" + "enum": [ + "topic_digest" + ], + "description": "The type of automation." }, - "project_id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the project that the project automation belongs under" + "status": { + "$ref": "#/components/schemas/AutomationStatus" }, - "user_id": { - "type": "string", - "nullable": true, - "format": "uuid", - "description": "Identifies the user who created the project automation" + "window_seconds": { + "type": "integer", + "minimum": 3600, + "maximum": 2592000, + "default": 86400, + "description": "How much recent history to include in each digest" }, - "created": { + "scheduled_time_minutes_utc": { + "type": "integer", + "minimum": 0, + "maximum": 1439, + "description": "Minutes after midnight UTC when the digest should be sent" + }, + "action": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "slack" + ], + "description": "The type of action to take" + }, + "workspace_id": { + "type": "string", + "description": "The Slack workspace ID to post to" + }, + "channel": { + "type": "string", + "description": "The Slack channel ID to post to" + }, + "message_template": { + "type": "string", + "description": "Custom message template for the alert" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" + } + }, + "required": [ + "type", + "workspace_id", + "channel" + ], + "description": "The Slack action to take when the digest is sent" + }, + "topic_map_function_ids": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "Optional topic map function IDs to include in the digest" + } + }, + "required": [ + "event_type", + "scheduled_time_minutes_utc", + "action" + ] + }, + "ProjectAutomation": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the project automation" + }, + "project_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the project that the project automation belongs under" + }, + "user_id": { + "type": "string", + "nullable": true, + "format": "uuid", + "description": "Identifies the user who created the project automation" + }, + "created": { "type": "string", "nullable": true, "format": "date-time", @@ -5508,6 +6337,9 @@ ], "description": "The type of automation." }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, "btql_filter": { "type": "string", "description": "BTQL filter to identify rows for the automation rule" @@ -5533,6 +6365,12 @@ "url": { "type": "string", "description": "The webhook URL to send the request to" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -5561,6 +6399,12 @@ "message_template": { "type": "string", "description": "Custom message template for the alert" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -5742,6 +6586,67 @@ "credentials" ] }, + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "enum": [ + "async_query" + ], + "description": "The type of automation." + }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "created_by_user_id": { + "type": "string", + "format": "uuid", + "description": "The user who submitted the async query" + }, + "object_type": { + "type": "string", + "enum": [ + "project_logs", + "experiment", + "dataset", + "playground_logs" + ], + "description": "The source object type for the async query" + }, + "object_id": { + "type": "string", + "description": "The source object ID for the async query" + }, + "query": { + "type": "string", + "description": "The SQL query to execute asynchronously" + }, + "format": { + "type": "string", + "enum": [ + "jsonl" + ], + "description": "The materialized result format" + }, + "batch_size": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 100000, + "description": "The maximum number of result rows to write per async query batch" + } + }, + "required": [ + "event_type", + "created_by_user_id", + "object_type", + "object_id", + "query", + "format" + ] + }, { "type": "object", "properties": { @@ -5756,7 +6661,7 @@ "$ref": "#/components/schemas/RetentionObjectType" }, "retention_days": { - "type": "number", + "type": "integer", "minimum": 0, "description": "The number of days to retain the object" } @@ -5777,6 +6682,9 @@ ], "description": "The type of automation." }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, "environment_filter": { "type": "array", "items": { @@ -5799,6 +6707,12 @@ "url": { "type": "string", "description": "The webhook URL to send the request to" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -5827,6 +6741,12 @@ "message_template": { "type": "string", "description": "Custom message template for the alert" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -5844,8 +6764,14 @@ "action" ] }, + { + "$ref": "#/components/schemas/WindowedAutomationConfig" + }, { "$ref": "#/components/schemas/TopicAutomationConfig" + }, + { + "$ref": "#/components/schemas/TopicDigestAutomationConfig" } ], "description": "The configuration for the automation rule" @@ -5887,6 +6813,9 @@ ], "description": "The type of automation." }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, "btql_filter": { "type": "string", "description": "BTQL filter to identify rows for the automation rule" @@ -5912,6 +6841,12 @@ "url": { "type": "string", "description": "The webhook URL to send the request to" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -5940,6 +6875,12 @@ "message_template": { "type": "string", "description": "Custom message template for the alert" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -6121,6 +7062,67 @@ "credentials" ] }, + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "enum": [ + "async_query" + ], + "description": "The type of automation." + }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "created_by_user_id": { + "type": "string", + "format": "uuid", + "description": "The user who submitted the async query" + }, + "object_type": { + "type": "string", + "enum": [ + "project_logs", + "experiment", + "dataset", + "playground_logs" + ], + "description": "The source object type for the async query" + }, + "object_id": { + "type": "string", + "description": "The source object ID for the async query" + }, + "query": { + "type": "string", + "description": "The SQL query to execute asynchronously" + }, + "format": { + "type": "string", + "enum": [ + "jsonl" + ], + "description": "The materialized result format" + }, + "batch_size": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 100000, + "description": "The maximum number of result rows to write per async query batch" + } + }, + "required": [ + "event_type", + "created_by_user_id", + "object_type", + "object_id", + "query", + "format" + ] + }, { "type": "object", "properties": { @@ -6135,7 +7137,7 @@ "$ref": "#/components/schemas/RetentionObjectType" }, "retention_days": { - "type": "number", + "type": "integer", "minimum": 0, "description": "The number of days to retain the object" } @@ -6156,6 +7158,9 @@ ], "description": "The type of automation." }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, "environment_filter": { "type": "array", "items": { @@ -6178,6 +7183,12 @@ "url": { "type": "string", "description": "The webhook URL to send the request to" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -6206,6 +7217,12 @@ "message_template": { "type": "string", "description": "Custom message template for the alert" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -6223,8 +7240,14 @@ "action" ] }, + { + "$ref": "#/components/schemas/WindowedAutomationConfig" + }, { "$ref": "#/components/schemas/TopicAutomationConfig" + }, + { + "$ref": "#/components/schemas/TopicDigestAutomationConfig" } ], "description": "The configuration for the automation rule" @@ -6261,6 +7284,9 @@ ], "description": "The type of automation." }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, "btql_filter": { "type": "string", "description": "BTQL filter to identify rows for the automation rule" @@ -6286,6 +7312,12 @@ "url": { "type": "string", "description": "The webhook URL to send the request to" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -6314,6 +7346,12 @@ "message_template": { "type": "string", "description": "Custom message template for the alert" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -6495,6 +7533,67 @@ "credentials" ] }, + { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "enum": [ + "async_query" + ], + "description": "The type of automation." + }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "created_by_user_id": { + "type": "string", + "format": "uuid", + "description": "The user who submitted the async query" + }, + "object_type": { + "type": "string", + "enum": [ + "project_logs", + "experiment", + "dataset", + "playground_logs" + ], + "description": "The source object type for the async query" + }, + "object_id": { + "type": "string", + "description": "The source object ID for the async query" + }, + "query": { + "type": "string", + "description": "The SQL query to execute asynchronously" + }, + "format": { + "type": "string", + "enum": [ + "jsonl" + ], + "description": "The materialized result format" + }, + "batch_size": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "maximum": 100000, + "description": "The maximum number of result rows to write per async query batch" + } + }, + "required": [ + "event_type", + "created_by_user_id", + "object_type", + "object_id", + "query", + "format" + ] + }, { "type": "object", "properties": { @@ -6509,7 +7608,7 @@ "$ref": "#/components/schemas/RetentionObjectType" }, "retention_days": { - "type": "number", + "type": "integer", "minimum": 0, "description": "The number of days to retain the object" } @@ -6530,6 +7629,9 @@ ], "description": "The type of automation." }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, "environment_filter": { "type": "array", "items": { @@ -6552,6 +7654,12 @@ "url": { "type": "string", "description": "The webhook URL to send the request to" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -6580,6 +7688,12 @@ "message_template": { "type": "string", "description": "Custom message template for the alert" + }, + "formatting_prompt": { + "type": "string", + "minLength": 1, + "maxLength": 10000, + "description": "Instructions for Loop to format content sent to this destination" } }, "required": [ @@ -6597,9 +7711,15 @@ "action" ] }, + { + "$ref": "#/components/schemas/WindowedAutomationConfig" + }, { "$ref": "#/components/schemas/TopicAutomationConfig" }, + { + "$ref": "#/components/schemas/TopicDigestAutomationConfig" + }, { "nullable": true } @@ -6608,21 +7728,181 @@ } } }, - "ProjectScoreCategory": { + "OrgAutomation": { "type": "object", "properties": { - "name": { + "id": { "type": "string", - "description": "Name of the category" + "format": "uuid", + "description": "Unique identifier for the project automation" }, - "value": { - "type": "number", - "description": "Numerical value of the category. Must be between 0 and 1, inclusive" - } - }, - "required": [ - "name", - "value" + "org_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the organization that the org automation belongs under" + }, + "user_id": { + "type": "string", + "nullable": true, + "format": "uuid", + "description": "Identifies the user who created the project automation" + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of project automation creation" + }, + "name": { + "type": "string", + "description": "Name of the project automation" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the project automation" + }, + "config": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "enum": [ + "retention" + ], + "description": "The type of automation." + }, + "object_type": { + "$ref": "#/components/schemas/RetentionObjectType" + }, + "retention_days": { + "type": "integer", + "minimum": 0, + "description": "The number of days to retain the object" + } + }, + "required": [ + "event_type", + "object_type", + "retention_days" + ], + "description": "The configuration for the org automation rule" + } + }, + "required": [ + "id", + "org_id", + "name", + "config" + ] + }, + "CreateOrgAutomation": { + "type": "object", + "properties": { + "org_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the organization that the org automation belongs under" + }, + "name": { + "type": "string", + "description": "Name of the project automation" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the project automation" + }, + "config": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "enum": [ + "retention" + ], + "description": "The type of automation." + }, + "object_type": { + "$ref": "#/components/schemas/RetentionObjectType" + }, + "retention_days": { + "type": "integer", + "minimum": 0, + "description": "The number of days to retain the object" + } + }, + "required": [ + "event_type", + "object_type", + "retention_days" + ], + "description": "The configuration for the org automation rule" + } + }, + "required": [ + "org_id", + "name", + "config" + ] + }, + "PatchOrgAutomation": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "Name of the project automation" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the project automation" + }, + "config": { + "type": "object", + "nullable": true, + "properties": { + "event_type": { + "type": "string", + "enum": [ + "retention" + ], + "description": "The type of automation." + }, + "object_type": { + "$ref": "#/components/schemas/RetentionObjectType" + }, + "retention_days": { + "type": "integer", + "minimum": 0, + "description": "The number of days to retain the object" + } + }, + "required": [ + "event_type", + "object_type", + "retention_days" + ], + "description": "The configuration for the org automation rule" + } + } + }, + "ProjectScoreCategory": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the category" + }, + "value": { + "type": "number", + "description": "Numerical value of the category. Must be between 0 and 1, inclusive" + } + }, + "required": [ + "name", + "value" ], "description": "For categorical-type project scores, defines a single category" }, @@ -6664,6 +7944,9 @@ "type": "object", "nullable": true, "properties": { + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, "sampling_rate": { "type": "number", "minimum": 0, @@ -6768,7 +8051,7 @@ "type": "null" } ], - "description": "The scope at which to run the functions. Defaults to span-level execution. Trace/group scope requires all functions to be facets." + "description": "The scope at which to run the functions. Defaults to span-level execution." } }, "required": [ @@ -6776,6 +8059,48 @@ "scorers" ] }, + "ProjectScoreCondition": { + "type": "object", + "nullable": true, + "properties": { + "when": { + "type": "object", + "properties": { + "clauses": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "subspan_clauses": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "trace_clauses": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + }, + "behavior": { + "type": "string", + "enum": [ + "hidden" + ], + "default": "hidden" + } + }, + "required": [ + "when" + ] + }, "ProjectScoreConfig": { "type": "object", "nullable": true, @@ -6788,8 +8113,43 @@ "type": "string", "nullable": true }, + "visibility": { + "type": "object", + "nullable": true, + "properties": { + "users": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "groups": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + }, "online": { "$ref": "#/components/schemas/OnlineScoreConfig" + }, + "condition": { + "$ref": "#/components/schemas/ProjectScoreCondition" + }, + "object_types": { + "type": "array", + "nullable": true, + "items": { + "type": "string", + "enum": [ + "project_logs", + "dataset", + "experiment" + ] + } } } }, @@ -7809,31 +9169,98 @@ "description": "This feature is preliminary and unsupported.", "title": "graph" }, - "FacetData": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "facet" - ] - }, - "preprocessor": { - "allOf": [ - { - "$ref": "#/components/schemas/NullableSavedFunctionId" + "FacetPreprocessorId": { + "anyOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ] }, - { - "description": "The preprocessor function to use for facet extraction. If not provided, the project default preprocessor will be used, falling back to the global 'thread' preprocessor." + "id": { + "type": "string" + }, + "version": { + "type": "string", + "description": "The version of the function" } - ] + }, + "required": [ + "type", + "id" + ], + "title": "function" }, - "prompt": { - "type": "string", - "description": "The prompt to use for LLM extraction. The preprocessed text will be provided as context." + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "global" + ] + }, + "name": { + "type": "string" + }, + "function_type": { + "$ref": "#/components/schemas/FunctionTypeEnum" + } + }, + "required": [ + "type", + "name" + ], + "title": "global" }, - "model": { - "type": "string", + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "inline" + ] + }, + "code": { + "type": "string", + "minLength": 1, + "description": "The complete JavaScript preprocessor implementation, including its handler." + } + }, + "required": [ + "type", + "code" + ], + "title": "preprocessor_inline" + }, + { + "type": "null" + } + ], + "description": "The saved, global, or inline preprocessor to use for facet extraction. If not provided, the project default preprocessor will be used, falling back to the global 'thread' preprocessor." + }, + "FacetData": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "facet" + ] + }, + "preprocessor": { + "$ref": "#/components/schemas/FacetPreprocessorId" + }, + "prompt": { + "type": "string", + "description": "The prompt to use for LLM extraction. The preprocessed text will be provided as context." + }, + "model": { + "type": "string", "description": "The model to use for facet extraction" }, "embedding_model": { @@ -7858,7 +9285,8 @@ "type": "string", "enum": [ "hdbscan", - "kmeans" + "kmeans", + "community" ] }, "dimension_reduction": { @@ -7943,9 +9371,25 @@ "type": "boolean", "description": "Whether new topic generation should ignore the previously saved report during reconciliation. Defaults to false when omitted." }, + "reconcile_mode": { + "type": "string", + "enum": [ + "evolve", + "names_only" + ], + "description": "How reconciliation carries the previous map forward: \"evolve\" re-routes new samples into the previous topics before naming; \"names_only\" keeps the fresh clustering and carries only topic ids/names. Defaults to \"names_only\" when omitted." + }, "distance_threshold": { "type": "number", "description": "Maximum distance to nearest centroid. If exceeded, returns no_match." + }, + "btql_filter": { + "type": "string", + "description": "Per-topic-map BTQL filter that was applied when this version was generated. Absent on versions generated before this was recorded." + }, + "automation_btql_filter": { + "type": "string", + "description": "Automation-level BTQL filter that was applied when this version was generated. Absent on versions generated before this was recorded." } }, "required": [ @@ -7964,14 +9408,7 @@ ] }, "preprocessor": { - "allOf": [ - { - "$ref": "#/components/schemas/NullableSavedFunctionId" - }, - { - "description": "The preprocessor function to use for facet extraction. If not provided, the project default preprocessor will be used, falling back to the global 'thread' preprocessor." - } - ] + "$ref": "#/components/schemas/FacetPreprocessorId" }, "facets": { "type": "array", @@ -8921,6 +10358,11 @@ }, "description": "Partial function definition to merge with the function being invoked. Fields are validated against the function type's schema at runtime. For facets: { preprocessor?, prompt?, model? }. For prompts: { model?, ... }." }, + "endpoint_name": { + "type": "string", + "nullable": true, + "description": "Name of the AI provider secret to pin this invocation to." + }, "version": { "type": "string", "description": "The version of the function" @@ -9190,6 +10632,28 @@ "value" ] }, + "pointSizeMetric": { + "type": "object", + "nullable": true, + "properties": { + "type": { + "type": "string", + "enum": [ + "none", + "score", + "metric", + "metadata" + ] + }, + "value": { + "type": "string" + } + }, + "required": [ + "type", + "value" + ] + }, "xAxisAggregation": { "type": "string", "nullable": true, @@ -9310,12 +10774,23 @@ "type": "string", "description": "Name of the view" }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the view" + }, "created": { "type": "string", "nullable": true, "format": "date-time", "description": "Date of view creation" }, + "updated_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of last view update" + }, "view_data": { "$ref": "#/components/schemas/ViewData" }, @@ -9382,6 +10857,11 @@ "type": "string", "description": "Name of the view" }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the view" + }, "view_data": { "$ref": "#/components/schemas/ViewData" }, @@ -9449,6 +10929,11 @@ "nullable": true, "description": "Name of the view" }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the view" + }, "view_data": { "$ref": "#/components/schemas/ViewData" }, @@ -9620,7 +11105,7 @@ "id" ] }, - "description": "If service accounts with tokens were created, this will contain the added users with their API keys" + "description": "The users who were added by this request. api_key and token_name are only present for the inline service-account create-and-mint compatibility path." } }, "required": [ @@ -9665,14 +11150,21 @@ "token_name": { "type": "string", "nullable": true, - "description": "Optional name of an initial service token to create for the new service account. When this field is set, the request must be authenticated with a service token that has organization-owner permissions, not a user API key." + "description": "Optional name of an initial service token to create for the new service account. This is a narrow compatibility carve-out only on PATCH /v1/organization/members. When this field is set, the request must be authenticated with a service token that has organization-owner permissions, not a user API key." + }, + "token_expires_in_seconds": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "description": "Number of seconds from now after which the initial service token should expire. If omitted, the token never expires." } }, "required": [ "name" ] }, - "description": "Service accounts to create. Any caller permitted to add organization members can create service accounts (but not necessarily their associated tokens)." + "description": "Service accounts to create. PATCH /v1/organization/members is the compatibility layer that accepts both plain service-account creation and the narrower token_name create-and-mint carve-out." }, "send_invite_emails": { "type": "boolean", @@ -9796,6 +11288,12 @@ "nullable": true, "format": "uuid", "description": "Unique identifier for the organization" + }, + "expires_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date at which the API key expires. If null, the key never expires." } }, "required": [ @@ -9847,6 +11345,12 @@ "format": "uuid", "description": "Unique identifier for the organization" }, + "expires_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date and time at which the service token expires. If null, the token never expires." + }, "key": { "type": "string", "description": "The raw service token. It will only be exposed this one time" @@ -9901,6 +11405,12 @@ "nullable": true, "format": "uuid", "description": "Unique identifier for the organization" + }, + "expires_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date and time at which the service token expires. If null, the token never expires." } }, "required": [ @@ -10549,6 +12059,9 @@ "parser": { "$ref": "#/components/schemas/PromptParserNullish" }, + "preprocessor": { + "$ref": "#/components/schemas/PreprocessorSavedFunctionId" + }, "tool_functions": { "type": "array", "nullable": true, @@ -11147,6 +12660,11 @@ } } } + }, + "endpoint_name": { + "type": "string", + "nullable": true, + "description": "Name of the AI provider secret to pin this run to." } }, "required": [ @@ -11221,6 +12739,15 @@ "name": "group_id", "in": "path" }, + "ProjectGroupIdParam": { + "schema": { + "$ref": "#/components/schemas/ProjectGroupIdParam" + }, + "required": true, + "description": "ProjectGroup id", + "name": "project_group_id", + "in": "path" + }, "AclIdParam": { "schema": { "$ref": "#/components/schemas/AclIdParam" @@ -11239,6 +12766,15 @@ "name": "user_id", "in": "path" }, + "AgentIdParam": { + "schema": { + "$ref": "#/components/schemas/AgentIdParam" + }, + "required": true, + "description": "Agent id", + "name": "agent_id", + "in": "path" + }, "ProjectAutomationIdParam": { "schema": { "$ref": "#/components/schemas/ProjectAutomationIdParam" @@ -11248,6 +12784,15 @@ "name": "project_automation_id", "in": "path" }, + "OrgAutomationIdParam": { + "schema": { + "$ref": "#/components/schemas/OrgAutomationIdParam" + }, + "required": true, + "description": "OrgAutomation id", + "name": "org_automation_id", + "in": "path" + }, "ProjectScoreIdParam": { "schema": { "$ref": "#/components/schemas/ProjectScoreIdParam" @@ -11435,6 +12980,26 @@ "in": "query", "allowReserved": true }, + "ProjectGroupName": { + "schema": { + "$ref": "#/components/schemas/ProjectGroupName" + }, + "required": false, + "description": "Name of the project_group to search for", + "name": "project_group_name", + "in": "query", + "allowReserved": true + }, + "AgentName": { + "schema": { + "$ref": "#/components/schemas/AgentName" + }, + "required": false, + "description": "Name of the agent to search for", + "name": "agent_name", + "in": "query", + "allowReserved": true + }, "ProjectAutomationName": { "schema": { "$ref": "#/components/schemas/ProjectAutomationName" @@ -11445,6 +13010,16 @@ "in": "query", "allowReserved": true }, + "OrgAutomationName": { + "schema": { + "$ref": "#/components/schemas/OrgAutomationName" + }, + "required": false, + "description": "Name of the org_automation to search for", + "name": "org_automation_name", + "in": "query", + "allowReserved": true + }, "ProjectScoreName": { "schema": { "$ref": "#/components/schemas/ProjectScoreName" @@ -11896,18 +13471,2372 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProject" + "$ref": "#/components/schemas/CreateProject" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new project object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "get": { + "operationId": "getProject", + "tags": [ + "Projects" + ], + "description": "List out all projects. The projects are sorted by creation date, with the most recently-created projects coming first", + "summary": "List projects", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/ProjectName" + }, + { + "$ref": "#/components/parameters/OrgName" + } + ], + "responses": { + "200": { + "description": "Returns a list of project objects", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Project" + }, + "description": "A list of project objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsProject", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/project`)", + "security": [], + "tags": [ + "CORS" + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/project/{project_id}": { + "get": { + "operationId": "getProjectId", + "tags": [ + "Projects" + ], + "description": "Get a project object by its id", + "summary": "Get project", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the project object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "patch": { + "operationId": "patchProjectId", + "tags": [ + "Projects" + ], + "description": "Partially update a project object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update project", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchProject" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the project object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "delete": { + "operationId": "deleteProjectId", + "tags": [ + "Projects" + ], + "description": "Delete a project object by its id", + "summary": "Delete project", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the deleted project object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsProjectId", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/project/{project_id}`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/project_logs/{project_id}/insert": { + "post": { + "operationId": "postProjectLogsIdInsert", + "tags": [ + "Logs" + ], + "description": "Insert a set of events into the project logs", + "summary": "Insert project logs events", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "requestBody": { + "description": "An array of project logs events to insert", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsertProjectLogsEventRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the inserted row ids", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsertEventsResponse" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsProjectLogsIdInsert", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/project_logs/{project_id}/insert`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/project_logs/{project_id}/fetch": { + "post": { + "operationId": "postProjectLogsIdFetch", + "tags": [ + "Logs" + ], + "description": "Fetch the events in a project logs. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch project logs (POST form)", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "requestBody": { + "description": "Filters for the fetch query", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchEventsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the fetched rows", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchProjectLogsEventsResponse" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "get": { + "operationId": "getProjectLogsIdFetch", + "tags": [ + "Logs" + ], + "description": "Fetch the events in a project logs. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch project logs (GET form)", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + }, + { + "$ref": "#/components/parameters/FetchLimitParam" + }, + { + "$ref": "#/components/parameters/MaxXactId" + }, + { + "$ref": "#/components/parameters/MaxRootSpanId" + }, + { + "$ref": "#/components/parameters/Version" + } + ], + "responses": { + "200": { + "description": "Returns the fetched rows", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchProjectLogsEventsResponse" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsProjectLogsIdFetch", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/project_logs/{project_id}/fetch`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/project_logs/{project_id}/feedback": { + "post": { + "operationId": "postProjectLogsIdFeedback", + "tags": [ + "Logs" + ], + "description": "Log feedback for a set of project logs events", + "summary": "Feedback for project logs events", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "requestBody": { + "description": "An array of feedback objects", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackProjectLogsEventRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Returns a success status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackResponseSchema" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsProjectLogsIdFeedback", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/project_logs/{project_id}/feedback`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/experiment": { + "post": { + "tags": [ + "Experiments" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "operationId": "postExperiment", + "description": "Create a new experiment. If there is an existing experiment in the project with the same name as the one specified in the request, will return the existing experiment unmodified", + "summary": "Create experiment", + "requestBody": { + "description": "Any desired information about the new experiment object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExperiment" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new experiment object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Experiment" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "get": { + "operationId": "getExperiment", + "tags": [ + "Experiments" + ], + "description": "List out all experiments. The experiments are sorted by creation date, with the most recently-created experiments coming first", + "summary": "List experiments", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AppLimitWithDefaultParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/ExperimentName" + }, + { + "$ref": "#/components/parameters/ProjectName" + }, + { + "$ref": "#/components/parameters/ProjectIdQuery" + }, + { + "$ref": "#/components/parameters/OrgName" + } + ], + "responses": { + "200": { + "description": "Returns a list of experiment objects", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Experiment" + }, + "description": "A list of experiment objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsExperiment", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/experiment`)", + "security": [], + "tags": [ + "CORS" + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/experiment/{experiment_id}": { + "get": { + "operationId": "getExperimentId", + "tags": [ + "Experiments" + ], + "description": "Get an experiment object by its id", + "summary": "Get experiment", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the experiment object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Experiment" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "patch": { + "operationId": "patchExperimentId", + "tags": [ + "Experiments" + ], + "description": "Partially update an experiment object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update experiment", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchExperiment" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the experiment object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Experiment" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "delete": { + "operationId": "deleteExperimentId", + "tags": [ + "Experiments" + ], + "description": "Delete an experiment object by its id", + "summary": "Delete experiment", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the deleted experiment object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Experiment" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsExperimentId", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/experiment/{experiment_id}`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/experiment/{experiment_id}/insert": { + "post": { + "operationId": "postExperimentIdInsert", + "tags": [ + "Experiments" + ], + "description": "Insert a set of events into the experiment", + "summary": "Insert experiment events", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], + "requestBody": { + "description": "An array of experiment events to insert", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsertExperimentEventRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the inserted row ids", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsertEventsResponse" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsExperimentIdInsert", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/experiment/{experiment_id}/insert`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/experiment/{experiment_id}/fetch": { + "post": { + "operationId": "postExperimentIdFetch", + "tags": [ + "Experiments" + ], + "description": "Fetch the events in an experiment. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch experiment (POST form)", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], + "requestBody": { + "description": "Filters for the fetch query", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchEventsRequest" } } } }, "responses": { "200": { - "description": "Returns the new project object", + "description": "Returns the fetched rows", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Project" + "$ref": "#/components/schemas/FetchExperimentEventsResponse" } } } @@ -11997,12 +15926,12 @@ } }, "get": { - "operationId": "getProject", + "operationId": "getExperimentIdFetch", "tags": [ - "Projects" + "Experiments" ], - "description": "List out all projects. The projects are sorted by creation date, with the most recently-created projects coming first", - "summary": "List projects", + "description": "Fetch the events in an experiment. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch experiment (GET form)", "security": [ { "bearerAuth": [] @@ -12011,44 +15940,216 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" + "$ref": "#/components/parameters/ExperimentIdParam" }, { - "$ref": "#/components/parameters/StartingAfter" + "$ref": "#/components/parameters/FetchLimitParam" }, { - "$ref": "#/components/parameters/EndingBefore" + "$ref": "#/components/parameters/MaxXactId" }, { - "$ref": "#/components/parameters/Ids" + "$ref": "#/components/parameters/MaxRootSpanId" }, { - "$ref": "#/components/parameters/ProjectName" + "$ref": "#/components/parameters/Version" + } + ], + "responses": { + "200": { + "description": "Returns the fetched rows", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchExperimentEventsResponse" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsExperimentIdFetch", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/experiment/{experiment_id}/fetch`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/experiment/{experiment_id}/feedback": { + "post": { + "operationId": "postExperimentIdFeedback", + "tags": [ + "Experiments" + ], + "description": "Log feedback for a set of experiment events", + "summary": "Feedback for experiment events", + "security": [ + { + "bearerAuth": [] }, + {} + ], + "parameters": [ { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/ExperimentIdParam" } ], + "requestBody": { + "description": "An array of feedback objects", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackExperimentEventRequest" + } + } + } + }, "responses": { "200": { - "description": "Returns a list of project objects", + "description": "Returns a success status", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Project" - }, - "description": "A list of project objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/FeedbackResponseSchema" } } } @@ -12138,13 +16239,18 @@ } }, "options": { - "operationId": "optionsProject", + "operationId": "optionsExperimentIdFeedback", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project`)", + "summary": "Enable CORS (`/v1/experiment/{experiment_id}/feedback`)", "security": [], "tags": [ "CORS" ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], "responses": { "200": { "description": "Response for CORS method", @@ -12195,32 +16301,37 @@ } } }, - "/v1/project/{project_id}": { + "/v1/experiment/{experiment_id}/summarize": { "get": { - "operationId": "getProjectId", + "operationId": "getExperimentIdSummarize", "tags": [ - "Projects" + "Experiments" ], - "description": "Get a project object by its id", - "summary": "Get project", + "description": "Summarize experiment", + "summary": "Summarize experiment", "security": [ { "bearerAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + }, + { + "$ref": "#/components/parameters/SummarizeScores" }, - {} - ], - "parameters": [ { - "$ref": "#/components/parameters/ProjectIdParam" + "$ref": "#/components/parameters/ComparisonExperimentId" } ], "responses": { "200": { - "description": "Returns the project object", + "description": "Experiment summary", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Project" + "$ref": "#/components/schemas/SummarizeExperimentResponse" } } } @@ -12309,42 +16420,101 @@ } } }, - "patch": { - "operationId": "patchProjectId", + "options": { + "operationId": "optionsExperimentIdSummarize", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/experiment/{experiment_id}/summarize`)", + "security": [], "tags": [ - "Projects" + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/dataset": { + "post": { + "tags": [ + "Datasets" ], - "description": "Partially update a project object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update project", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectIdParam" - } - ], + "operationId": "postDataset", + "description": "Create a new dataset. If there is an existing dataset in the project with the same name as the one specified in the request, will return the existing dataset unmodified", + "summary": "Create dataset", "requestBody": { - "description": "Fields to update", + "description": "Any desired information about the new dataset object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchProject" + "$ref": "#/components/schemas/CreateDataset" } } } }, "responses": { "200": { - "description": "Returns the project object", + "description": "Returns the new dataset object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Project" + "$ref": "#/components/schemas/Dataset" } } } @@ -12433,13 +16603,13 @@ } } }, - "delete": { - "operationId": "deleteProjectId", + "get": { + "operationId": "getDataset", "tags": [ - "Projects" + "Datasets" ], - "description": "Delete a project object by its id", - "summary": "Delete project", + "description": "List out all datasets. The datasets are sorted by creation date, with the most recently-created datasets coming first", + "summary": "List datasets", "security": [ { "bearerAuth": [] @@ -12448,16 +16618,50 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/DatasetName" + }, + { + "$ref": "#/components/parameters/ProjectName" + }, + { + "$ref": "#/components/parameters/ProjectIdQuery" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns the deleted project object", + "description": "Returns a list of dataset objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Project" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dataset" + }, + "description": "A list of dataset objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -12547,18 +16751,13 @@ } }, "options": { - "operationId": "optionsProjectId", + "operationId": "optionsDataset", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project/{project_id}`)", + "summary": "Enable CORS (`/v1/dataset`)", "security": [], "tags": [ "CORS" ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectIdParam" - } - ], "responses": { "200": { "description": "Response for CORS method", @@ -12609,14 +16808,14 @@ } } }, - "/v1/project_logs/{project_id}/insert": { - "post": { - "operationId": "postProjectLogsIdInsert", + "/v1/dataset/{dataset_id}": { + "get": { + "operationId": "getDatasetId", "tags": [ - "Logs" + "Datasets" ], - "description": "Insert a set of events into the project logs", - "summary": "Insert project logs events", + "description": "Get a dataset object by its id", + "summary": "Get dataset", "security": [ { "bearerAuth": [] @@ -12625,27 +16824,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectIdParam" + "$ref": "#/components/parameters/DatasetIdParam" } ], - "requestBody": { - "description": "An array of project logs events to insert", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertProjectLogsEventRequest" - } - } - } - }, "responses": { "200": { - "description": "Returns the inserted row ids", + "description": "Returns the dataset object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsertEventsResponse" + "$ref": "#/components/schemas/Dataset" } } } @@ -12680,107 +16868,45 @@ } } }, - "403": { - "description": "The API key doesn’t have permissions to perform the request", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "429": { - "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", - "headers": { - "Retry-After": { - "schema": { - "type": "string" - } - } - }, - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "500": { - "description": "Something went wrong on Braintrust's end. (These are rare.)", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - }, - "options": { - "operationId": "optionsProjectLogsIdInsert", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_logs/{project_id}/insert`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Headers": { + "application/json": { "schema": { - "type": "string" + "nullable": true } - }, - "Access-Control-Allow-Methods": { + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } - }, - "Access-Control-Allow-Origin": { + } + }, + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { "schema": { - "type": "string" + "nullable": true } } - }, - "content": {} + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -12795,16 +16921,14 @@ } } } - } - }, - "/v1/project_logs/{project_id}/fetch": { - "post": { - "operationId": "postProjectLogsIdFetch", + }, + "patch": { + "operationId": "patchDatasetId", "tags": [ - "Logs" + "Datasets" ], - "description": "Fetch the events in a project logs. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch project logs (POST form)", + "description": "Partially update a dataset object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update dataset", "security": [ { "bearerAuth": [] @@ -12813,27 +16937,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectIdParam" + "$ref": "#/components/parameters/DatasetIdParam" } ], "requestBody": { - "description": "Filters for the fetch query", + "description": "Fields to update", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchEventsRequest" + "$ref": "#/components/schemas/PatchDataset" } } } }, "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns the dataset object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchProjectLogsEventsResponse" + "$ref": "#/components/schemas/Dataset" } } } @@ -12922,13 +17046,13 @@ } } }, - "get": { - "operationId": "getProjectLogsIdFetch", + "delete": { + "operationId": "deleteDatasetId", "tags": [ - "Logs" + "Datasets" ], - "description": "Fetch the events in a project logs. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch project logs (GET form)", + "description": "Delete a dataset object by its id", + "summary": "Delete dataset", "security": [ { "bearerAuth": [] @@ -12937,28 +17061,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectIdParam" - }, - { - "$ref": "#/components/parameters/FetchLimitParam" - }, - { - "$ref": "#/components/parameters/MaxXactId" - }, - { - "$ref": "#/components/parameters/MaxRootSpanId" - }, - { - "$ref": "#/components/parameters/Version" + "$ref": "#/components/parameters/DatasetIdParam" } ], "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns the deleted dataset object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchProjectLogsEventsResponse" + "$ref": "#/components/schemas/Dataset" } } } @@ -13048,16 +17160,16 @@ } }, "options": { - "operationId": "optionsProjectLogsIdFetch", + "operationId": "optionsDatasetId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_logs/{project_id}/fetch`)", + "summary": "Enable CORS (`/v1/dataset/{dataset_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/ProjectIdParam" + "$ref": "#/components/parameters/DatasetIdParam" } ], "responses": { @@ -13110,14 +17222,14 @@ } } }, - "/v1/project_logs/{project_id}/feedback": { + "/v1/dataset/{dataset_id}/insert": { "post": { - "operationId": "postProjectLogsIdFeedback", + "operationId": "postDatasetIdInsert", "tags": [ - "Logs" + "Datasets" ], - "description": "Log feedback for a set of project logs events", - "summary": "Feedback for project logs events", + "description": "Insert a set of events into the dataset", + "summary": "Insert dataset events", "security": [ { "bearerAuth": [] @@ -13126,27 +17238,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectIdParam" + "$ref": "#/components/parameters/DatasetIdParam" } ], "requestBody": { - "description": "An array of feedback objects", + "description": "An array of dataset events to insert", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackProjectLogsEventRequest" + "$ref": "#/components/schemas/InsertDatasetEventRequest" } } } }, "responses": { "200": { - "description": "Returns a success status", + "description": "Returns the inserted row ids", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackResponseSchema" + "$ref": "#/components/schemas/InsertEventsResponse" } } } @@ -13236,16 +17348,16 @@ } }, "options": { - "operationId": "optionsProjectLogsIdFeedback", + "operationId": "optionsDatasetIdInsert", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_logs/{project_id}/feedback`)", + "summary": "Enable CORS (`/v1/dataset/{dataset_id}/insert`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/ProjectIdParam" + "$ref": "#/components/parameters/DatasetIdParam" } ], "responses": { @@ -13298,38 +17410,168 @@ } } }, - "/v1/experiment": { + "/v1/dataset/{dataset_id}/fetch": { "post": { + "operationId": "postDatasetIdFetch", "tags": [ - "Experiments" + "Datasets" + ], + "description": "Fetch the events in a dataset. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch dataset (POST form)", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/DatasetIdParam" + } + ], + "requestBody": { + "description": "Filters for the fetch query", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchEventsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the fetched rows", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchDatasetEventsResponse" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "get": { + "operationId": "getDatasetIdFetch", + "tags": [ + "Datasets" ], + "description": "Fetch the events in a dataset. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch dataset (GET form)", "security": [ { - "bearerAuth": [] + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/DatasetIdParam" + }, + { + "$ref": "#/components/parameters/FetchLimitParam" }, - {} - ], - "operationId": "postExperiment", - "description": "Create a new experiment. If there is an existing experiment in the project with the same name as the one specified in the request, will return the existing experiment unmodified", - "summary": "Create experiment", - "requestBody": { - "description": "Any desired information about the new experiment object", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateExperiment" - } - } + { + "$ref": "#/components/parameters/MaxXactId" + }, + { + "$ref": "#/components/parameters/MaxRootSpanId" + }, + { + "$ref": "#/components/parameters/Version" } - }, + ], "responses": { "200": { - "description": "Returns the new experiment object", + "description": "Returns the fetched rows", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Experiment" + "$ref": "#/components/schemas/FetchDatasetEventsResponse" } } } @@ -13418,13 +17660,77 @@ } } }, - "get": { - "operationId": "getExperiment", + "options": { + "operationId": "optionsDatasetIdFetch", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/dataset/{dataset_id}/fetch`)", + "security": [], "tags": [ - "Experiments" + "CORS" ], - "description": "List out all experiments. The experiments are sorted by creation date, with the most recently-created experiments coming first", - "summary": "List experiments", + "parameters": [ + { + "$ref": "#/components/parameters/DatasetIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/dataset/{dataset_id}/feedback": { + "post": { + "operationId": "postDatasetIdFeedback", + "tags": [ + "Datasets" + ], + "description": "Log feedback for a set of dataset events", + "summary": "Feedback for dataset events", "security": [ { "bearerAuth": [] @@ -13433,50 +17739,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitWithDefaultParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/ExperimentName" - }, - { - "$ref": "#/components/parameters/ProjectName" - }, - { - "$ref": "#/components/parameters/ProjectIdQuery" - }, - { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/DatasetIdParam" } ], + "requestBody": { + "description": "An array of feedback objects", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackDatasetEventRequest" + } + } + } + }, "responses": { "200": { - "description": "Returns a list of experiment objects", + "description": "Returns a success status", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Experiment" - }, - "description": "A list of experiment objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/FeedbackResponseSchema" } } } @@ -13566,13 +17849,18 @@ } }, "options": { - "operationId": "optionsExperiment", + "operationId": "optionsDatasetIdFeedback", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment`)", + "summary": "Enable CORS (`/v1/dataset/{dataset_id}/feedback`)", "security": [], "tags": [ "CORS" ], + "parameters": [ + { + "$ref": "#/components/parameters/DatasetIdParam" + } + ], "responses": { "200": { "description": "Response for CORS method", @@ -13623,32 +17911,34 @@ } } }, - "/v1/experiment/{experiment_id}": { + "/v1/dataset/{dataset_id}/summarize": { "get": { - "operationId": "getExperimentId", + "operationId": "getDatasetIdSummarize", "tags": [ - "Experiments" + "Datasets" ], - "description": "Get an experiment object by its id", - "summary": "Get experiment", + "description": "Summarize dataset", + "summary": "Summarize dataset", "security": [ { "bearerAuth": [] - }, - {} + } ], "parameters": [ { - "$ref": "#/components/parameters/ExperimentIdParam" + "$ref": "#/components/parameters/DatasetIdParam" + }, + { + "$ref": "#/components/parameters/SummarizeData" } ], "responses": { "200": { - "description": "Returns the experiment object", + "description": "Dataset summary", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Experiment" + "$ref": "#/components/schemas/SummarizeDatasetResponse" } } } @@ -13695,33 +17985,95 @@ "schema": { "nullable": true } - } - } - }, - "429": { - "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", - "headers": { - "Retry-After": { + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsDatasetIdSummarize", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/dataset/{dataset_id}/summarize`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/DatasetIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { "schema": { "type": "string" } - } - }, - "content": { - "text/plain": { + }, + "Access-Control-Allow-Origin": { "schema": { "type": "string" } }, - "application/json": { + "Access-Control-Max-Age": { "schema": { - "nullable": true + "type": "string" } } - } + }, + "content": {} }, - "500": { - "description": "Something went wrong on Braintrust's end. (These are rare.)", + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", "content": { "text/plain": { "schema": { @@ -13736,43 +18088,40 @@ } } } - }, - "patch": { - "operationId": "patchExperimentId", + } + }, + "/v1/prompt": { + "post": { "tags": [ - "Experiments" + "Prompts" ], - "description": "Partially update an experiment object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update experiment", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" - } - ], + "operationId": "postPrompt", + "description": "Create a new prompt. If there is an existing prompt in the project with the same slug as the one specified in the request, will return the existing prompt unmodified", + "summary": "Create prompt", "requestBody": { - "description": "Fields to update", + "description": "Any desired information about the new prompt object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchExperiment" + "$ref": "#/components/schemas/CreatePrompt" } } } }, "responses": { "200": { - "description": "Returns the experiment object", + "description": "Returns the new prompt object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Experiment" + "$ref": "#/components/schemas/Prompt" } } } @@ -13861,31 +18210,37 @@ } } }, - "delete": { - "operationId": "deleteExperimentId", + "put": { "tags": [ - "Experiments" + "Prompts" ], - "description": "Delete an experiment object by its id", - "summary": "Delete experiment", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" + "operationId": "putPrompt", + "description": "Create or replace prompt. If there is an existing prompt in the project with the same slug as the one specified in the request, will replace the existing prompt with the provided fields", + "summary": "Create or replace prompt", + "requestBody": { + "description": "Any desired information about the new prompt object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePrompt" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the deleted experiment object", + "description": "Returns the new prompt object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Experiment" + "$ref": "#/components/schemas/Prompt" } } } @@ -13974,77 +18329,13 @@ } } }, - "options": { - "operationId": "optionsExperimentId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment/{experiment_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/experiment/{experiment_id}/insert": { - "post": { - "operationId": "postExperimentIdInsert", + "get": { + "operationId": "getPrompt", "tags": [ - "Experiments" + "Prompts" ], - "description": "Insert a set of events into the experiment", - "summary": "Insert experiment events", + "description": "List out all prompts. The prompts are sorted by creation date, with the most recently-created prompts coming first", + "summary": "List prompts", "security": [ { "bearerAuth": [] @@ -14053,27 +18344,59 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ExperimentIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/PromptName" + }, + { + "$ref": "#/components/parameters/ProjectName" + }, + { + "$ref": "#/components/parameters/ProjectIdQuery" + }, + { + "$ref": "#/components/parameters/Slug" + }, + { + "$ref": "#/components/parameters/PromptVersion" + }, + { + "$ref": "#/components/parameters/PromptEnvironment" + }, + { + "$ref": "#/components/parameters/OrgName" } ], - "requestBody": { - "description": "An array of experiment events to insert", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InsertExperimentEventRequest" - } - } - } - }, "responses": { "200": { - "description": "Returns the inserted row ids", + "description": "Returns a list of prompt objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsertEventsResponse" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt" + }, + "description": "A list of prompt objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -14163,18 +18486,13 @@ } }, "options": { - "operationId": "optionsExperimentIdInsert", + "operationId": "optionsPrompt", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment/{experiment_id}/insert`)", + "summary": "Enable CORS (`/v1/prompt`)", "security": [], "tags": [ "CORS" ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" - } - ], "responses": { "200": { "description": "Response for CORS method", @@ -14225,14 +18543,14 @@ } } }, - "/v1/experiment/{experiment_id}/fetch": { - "post": { - "operationId": "postExperimentIdFetch", + "/v1/prompt/{prompt_id}": { + "get": { + "operationId": "getPromptId", "tags": [ - "Experiments" + "Prompts" ], - "description": "Fetch the events in an experiment. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch experiment (POST form)", + "description": "Get a prompt object by its id", + "summary": "Get prompt", "security": [ { "bearerAuth": [] @@ -14241,27 +18559,22 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ExperimentIdParam" - } - ], - "requestBody": { - "description": "Filters for the fetch query", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FetchEventsRequest" - } - } + "$ref": "#/components/parameters/PromptIdParam" + }, + { + "$ref": "#/components/parameters/PromptVersion" + }, + { + "$ref": "#/components/parameters/PromptEnvironment" } - }, + ], "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns the prompt object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchExperimentEventsResponse" + "$ref": "#/components/schemas/Prompt" } } } @@ -14350,13 +18663,13 @@ } } }, - "get": { - "operationId": "getExperimentIdFetch", + "patch": { + "operationId": "patchPromptId", "tags": [ - "Experiments" + "Prompts" ], - "description": "Fetch the events in an experiment. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch experiment (GET form)", + "description": "Partially update a prompt object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update prompt", "security": [ { "bearerAuth": [] @@ -14365,28 +18678,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ExperimentIdParam" - }, - { - "$ref": "#/components/parameters/FetchLimitParam" - }, - { - "$ref": "#/components/parameters/MaxXactId" - }, - { - "$ref": "#/components/parameters/MaxRootSpanId" - }, - { - "$ref": "#/components/parameters/Version" + "$ref": "#/components/parameters/PromptIdParam" } ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchPrompt" + } + } + } + }, "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns the prompt object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchExperimentEventsResponse" + "$ref": "#/components/schemas/Prompt" } } } @@ -14475,77 +18787,13 @@ } } }, - "options": { - "operationId": "optionsExperimentIdFetch", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment/{experiment_id}/fetch`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/experiment/{experiment_id}/feedback": { - "post": { - "operationId": "postExperimentIdFeedback", + "delete": { + "operationId": "deletePromptId", "tags": [ - "Experiments" + "Prompts" ], - "description": "Log feedback for a set of experiment events", - "summary": "Feedback for experiment events", + "description": "Delete a prompt object by its id", + "summary": "Delete prompt", "security": [ { "bearerAuth": [] @@ -14554,27 +18802,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ExperimentIdParam" + "$ref": "#/components/parameters/PromptIdParam" } ], - "requestBody": { - "description": "An array of feedback objects", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackExperimentEventRequest" - } - } - } - }, "responses": { "200": { - "description": "Returns a success status", + "description": "Returns the deleted prompt object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackResponseSchema" + "$ref": "#/components/schemas/Prompt" } } } @@ -14664,16 +18901,16 @@ } }, "options": { - "operationId": "optionsExperimentIdFeedback", + "operationId": "optionsPromptId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment/{experiment_id}/feedback`)", + "summary": "Enable CORS (`/v1/prompt/{prompt_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/ExperimentIdParam" + "$ref": "#/components/parameters/PromptIdParam" } ], "responses": { @@ -14726,37 +18963,38 @@ } } }, - "/v1/experiment/{experiment_id}/summarize": { - "get": { - "operationId": "getExperimentIdSummarize", + "/v1/role": { + "post": { "tags": [ - "Experiments" + "Roles" ], - "description": "Summarize experiment", - "summary": "Summarize experiment", "security": [ { "bearerAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" - }, - { - "$ref": "#/components/parameters/SummarizeScores" }, - { - "$ref": "#/components/parameters/ComparisonExperimentId" - } + {} ], + "operationId": "postRole", + "description": "Create a new role. If there is an existing role with the same name as the one specified in the request, will return the existing role unmodified", + "summary": "Create role", + "requestBody": { + "description": "Any desired information about the new role object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRole" + } + } + } + }, "responses": { "200": { - "description": "Experiment summary", + "description": "Returns the new role object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SummarizeExperimentResponse" + "$ref": "#/components/schemas/Role" } } } @@ -14787,111 +19025,49 @@ "application/json": { "schema": { "nullable": true - } - } - } - }, - "403": { - "description": "The API key doesn’t have permissions to perform the request", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "429": { - "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", - "headers": { - "Retry-After": { - "schema": { - "type": "string" - } - } - }, - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "500": { - "description": "Something went wrong on Braintrust's end. (These are rare.)", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - }, - "options": { - "operationId": "optionsExperimentIdSummarize", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment/{experiment_id}/summarize`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Headers": { + "application/json": { "schema": { - "type": "string" + "nullable": true } - }, - "Access-Control-Allow-Methods": { + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } - }, - "Access-Control-Allow-Origin": { + } + }, + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { "schema": { - "type": "string" + "nullable": true } } - }, - "content": {} + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -14906,12 +19082,10 @@ } } } - } - }, - "/v1/dataset": { - "post": { + }, + "put": { "tags": [ - "Datasets" + "Roles" ], "security": [ { @@ -14919,27 +19093,27 @@ }, {} ], - "operationId": "postDataset", - "description": "Create a new dataset. If there is an existing dataset in the project with the same name as the one specified in the request, will return the existing dataset unmodified", - "summary": "Create dataset", + "operationId": "putRole", + "description": "Create or replace role. If there is an existing role with the same name as the one specified in the request, will replace the existing role with the provided fields", + "summary": "Create or replace role", "requestBody": { - "description": "Any desired information about the new dataset object", + "description": "Any desired information about the new role object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateDataset" + "$ref": "#/components/schemas/CreateRole" } } } }, "responses": { "200": { - "description": "Returns the new dataset object", + "description": "Returns the new role object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Dataset" + "$ref": "#/components/schemas/Role" } } } @@ -15029,12 +19203,12 @@ } }, "get": { - "operationId": "getDataset", + "operationId": "getRole", "tags": [ - "Datasets" + "Roles" ], - "description": "List out all datasets. The datasets are sorted by creation date, with the most recently-created datasets coming first", - "summary": "List datasets", + "description": "List out all roles. The roles are sorted by creation date, with the most recently-created roles coming first", + "summary": "List roles", "security": [ { "bearerAuth": [] @@ -15055,13 +19229,7 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/DatasetName" - }, - { - "$ref": "#/components/parameters/ProjectName" - }, - { - "$ref": "#/components/parameters/ProjectIdQuery" + "$ref": "#/components/parameters/RoleName" }, { "$ref": "#/components/parameters/OrgName" @@ -15069,7 +19237,7 @@ ], "responses": { "200": { - "description": "Returns a list of dataset objects", + "description": "Returns a list of role objects", "content": { "application/json": { "schema": { @@ -15078,9 +19246,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/Dataset" + "$ref": "#/components/schemas/Role" }, - "description": "A list of dataset objects" + "description": "A list of role objects" } }, "required": [ @@ -15176,9 +19344,9 @@ } }, "options": { - "operationId": "optionsDataset", + "operationId": "optionsRole", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset`)", + "summary": "Enable CORS (`/v1/role`)", "security": [], "tags": [ "CORS" @@ -15233,14 +19401,14 @@ } } }, - "/v1/dataset/{dataset_id}": { + "/v1/role/{role_id}": { "get": { - "operationId": "getDatasetId", + "operationId": "getRoleId", "tags": [ - "Datasets" + "Roles" ], - "description": "Get a dataset object by its id", - "summary": "Get dataset", + "description": "Get a role object by its id", + "summary": "Get role", "security": [ { "bearerAuth": [] @@ -15249,16 +19417,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/DatasetIdParam" + "$ref": "#/components/parameters/RoleIdParam" } ], "responses": { "200": { - "description": "Returns the dataset object", + "description": "Returns the role object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Dataset" + "$ref": "#/components/schemas/Role" } } } @@ -15348,12 +19516,12 @@ } }, "patch": { - "operationId": "patchDatasetId", + "operationId": "patchRoleId", "tags": [ - "Datasets" + "Roles" ], - "description": "Partially update a dataset object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update dataset", + "description": "Partially update a role object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update role", "security": [ { "bearerAuth": [] @@ -15362,7 +19530,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/DatasetIdParam" + "$ref": "#/components/parameters/RoleIdParam" } ], "requestBody": { @@ -15371,18 +19539,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchDataset" + "$ref": "#/components/schemas/PatchRole" } } } }, "responses": { "200": { - "description": "Returns the dataset object", + "description": "Returns the role object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Dataset" + "$ref": "#/components/schemas/Role" } } } @@ -15472,12 +19640,12 @@ } }, "delete": { - "operationId": "deleteDatasetId", + "operationId": "deleteRoleId", "tags": [ - "Datasets" + "Roles" ], - "description": "Delete a dataset object by its id", - "summary": "Delete dataset", + "description": "Delete a role object by its id", + "summary": "Delete role", "security": [ { "bearerAuth": [] @@ -15486,16 +19654,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/DatasetIdParam" + "$ref": "#/components/parameters/RoleIdParam" } ], "responses": { "200": { - "description": "Returns the deleted dataset object", + "description": "Returns the deleted role object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Dataset" + "$ref": "#/components/schemas/Role" } } } @@ -15585,16 +19753,16 @@ } }, "options": { - "operationId": "optionsDatasetId", + "operationId": "optionsRoleId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset/{dataset_id}`)", + "summary": "Enable CORS (`/v1/role/{role_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/DatasetIdParam" + "$ref": "#/components/parameters/RoleIdParam" } ], "responses": { @@ -15647,43 +19815,38 @@ } } }, - "/v1/dataset/{dataset_id}/insert": { + "/v1/group": { "post": { - "operationId": "postDatasetIdInsert", "tags": [ - "Datasets" + "Groups" ], - "description": "Insert a set of events into the dataset", - "summary": "Insert dataset events", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - } - ], + "operationId": "postGroup", + "description": "Create a new group. If there is an existing group with the same name as the one specified in the request, will return the existing group unmodified", + "summary": "Create group", "requestBody": { - "description": "An array of dataset events to insert", + "description": "Any desired information about the new group object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsertDatasetEventRequest" + "$ref": "#/components/schemas/CreateGroup" } } } }, "responses": { "200": { - "description": "Returns the inserted row ids", + "description": "Returns the new group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsertEventsResponse" + "$ref": "#/components/schemas/Group" } } } @@ -15772,106 +19935,37 @@ } } }, - "options": { - "operationId": "optionsDatasetIdInsert", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset/{dataset_id}/insert`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/dataset/{dataset_id}/fetch": { - "post": { - "operationId": "postDatasetIdFetch", + "put": { "tags": [ - "Datasets" + "Groups" ], - "description": "Fetch the events in a dataset. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch dataset (POST form)", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - } - ], + "operationId": "putGroup", + "description": "Create or replace group. If there is an existing group with the same name as the one specified in the request, will replace the existing group with the provided fields", + "summary": "Create or replace group", "requestBody": { - "description": "Filters for the fetch query", + "description": "Any desired information about the new group object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchEventsRequest" + "$ref": "#/components/schemas/CreateGroup" } } } }, "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns the new group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchDatasetEventsResponse" + "$ref": "#/components/schemas/Group" } } } @@ -15961,12 +20055,12 @@ } }, "get": { - "operationId": "getDatasetIdFetch", + "operationId": "getGroup", "tags": [ - "Datasets" + "Groups" ], - "description": "Fetch the events in a dataset. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch dataset (GET form)", + "description": "List out all groups. The groups are sorted by creation date, with the most recently-created groups coming first", + "summary": "List groups", "security": [ { "bearerAuth": [] @@ -15975,28 +20069,44 @@ ], "parameters": [ { - "$ref": "#/components/parameters/DatasetIdParam" + "$ref": "#/components/parameters/AppLimitParam" }, { - "$ref": "#/components/parameters/FetchLimitParam" + "$ref": "#/components/parameters/StartingAfter" }, { - "$ref": "#/components/parameters/MaxXactId" + "$ref": "#/components/parameters/EndingBefore" }, { - "$ref": "#/components/parameters/MaxRootSpanId" + "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/Version" + "$ref": "#/components/parameters/GroupName" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns a list of group objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchDatasetEventsResponse" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + }, + "description": "A list of group objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -16086,18 +20196,13 @@ } }, "options": { - "operationId": "optionsDatasetIdFetch", + "operationId": "optionsGroup", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset/{dataset_id}/fetch`)", + "summary": "Enable CORS (`/v1/group`)", "security": [], "tags": [ "CORS" ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - } - ], "responses": { "200": { "description": "Response for CORS method", @@ -16148,14 +20253,14 @@ } } }, - "/v1/dataset/{dataset_id}/feedback": { - "post": { - "operationId": "postDatasetIdFeedback", + "/v1/group/{group_id}": { + "get": { + "operationId": "getGroupId", "tags": [ - "Datasets" + "Groups" ], - "description": "Log feedback for a set of dataset events", - "summary": "Feedback for dataset events", + "description": "Get a group object by its id", + "summary": "Get group", "security": [ { "bearerAuth": [] @@ -16164,27 +20269,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/DatasetIdParam" + "$ref": "#/components/parameters/GroupIdParam" } ], - "requestBody": { - "description": "An array of feedback objects", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackDatasetEventRequest" - } - } - } - }, "responses": { "200": { - "description": "Returns a success status", + "description": "Returns the group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackResponseSchema" + "$ref": "#/components/schemas/Group" } } } @@ -16273,53 +20367,115 @@ } } }, - "options": { - "operationId": "optionsDatasetIdFeedback", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset/{dataset_id}/feedback`)", - "security": [], + "patch": { + "operationId": "patchGroupId", "tags": [ - "CORS" + "Groups" + ], + "description": "Partially update a group object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update group", + "security": [ + { + "bearerAuth": [] + }, + {} ], "parameters": [ { - "$ref": "#/components/parameters/DatasetIdParam" + "$ref": "#/components/parameters/GroupIdParam" } ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchGroup" + } + } + } + }, "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns the group object", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Group" } - }, - "Access-Control-Allow-Headers": { + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } } }, - "content": {} + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -16334,36 +20490,32 @@ } } } - } - }, - "/v1/dataset/{dataset_id}/summarize": { - "get": { - "operationId": "getDatasetIdSummarize", + }, + "delete": { + "operationId": "deleteGroupId", "tags": [ - "Datasets" + "Groups" ], - "description": "Summarize dataset", - "summary": "Summarize dataset", + "description": "Delete a group object by its id", + "summary": "Delete group", "security": [ { "bearerAuth": [] - } + }, + {} ], "parameters": [ { - "$ref": "#/components/parameters/DatasetIdParam" - }, - { - "$ref": "#/components/parameters/SummarizeData" + "$ref": "#/components/parameters/GroupIdParam" } ], "responses": { "200": { - "description": "Dataset summary", + "description": "Returns the deleted group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SummarizeDatasetResponse" + "$ref": "#/components/schemas/Group" } } } @@ -16453,16 +20605,16 @@ } }, "options": { - "operationId": "optionsDatasetIdSummarize", + "operationId": "optionsGroupId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset/{dataset_id}/summarize`)", + "summary": "Enable CORS (`/v1/group/{group_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/DatasetIdParam" + "$ref": "#/components/parameters/GroupIdParam" } ], "responses": { @@ -16515,10 +20667,10 @@ } } }, - "/v1/prompt": { + "/v1/project_group": { "post": { "tags": [ - "Prompts" + "ProjectGroups" ], "security": [ { @@ -16526,27 +20678,27 @@ }, {} ], - "operationId": "postPrompt", - "description": "Create a new prompt. If there is an existing prompt in the project with the same slug as the one specified in the request, will return the existing prompt unmodified", - "summary": "Create prompt", + "operationId": "postProjectGroup", + "description": "Create a new project_group. If there is an existing project_group with the same name as the one specified in the request, will return the existing project_group unmodified", + "summary": "Create project_group", "requestBody": { - "description": "Any desired information about the new prompt object", + "description": "Any desired information about the new project_group object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreatePrompt" + "$ref": "#/components/schemas/CreateProjectGroup" } } } }, "responses": { "200": { - "description": "Returns the new prompt object", + "description": "Returns the new project_group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Prompt" + "$ref": "#/components/schemas/ProjectGroup" } } } @@ -16637,7 +20789,7 @@ }, "put": { "tags": [ - "Prompts" + "ProjectGroups" ], "security": [ { @@ -16645,27 +20797,27 @@ }, {} ], - "operationId": "putPrompt", - "description": "Create or replace prompt. If there is an existing prompt in the project with the same slug as the one specified in the request, will replace the existing prompt with the provided fields", - "summary": "Create or replace prompt", + "operationId": "putProjectGroup", + "description": "Create or replace project_group. If there is an existing project_group with the same name as the one specified in the request, will replace the existing project_group with the provided fields", + "summary": "Create or replace project_group", "requestBody": { - "description": "Any desired information about the new prompt object", + "description": "Any desired information about the new project_group object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreatePrompt" + "$ref": "#/components/schemas/CreateProjectGroup" } } } }, "responses": { "200": { - "description": "Returns the new prompt object", + "description": "Returns the new project_group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Prompt" + "$ref": "#/components/schemas/ProjectGroup" } } } @@ -16755,12 +20907,12 @@ } }, "get": { - "operationId": "getPrompt", + "operationId": "getProjectGroup", "tags": [ - "Prompts" + "ProjectGroups" ], - "description": "List out all prompts. The prompts are sorted by creation date, with the most recently-created prompts coming first", - "summary": "List prompts", + "description": "List out all project_groups. The project_groups are sorted by creation date, with the most recently-created project_groups coming first", + "summary": "List project_groups", "security": [ { "bearerAuth": [] @@ -16781,22 +20933,7 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/PromptName" - }, - { - "$ref": "#/components/parameters/ProjectName" - }, - { - "$ref": "#/components/parameters/ProjectIdQuery" - }, - { - "$ref": "#/components/parameters/Slug" - }, - { - "$ref": "#/components/parameters/PromptVersion" - }, - { - "$ref": "#/components/parameters/PromptEnvironment" + "$ref": "#/components/parameters/ProjectGroupName" }, { "$ref": "#/components/parameters/OrgName" @@ -16804,7 +20941,7 @@ ], "responses": { "200": { - "description": "Returns a list of prompt objects", + "description": "Returns a list of project_group objects", "content": { "application/json": { "schema": { @@ -16813,9 +20950,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/Prompt" + "$ref": "#/components/schemas/ProjectGroup" }, - "description": "A list of prompt objects" + "description": "A list of project_group objects" } }, "required": [ @@ -16911,9 +21048,9 @@ } }, "options": { - "operationId": "optionsPrompt", + "operationId": "optionsProjectGroup", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/prompt`)", + "summary": "Enable CORS (`/v1/project_group`)", "security": [], "tags": [ "CORS" @@ -16968,38 +21105,32 @@ } } }, - "/v1/prompt/{prompt_id}": { + "/v1/project_group/{project_group_id}": { "get": { - "operationId": "getPromptId", + "operationId": "getProjectGroupId", "tags": [ - "Prompts" + "ProjectGroups" ], - "description": "Get a prompt object by its id", - "summary": "Get prompt", + "description": "Get a project_group object by its id", + "summary": "Get project_group", "security": [ { - "bearerAuth": [] - }, - {} - ], - "parameters": [ - { - "$ref": "#/components/parameters/PromptIdParam" - }, - { - "$ref": "#/components/parameters/PromptVersion" + "bearerAuth": [] }, + {} + ], + "parameters": [ { - "$ref": "#/components/parameters/PromptEnvironment" + "$ref": "#/components/parameters/ProjectGroupIdParam" } ], "responses": { "200": { - "description": "Returns the prompt object", + "description": "Returns the project_group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Prompt" + "$ref": "#/components/schemas/ProjectGroup" } } } @@ -17089,12 +21220,12 @@ } }, "patch": { - "operationId": "patchPromptId", + "operationId": "patchProjectGroupId", "tags": [ - "Prompts" + "ProjectGroups" ], - "description": "Partially update a prompt object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update prompt", + "description": "Partially update a project_group object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update project_group", "security": [ { "bearerAuth": [] @@ -17103,7 +21234,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/PromptIdParam" + "$ref": "#/components/parameters/ProjectGroupIdParam" } ], "requestBody": { @@ -17112,18 +21243,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchPrompt" + "$ref": "#/components/schemas/PatchProjectGroup" } } } }, "responses": { "200": { - "description": "Returns the prompt object", + "description": "Returns the project_group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Prompt" + "$ref": "#/components/schemas/ProjectGroup" } } } @@ -17213,12 +21344,12 @@ } }, "delete": { - "operationId": "deletePromptId", + "operationId": "deleteProjectGroupId", "tags": [ - "Prompts" + "ProjectGroups" ], - "description": "Delete a prompt object by its id", - "summary": "Delete prompt", + "description": "Delete a project_group object by its id", + "summary": "Delete project_group", "security": [ { "bearerAuth": [] @@ -17227,16 +21358,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/PromptIdParam" + "$ref": "#/components/parameters/ProjectGroupIdParam" } ], "responses": { "200": { - "description": "Returns the deleted prompt object", + "description": "Returns the deleted project_group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Prompt" + "$ref": "#/components/schemas/ProjectGroup" } } } @@ -17326,16 +21457,16 @@ } }, "options": { - "operationId": "optionsPromptId", + "operationId": "optionsProjectGroupId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/prompt/{prompt_id}`)", + "summary": "Enable CORS (`/v1/project_group/{project_group_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/PromptIdParam" + "$ref": "#/components/parameters/ProjectGroupIdParam" } ], "responses": { @@ -17388,10 +21519,10 @@ } } }, - "/v1/role": { + "/v1/acl": { "post": { "tags": [ - "Roles" + "Acls" ], "security": [ { @@ -17399,27 +21530,27 @@ }, {} ], - "operationId": "postRole", - "description": "Create a new role. If there is an existing role with the same name as the one specified in the request, will return the existing role unmodified", - "summary": "Create role", + "operationId": "postAcl", + "description": "Create a new acl. If there is an existing acl with the same contents as the one specified in the request, will return the existing acl unmodified", + "summary": "Create acl", "requestBody": { - "description": "Any desired information about the new role object", + "description": "Any desired information about the new acl object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRole" + "$ref": "#/components/schemas/AclItem" } } } }, "responses": { "200": { - "description": "Returns the new role object", + "description": "Returns the new acl object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/Acl" } } } @@ -17508,37 +21639,37 @@ } } }, - "put": { + "delete": { + "operationId": "deleteAcl", "tags": [ - "Roles" + "Acls" ], + "description": "Delete a single acl", + "summary": "Delete single acl", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putRole", - "description": "Create or replace role. If there is an existing role with the same name as the one specified in the request, will replace the existing role with the provided fields", - "summary": "Create or replace role", "requestBody": { - "description": "Any desired information about the new role object", + "description": "Parameters which uniquely specify the acl to delete", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRole" + "$ref": "#/components/schemas/AclItem" } } } }, "responses": { "200": { - "description": "Returns the new role object", + "description": "Returns the deleted acl object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/Acl" } } } @@ -17628,12 +21759,12 @@ } }, "get": { - "operationId": "getRole", + "operationId": "getAcl", "tags": [ - "Roles" + "Acls" ], - "description": "List out all roles. The roles are sorted by creation date, with the most recently-created roles coming first", - "summary": "List roles", + "description": "List out all acls. The acls are sorted by creation date, with the most recently-created acls coming first", + "summary": "List acls", "security": [ { "bearerAuth": [] @@ -17649,209 +21780,52 @@ }, { "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/RoleName" - }, - { - "$ref": "#/components/parameters/OrgName" - } - ], - "responses": { - "200": { - "description": "Returns a list of role objects", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Role" - }, - "description": "A list of role objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false - } - } - } - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "401": { - "description": "No valid API key provided", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "403": { - "description": "The API key doesn’t have permissions to perform the request", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "429": { - "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", - "headers": { - "Retry-After": { - "schema": { - "type": "string" - } - } - }, - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "500": { - "description": "Something went wrong on Braintrust's end. (These are rare.)", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - }, - "options": { - "operationId": "optionsRole", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/role`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/role/{role_id}": { - "get": { - "operationId": "getRoleId", - "tags": [ - "Roles" - ], - "description": "Get a role object by its id", - "summary": "Get role", - "security": [ + }, { - "bearerAuth": [] + "$ref": "#/components/parameters/Ids" }, - {} - ], - "parameters": [ { - "$ref": "#/components/parameters/RoleIdParam" + "$ref": "#/components/parameters/AclObjectType" + }, + { + "$ref": "#/components/parameters/AclObjectId" + }, + { + "$ref": "#/components/parameters/AclListUserId" + }, + { + "$ref": "#/components/parameters/AclListGroupId" + }, + { + "$ref": "#/components/parameters/AclListPermission" + }, + { + "$ref": "#/components/parameters/AclListRestrictObjectType" + }, + { + "$ref": "#/components/parameters/AclListRoleId" } ], "responses": { "200": { - "description": "Returns the role object", + "description": "Returns a list of acl objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Acl" + }, + "description": "A list of acl objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -17940,13 +21914,72 @@ } } }, - "patch": { - "operationId": "patchRoleId", + "options": { + "operationId": "optionsAcl", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/acl`)", + "security": [], "tags": [ - "Roles" + "CORS" ], - "description": "Partially update a role object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update role", + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/acl/{acl_id}": { + "get": { + "operationId": "getAclId", + "tags": [ + "Acls" + ], + "description": "Get an acl object by its id", + "summary": "Get acl", "security": [ { "bearerAuth": [] @@ -17955,27 +21988,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/RoleIdParam" + "$ref": "#/components/parameters/AclIdParam" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchRole" - } - } - } - }, "responses": { "200": { - "description": "Returns the role object", + "description": "Returns the acl object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/Acl" } } } @@ -18065,12 +22087,12 @@ } }, "delete": { - "operationId": "deleteRoleId", + "operationId": "deleteAclId", "tags": [ - "Roles" + "Acls" ], - "description": "Delete a role object by its id", - "summary": "Delete role", + "description": "Delete an acl object by its id", + "summary": "Delete acl", "security": [ { "bearerAuth": [] @@ -18079,16 +22101,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/RoleIdParam" + "$ref": "#/components/parameters/AclIdParam" } ], "responses": { "200": { - "description": "Returns the deleted role object", + "description": "Returns the deleted acl object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/Acl" } } } @@ -18178,173 +22200,52 @@ } }, "options": { - "operationId": "optionsRoleId", + "operationId": "optionsAclId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/role/{role_id}`)", + "summary": "Enable CORS (`/v1/acl/{acl_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/RoleIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/group": { - "post": { - "tags": [ - "Groups" - ], - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "operationId": "postGroup", - "description": "Create a new group. If there is an existing group with the same name as the one specified in the request, will return the existing group unmodified", - "summary": "Create group", - "requestBody": { - "description": "Any desired information about the new group object", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateGroup" - } - } - } - }, - "responses": { - "200": { - "description": "Returns the new group object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Group" - } - } - } - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "401": { - "description": "No valid API key provided", - "content": { - "text/plain": { + "$ref": "#/components/parameters/AclIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { "schema": { "type": "string" } }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "403": { - "description": "The API key doesn’t have permissions to perform the request", - "content": { - "text/plain": { + "Access-Control-Allow-Headers": { "schema": { "type": "string" } }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "429": { - "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", - "headers": { - "Retry-After": { + "Access-Control-Allow-Methods": { "schema": { "type": "string" } - } - }, - "content": { - "text/plain": { + }, + "Access-Control-Allow-Origin": { "schema": { "type": "string" } }, - "application/json": { + "Access-Control-Max-Age": { "schema": { - "nullable": true + "type": "string" } } - } + }, + "content": {} }, - "500": { - "description": "Something went wrong on Braintrust's end. (These are rare.)", + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", "content": { "text/plain": { "schema": { @@ -18359,38 +22260,40 @@ } } } - }, - "put": { + } + }, + "/v1/acl/batch_update": { + "post": { + "operationId": "aclBatchUpdate", "tags": [ - "Groups" + "Acls" ], + "description": "Batch update acls. This operation is idempotent, so adding acls which already exist will have no effect, and removing acls which do not exist will have no effect.", + "summary": "Batch update acls", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putGroup", - "description": "Create or replace group. If there is an existing group with the same name as the one specified in the request, will replace the existing group with the provided fields", - "summary": "Create or replace group", "requestBody": { - "description": "Any desired information about the new group object", + "description": "Acls to add/remove.", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateGroup" + "$ref": "#/components/schemas/AclBatchUpdateRequest" } } } }, "responses": { "200": { - "description": "Returns the new group object", + "description": "A success status", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Group" + "$ref": "#/components/schemas/AclBatchUpdateResponse" } } } @@ -18478,14 +22381,16 @@ } } } - }, + } + }, + "/v1/acl/list_org": { "get": { - "operationId": "getGroup", + "operationId": "aclListOrg", "tags": [ - "Groups" + "Acls" ], - "description": "List out all groups. The groups are sorted by creation date, with the most recently-created groups coming first", - "summary": "List groups", + "description": "List all acls in the org. This query requires the caller to have `read_acls` permission at the organization level", + "summary": "List org acls", "security": [ { "bearerAuth": [] @@ -18496,6 +22401,9 @@ { "$ref": "#/components/parameters/AppLimitParam" }, + { + "$ref": "#/components/parameters/Ids" + }, { "$ref": "#/components/parameters/StartingAfter" }, @@ -18503,10 +22411,25 @@ "$ref": "#/components/parameters/EndingBefore" }, { - "$ref": "#/components/parameters/Ids" + "$ref": "#/components/parameters/AclListOrgObjectType" }, { - "$ref": "#/components/parameters/GroupName" + "$ref": "#/components/parameters/AclListOrgObjectId" + }, + { + "$ref": "#/components/parameters/AclListUserId" + }, + { + "$ref": "#/components/parameters/AclListGroupId" + }, + { + "$ref": "#/components/parameters/AclListPermission" + }, + { + "$ref": "#/components/parameters/AclListRestrictObjectType" + }, + { + "$ref": "#/components/parameters/AclListRoleId" }, { "$ref": "#/components/parameters/OrgName" @@ -18514,24 +22437,14 @@ ], "responses": { "200": { - "description": "Returns a list of group objects", + "description": "A list of acls", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Group" - }, - "description": "A list of group objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "type": "array", + "items": { + "$ref": "#/components/schemas/Acl" + } } } } @@ -18621,9 +22534,9 @@ } }, "options": { - "operationId": "optionsGroup", + "operationId": "optionsAclListOrg", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/group`)", + "summary": "Enable CORS (`/v1/acl/list_org`)", "security": [], "tags": [ "CORS" @@ -18678,105 +22591,49 @@ } } }, - "/v1/group/{group_id}": { - "get": { - "operationId": "getGroupId", + "/v1/acl/acl/batch_update": { + "options": { + "operationId": "optionsAclBatchUpdate", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/acl/acl/batch_update`)", + "security": [], "tags": [ - "Groups" - ], - "description": "Get a group object by its id", - "summary": "Get group", - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "parameters": [ - { - "$ref": "#/components/parameters/GroupIdParam" - } + "CORS" ], "responses": { "200": { - "description": "Returns the group object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Group" - } - } - } - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { "schema": { "type": "string" } }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "401": { - "description": "No valid API key provided", - "content": { - "text/plain": { + "Access-Control-Allow-Headers": { "schema": { "type": "string" } }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "403": { - "description": "The API key doesn’t have permissions to perform the request", - "content": { - "text/plain": { + "Access-Control-Allow-Methods": { "schema": { "type": "string" } }, - "application/json": { - "schema": { - "nullable": true - } - } - } - }, - "429": { - "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", - "headers": { - "Retry-After": { - "schema": { - "type": "string" - } - } - }, - "content": { - "text/plain": { + "Access-Control-Allow-Origin": { "schema": { "type": "string" } }, - "application/json": { + "Access-Control-Max-Age": { "schema": { - "nullable": true + "type": "string" } } - } + }, + "content": {} }, - "500": { - "description": "Something went wrong on Braintrust's end. (These are rare.)", + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", "content": { "text/plain": { "schema": { @@ -18791,14 +22648,16 @@ } } } - }, - "patch": { - "operationId": "patchGroupId", + } + }, + "/v1/user": { + "get": { + "operationId": "getUser", "tags": [ - "Groups" + "Users" ], - "description": "Partially update a group object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update group", + "description": "List out all users. The users are sorted by creation date, with the most recently-created users coming first", + "summary": "List users", "security": [ { "bearerAuth": [] @@ -18807,27 +22666,50 @@ ], "parameters": [ { - "$ref": "#/components/parameters/GroupIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/UserGivenName" + }, + { + "$ref": "#/components/parameters/UserFamilyName" + }, + { + "$ref": "#/components/parameters/UserEmail" + }, + { + "$ref": "#/components/parameters/OrgName" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchGroup" - } - } - } - }, "responses": { "200": { - "description": "Returns the group object", + "description": "Returns a list of user objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Group" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + }, + "description": "A list of user objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -18916,13 +22798,72 @@ } } }, - "delete": { - "operationId": "deleteGroupId", + "options": { + "operationId": "optionsUser", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/user`)", + "security": [], "tags": [ - "Groups" + "CORS" ], - "description": "Delete a group object by its id", - "summary": "Delete group", + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/user/{user_id}": { + "get": { + "operationId": "getUserId", + "tags": [ + "Users" + ], + "description": "Get a user object by its id", + "summary": "Get user", "security": [ { "bearerAuth": [] @@ -18931,16 +22872,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/GroupIdParam" + "$ref": "#/components/parameters/UserIdParam" } ], "responses": { "200": { - "description": "Returns the deleted group object", + "description": "Returns the user object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Group" + "$ref": "#/components/schemas/User" } } } @@ -19030,16 +22971,16 @@ } }, "options": { - "operationId": "optionsGroupId", + "operationId": "optionsUserId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/group/{group_id}`)", + "summary": "Enable CORS (`/v1/user/{user_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/GroupIdParam" + "$ref": "#/components/parameters/UserIdParam" } ], "responses": { @@ -19092,10 +23033,10 @@ } } }, - "/v1/acl": { + "/v1/agent": { "post": { "tags": [ - "Acls" + "Agents" ], "security": [ { @@ -19103,27 +23044,27 @@ }, {} ], - "operationId": "postAcl", - "description": "Create a new acl. If there is an existing acl with the same contents as the one specified in the request, will return the existing acl unmodified", - "summary": "Create acl", + "operationId": "postAgent", + "description": "Create a new agent. If there is an existing agent with the same name as the one specified in the request, will return the existing agent unmodified", + "summary": "Create agent", "requestBody": { - "description": "Any desired information about the new acl object", + "description": "Any desired information about the new agent object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AclItem" + "$ref": "#/components/schemas/CreateAgent" } } } }, "responses": { "200": { - "description": "Returns the new acl object", + "description": "Returns the new agent object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Acl" + "$ref": "#/components/schemas/Agent" } } } @@ -19212,37 +23153,37 @@ } } }, - "delete": { - "operationId": "deleteAcl", + "put": { "tags": [ - "Acls" + "Agents" ], - "description": "Delete a single acl", - "summary": "Delete single acl", "security": [ { "bearerAuth": [] }, {} ], + "operationId": "putAgent", + "description": "Create or replace agent. If there is an existing agent with the same name as the one specified in the request, will replace the existing agent with the provided fields", + "summary": "Create or replace agent", "requestBody": { - "description": "Parameters which uniquely specify the acl to delete", + "description": "Any desired information about the new agent object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AclItem" + "$ref": "#/components/schemas/CreateAgent" } } } }, "responses": { "200": { - "description": "Returns the deleted acl object", + "description": "Returns the new agent object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Acl" + "$ref": "#/components/schemas/Agent" } } } @@ -19332,12 +23273,12 @@ } }, "get": { - "operationId": "getAcl", + "operationId": "getAgent", "tags": [ - "Acls" + "Agents" ], - "description": "List out all acls. The acls are sorted by creation date, with the most recently-created acls coming first", - "summary": "List acls", + "description": "List out all agents. The agents are sorted by creation date, with the most recently-created agents coming first", + "summary": "List agents", "security": [ { "bearerAuth": [] @@ -19358,30 +23299,15 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/AclObjectType" - }, - { - "$ref": "#/components/parameters/AclObjectId" - }, - { - "$ref": "#/components/parameters/AclListUserId" - }, - { - "$ref": "#/components/parameters/AclListGroupId" - }, - { - "$ref": "#/components/parameters/AclListPermission" + "$ref": "#/components/parameters/AgentName" }, { - "$ref": "#/components/parameters/AclListRestrictObjectType" - }, - { - "$ref": "#/components/parameters/AclListRoleId" + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns a list of acl objects", + "description": "Returns a list of agent objects", "content": { "application/json": { "schema": { @@ -19390,9 +23316,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/Acl" + "$ref": "#/components/schemas/Agent" }, - "description": "A list of acl objects" + "description": "A list of agent objects" } }, "required": [ @@ -19488,9 +23414,9 @@ } }, "options": { - "operationId": "optionsAcl", + "operationId": "optionsAgent", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/acl`)", + "summary": "Enable CORS (`/v1/agent`)", "security": [], "tags": [ "CORS" @@ -19513,22 +23439,137 @@ "schema": { "type": "string" } - }, - "Access-Control-Allow-Origin": { + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/agent/{agent_id}": { + "get": { + "operationId": "getAgentId", + "tags": [ + "Agents" + ], + "description": "Get a agent object by its id", + "summary": "Get agent", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AgentIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the agent object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Agent" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { "schema": { - "type": "string" + "nullable": true } } - }, - "content": {} + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -19543,16 +23584,14 @@ } } } - } - }, - "/v1/acl/{acl_id}": { - "get": { - "operationId": "getAclId", + }, + "patch": { + "operationId": "patchAgentId", "tags": [ - "Acls" + "Agents" ], - "description": "Get an acl object by its id", - "summary": "Get acl", + "description": "Partially update a agent object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update agent", "security": [ { "bearerAuth": [] @@ -19561,16 +23600,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AclIdParam" + "$ref": "#/components/parameters/AgentIdParam" } ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchAgent" + } + } + } + }, "responses": { "200": { - "description": "Returns the acl object", + "description": "Returns the agent object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Acl" + "$ref": "#/components/schemas/Agent" } } } @@ -19660,12 +23710,12 @@ } }, "delete": { - "operationId": "deleteAclId", + "operationId": "deleteAgentId", "tags": [ - "Acls" + "Agents" ], - "description": "Delete an acl object by its id", - "summary": "Delete acl", + "description": "Delete a agent object by its id", + "summary": "Delete agent", "security": [ { "bearerAuth": [] @@ -19674,16 +23724,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AclIdParam" + "$ref": "#/components/parameters/AgentIdParam" } ], "responses": { "200": { - "description": "Returns the deleted acl object", + "description": "Returns the deleted agent object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Acl" + "$ref": "#/components/schemas/Agent" } } } @@ -19773,16 +23823,16 @@ } }, "options": { - "operationId": "optionsAclId", + "operationId": "optionsAgentId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/acl/{acl_id}`)", + "summary": "Enable CORS (`/v1/agent/{agent_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/AclIdParam" + "$ref": "#/components/parameters/AgentIdParam" } ], "responses": { @@ -19835,38 +23885,38 @@ } } }, - "/v1/acl/batch_update": { + "/v1/project_automation": { "post": { - "operationId": "aclBatchUpdate", "tags": [ - "Acls" + "ProjectAutomations" ], - "description": "Batch update acls. This operation is idempotent, so adding acls which already exist will have no effect, and removing acls which do not exist will have no effect.", - "summary": "Batch update acls", "security": [ { "bearerAuth": [] }, {} ], + "operationId": "postProjectAutomation", + "description": "Create a new project_automation. If there is an existing project_automation with the same name as the one specified in the request, will return the existing project_automation unmodified", + "summary": "Create project_automation", "requestBody": { - "description": "Acls to add/remove.", + "description": "Any desired information about the new project_automation object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AclBatchUpdateRequest" + "$ref": "#/components/schemas/CreateProjectAutomation" } } } }, "responses": { "200": { - "description": "A success status", + "description": "Returns the new project_automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AclBatchUpdateResponse" + "$ref": "#/components/schemas/ProjectAutomation" } } } @@ -19954,70 +24004,38 @@ } } } - } - }, - "/v1/acl/list_org": { - "get": { - "operationId": "aclListOrg", + }, + "put": { "tags": [ - "Acls" + "ProjectAutomations" ], - "description": "List all acls in the org. This query requires the caller to have `read_acls` permission at the organization level", - "summary": "List org acls", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/AclListOrgObjectType" - }, - { - "$ref": "#/components/parameters/AclListOrgObjectId" - }, - { - "$ref": "#/components/parameters/AclListUserId" - }, - { - "$ref": "#/components/parameters/AclListGroupId" - }, - { - "$ref": "#/components/parameters/AclListPermission" - }, - { - "$ref": "#/components/parameters/AclListRestrictObjectType" - }, - { - "$ref": "#/components/parameters/AclListRoleId" - }, - { - "$ref": "#/components/parameters/OrgName" + "operationId": "putProjectAutomation", + "description": "Create or replace project_automation. If there is an existing project_automation with the same name as the one specified in the request, will replace the existing project_automation with the provided fields", + "summary": "Create or replace project_automation", + "requestBody": { + "description": "Any desired information about the new project_automation object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectAutomation" + } + } } - ], + }, "responses": { "200": { - "description": "A list of acls", + "description": "Returns the new project_automation object", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Acl" - } + "$ref": "#/components/schemas/ProjectAutomation" } } } @@ -20106,48 +24124,132 @@ } } }, - "options": { - "operationId": "optionsAclListOrg", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/acl/list_org`)", - "security": [], + "get": { + "operationId": "getProjectAutomation", "tags": [ - "CORS" + "ProjectAutomations" + ], + "description": "List out all project_automations. The project_automations are sorted by creation date, with the most recently-created project_automations coming first", + "summary": "List project_automations", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/ProjectAutomationName" + }, + { + "$ref": "#/components/parameters/OrgName" + } ], "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns a list of project_automation objects", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectAutomation" + }, + "description": "A list of project_automation objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Headers": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } - }, - "Access-Control-Max-Age": { + } + }, + "content": { + "text/plain": { "schema": { "type": "string" } + }, + "application/json": { + "schema": { + "nullable": true + } } - }, - "content": {} + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -20162,13 +24264,11 @@ } } } - } - }, - "/v1/acl/acl/batch_update": { + }, "options": { - "operationId": "optionsAclBatchUpdate", + "operationId": "optionsProjectAutomation", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/acl/acl/batch_update`)", + "summary": "Enable CORS (`/v1/project_automation`)", "security": [], "tags": [ "CORS" @@ -20223,14 +24323,14 @@ } } }, - "/v1/user": { + "/v1/project_automation/{project_automation_id}": { "get": { - "operationId": "getUser", + "operationId": "getProjectAutomationId", "tags": [ - "Users" + "ProjectAutomations" ], - "description": "List out all users. The users are sorted by creation date, with the most recently-created users coming first", - "summary": "List users", + "description": "Get a project_automation object by its id", + "summary": "Get project_automation", "security": [ { "bearerAuth": [] @@ -20239,50 +24339,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/UserGivenName" - }, - { - "$ref": "#/components/parameters/UserFamilyName" - }, - { - "$ref": "#/components/parameters/UserEmail" - }, - { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/ProjectAutomationIdParam" } ], "responses": { "200": { - "description": "Returns a list of user objects", + "description": "Returns the project_automation object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/User" - }, - "description": "A list of user objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/ProjectAutomation" } } } @@ -20371,48 +24437,115 @@ } } }, - "options": { - "operationId": "optionsUser", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/user`)", - "security": [], + "patch": { + "operationId": "patchProjectAutomationId", "tags": [ - "CORS" + "ProjectAutomations" + ], + "description": "Partially update a project_automation object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update project_automation", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectAutomationIdParam" + } ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchProjectAutomation" + } + } + } + }, "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns the project_automation object", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ProjectAutomation" } - }, - "Access-Control-Allow-Headers": { + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } } }, - "content": {} + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -20427,16 +24560,14 @@ } } } - } - }, - "/v1/user/{user_id}": { - "get": { - "operationId": "getUserId", + }, + "delete": { + "operationId": "deleteProjectAutomationId", "tags": [ - "Users" + "ProjectAutomations" ], - "description": "Get a user object by its id", - "summary": "Get user", + "description": "Delete a project_automation object by its id", + "summary": "Delete project_automation", "security": [ { "bearerAuth": [] @@ -20445,16 +24576,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/UserIdParam" + "$ref": "#/components/parameters/ProjectAutomationIdParam" } ], "responses": { "200": { - "description": "Returns the user object", + "description": "Returns the deleted project_automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/ProjectAutomation" } } } @@ -20544,16 +24675,16 @@ } }, "options": { - "operationId": "optionsUserId", + "operationId": "optionsProjectAutomationId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/user/{user_id}`)", + "summary": "Enable CORS (`/v1/project_automation/{project_automation_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/UserIdParam" + "$ref": "#/components/parameters/ProjectAutomationIdParam" } ], "responses": { @@ -20606,10 +24737,10 @@ } } }, - "/v1/project_automation": { + "/v1/org_automation": { "post": { "tags": [ - "ProjectAutomations" + "OrgAutomations" ], "security": [ { @@ -20617,27 +24748,27 @@ }, {} ], - "operationId": "postProjectAutomation", - "description": "Create a new project_automation. If there is an existing project_automation with the same name as the one specified in the request, will return the existing project_automation unmodified", - "summary": "Create project_automation", + "operationId": "postOrgAutomation", + "description": "Create a new org_automation. If there is an existing org_automation with the same name as the one specified in the request, will return the existing org_automation unmodified", + "summary": "Create org_automation", "requestBody": { - "description": "Any desired information about the new project_automation object", + "description": "Any desired information about the new org_automation object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProjectAutomation" + "$ref": "#/components/schemas/CreateOrgAutomation" } } } }, "responses": { "200": { - "description": "Returns the new project_automation object", + "description": "Returns the new org_automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectAutomation" + "$ref": "#/components/schemas/OrgAutomation" } } } @@ -20728,7 +24859,7 @@ }, "put": { "tags": [ - "ProjectAutomations" + "OrgAutomations" ], "security": [ { @@ -20736,27 +24867,27 @@ }, {} ], - "operationId": "putProjectAutomation", - "description": "Create or replace project_automation. If there is an existing project_automation with the same name as the one specified in the request, will replace the existing project_automation with the provided fields", - "summary": "Create or replace project_automation", + "operationId": "putOrgAutomation", + "description": "Create or replace org_automation. If there is an existing org_automation with the same name as the one specified in the request, will replace the existing org_automation with the provided fields", + "summary": "Create or replace org_automation", "requestBody": { - "description": "Any desired information about the new project_automation object", + "description": "Any desired information about the new org_automation object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProjectAutomation" + "$ref": "#/components/schemas/CreateOrgAutomation" } } } }, "responses": { "200": { - "description": "Returns the new project_automation object", + "description": "Returns the new org_automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectAutomation" + "$ref": "#/components/schemas/OrgAutomation" } } } @@ -20846,12 +24977,12 @@ } }, "get": { - "operationId": "getProjectAutomation", + "operationId": "getOrgAutomation", "tags": [ - "ProjectAutomations" + "OrgAutomations" ], - "description": "List out all project_automations. The project_automations are sorted by creation date, with the most recently-created project_automations coming first", - "summary": "List project_automations", + "description": "List out all org_automations. The org_automations are sorted by creation date, with the most recently-created org_automations coming first", + "summary": "List org_automations", "security": [ { "bearerAuth": [] @@ -20872,7 +25003,7 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/ProjectAutomationName" + "$ref": "#/components/parameters/OrgAutomationName" }, { "$ref": "#/components/parameters/OrgName" @@ -20880,7 +25011,7 @@ ], "responses": { "200": { - "description": "Returns a list of project_automation objects", + "description": "Returns a list of org_automation objects", "content": { "application/json": { "schema": { @@ -20889,9 +25020,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/ProjectAutomation" + "$ref": "#/components/schemas/OrgAutomation" }, - "description": "A list of project_automation objects" + "description": "A list of org_automation objects" } }, "required": [ @@ -20987,9 +25118,9 @@ } }, "options": { - "operationId": "optionsProjectAutomation", + "operationId": "optionsOrgAutomation", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_automation`)", + "summary": "Enable CORS (`/v1/org_automation`)", "security": [], "tags": [ "CORS" @@ -21044,14 +25175,14 @@ } } }, - "/v1/project_automation/{project_automation_id}": { + "/v1/org_automation/{org_automation_id}": { "get": { - "operationId": "getProjectAutomationId", + "operationId": "getOrgAutomationId", "tags": [ - "ProjectAutomations" + "OrgAutomations" ], - "description": "Get a project_automation object by its id", - "summary": "Get project_automation", + "description": "Get a org_automation object by its id", + "summary": "Get org_automation", "security": [ { "bearerAuth": [] @@ -21060,16 +25191,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectAutomationIdParam" + "$ref": "#/components/parameters/OrgAutomationIdParam" } ], "responses": { "200": { - "description": "Returns the project_automation object", + "description": "Returns the org_automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectAutomation" + "$ref": "#/components/schemas/OrgAutomation" } } } @@ -21159,12 +25290,12 @@ } }, "patch": { - "operationId": "patchProjectAutomationId", + "operationId": "patchOrgAutomationId", "tags": [ - "ProjectAutomations" + "OrgAutomations" ], - "description": "Partially update a project_automation object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update project_automation", + "description": "Partially update a org_automation object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update org_automation", "security": [ { "bearerAuth": [] @@ -21173,7 +25304,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectAutomationIdParam" + "$ref": "#/components/parameters/OrgAutomationIdParam" } ], "requestBody": { @@ -21182,18 +25313,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchProjectAutomation" + "$ref": "#/components/schemas/PatchOrgAutomation" } } } }, "responses": { "200": { - "description": "Returns the project_automation object", + "description": "Returns the org_automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectAutomation" + "$ref": "#/components/schemas/OrgAutomation" } } } @@ -21283,12 +25414,12 @@ } }, "delete": { - "operationId": "deleteProjectAutomationId", + "operationId": "deleteOrgAutomationId", "tags": [ - "ProjectAutomations" + "OrgAutomations" ], - "description": "Delete a project_automation object by its id", - "summary": "Delete project_automation", + "description": "Delete a org_automation object by its id", + "summary": "Delete org_automation", "security": [ { "bearerAuth": [] @@ -21297,16 +25428,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectAutomationIdParam" + "$ref": "#/components/parameters/OrgAutomationIdParam" } ], "responses": { "200": { - "description": "Returns the deleted project_automation object", + "description": "Returns the deleted org_automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectAutomation" + "$ref": "#/components/schemas/OrgAutomation" } } } @@ -21396,16 +25527,16 @@ } }, "options": { - "operationId": "optionsProjectAutomationId", + "operationId": "optionsOrgAutomationId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_automation/{project_automation_id}`)", + "summary": "Enable CORS (`/v1/org_automation/{org_automation_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/ProjectAutomationIdParam" + "$ref": "#/components/parameters/OrgAutomationIdParam" } ], "responses": { @@ -27082,6 +31213,13 @@ "service_account_id": { "type": "string", "description": "The ID of the service account to which the token should belong. To create a service account, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI or call [`PATCH /v1/organization/members`](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership)." + }, + "expires_in_seconds": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "description": "Number of seconds from now after which the service token should expire. If omitted, the token never expires." } }, "required": [ @@ -27220,6 +31358,13 @@ "service_account_id": { "type": "string", "description": "The ID of the service account to which the token should belong. To create a service account, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI or call [`PATCH /v1/organization/members`](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership)." + }, + "expires_in_seconds": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "description": "Number of seconds from now after which the service token should expire. If omitted, the token never expires." } }, "required": [ diff --git a/openapi/spec.yaml b/openapi/spec.yaml index 6be9bdd..db05a73 100644 --- a/openapi/spec.yaml +++ b/openapi/spec.yaml @@ -56,6 +56,10 @@ components: type: string format: uuid description: Group id + ProjectGroupIdParam: + type: string + format: uuid + description: ProjectGroup id AclIdParam: type: string format: uuid @@ -64,10 +68,18 @@ components: type: string format: uuid description: User id + AgentIdParam: + type: string + format: uuid + description: Agent id ProjectAutomationIdParam: type: string format: uuid description: ProjectAutomation id + OrgAutomationIdParam: + type: string + format: uuid + description: OrgAutomation id ProjectScoreIdParam: type: string format: uuid @@ -141,9 +153,18 @@ components: GroupName: type: string description: Name of the group to search for + ProjectGroupName: + type: string + description: Name of the project_group to search for + AgentName: + type: string + description: Name of the agent to search for ProjectAutomationName: type: string description: Name of the project_automation to search for + OrgAutomationName: + type: string + description: Name of the org_automation to search for ProjectScoreName: type: string description: Name of the project_score to search for @@ -384,6 +405,8 @@ components: - org_member - project_log - org_project + - org_audit_logs + - project_group description: The object type that the ACL applies to AclObjectId: type: string @@ -403,6 +426,8 @@ components: - org_member - project_log - org_project + - org_audit_logs + - project_group description: The object type that the ACL applies to AclListOrgObjectId: type: string @@ -450,6 +475,8 @@ components: - org_member - project_log - org_project + - org_audit_logs + - project_group description: The object type that the ACL applies to AclListRoleId: type: string @@ -598,6 +625,11 @@ components: nullable: true description: If true, disable real-time queries for this project. This can improve query performance for high-volume logs. + monitor_charts_use_metrics_start: + type: boolean + nullable: true + description: If true, use metrics.start rather than created for monitor chart + time bucket dimensions. default_preprocessor: $ref: "#/components/schemas/NullableSavedFunctionId" Project: @@ -3227,6 +3259,11 @@ components: type: string enum: - ephemeral + ttl: + type: string + enum: + - 5m + - 1h required: - type required: @@ -3248,6 +3285,11 @@ components: type: string enum: - ephemeral + ttl: + type: string + enum: + - 5m + - 1h required: - type required: @@ -3281,6 +3323,20 @@ components: type: string enum: - image_url + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type required: - image_url - type @@ -3304,6 +3360,20 @@ components: type: string enum: - file + cache_control: + type: object + properties: + type: + type: string + enum: + - ephemeral + ttl: + type: string + enum: + - 5m + - 1h + required: + - type required: - file - type @@ -3778,6 +3848,9 @@ components: $ref: "#/components/schemas/ModelParams" position: type: string + endpoint_name: + type: string + nullable: true PromptParserNullish: type: object nullable: true @@ -3805,9 +3878,53 @@ components: type: boolean description: If true, adds a 'No match' option. When selected, no tag is deposited. + allow_skip: + type: boolean + description: If true, adds a 'Skip' option. When selected, the scorer returns + null. required: - type - use_cot + PreprocessorSavedFunctionId: + anyOf: + - type: object + properties: + type: + type: string + enum: + - function + id: + type: string + version: + type: string + description: The version of the function + required: + - type + - id + title: function + - type: object + properties: + type: + type: string + enum: + - global + name: + type: string + function_type: + type: string + enum: + - preprocessor + default: preprocessor + description: The type of global function. Defaults to 'preprocessor'. + required: + - type + - name + title: preprocessor_global + - type: "null" + description: "For prompt-backed scorers: the preprocessor function to use for + trace template variables. Set to null to disable preprocessing. If + omitted, the traced project's default preprocessor will be used, falling + back to the global 'thread' preprocessor." PromptDataNullish: type: object nullable: true @@ -3818,6 +3935,8 @@ components: $ref: "#/components/schemas/PromptOptionsNullish" parser: $ref: "#/components/schemas/PromptParserNullish" + preprocessor: + $ref: "#/components/schemas/PreprocessorSavedFunctionId" tool_functions: type: array nullable: true @@ -4394,6 +4513,105 @@ components: type: string format: uuid description: A list of group IDs to remove from the group's inheriting-from set + ProjectGroup: + type: object + properties: + id: + type: string + format: uuid + description: Unique identifier for the project group + org_id: + type: string + format: uuid + description: |- + Unique id for the organization that the project group belongs under + + It is forbidden to change the org after creating a project group + user_id: + type: string + nullable: true + format: uuid + description: Identifies the user who created the project group + created: + type: string + nullable: true + format: date-time + description: Date of project group creation + name: + type: string + description: Name of the project group + description: + type: string + nullable: true + description: Textual description of the project group + deleted_at: + type: string + nullable: true + format: date-time + description: Date of project group deletion, or null if the project group is + still active + member_projects: + type: array + items: + type: string + format: uuid + maxItems: 10000 + description: Sorted ids of active projects in this project group + required: + - id + - org_id + - name + - member_projects + description: A project group is a collection of projects which can inherit + access from project-group ACLs + CreateProjectGroup: + type: object + properties: + name: + type: string + minLength: 1 + description: Name of the project group + description: + type: string + nullable: true + description: Textual description of the project group + org_name: + type: string + nullable: true + description: For nearly all users, this parameter should be unnecessary. But in + the rare case that your API key belongs to multiple organizations, + you may specify the name of the organization the project group + belongs in. + required: + - name + PatchProjectGroup: + type: object + properties: + name: + type: string + nullable: true + minLength: 1 + description: Name of the project group + description: + type: string + nullable: true + description: Textual description of the project group + add_member_projects: + type: array + nullable: true + items: + type: string + format: uuid + maxItems: 1000 + description: A list of project IDs to add to the project group + remove_member_projects: + type: array + nullable: true + items: + type: string + format: uuid + maxItems: 1000 + description: A list of project IDs to remove from the project group Acl: type: object properties: @@ -4576,6 +4794,98 @@ components: description: Date of user creation required: - id + Agent: + type: object + properties: + id: + type: string + format: uuid + description: Unique identifier for the agent + project_id: + type: string + format: uuid + description: Unique identifier for the project that the agent belongs under + user_id: + type: string + format: uuid + created: + type: string + nullable: true + format: date-time + description: Date of agent creation + name: + type: string + description: Name of the agent. Within a project, agent names are unique + slug: + type: string + description: Stable, URL-safe identifier for the agent, unique within its project. + kind: + type: string + description: "Agent classification: 'custom' for customer-defined agents, 'loop' + for built-in Loop agents." + description: + type: string + nullable: true + description: Textual description of the agent + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + description: User-controlled metadata about the agent + required: + - id + - project_id + - user_id + - name + - slug + - kind + description: An agent is a project-scoped durable object that identifies an AI + agent or service emitting spans + CreateAgent: + type: object + properties: + project_id: + type: string + format: uuid + description: Unique identifier for the project that the agent belongs under + name: + type: string + description: Name of the agent. Within a project, agent names are unique + description: + type: string + nullable: true + description: Textual description of the agent + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + description: User-controlled metadata about the agent + required: + - project_id + - name + description: An agent is a project-scoped durable object that identifies an AI + agent or service emitting spans + PatchAgent: + type: object + properties: + name: + type: string + nullable: true + description: Name of the agent. Within a project, agent names are unique + description: + type: string + nullable: true + description: Textual description of the agent + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + description: User-controlled metadata about the agent + description: An agent is a project-scoped durable object that identifies an AI + agent or service emitting spans AutomationStatus: type: string enum: @@ -4647,47 +4957,312 @@ components: - experiment - dataset description: The object type that the retention policy applies to - TopicAutomationFacetModel: - type: string - nullable: true - enum: - - brain-facet-latest - - brain-facet-1 - - brain-facet-2 - - null - description: Optional facet model override for topic automation - TopicMapFunctionAutomation: + WindowedAutomationConfig: type: object properties: - function: - allOf: - - $ref: "#/components/schemas/SavedFunctionId" - - anyOf: + event_type: + type: string + enum: + - windowed + description: The type of automation. + product_origin: + type: string + nullable: true + enum: + - patterns + - null + description: The product surface that created and manages the automation + status: + $ref: "#/components/schemas/AutomationStatus" + threshold: + type: object + properties: + calculation: + oneOf: - type: object properties: type: type: string enum: - - function - id: - type: string - version: + - btql + btql_query: type: string - description: The version of the function + minLength: 1 + description: A project-scoped BTQL or SQL query without runtime-owned evaluation + time bounds + output: + type: object + properties: + type: + type: string + enum: + - scalar + value_column: + type: string + minLength: 1 + description: The numeric result column produced by the query + required: + - type + - value_column required: - type - - id - title: function - - type: object + - btql_query + - output + description: The calculation evaluated for each window + policy: + type: object + properties: + condition: + type: object properties: type: type: string enum: - - global - name: + - threshold + operator: type: string - function_type: - $ref: "#/components/schemas/FunctionTypeEnum" + enum: + - lt + - lte + - gt + - gte + - eq + - neq + threshold: + type: number + required: + - type + - operator + - threshold + pending_seconds: + type: integer + minimum: 0 + maximum: 2592000 + description: How long the condition must remain breached before firing + no_data_behavior: + type: string + enum: + - keep_last + - resolve + - alert + description: How the lifecycle changes when the calculation returns no data + renotify_interval_seconds: + type: integer + nullable: true + minimum: 1 + maximum: 2592000 + description: Optional reminder interval while the automation is firing + notify_on_recovery: + type: boolean + default: true + description: Whether to deliver actions when a firing automation recovers + required: + - condition + - pending_seconds + - no_data_behavior + description: The lifecycle policy applied to each calculation result + required: + - calculation + - policy + description: Optional calculation and lifecycle policy that gate scheduled + delivery + window: + type: object + properties: + window_seconds: + type: integer + minimum: 1 + maximum: 2592000 + description: How much recent data each scheduled run covers + schedule: + oneOf: + - type: object + properties: + type: + type: string + enum: + - interval + evaluation_interval_seconds: + type: integer + minimum: 1 + maximum: 2592000 + description: How often the automation runs + required: + - type + - evaluation_interval_seconds + - type: object + properties: + type: + type: string + enum: + - cron + cron_expression: + type: string + minLength: 1 + description: A standard five-field cron expression (minute hour day-of-month + month day-of-week) controlling when the automation runs + timezone: + type: string + nullable: true + minLength: 1 + description: IANA timezone used to interpret the cron expression (defaults to + UTC) + required: + - type + - cron_expression + description: "How often the windowed automation runs: at a fixed interval or on + a cron schedule" + evaluation_delay_seconds: + type: integer + minimum: 0 + maximum: 2592000 + description: How far behind the present each evaluation window ends + required: + - window_seconds + - schedule + - evaluation_delay_seconds + loop: + type: object + properties: + prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for the Loop agent + include_trigger_input: + type: boolean + default: false + description: Whether to include the automation trigger payload as input + agent_slug: + type: string + minLength: 1 + description: The Loop agent to run + auto_approve_tools: + type: array + items: + type: string + minLength: 1 + default: [] + description: Write tools that may run without interactive approval + harness: + type: string + enum: + - native + - codex + - claude-code + model: + type: string + minLength: 1 + reasoning_effort: + type: string + enum: + - none + - minimal + - low + - medium + - high + - xhigh + - max + required: + - prompt + - agent_slug + description: Optional Loop agent to run for each triggered window + actions: + type: array + items: + oneOf: + - type: object + properties: + type: + type: string + enum: + - webhook + description: The type of action to take + url: + type: string + description: The webhook URL to send the request to + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination + required: + - type + - url + - type: object + properties: + type: + type: string + enum: + - slack + description: The type of action to take + workspace_id: + type: string + description: The Slack workspace ID to post to + channel: + type: string + description: The Slack channel ID to post to + message_template: + type: string + description: Custom message template for the alert + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination + required: + - type + - workspace_id + - channel + description: A delivery action available to an automation + maxItems: 20 + default: [] + description: Delivery actions exposed to Loop as tools, or run directly when + Loop is not configured + required: + - event_type + - window + TopicAutomationFacetModel: + type: string + nullable: true + enum: + - brain-facet-latest + - brain-facet-1 + - brain-facet-2 + - null + description: Optional facet model override for topic automation + TopicMapFunctionAutomation: + type: object + properties: + function: + allOf: + - $ref: "#/components/schemas/SavedFunctionId" + - anyOf: + - type: object + properties: + type: + type: string + enum: + - function + id: + type: string + version: + type: string + description: The version of the function + required: + - type + - id + title: function + - type: object + properties: + type: + type: string + enum: + - global + name: + type: string + function_type: + $ref: "#/components/schemas/FunctionTypeEnum" required: - type - name @@ -4834,6 +5409,64 @@ components: - sampling_rate - facet_functions - topic_map_functions + TopicDigestAutomationConfig: + type: object + properties: + event_type: + type: string + enum: + - topic_digest + description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" + window_seconds: + type: integer + minimum: 3600 + maximum: 2592000 + default: 86400 + description: How much recent history to include in each digest + scheduled_time_minutes_utc: + type: integer + minimum: 0 + maximum: 1439 + description: Minutes after midnight UTC when the digest should be sent + action: + type: object + properties: + type: + type: string + enum: + - slack + description: The type of action to take + workspace_id: + type: string + description: The Slack workspace ID to post to + channel: + type: string + description: The Slack channel ID to post to + message_template: + type: string + description: Custom message template for the alert + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination + required: + - type + - workspace_id + - channel + description: The Slack action to take when the digest is sent + topic_map_function_ids: + type: array + items: + type: string + maxItems: 10 + description: Optional topic map function IDs to include in the digest + required: + - event_type + - scheduled_time_minutes_utc + - action ProjectAutomation: type: object properties: @@ -4872,6 +5505,8 @@ components: enum: - logs description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" btql_filter: type: string description: BTQL filter to identify rows for the automation rule @@ -4893,6 +5528,11 @@ components: url: type: string description: The webhook URL to send the request to + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - url @@ -4912,6 +5552,11 @@ components: message_template: type: string description: Custom message template for the alert + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - workspace_id @@ -5028,6 +5673,52 @@ components: - format - interval_seconds - credentials + - type: object + properties: + event_type: + type: string + enum: + - async_query + description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" + created_by_user_id: + type: string + format: uuid + description: The user who submitted the async query + object_type: + type: string + enum: + - project_logs + - experiment + - dataset + - playground_logs + description: The source object type for the async query + object_id: + type: string + description: The source object ID for the async query + query: + type: string + description: The SQL query to execute asynchronously + format: + type: string + enum: + - jsonl + description: The materialized result format + batch_size: + type: integer + nullable: true + minimum: 0 + exclusiveMinimum: true + maximum: 100000 + description: The maximum number of result rows to write per async query batch + required: + - event_type + - created_by_user_id + - object_type + - object_id + - query + - format - type: object properties: event_type: @@ -5038,7 +5729,7 @@ components: object_type: $ref: "#/components/schemas/RetentionObjectType" retention_days: - type: number + type: integer minimum: 0 description: The number of days to retain the object required: @@ -5052,6 +5743,8 @@ components: enum: - environment_update description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" environment_filter: type: array items: @@ -5069,6 +5762,11 @@ components: url: type: string description: The webhook URL to send the request to + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - url @@ -5088,6 +5786,11 @@ components: message_template: type: string description: Custom message template for the alert + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - workspace_id @@ -5096,7 +5799,9 @@ components: required: - event_type - action + - $ref: "#/components/schemas/WindowedAutomationConfig" - $ref: "#/components/schemas/TopicAutomationConfig" + - $ref: "#/components/schemas/TopicDigestAutomationConfig" description: The configuration for the automation rule required: - id @@ -5127,6 +5832,8 @@ components: enum: - logs description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" btql_filter: type: string description: BTQL filter to identify rows for the automation rule @@ -5148,6 +5855,11 @@ components: url: type: string description: The webhook URL to send the request to + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - url @@ -5167,6 +5879,11 @@ components: message_template: type: string description: Custom message template for the alert + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - workspace_id @@ -5283,6 +6000,52 @@ components: - format - interval_seconds - credentials + - type: object + properties: + event_type: + type: string + enum: + - async_query + description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" + created_by_user_id: + type: string + format: uuid + description: The user who submitted the async query + object_type: + type: string + enum: + - project_logs + - experiment + - dataset + - playground_logs + description: The source object type for the async query + object_id: + type: string + description: The source object ID for the async query + query: + type: string + description: The SQL query to execute asynchronously + format: + type: string + enum: + - jsonl + description: The materialized result format + batch_size: + type: integer + nullable: true + minimum: 0 + exclusiveMinimum: true + maximum: 100000 + description: The maximum number of result rows to write per async query batch + required: + - event_type + - created_by_user_id + - object_type + - object_id + - query + - format - type: object properties: event_type: @@ -5293,7 +6056,7 @@ components: object_type: $ref: "#/components/schemas/RetentionObjectType" retention_days: - type: number + type: integer minimum: 0 description: The number of days to retain the object required: @@ -5307,6 +6070,8 @@ components: enum: - environment_update description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" environment_filter: type: array items: @@ -5324,6 +6089,11 @@ components: url: type: string description: The webhook URL to send the request to + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - url @@ -5343,6 +6113,11 @@ components: message_template: type: string description: Custom message template for the alert + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - workspace_id @@ -5351,7 +6126,9 @@ components: required: - event_type - action + - $ref: "#/components/schemas/WindowedAutomationConfig" - $ref: "#/components/schemas/TopicAutomationConfig" + - $ref: "#/components/schemas/TopicDigestAutomationConfig" description: The configuration for the automation rule required: - project_id @@ -5377,6 +6154,8 @@ components: enum: - logs description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" btql_filter: type: string description: BTQL filter to identify rows for the automation rule @@ -5398,6 +6177,11 @@ components: url: type: string description: The webhook URL to send the request to + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - url @@ -5417,6 +6201,11 @@ components: message_template: type: string description: Custom message template for the alert + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - workspace_id @@ -5538,25 +6327,73 @@ components: event_type: type: string enum: - - retention + - async_query description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" + created_by_user_id: + type: string + format: uuid + description: The user who submitted the async query object_type: - $ref: "#/components/schemas/RetentionObjectType" - retention_days: - type: number - minimum: 0 - description: The number of days to retain the object - required: - - event_type - - object_type - - retention_days - - type: object - properties: - event_type: type: string enum: - - environment_update + - project_logs + - experiment + - dataset + - playground_logs + description: The source object type for the async query + object_id: + type: string + description: The source object ID for the async query + query: + type: string + description: The SQL query to execute asynchronously + format: + type: string + enum: + - jsonl + description: The materialized result format + batch_size: + type: integer + nullable: true + minimum: 0 + exclusiveMinimum: true + maximum: 100000 + description: The maximum number of result rows to write per async query batch + required: + - event_type + - created_by_user_id + - object_type + - object_id + - query + - format + - type: object + properties: + event_type: + type: string + enum: + - retention + description: The type of automation. + object_type: + $ref: "#/components/schemas/RetentionObjectType" + retention_days: + type: integer + minimum: 0 + description: The number of days to retain the object + required: + - event_type + - object_type + - retention_days + - type: object + properties: + event_type: + type: string + enum: + - environment_update description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" environment_filter: type: array items: @@ -5574,6 +6411,11 @@ components: url: type: string description: The webhook URL to send the request to + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - url @@ -5593,6 +6435,11 @@ components: message_template: type: string description: Custom message template for the alert + formatting_prompt: + type: string + minLength: 1 + maxLength: 10000 + description: Instructions for Loop to format content sent to this destination required: - type - workspace_id @@ -5601,9 +6448,133 @@ components: required: - event_type - action + - $ref: "#/components/schemas/WindowedAutomationConfig" - $ref: "#/components/schemas/TopicAutomationConfig" + - $ref: "#/components/schemas/TopicDigestAutomationConfig" - nullable: true description: The configuration for the automation rule + OrgAutomation: + type: object + properties: + id: + type: string + format: uuid + description: Unique identifier for the project automation + org_id: + type: string + format: uuid + description: Unique identifier for the organization that the org automation + belongs under + user_id: + type: string + nullable: true + format: uuid + description: Identifies the user who created the project automation + created: + type: string + nullable: true + format: date-time + description: Date of project automation creation + name: + type: string + description: Name of the project automation + description: + type: string + nullable: true + description: Textual description of the project automation + config: + type: object + properties: + event_type: + type: string + enum: + - retention + description: The type of automation. + object_type: + $ref: "#/components/schemas/RetentionObjectType" + retention_days: + type: integer + minimum: 0 + description: The number of days to retain the object + required: + - event_type + - object_type + - retention_days + description: The configuration for the org automation rule + required: + - id + - org_id + - name + - config + CreateOrgAutomation: + type: object + properties: + org_id: + type: string + format: uuid + description: Unique identifier for the organization that the org automation + belongs under + name: + type: string + description: Name of the project automation + description: + type: string + nullable: true + description: Textual description of the project automation + config: + type: object + properties: + event_type: + type: string + enum: + - retention + description: The type of automation. + object_type: + $ref: "#/components/schemas/RetentionObjectType" + retention_days: + type: integer + minimum: 0 + description: The number of days to retain the object + required: + - event_type + - object_type + - retention_days + description: The configuration for the org automation rule + required: + - org_id + - name + - config + PatchOrgAutomation: + type: object + properties: + name: + type: string + nullable: true + description: Name of the project automation + description: + type: string + nullable: true + description: Textual description of the project automation + config: + type: object + nullable: true + properties: + event_type: + type: string + enum: + - retention + description: The type of automation. + object_type: + $ref: "#/components/schemas/RetentionObjectType" + retention_days: + type: integer + minimum: 0 + description: The number of days to retain the object + required: + - event_type + - object_type + - retention_days + description: The configuration for the org automation rule ProjectScoreCategory: type: object properties: @@ -5641,6 +6612,8 @@ components: type: object nullable: true properties: + status: + $ref: "#/components/schemas/AutomationStatus" sampling_rate: type: number minimum: 0 @@ -5710,10 +6683,39 @@ components: - $ref: "#/components/schemas/GroupScope" - type: "null" description: The scope at which to run the functions. Defaults to span-level - execution. Trace/group scope requires all functions to be facets. + execution. required: - sampling_rate - scorers + ProjectScoreCondition: + type: object + nullable: true + properties: + when: + type: object + properties: + clauses: + type: array + nullable: true + items: + type: string + subspan_clauses: + type: array + nullable: true + items: + type: string + trace_clauses: + type: array + nullable: true + items: + type: string + behavior: + type: string + enum: + - hidden + default: hidden + required: + - when ProjectScoreConfig: type: object nullable: true @@ -5724,8 +6726,33 @@ components: destination: type: string nullable: true + visibility: + type: object + nullable: true + properties: + users: + type: array + nullable: true + items: + type: string + groups: + type: array + nullable: true + items: + type: string online: $ref: "#/components/schemas/OnlineScoreConfig" + condition: + $ref: "#/components/schemas/ProjectScoreCondition" + object_types: + type: array + nullable: true + items: + type: string + enum: + - project_logs + - dataset + - experiment ProjectScore: type: object properties: @@ -6456,6 +7483,56 @@ components: - edges description: This feature is preliminary and unsupported. title: graph + FacetPreprocessorId: + anyOf: + - type: object + properties: + type: + type: string + enum: + - function + id: + type: string + version: + type: string + description: The version of the function + required: + - type + - id + title: function + - type: object + properties: + type: + type: string + enum: + - global + name: + type: string + function_type: + $ref: "#/components/schemas/FunctionTypeEnum" + required: + - type + - name + title: global + - type: object + properties: + type: + type: string + enum: + - inline + code: + type: string + minLength: 1 + description: The complete JavaScript preprocessor implementation, including its + handler. + required: + - type + - code + title: preprocessor_inline + - type: "null" + description: The saved, global, or inline preprocessor to use for facet + extraction. If not provided, the project default preprocessor will be + used, falling back to the global 'thread' preprocessor. FacetData: type: object properties: @@ -6464,11 +7541,7 @@ components: enum: - facet preprocessor: - allOf: - - $ref: "#/components/schemas/NullableSavedFunctionId" - - description: The preprocessor function to use for facet extraction. If not - provided, the project default preprocessor will be used, falling - back to the global 'thread' preprocessor. + $ref: "#/components/schemas/FacetPreprocessorId" prompt: type: string description: The prompt to use for LLM extraction. The preprocessed text will be @@ -6495,6 +7568,7 @@ components: enum: - hdbscan - kmeans + - community dimension_reduction: type: string enum: @@ -6557,9 +7631,26 @@ components: type: boolean description: Whether new topic generation should ignore the previously saved report during reconciliation. Defaults to false when omitted. + reconcile_mode: + type: string + enum: + - evolve + - names_only + description: 'How reconciliation carries the previous map forward: "evolve" + re-routes new samples into the previous topics before naming; + "names_only" keeps the fresh clustering and carries only topic + ids/names. Defaults to "names_only" when omitted.' distance_threshold: type: number description: Maximum distance to nearest centroid. If exceeded, returns no_match. + btql_filter: + type: string + description: Per-topic-map BTQL filter that was applied when this version was + generated. Absent on versions generated before this was recorded. + automation_btql_filter: + type: string + description: Automation-level BTQL filter that was applied when this version was + generated. Absent on versions generated before this was recorded. required: - type - source_facet @@ -6572,11 +7663,7 @@ components: enum: - batched_facet preprocessor: - allOf: - - $ref: "#/components/schemas/NullableSavedFunctionId" - - description: The preprocessor function to use for facet extraction. If not - provided, the project default preprocessor will be used, falling - back to the global 'thread' preprocessor. + $ref: "#/components/schemas/FacetPreprocessorId" facets: type: array items: @@ -7233,6 +8320,10 @@ components: invoked. Fields are validated against the function type's schema at runtime. For facets: { preprocessor?, prompt?, model? }. For prompts: { model?, ... }." + endpoint_name: + type: string + nullable: true + description: Name of the AI provider secret to pin this invocation to. version: type: string description: The version of the function @@ -7426,6 +8517,22 @@ components: required: - type - value + pointSizeMetric: + type: object + nullable: true + properties: + type: + type: string + enum: + - none + - score + - metric + - metadata + value: + type: string + required: + - type + - value xAxisAggregation: type: string nullable: true @@ -7511,11 +8618,20 @@ components: name: type: string description: Name of the view + description: + type: string + nullable: true + description: Textual description of the view created: type: string nullable: true format: date-time description: Date of view creation + updated_at: + type: string + nullable: true + format: date-time + description: Date of last view update view_data: $ref: "#/components/schemas/ViewData" options: @@ -7570,6 +8686,10 @@ components: name: type: string description: Name of the view + description: + type: string + nullable: true + description: Textual description of the view view_data: $ref: "#/components/schemas/ViewData" options: @@ -7625,6 +8745,10 @@ components: type: string nullable: true description: Name of the view + description: + type: string + nullable: true + description: Textual description of the view view_data: $ref: "#/components/schemas/ViewData" options: @@ -7755,8 +8879,9 @@ components: nullable: true required: - id - description: If service accounts with tokens were created, this will contain the - added users with their API keys + description: The users who were added by this request. api_key and token_name + are only present for the inline service-account create-and-mint + compatibility path. required: - status - org_id @@ -7793,14 +8918,23 @@ components: type: string nullable: true description: Optional name of an initial service token to create for the new - service account. When this field is set, the request must - be authenticated with a service token that has - organization-owner permissions, not a user API key. + service account. This is a narrow compatibility carve-out + only on PATCH /v1/organization/members. When this field is + set, the request must be authenticated with a service + token that has organization-owner permissions, not a user + API key. + token_expires_in_seconds: + type: integer + nullable: true + minimum: 0 + exclusiveMinimum: true + description: Number of seconds from now after which the initial service token + should expire. If omitted, the token never expires. required: - name - description: Service accounts to create. Any caller permitted to add - organization members can create service accounts (but not - necessarily their associated tokens). + description: Service accounts to create. PATCH /v1/organization/members is the + compatibility layer that accepts both plain service-account + creation and the narrower token_name create-and-mint carve-out. send_invite_emails: type: boolean nullable: true @@ -7902,6 +9036,11 @@ components: nullable: true format: uuid description: Unique identifier for the organization + expires_at: + type: string + nullable: true + format: date-time + description: Date at which the API key expires. If null, the key never expires. required: - id - name @@ -7941,6 +9080,12 @@ components: nullable: true format: uuid description: Unique identifier for the organization + expires_at: + type: string + nullable: true + format: date-time + description: Date and time at which the service token expires. If null, the + token never expires. key: type: string description: The raw service token. It will only be exposed this one time @@ -7984,7 +9129,13 @@ components: nullable: true format: uuid description: Unique identifier for the organization - required: + expires_at: + type: string + nullable: true + format: date-time + description: Date and time at which the service token expires. If null, the + token never expires. + required: - id - name - preview_name @@ -8494,6 +9645,8 @@ components: $ref: "#/components/schemas/PromptOptionsNullish" parser: $ref: "#/components/schemas/PromptParserNullish" + preprocessor: + $ref: "#/components/schemas/PreprocessorSavedFunctionId" tool_functions: type: array nullable: true @@ -8920,6 +10073,10 @@ components: oauth_token: type: string description: The OAuth token to use + endpoint_name: + type: string + nullable: true + description: Name of the AI provider secret to pin this run to. required: - project_id - data @@ -8975,6 +10132,13 @@ components: description: Group id name: group_id in: path + ProjectGroupIdParam: + schema: + $ref: "#/components/schemas/ProjectGroupIdParam" + required: true + description: ProjectGroup id + name: project_group_id + in: path AclIdParam: schema: $ref: "#/components/schemas/AclIdParam" @@ -8989,6 +10153,13 @@ components: description: User id name: user_id in: path + AgentIdParam: + schema: + $ref: "#/components/schemas/AgentIdParam" + required: true + description: Agent id + name: agent_id + in: path ProjectAutomationIdParam: schema: $ref: "#/components/schemas/ProjectAutomationIdParam" @@ -8996,6 +10167,13 @@ components: description: ProjectAutomation id name: project_automation_id in: path + OrgAutomationIdParam: + schema: + $ref: "#/components/schemas/OrgAutomationIdParam" + required: true + description: OrgAutomation id + name: org_automation_id + in: path ProjectScoreIdParam: schema: $ref: "#/components/schemas/ProjectScoreIdParam" @@ -9143,6 +10321,22 @@ components: name: group_name in: query allowReserved: true + ProjectGroupName: + schema: + $ref: "#/components/schemas/ProjectGroupName" + required: false + description: Name of the project_group to search for + name: project_group_name + in: query + allowReserved: true + AgentName: + schema: + $ref: "#/components/schemas/AgentName" + required: false + description: Name of the agent to search for + name: agent_name + in: query + allowReserved: true ProjectAutomationName: schema: $ref: "#/components/schemas/ProjectAutomationName" @@ -9151,6 +10345,14 @@ components: name: project_automation_name in: query allowReserved: true + OrgAutomationName: + schema: + $ref: "#/components/schemas/OrgAutomationName" + required: false + description: Name of the org_automation to search for + name: org_automation_name + in: query + allowReserved: true ProjectScoreName: schema: $ref: "#/components/schemas/ProjectScoreName" @@ -14041,32 +15243,32 @@ paths: application/json: schema: nullable: true - /v1/acl: + /v1/project_group: post: tags: - - Acls + - ProjectGroups security: - bearerAuth: [] - {} - operationId: postAcl - description: Create a new acl. If there is an existing acl with the same - contents as the one specified in the request, will return the existing - acl unmodified - summary: Create acl + operationId: postProjectGroup + description: Create a new project_group. If there is an existing project_group + with the same name as the one specified in the request, will return the + existing project_group unmodified + summary: Create project_group requestBody: - description: Any desired information about the new acl object + description: Any desired information about the new project_group object required: false content: application/json: schema: - $ref: "#/components/schemas/AclItem" + $ref: "#/components/schemas/CreateProjectGroup" responses: "200": - description: Returns the new acl object + description: Returns the new project_group object content: application/json: schema: - $ref: "#/components/schemas/Acl" + $ref: "#/components/schemas/ProjectGroup" "400": description: The request was unacceptable, often due to missing a required parameter @@ -14118,29 +15320,31 @@ paths: application/json: schema: nullable: true - delete: - operationId: deleteAcl + put: tags: - - Acls - description: Delete a single acl - summary: Delete single acl + - ProjectGroups security: - bearerAuth: [] - {} + operationId: putProjectGroup + description: Create or replace project_group. If there is an existing + project_group with the same name as the one specified in the request, + will replace the existing project_group with the provided fields + summary: Create or replace project_group requestBody: - description: Parameters which uniquely specify the acl to delete + description: Any desired information about the new project_group object required: false content: application/json: schema: - $ref: "#/components/schemas/AclItem" + $ref: "#/components/schemas/CreateProjectGroup" responses: "200": - description: Returns the deleted acl object + description: Returns the new project_group object content: application/json: schema: - $ref: "#/components/schemas/Acl" + $ref: "#/components/schemas/ProjectGroup" "400": description: The request was unacceptable, often due to missing a required parameter @@ -14193,12 +15397,13 @@ paths: schema: nullable: true get: - operationId: getAcl + operationId: getProjectGroup tags: - - Acls - description: List out all acls. The acls are sorted by creation date, with the - most recently-created acls coming first - summary: List acls + - ProjectGroups + description: List out all project_groups. The project_groups are sorted by + creation date, with the most recently-created project_groups coming + first + summary: List project_groups security: - bearerAuth: [] - {} @@ -14207,16 +15412,11 @@ paths: - $ref: "#/components/parameters/StartingAfter" - $ref: "#/components/parameters/EndingBefore" - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/AclObjectType" - - $ref: "#/components/parameters/AclObjectId" - - $ref: "#/components/parameters/AclListUserId" - - $ref: "#/components/parameters/AclListGroupId" - - $ref: "#/components/parameters/AclListPermission" - - $ref: "#/components/parameters/AclListRestrictObjectType" - - $ref: "#/components/parameters/AclListRoleId" + - $ref: "#/components/parameters/ProjectGroupName" + - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of acl objects + description: Returns a list of project_group objects content: application/json: schema: @@ -14225,8 +15425,8 @@ paths: objects: type: array items: - $ref: "#/components/schemas/Acl" - description: A list of acl objects + $ref: "#/components/schemas/ProjectGroup" + description: A list of project_group objects required: - objects additionalProperties: false @@ -14282,9 +15482,9 @@ paths: schema: nullable: true options: - operationId: optionsAcl + operationId: optionsProjectGroup description: Enable CORS - summary: Enable CORS (`/v1/acl`) + summary: Enable CORS (`/v1/project_group`) security: [] tags: - CORS @@ -14318,25 +15518,104 @@ paths: application/json: schema: nullable: true - /v1/acl/{acl_id}: + /v1/project_group/{project_group_id}: get: - operationId: getAclId + operationId: getProjectGroupId tags: - - Acls - description: Get an acl object by its id - summary: Get acl + - ProjectGroups + description: Get a project_group object by its id + summary: Get project_group security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/AclIdParam" + - $ref: "#/components/parameters/ProjectGroupIdParam" responses: "200": - description: Returns the acl object + description: Returns the project_group object content: application/json: schema: - $ref: "#/components/schemas/Acl" + $ref: "#/components/schemas/ProjectGroup" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + patch: + operationId: patchProjectGroupId + tags: + - ProjectGroups + description: Partially update a project_group object. Specify the fields to + update in the payload. Any object-type fields will be deep-merged with + existing content. Currently we do not support removing fields or setting + them to null. + summary: Partially update project_group + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/ProjectGroupIdParam" + requestBody: + description: Fields to update + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/PatchProjectGroup" + responses: + "200": + description: Returns the project_group object + content: + application/json: + schema: + $ref: "#/components/schemas/ProjectGroup" "400": description: The request was unacceptable, often due to missing a required parameter @@ -14389,23 +15668,23 @@ paths: schema: nullable: true delete: - operationId: deleteAclId + operationId: deleteProjectGroupId tags: - - Acls - description: Delete an acl object by its id - summary: Delete acl + - ProjectGroups + description: Delete a project_group object by its id + summary: Delete project_group security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/AclIdParam" + - $ref: "#/components/parameters/ProjectGroupIdParam" responses: "200": - description: Returns the deleted acl object + description: Returns the deleted project_group object content: application/json: schema: - $ref: "#/components/schemas/Acl" + $ref: "#/components/schemas/ProjectGroup" "400": description: The request was unacceptable, often due to missing a required parameter @@ -14458,14 +15737,14 @@ paths: schema: nullable: true options: - operationId: optionsAclId + operationId: optionsProjectGroupId description: Enable CORS - summary: Enable CORS (`/v1/acl/{acl_id}`) + summary: Enable CORS (`/v1/project_group/{project_group_id}`) security: [] tags: - CORS parameters: - - $ref: "#/components/parameters/AclIdParam" + - $ref: "#/components/parameters/ProjectGroupIdParam" responses: "200": description: Response for CORS method @@ -14496,32 +15775,32 @@ paths: application/json: schema: nullable: true - /v1/acl/batch_update: + /v1/acl: post: - operationId: aclBatchUpdate tags: - Acls - description: Batch update acls. This operation is idempotent, so adding acls - which already exist will have no effect, and removing acls which do not - exist will have no effect. - summary: Batch update acls security: - bearerAuth: [] - {} + operationId: postAcl + description: Create a new acl. If there is an existing acl with the same + contents as the one specified in the request, will return the existing + acl unmodified + summary: Create acl requestBody: - description: Acls to add/remove. + description: Any desired information about the new acl object required: false content: application/json: schema: - $ref: "#/components/schemas/AclBatchUpdateRequest" + $ref: "#/components/schemas/AclItem" responses: "200": - description: A success status + description: Returns the new acl object content: application/json: schema: - $ref: "#/components/schemas/AclBatchUpdateResponse" + $ref: "#/components/schemas/Acl" "400": description: The request was unacceptable, often due to missing a required parameter @@ -14573,39 +15852,1572 @@ paths: application/json: schema: nullable: true - /v1/acl/list_org: - get: - operationId: aclListOrg + delete: + operationId: deleteAcl tags: - Acls - description: List all acls in the org. This query requires the caller to have - `read_acls` permission at the organization level - summary: List org acls + description: Delete a single acl + summary: Delete single acl security: - bearerAuth: [] - {} - parameters: - - $ref: "#/components/parameters/AppLimitParam" - - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/StartingAfter" - - $ref: "#/components/parameters/EndingBefore" - - $ref: "#/components/parameters/AclListOrgObjectType" - - $ref: "#/components/parameters/AclListOrgObjectId" - - $ref: "#/components/parameters/AclListUserId" - - $ref: "#/components/parameters/AclListGroupId" - - $ref: "#/components/parameters/AclListPermission" - - $ref: "#/components/parameters/AclListRestrictObjectType" - - $ref: "#/components/parameters/AclListRoleId" + requestBody: + description: Parameters which uniquely specify the acl to delete + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/AclItem" + responses: + "200": + description: Returns the deleted acl object + content: + application/json: + schema: + $ref: "#/components/schemas/Acl" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + get: + operationId: getAcl + tags: + - Acls + description: List out all acls. The acls are sorted by creation date, with the + most recently-created acls coming first + summary: List acls + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AppLimitParam" + - $ref: "#/components/parameters/StartingAfter" + - $ref: "#/components/parameters/EndingBefore" + - $ref: "#/components/parameters/Ids" + - $ref: "#/components/parameters/AclObjectType" + - $ref: "#/components/parameters/AclObjectId" + - $ref: "#/components/parameters/AclListUserId" + - $ref: "#/components/parameters/AclListGroupId" + - $ref: "#/components/parameters/AclListPermission" + - $ref: "#/components/parameters/AclListRestrictObjectType" + - $ref: "#/components/parameters/AclListRoleId" + responses: + "200": + description: Returns a list of acl objects + content: + application/json: + schema: + type: object + properties: + objects: + type: array + items: + $ref: "#/components/schemas/Acl" + description: A list of acl objects + required: + - objects + additionalProperties: false + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsAcl + description: Enable CORS + summary: Enable CORS (`/v1/acl`) + security: [] + tags: + - CORS + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: + schema: + type: string + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + Access-Control-Max-Age: + schema: + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + /v1/acl/{acl_id}: + get: + operationId: getAclId + tags: + - Acls + description: Get an acl object by its id + summary: Get acl + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AclIdParam" + responses: + "200": + description: Returns the acl object + content: + application/json: + schema: + $ref: "#/components/schemas/Acl" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + delete: + operationId: deleteAclId + tags: + - Acls + description: Delete an acl object by its id + summary: Delete acl + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AclIdParam" + responses: + "200": + description: Returns the deleted acl object + content: + application/json: + schema: + $ref: "#/components/schemas/Acl" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsAclId + description: Enable CORS + summary: Enable CORS (`/v1/acl/{acl_id}`) + security: [] + tags: + - CORS + parameters: + - $ref: "#/components/parameters/AclIdParam" + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: + schema: + type: string + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + Access-Control-Max-Age: + schema: + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + /v1/acl/batch_update: + post: + operationId: aclBatchUpdate + tags: + - Acls + description: Batch update acls. This operation is idempotent, so adding acls + which already exist will have no effect, and removing acls which do not + exist will have no effect. + summary: Batch update acls + security: + - bearerAuth: [] + - {} + requestBody: + description: Acls to add/remove. + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/AclBatchUpdateRequest" + responses: + "200": + description: A success status + content: + application/json: + schema: + $ref: "#/components/schemas/AclBatchUpdateResponse" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + /v1/acl/list_org: + get: + operationId: aclListOrg + tags: + - Acls + description: List all acls in the org. This query requires the caller to have + `read_acls` permission at the organization level + summary: List org acls + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AppLimitParam" + - $ref: "#/components/parameters/Ids" + - $ref: "#/components/parameters/StartingAfter" + - $ref: "#/components/parameters/EndingBefore" + - $ref: "#/components/parameters/AclListOrgObjectType" + - $ref: "#/components/parameters/AclListOrgObjectId" + - $ref: "#/components/parameters/AclListUserId" + - $ref: "#/components/parameters/AclListGroupId" + - $ref: "#/components/parameters/AclListPermission" + - $ref: "#/components/parameters/AclListRestrictObjectType" + - $ref: "#/components/parameters/AclListRoleId" + - $ref: "#/components/parameters/OrgName" + responses: + "200": + description: A list of acls + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/Acl" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsAclListOrg + description: Enable CORS + summary: Enable CORS (`/v1/acl/list_org`) + security: [] + tags: + - CORS + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: + schema: + type: string + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + Access-Control-Max-Age: + schema: + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + /v1/acl/acl/batch_update: + options: + operationId: optionsAclBatchUpdate + description: Enable CORS + summary: Enable CORS (`/v1/acl/acl/batch_update`) + security: [] + tags: + - CORS + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: + schema: + type: string + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + Access-Control-Max-Age: + schema: + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + /v1/user: + get: + operationId: getUser + tags: + - Users + description: List out all users. The users are sorted by creation date, with the + most recently-created users coming first + summary: List users + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AppLimitParam" + - $ref: "#/components/parameters/StartingAfter" + - $ref: "#/components/parameters/EndingBefore" + - $ref: "#/components/parameters/Ids" + - $ref: "#/components/parameters/UserGivenName" + - $ref: "#/components/parameters/UserFamilyName" + - $ref: "#/components/parameters/UserEmail" + - $ref: "#/components/parameters/OrgName" + responses: + "200": + description: Returns a list of user objects + content: + application/json: + schema: + type: object + properties: + objects: + type: array + items: + $ref: "#/components/schemas/User" + description: A list of user objects + required: + - objects + additionalProperties: false + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsUser + description: Enable CORS + summary: Enable CORS (`/v1/user`) + security: [] + tags: + - CORS + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: + schema: + type: string + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + Access-Control-Max-Age: + schema: + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + /v1/user/{user_id}: + get: + operationId: getUserId + tags: + - Users + description: Get a user object by its id + summary: Get user + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/UserIdParam" + responses: + "200": + description: Returns the user object + content: + application/json: + schema: + $ref: "#/components/schemas/User" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsUserId + description: Enable CORS + summary: Enable CORS (`/v1/user/{user_id}`) + security: [] + tags: + - CORS + parameters: + - $ref: "#/components/parameters/UserIdParam" + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: + schema: + type: string + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + Access-Control-Max-Age: + schema: + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + /v1/agent: + post: + tags: + - Agents + security: + - bearerAuth: [] + - {} + operationId: postAgent + description: Create a new agent. If there is an existing agent with the same + name as the one specified in the request, will return the existing agent + unmodified + summary: Create agent + requestBody: + description: Any desired information about the new agent object + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateAgent" + responses: + "200": + description: Returns the new agent object + content: + application/json: + schema: + $ref: "#/components/schemas/Agent" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + put: + tags: + - Agents + security: + - bearerAuth: [] + - {} + operationId: putAgent + description: Create or replace agent. If there is an existing agent with the + same name as the one specified in the request, will replace the existing + agent with the provided fields + summary: Create or replace agent + requestBody: + description: Any desired information about the new agent object + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateAgent" + responses: + "200": + description: Returns the new agent object + content: + application/json: + schema: + $ref: "#/components/schemas/Agent" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + get: + operationId: getAgent + tags: + - Agents + description: List out all agents. The agents are sorted by creation date, with + the most recently-created agents coming first + summary: List agents + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AppLimitParam" + - $ref: "#/components/parameters/StartingAfter" + - $ref: "#/components/parameters/EndingBefore" + - $ref: "#/components/parameters/Ids" + - $ref: "#/components/parameters/AgentName" + - $ref: "#/components/parameters/OrgName" + responses: + "200": + description: Returns a list of agent objects + content: + application/json: + schema: + type: object + properties: + objects: + type: array + items: + $ref: "#/components/schemas/Agent" + description: A list of agent objects + required: + - objects + additionalProperties: false + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsAgent + description: Enable CORS + summary: Enable CORS (`/v1/agent`) + security: [] + tags: + - CORS + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: + schema: + type: string + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + Access-Control-Max-Age: + schema: + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + /v1/agent/{agent_id}: + get: + operationId: getAgentId + tags: + - Agents + description: Get a agent object by its id + summary: Get agent + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AgentIdParam" + responses: + "200": + description: Returns the agent object + content: + application/json: + schema: + $ref: "#/components/schemas/Agent" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + patch: + operationId: patchAgentId + tags: + - Agents + description: Partially update a agent object. Specify the fields to update in + the payload. Any object-type fields will be deep-merged with existing + content. Currently we do not support removing fields or setting them to + null. + summary: Partially update agent + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AgentIdParam" + requestBody: + description: Fields to update + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/PatchAgent" + responses: + "200": + description: Returns the agent object + content: + application/json: + schema: + $ref: "#/components/schemas/Agent" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + delete: + operationId: deleteAgentId + tags: + - Agents + description: Delete a agent object by its id + summary: Delete agent + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AgentIdParam" + responses: + "200": + description: Returns the deleted agent object + content: + application/json: + schema: + $ref: "#/components/schemas/Agent" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsAgentId + description: Enable CORS + summary: Enable CORS (`/v1/agent/{agent_id}`) + security: [] + tags: + - CORS + parameters: + - $ref: "#/components/parameters/AgentIdParam" + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: + schema: + type: string + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + Access-Control-Max-Age: + schema: + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + /v1/project_automation: + post: + tags: + - ProjectAutomations + security: + - bearerAuth: [] + - {} + operationId: postProjectAutomation + description: Create a new project_automation. If there is an existing + project_automation with the same name as the one specified in the + request, will return the existing project_automation unmodified + summary: Create project_automation + requestBody: + description: Any desired information about the new project_automation object + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateProjectAutomation" + responses: + "200": + description: Returns the new project_automation object + content: + application/json: + schema: + $ref: "#/components/schemas/ProjectAutomation" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + put: + tags: + - ProjectAutomations + security: + - bearerAuth: [] + - {} + operationId: putProjectAutomation + description: Create or replace project_automation. If there is an existing + project_automation with the same name as the one specified in the + request, will replace the existing project_automation with the provided + fields + summary: Create or replace project_automation + requestBody: + description: Any desired information about the new project_automation object + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateProjectAutomation" + responses: + "200": + description: Returns the new project_automation object + content: + application/json: + schema: + $ref: "#/components/schemas/ProjectAutomation" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + get: + operationId: getProjectAutomation + tags: + - ProjectAutomations + description: List out all project_automations. The project_automations are + sorted by creation date, with the most recently-created + project_automations coming first + summary: List project_automations + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AppLimitParam" + - $ref: "#/components/parameters/StartingAfter" + - $ref: "#/components/parameters/EndingBefore" + - $ref: "#/components/parameters/Ids" + - $ref: "#/components/parameters/ProjectAutomationName" - $ref: "#/components/parameters/OrgName" responses: "200": - description: A list of acls + description: Returns a list of project_automation objects content: application/json: schema: - type: array - items: - $ref: "#/components/schemas/Acl" + type: object + properties: + objects: + type: array + items: + $ref: "#/components/schemas/ProjectAutomation" + description: A list of project_automation objects + required: + - objects + additionalProperties: false "400": description: The request was unacceptable, often due to missing a required parameter @@ -14658,47 +17470,9 @@ paths: schema: nullable: true options: - operationId: optionsAclListOrg - description: Enable CORS - summary: Enable CORS (`/v1/acl/list_org`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true - /v1/acl/acl/batch_update: - options: - operationId: optionsAclBatchUpdate + operationId: optionsProjectAutomation description: Enable CORS - summary: Enable CORS (`/v1/acl/acl/batch_update`) + summary: Enable CORS (`/v1/project_automation`) security: [] tags: - CORS @@ -14732,42 +17506,25 @@ paths: application/json: schema: nullable: true - /v1/user: + /v1/project_automation/{project_automation_id}: get: - operationId: getUser + operationId: getProjectAutomationId tags: - - Users - description: List out all users. The users are sorted by creation date, with the - most recently-created users coming first - summary: List users + - ProjectAutomations + description: Get a project_automation object by its id + summary: Get project_automation security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/AppLimitParam" - - $ref: "#/components/parameters/StartingAfter" - - $ref: "#/components/parameters/EndingBefore" - - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/UserGivenName" - - $ref: "#/components/parameters/UserFamilyName" - - $ref: "#/components/parameters/UserEmail" - - $ref: "#/components/parameters/OrgName" + - $ref: "#/components/parameters/ProjectAutomationIdParam" responses: "200": - description: Returns a list of user objects + description: Returns the project_automation object content: application/json: schema: - type: object - properties: - objects: - type: array - items: - $ref: "#/components/schemas/User" - description: A list of user objects - required: - - objects - additionalProperties: false + $ref: "#/components/schemas/ProjectAutomation" "400": description: The request was unacceptable, often due to missing a required parameter @@ -14819,36 +17576,78 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsUser - description: Enable CORS - summary: Enable CORS (`/v1/user`) - security: [] + patch: + operationId: patchProjectAutomationId tags: - - CORS + - ProjectAutomations + description: Partially update a project_automation object. Specify the fields to + update in the payload. Any object-type fields will be deep-merged with + existing content. Currently we do not support removing fields or setting + them to null. + summary: Partially update project_automation + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/ProjectAutomationIdParam" + requestBody: + description: Fields to update + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/PatchProjectAutomation" responses: "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: + description: Returns the project_automation object + content: + application/json: + schema: + $ref: "#/components/schemas/ProjectAutomation" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: schema: type: string - Access-Control-Allow-Headers: + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: schema: type: string - Access-Control-Allow-Methods: + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: schema: type: string - Access-Control-Allow-Origin: + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: schema: type: string - Access-Control-Max-Age: + content: + text/plain: schema: type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) content: text/plain: schema: @@ -14856,25 +17655,24 @@ paths: application/json: schema: nullable: true - /v1/user/{user_id}: - get: - operationId: getUserId + delete: + operationId: deleteProjectAutomationId tags: - - Users - description: Get a user object by its id - summary: Get user + - ProjectAutomations + description: Delete a project_automation object by its id + summary: Delete project_automation security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/UserIdParam" + - $ref: "#/components/parameters/ProjectAutomationIdParam" responses: "200": - description: Returns the user object + description: Returns the deleted project_automation object content: application/json: schema: - $ref: "#/components/schemas/User" + $ref: "#/components/schemas/ProjectAutomation" "400": description: The request was unacceptable, often due to missing a required parameter @@ -14927,14 +17725,14 @@ paths: schema: nullable: true options: - operationId: optionsUserId + operationId: optionsProjectAutomationId description: Enable CORS - summary: Enable CORS (`/v1/user/{user_id}`) + summary: Enable CORS (`/v1/project_automation/{project_automation_id}`) security: [] tags: - CORS parameters: - - $ref: "#/components/parameters/UserIdParam" + - $ref: "#/components/parameters/ProjectAutomationIdParam" responses: "200": description: Response for CORS method @@ -14965,32 +17763,32 @@ paths: application/json: schema: nullable: true - /v1/project_automation: + /v1/org_automation: post: tags: - - ProjectAutomations + - OrgAutomations security: - bearerAuth: [] - {} - operationId: postProjectAutomation - description: Create a new project_automation. If there is an existing - project_automation with the same name as the one specified in the - request, will return the existing project_automation unmodified - summary: Create project_automation + operationId: postOrgAutomation + description: Create a new org_automation. If there is an existing org_automation + with the same name as the one specified in the request, will return the + existing org_automation unmodified + summary: Create org_automation requestBody: - description: Any desired information about the new project_automation object + description: Any desired information about the new org_automation object required: false content: application/json: schema: - $ref: "#/components/schemas/CreateProjectAutomation" + $ref: "#/components/schemas/CreateOrgAutomation" responses: "200": - description: Returns the new project_automation object + description: Returns the new org_automation object content: application/json: schema: - $ref: "#/components/schemas/ProjectAutomation" + $ref: "#/components/schemas/OrgAutomation" "400": description: The request was unacceptable, often due to missing a required parameter @@ -15044,30 +17842,29 @@ paths: nullable: true put: tags: - - ProjectAutomations + - OrgAutomations security: - bearerAuth: [] - {} - operationId: putProjectAutomation - description: Create or replace project_automation. If there is an existing - project_automation with the same name as the one specified in the - request, will replace the existing project_automation with the provided - fields - summary: Create or replace project_automation + operationId: putOrgAutomation + description: Create or replace org_automation. If there is an existing + org_automation with the same name as the one specified in the request, + will replace the existing org_automation with the provided fields + summary: Create or replace org_automation requestBody: - description: Any desired information about the new project_automation object + description: Any desired information about the new org_automation object required: false content: application/json: schema: - $ref: "#/components/schemas/CreateProjectAutomation" + $ref: "#/components/schemas/CreateOrgAutomation" responses: "200": - description: Returns the new project_automation object + description: Returns the new org_automation object content: application/json: schema: - $ref: "#/components/schemas/ProjectAutomation" + $ref: "#/components/schemas/OrgAutomation" "400": description: The request was unacceptable, often due to missing a required parameter @@ -15120,13 +17917,13 @@ paths: schema: nullable: true get: - operationId: getProjectAutomation + operationId: getOrgAutomation tags: - - ProjectAutomations - description: List out all project_automations. The project_automations are - sorted by creation date, with the most recently-created - project_automations coming first - summary: List project_automations + - OrgAutomations + description: List out all org_automations. The org_automations are sorted by + creation date, with the most recently-created org_automations coming + first + summary: List org_automations security: - bearerAuth: [] - {} @@ -15135,11 +17932,11 @@ paths: - $ref: "#/components/parameters/StartingAfter" - $ref: "#/components/parameters/EndingBefore" - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/ProjectAutomationName" + - $ref: "#/components/parameters/OrgAutomationName" - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of project_automation objects + description: Returns a list of org_automation objects content: application/json: schema: @@ -15148,8 +17945,8 @@ paths: objects: type: array items: - $ref: "#/components/schemas/ProjectAutomation" - description: A list of project_automation objects + $ref: "#/components/schemas/OrgAutomation" + description: A list of org_automation objects required: - objects additionalProperties: false @@ -15205,9 +18002,9 @@ paths: schema: nullable: true options: - operationId: optionsProjectAutomation + operationId: optionsOrgAutomation description: Enable CORS - summary: Enable CORS (`/v1/project_automation`) + summary: Enable CORS (`/v1/org_automation`) security: [] tags: - CORS @@ -15241,25 +18038,25 @@ paths: application/json: schema: nullable: true - /v1/project_automation/{project_automation_id}: + /v1/org_automation/{org_automation_id}: get: - operationId: getProjectAutomationId + operationId: getOrgAutomationId tags: - - ProjectAutomations - description: Get a project_automation object by its id - summary: Get project_automation + - OrgAutomations + description: Get a org_automation object by its id + summary: Get org_automation security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/ProjectAutomationIdParam" + - $ref: "#/components/parameters/OrgAutomationIdParam" responses: "200": - description: Returns the project_automation object + description: Returns the org_automation object content: application/json: schema: - $ref: "#/components/schemas/ProjectAutomation" + $ref: "#/components/schemas/OrgAutomation" "400": description: The request was unacceptable, often due to missing a required parameter @@ -15312,33 +18109,33 @@ paths: schema: nullable: true patch: - operationId: patchProjectAutomationId + operationId: patchOrgAutomationId tags: - - ProjectAutomations - description: Partially update a project_automation object. Specify the fields to + - OrgAutomations + description: Partially update a org_automation object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. - summary: Partially update project_automation + summary: Partially update org_automation security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/ProjectAutomationIdParam" + - $ref: "#/components/parameters/OrgAutomationIdParam" requestBody: description: Fields to update required: false content: application/json: schema: - $ref: "#/components/schemas/PatchProjectAutomation" + $ref: "#/components/schemas/PatchOrgAutomation" responses: "200": - description: Returns the project_automation object + description: Returns the org_automation object content: application/json: schema: - $ref: "#/components/schemas/ProjectAutomation" + $ref: "#/components/schemas/OrgAutomation" "400": description: The request was unacceptable, often due to missing a required parameter @@ -15391,23 +18188,23 @@ paths: schema: nullable: true delete: - operationId: deleteProjectAutomationId + operationId: deleteOrgAutomationId tags: - - ProjectAutomations - description: Delete a project_automation object by its id - summary: Delete project_automation + - OrgAutomations + description: Delete a org_automation object by its id + summary: Delete org_automation security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/ProjectAutomationIdParam" + - $ref: "#/components/parameters/OrgAutomationIdParam" responses: "200": - description: Returns the deleted project_automation object + description: Returns the deleted org_automation object content: application/json: schema: - $ref: "#/components/schemas/ProjectAutomation" + $ref: "#/components/schemas/OrgAutomation" "400": description: The request was unacceptable, often due to missing a required parameter @@ -15460,14 +18257,14 @@ paths: schema: nullable: true options: - operationId: optionsProjectAutomationId + operationId: optionsOrgAutomationId description: Enable CORS - summary: Enable CORS (`/v1/project_automation/{project_automation_id}`) + summary: Enable CORS (`/v1/org_automation/{org_automation_id}`) security: [] tags: - CORS parameters: - - $ref: "#/components/parameters/ProjectAutomationIdParam" + - $ref: "#/components/parameters/OrgAutomationIdParam" responses: "200": description: Response for CORS method @@ -19009,6 +21806,13 @@ paths: tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI or call [`PATCH /v1/organization/members`](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership). + expires_in_seconds: + type: integer + nullable: true + minimum: 0 + exclusiveMinimum: true + description: Number of seconds from now after which the service token should + expire. If omitted, the token never expires. required: - name - service_account_id @@ -19107,6 +21911,13 @@ paths: tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI or call [`PATCH /v1/organization/members`](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership). + expires_in_seconds: + type: integer + nullable: true + minimum: 0 + exclusiveMinimum: true + description: Number of seconds from now after which the service token should + expire. If omitted, the token never expires. required: - name - service_account_id