From 5d7d557f9ac59367691fab841330d2056adfa7b9 Mon Sep 17 00:00:00 2001 From: Ankur Goyal Date: Sat, 25 Apr 2026 10:17:02 -0700 Subject: [PATCH 1/2] bump --- openapi/spec.json | 3124 ++++++++++++++++++++++++--------------------- openapi/spec.yaml | 2595 +++++++++++++++++++------------------ 2 files changed, 3062 insertions(+), 2657 deletions(-) diff --git a/openapi/spec.json b/openapi/spec.json index 3869341..c8aa922 100644 --- a/openapi/spec.json +++ b/openapi/spec.json @@ -94,11 +94,6 @@ "format": "uuid", "description": "SpanIframe id" }, - "EvalStatusPageIdParam": { - "type": "string", - "format": "uuid", - "description": "EvalStatusPage id" - }, "FunctionIdParam": { "type": "string", "format": "uuid", @@ -139,6 +134,11 @@ "format": "uuid", "description": "McpServer id" }, + "DatasetSnapshotIdParam": { + "type": "string", + "format": "uuid", + "description": "DatasetSnapshot id" + }, "ProjectIdQuery": { "type": "string", "format": "uuid", @@ -188,10 +188,6 @@ "type": "string", "description": "Name of the span_iframe to search for" }, - "EvalStatusPageName": { - "type": "string", - "description": "Name of the eval_status_page to search for" - }, "FunctionName": { "type": "string", "description": "Name of the function to search for" @@ -220,6 +216,10 @@ "type": "string", "description": "Name of the mcp_server to search for" }, + "DatasetSnapshotName": { + "type": "string", + "description": "Name of the dataset_snapshot to search for" + }, "OrgName": { "type": "string", "description": "Filter search results to within a particular organization" @@ -815,6 +815,15 @@ }, "type": { "$ref": "#/components/schemas/SpanType" + }, + "purpose": { + "type": "string", + "nullable": true, + "enum": [ + "scorer", + null + ], + "description": "A special value that indicates the span was generated by a scoring automation" } }, "additionalProperties": { @@ -1676,6 +1685,35 @@ "nullable": true, "description": "Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified." }, + "internal_metadata": { + "type": "object", + "nullable": true, + "properties": { + "dataset_filter": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "BTQL filter payload used to evaluate a subset of a linked dataset." + } + }, + "additionalProperties": { + "nullable": true + }, + "description": "Braintrust-controlled metadata about the experiment." + }, + "parameters_id": { + "type": "string", + "nullable": true, + "format": "uuid", + "description": "Identifier of the linked saved parameters object, or null if the experiment is not linked to saved parameters" + }, + "parameters_version": { + "type": "string", + "nullable": true, + "description": "Version number of the linked saved parameters object the experiment was run against." + }, "public": { "type": "boolean", "description": "Whether or not the experiment is public. Public experiments can be viewed by anybody inside or outside the organization" @@ -1749,6 +1787,35 @@ "nullable": true, "description": "Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified." }, + "internal_metadata": { + "type": "object", + "nullable": true, + "properties": { + "dataset_filter": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "BTQL filter payload used to evaluate a subset of a linked dataset." + } + }, + "additionalProperties": { + "nullable": true + }, + "description": "Braintrust-controlled metadata about the experiment." + }, + "parameters_id": { + "type": "string", + "nullable": true, + "format": "uuid", + "description": "Identifier of the linked saved parameters object, or null if the experiment is not linked to saved parameters" + }, + "parameters_version": { + "type": "string", + "nullable": true, + "description": "Version number of the linked saved parameters object the experiment was run against." + }, "public": { "type": "boolean", "nullable": true, @@ -1813,6 +1880,35 @@ "nullable": true, "description": "Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified." }, + "internal_metadata": { + "type": "object", + "nullable": true, + "properties": { + "dataset_filter": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "BTQL filter payload used to evaluate a subset of a linked dataset." + } + }, + "additionalProperties": { + "nullable": true + }, + "description": "Braintrust-controlled metadata about the experiment." + }, + "parameters_id": { + "type": "string", + "nullable": true, + "format": "uuid", + "description": "Identifier of the linked saved parameters object, or null if the experiment is not linked to saved parameters" + }, + "parameters_version": { + "type": "string", + "nullable": true, + "description": "Version number of the linked saved parameters object the experiment was run against." + }, "public": { "type": "boolean", "nullable": true, @@ -2591,6 +2687,14 @@ "format": "uuid", "description": "Identifies the user who created the dataset" }, + "tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of tags for the dataset" + }, "metadata": { "type": "object", "nullable": true, @@ -2629,6 +2733,14 @@ "nullable": true, "description": "Textual description of the dataset" }, + "tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of tags for the dataset" + }, "metadata": { "type": "object", "nullable": true, @@ -2656,6 +2768,14 @@ "nullable": true, "description": "Textual description of the dataset" }, + "tags": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "A list of tags for the dataset" + }, "metadata": { "type": "object", "nullable": true, @@ -4936,12 +5056,75 @@ "nullable": true, "format": "date-time", "description": "Date of user creation" + }, + "last_active_at": { + "type": "number", + "nullable": true, + "description": "Unix timestamp in milliseconds of the user's last activity, when available" } }, "required": [ "id" ] }, + "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", + "enum": [ + "group" + ] + }, + "group_by": { + "type": "string", + "description": "Field path to group by, e.g. metadata.session_id" + }, + "idle_seconds": { + "type": "number", + "description": "Optional: trigger after this many seconds of inactivity" + } + }, + "required": [ + "type", + "group_by" + ], + "description": "Process spans/traces grouped by a field (e.g., session_id)" + }, "RetentionObjectType": { "type": "string", "enum": [ @@ -5021,64 +5204,6 @@ "function" ] }, - "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", - "enum": [ - "group" - ] - }, - "group_by": { - "type": "string", - "description": "Field path to group by, e.g. metadata.session_id" - }, - "idle_seconds": { - "type": "number", - "description": "Optional: trigger after this many seconds of inactivity" - } - }, - "required": [ - "type", - "group_by" - ], - "description": "Process spans/traces grouped by a field (e.g., session_id)" - }, "TopicAutomationDataScope": { "anyOf": [ { @@ -5241,6 +5366,18 @@ "nullable": true, "description": "Optional BTQL filter applied before topic automation." }, + "rerun_seconds": { + "type": "number", + "nullable": true, + "minimum": 600, + "description": "How often to recompute topic maps" + }, + "relabel_overlap_seconds": { + "type": "number", + "nullable": true, + "minimum": 60, + "description": "How much recent history to relabel after a new topic map version becomes active" + }, "backfill_time_range": { "anyOf": [ { @@ -5265,7 +5402,7 @@ "type": "null" } ], - "description": "Optional default time range for backfill operations." + "description": "Topic window used for classification coverage and initial backfill." } }, "required": [ @@ -5310,7 +5447,7 @@ "description": "Textual description of the project automation" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -5455,6 +5592,23 @@ ], "description": "The definition of what to export" }, + "scope": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpanScope" + }, + { + "$ref": "#/components/schemas/TraceScope" + }, + { + "$ref": "#/components/schemas/GroupScope" + }, + { + "type": "null" + } + ], + "description": "Execution scope for export automation. Defaults to span-level execution." + }, "export_path": { "type": "string", "description": "The path to export the results to. It should include the storage protocol and prefix, e.g. s3://bucket-name/path/to/export" @@ -5498,6 +5652,25 @@ "role_arn", "external_id" ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "gcp_service_account" + ] + }, + "service_account_email": { + "type": "string", + "description": "The GCP service account email to impersonate" + } + }, + "required": [ + "type", + "service_account_email" + ] } ] }, @@ -5650,7 +5823,7 @@ "description": "Textual description of the project automation" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -5795,8 +5968,25 @@ ], "description": "The definition of what to export" }, - "export_path": { - "type": "string", + "scope": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpanScope" + }, + { + "$ref": "#/components/schemas/TraceScope" + }, + { + "$ref": "#/components/schemas/GroupScope" + }, + { + "type": "null" + } + ], + "description": "Execution scope for export automation. Defaults to span-level execution." + }, + "export_path": { + "type": "string", "description": "The path to export the results to. It should include the storage protocol and prefix, e.g. s3://bucket-name/path/to/export" }, "format": { @@ -5838,6 +6028,25 @@ "role_arn", "external_id" ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "gcp_service_account" + ] + }, + "service_account_email": { + "type": "string", + "description": "The GCP service account email to impersonate" + } + }, + "required": [ + "type", + "service_account_email" + ] } ] }, @@ -5985,7 +6194,7 @@ "description": "Textual description of the project automation" }, "config": { - "anyOf": [ + "oneOf": [ { "type": "object", "properties": { @@ -6130,6 +6339,23 @@ ], "description": "The definition of what to export" }, + "scope": { + "anyOf": [ + { + "$ref": "#/components/schemas/SpanScope" + }, + { + "$ref": "#/components/schemas/TraceScope" + }, + { + "$ref": "#/components/schemas/GroupScope" + }, + { + "type": "null" + } + ], + "description": "Execution scope for export automation. Defaults to span-level execution." + }, "export_path": { "type": "string", "description": "The path to export the results to. It should include the storage protocol and prefix, e.g. s3://bucket-name/path/to/export" @@ -6173,6 +6399,25 @@ "role_arn", "external_id" ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "gcp_service_account" + ] + }, + "service_account_email": { + "type": "string", + "description": "The GCP service account email to impersonate" + } + }, + "required": [ + "type", + "service_account_email" + ] } ] }, @@ -6297,7 +6542,7 @@ "$ref": "#/components/schemas/TopicAutomationConfig" }, { - "type": "null" + "nullable": true } ], "description": "The configuration for the automation rule" @@ -6819,192 +7064,6 @@ } } }, - "EvalStatusPageTheme": { - "type": "string", - "enum": [ - "light", - "dark" - ], - "description": "The theme for the page" - }, - "EvalStatusPageConfig": { - "type": "object", - "properties": { - "score_columns": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - }, - "description": "The score columns to display on the page" - }, - "metric_columns": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - }, - "description": "The metric columns to display on the page" - }, - "grouping_field": { - "type": "string", - "nullable": true, - "description": "The metadata field to use for grouping experiments (model)" - }, - "filter": { - "type": "string", - "nullable": true, - "description": "BTQL filter to apply to experiment data" - }, - "sort_by": { - "type": "string", - "nullable": true, - "description": "Field to sort results by (format: 'score:' or 'metric:')" - }, - "sort_order": { - "type": "string", - "nullable": true, - "enum": [ - "asc", - "desc", - null - ], - "description": "Sort order (ascending or descending)" - }, - "api_key": { - "type": "string", - "nullable": true, - "description": "The API key used for fetching experiment data" - } - }, - "description": "Configuration for what data to display" - }, - "EvalStatusPage": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the eval status page" - }, - "project_id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the project that the eval status page belongs under" - }, - "user_id": { - "type": "string", - "nullable": true, - "format": "uuid", - "description": "Identifies the user who created the eval status page" - }, - "created": { - "type": "string", - "nullable": true, - "format": "date-time", - "description": "Date of eval status page creation" - }, - "deleted_at": { - "type": "string", - "nullable": true, - "format": "date-time", - "description": "Date of eval status page deletion, or null if the eval status page is still active" - }, - "name": { - "type": "string", - "description": "Name of the eval status page" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Textual description of the eval status page" - }, - "logo_url": { - "type": "string", - "nullable": true, - "description": "URL of the logo to display on the page" - }, - "theme": { - "$ref": "#/components/schemas/EvalStatusPageTheme" - }, - "config": { - "$ref": "#/components/schemas/EvalStatusPageConfig" - } - }, - "required": [ - "id", - "project_id", - "name", - "theme", - "config" - ], - "description": "A public eval status page that displays aggregate experiment results" - }, - "CreateEvalStatusPage": { - "type": "object", - "properties": { - "project_id": { - "type": "string", - "format": "uuid", - "description": "Unique identifier for the project that the eval status page belongs under" - }, - "name": { - "type": "string", - "description": "Name of the eval status page" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Textual description of the eval status page" - }, - "logo_url": { - "type": "string", - "nullable": true, - "description": "URL of the logo to display on the page" - }, - "theme": { - "$ref": "#/components/schemas/EvalStatusPageTheme" - }, - "config": { - "$ref": "#/components/schemas/EvalStatusPageConfig" - } - }, - "required": [ - "project_id", - "name", - "theme", - "config" - ], - "description": "A public eval status page that displays aggregate experiment results" - }, - "PatchEvalStatusPage": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "description": "Name of the eval status page" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Textual description of the eval status page" - }, - "logo_url": { - "type": "string", - "nullable": true, - "description": "URL of the logo to display on the page" - }, - "theme": { - "$ref": "#/components/schemas/EvalStatusPageTheme", - "nullable": true - }, - "config": { - "$ref": "#/components/schemas/EvalStatusPageConfig", - "nullable": true - } - } - }, "CodeBundle": { "type": "object", "properties": { @@ -7713,6 +7772,59 @@ ], "title": "facet" }, + "TopicMapGenerationSettings": { + "type": "object", + "properties": { + "algorithm": { + "type": "string", + "enum": [ + "hdbscan", + "kmeans" + ] + }, + "dimension_reduction": { + "type": "string", + "enum": [ + "umap", + "pca", + "none" + ] + }, + "sample_size": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "n_clusters": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "min_cluster_size": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "min_samples": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "hierarchy_threshold": { + "type": "integer", + "minimum": 0, + "exclusiveMinimum": true + }, + "naming_model": { + "type": "string" + } + }, + "required": [ + "algorithm", + "dimension_reduction" + ], + "description": "Clustering and naming settings used to generate this topic map" + }, "TopicMapData": { "type": "object", "properties": { @@ -7745,6 +7857,9 @@ }, "description": "Mapping from topic_id to topic name" }, + "generation_settings": { + "$ref": "#/components/schemas/TopicMapGenerationSettings" + }, "distance_threshold": { "type": "number", "description": "Maximum distance to nearest centroid. If exceeded, returns no_match." @@ -8893,6 +9008,10 @@ "type": "string", "nullable": true }, + "topicMapReportKey": { + "type": "string", + "nullable": true + }, "chartHeight": { "type": "number", "nullable": true @@ -9043,9 +9162,14 @@ "enum": [ "traces", "spans", + "topics", null ] }, + "cluster": { + "type": "string", + "nullable": true + }, "freezeColumns": { "type": "boolean", "nullable": true @@ -10069,60 +10193,146 @@ } } }, - "Environment": { + "DatasetSnapshot": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", - "description": "Unique identifier for the environment" + "description": "Unique identifier for the dataset snapshot" }, - "org_id": { + "dataset_id": { "type": "string", "format": "uuid", - "description": "Unique identifier for the organization that the environment belongs under" + "description": "Unique identifier for the dataset that this snapshot belongs to" }, "name": { "type": "string", - "description": "Name of the environment" - }, - "slug": { - "type": "string", - "description": "A url-friendly, unique identifier for the environment within an organization" + "description": "Name of the dataset snapshot" }, "description": { "type": "string", - "nullable": true, - "description": "Textual description of the environment" + "nullable": true }, - "created": { + "xact_id": { "type": "string", - "nullable": true, - "format": "date-time", - "description": "Date of environment creation" + "description": "Transaction id of the brainstore version at the time of the snapshot" }, - "deleted_at": { + "created": { "type": "string", "nullable": true, "format": "date-time", - "description": "Date of environment deletion, or null if the environment is still active" + "description": "Date of dataset snapshot creation" } }, "required": [ "id", - "org_id", + "dataset_id", "name", - "slug" + "description", + "xact_id", + "created" ] }, - "CreateEnvironment": { + "CreateDatasetSnapshot": { "type": "object", "properties": { - "name": { + "dataset_id": { "type": "string", - "description": "Name of the environment" + "format": "uuid", + "description": "Unique identifier for the dataset that this snapshot belongs to" }, - "slug": { + "name": { + "type": "string", + "minLength": 1, + "description": "Name of the dataset snapshot" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the dataset snapshot" + }, + "xact_id": { + "type": "string", + "minLength": 1, + "description": "Transaction id of the brainstore version at the time of the snapshot" + } + }, + "required": [ + "dataset_id", + "name", + "xact_id" + ] + }, + "PatchDatasetSnapshot": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "Name of the dataset snapshot" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the dataset snapshot" + } + } + }, + "Environment": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the environment" + }, + "org_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the organization that the environment belongs under" + }, + "name": { + "type": "string", + "description": "Name of the environment" + }, + "slug": { + "type": "string", + "description": "A url-friendly, unique identifier for the environment within an organization" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the environment" + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of environment creation" + }, + "deleted_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of environment deletion, or null if the environment is still active" + } + }, + "required": [ + "id", + "org_id", + "name", + "slug" + ] + }, + "CreateEnvironment": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the environment" + }, + "slug": { "type": "string", "description": "A url-friendly, unique identifier for the environment within an organization" }, @@ -10553,6 +10763,16 @@ "type": "string", "description": "The inline code to execute" }, + "function_type": { + "allOf": [ + { + "$ref": "#/components/schemas/FunctionTypeEnum" + }, + { + "description": "The function type for inline code. Required when invoking inline preprocessors." + } + ] + }, "name": { "type": "string", "nullable": true, @@ -10668,6 +10888,16 @@ "dataset_id": { "type": "string" }, + "dataset_version": { + "type": "string", + "nullable": true, + "description": "The version of the dataset to evaluate" + }, + "dataset_environment": { + "type": "string", + "nullable": true, + "description": "The environment tag that resolves to the dataset version to evaluate" + }, "_internal_btql": { "type": "object", "nullable": true, @@ -10691,6 +10921,16 @@ "dataset_name": { "type": "string" }, + "dataset_version": { + "type": "string", + "nullable": true, + "description": "The version of the dataset to evaluate" + }, + "dataset_environment": { + "type": "string", + "nullable": true, + "description": "The environment tag that resolves to the dataset version to evaluate" + }, "_internal_btql": { "type": "object", "nullable": true, @@ -10982,15 +11222,6 @@ "name": "span_iframe_id", "in": "path" }, - "EvalStatusPageIdParam": { - "schema": { - "$ref": "#/components/schemas/EvalStatusPageIdParam" - }, - "required": true, - "description": "EvalStatusPage id", - "name": "eval_status_page_id", - "in": "path" - }, "FunctionIdParam": { "schema": { "$ref": "#/components/schemas/FunctionIdParam" @@ -11063,6 +11294,15 @@ "name": "mcp_server_id", "in": "path" }, + "DatasetSnapshotIdParam": { + "schema": { + "$ref": "#/components/schemas/DatasetSnapshotIdParam" + }, + "required": true, + "description": "DatasetSnapshot id", + "name": "dataset_snapshot_id", + "in": "path" + }, "ProjectIdQuery": { "schema": { "$ref": "#/components/schemas/ProjectIdQuery" @@ -11182,16 +11422,6 @@ "in": "query", "allowReserved": true }, - "EvalStatusPageName": { - "schema": { - "$ref": "#/components/schemas/EvalStatusPageName" - }, - "required": false, - "description": "Name of the eval_status_page to search for", - "name": "eval_status_page_name", - "in": "query", - "allowReserved": true - }, "FunctionName": { "schema": { "$ref": "#/components/schemas/FunctionName" @@ -11262,6 +11492,16 @@ "in": "query", "allowReserved": true }, + "DatasetSnapshotName": { + "schema": { + "$ref": "#/components/schemas/DatasetSnapshotName" + }, + "required": false, + "description": "Name of the dataset_snapshot to search for", + "name": "dataset_snapshot_name", + "in": "query", + "allowReserved": true + }, "OrgName": { "schema": { "$ref": "#/components/schemas/OrgName" @@ -23736,10 +23976,10 @@ } } }, - "/v1/eval_status_page": { + "/v1/function": { "post": { "tags": [ - "EvalStatusPages" + "Functions" ], "security": [ { @@ -23747,27 +23987,27 @@ }, {} ], - "operationId": "postEvalStatusPage", - "description": "Create a new eval_status_page. If there is an existing eval_status_page with the same name as the one specified in the request, will return the existing eval_status_page unmodified", - "summary": "Create eval_status_page", + "operationId": "postFunction", + "description": "Create a new function. If there is an existing function in the project with the same slug as the one specified in the request, will return the existing function unmodified", + "summary": "Create function", "requestBody": { - "description": "Any desired information about the new eval_status_page object", + "description": "Any desired information about the new function object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateEvalStatusPage" + "$ref": "#/components/schemas/CreateFunction" } } } }, "responses": { "200": { - "description": "Returns the new eval_status_page object", + "description": "Returns the new function object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalStatusPage" + "$ref": "#/components/schemas/Function" } } } @@ -23858,7 +24098,7 @@ }, "put": { "tags": [ - "EvalStatusPages" + "Functions" ], "security": [ { @@ -23866,27 +24106,27 @@ }, {} ], - "operationId": "putEvalStatusPage", - "description": "Create or replace eval_status_page. If there is an existing eval_status_page with the same name as the one specified in the request, will replace the existing eval_status_page with the provided fields", - "summary": "Create or replace eval_status_page", + "operationId": "putFunction", + "description": "Create or replace function. If there is an existing function in the project with the same slug as the one specified in the request, will replace the existing function with the provided fields", + "summary": "Create or replace function", "requestBody": { - "description": "Any desired information about the new eval_status_page object", + "description": "Any desired information about the new function object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateEvalStatusPage" + "$ref": "#/components/schemas/CreateFunction" } } } }, "responses": { "200": { - "description": "Returns the new eval_status_page object", + "description": "Returns the new function object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalStatusPage" + "$ref": "#/components/schemas/Function" } } } @@ -23976,12 +24216,12 @@ } }, "get": { - "operationId": "getEvalStatusPage", + "operationId": "getFunction", "tags": [ - "EvalStatusPages" + "Functions" ], - "description": "List out all eval_status_pages. The eval_status_pages are sorted by creation date, with the most recently-created eval_status_pages coming first", - "summary": "List eval_status_pages", + "description": "List out all functions. The functions are sorted by creation date, with the most recently-created functions coming first", + "summary": "List functions", "security": [ { "bearerAuth": [] @@ -24002,7 +24242,22 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/EvalStatusPageName" + "$ref": "#/components/parameters/FunctionName" + }, + { + "$ref": "#/components/parameters/ProjectName" + }, + { + "$ref": "#/components/parameters/ProjectIdQuery" + }, + { + "$ref": "#/components/parameters/Slug" + }, + { + "$ref": "#/components/parameters/PromptVersion" + }, + { + "$ref": "#/components/parameters/PromptEnvironment" }, { "$ref": "#/components/parameters/OrgName" @@ -24010,7 +24265,7 @@ ], "responses": { "200": { - "description": "Returns a list of eval_status_page objects", + "description": "Returns a list of function objects", "content": { "application/json": { "schema": { @@ -24019,9 +24274,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/EvalStatusPage" + "$ref": "#/components/schemas/Function" }, - "description": "A list of eval_status_page objects" + "description": "A list of function objects" } }, "required": [ @@ -24117,9 +24372,9 @@ } }, "options": { - "operationId": "optionsEvalStatusPage", + "operationId": "optionsFunction", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/eval_status_page`)", + "summary": "Enable CORS (`/v1/function`)", "security": [], "tags": [ "CORS" @@ -24174,14 +24429,14 @@ } } }, - "/v1/eval_status_page/{eval_status_page_id}": { + "/v1/function/{function_id}": { "get": { - "operationId": "getEvalStatusPageId", + "operationId": "getFunctionId", "tags": [ - "EvalStatusPages" + "Functions" ], - "description": "Get a eval_status_page object by its id", - "summary": "Get eval_status_page", + "description": "Get a function object by its id", + "summary": "Get function", "security": [ { "bearerAuth": [] @@ -24190,16 +24445,22 @@ ], "parameters": [ { - "$ref": "#/components/parameters/EvalStatusPageIdParam" + "$ref": "#/components/parameters/FunctionIdParam" + }, + { + "$ref": "#/components/parameters/PromptVersion" + }, + { + "$ref": "#/components/parameters/PromptEnvironment" } ], "responses": { "200": { - "description": "Returns the eval_status_page object", + "description": "Returns the function object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalStatusPage" + "$ref": "#/components/schemas/Function" } } } @@ -24289,12 +24550,12 @@ } }, "patch": { - "operationId": "patchEvalStatusPageId", + "operationId": "patchFunctionId", "tags": [ - "EvalStatusPages" + "Functions" ], - "description": "Partially update a eval_status_page 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 eval_status_page", + "description": "Partially update a function 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 function", "security": [ { "bearerAuth": [] @@ -24303,7 +24564,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/EvalStatusPageIdParam" + "$ref": "#/components/parameters/FunctionIdParam" } ], "requestBody": { @@ -24312,18 +24573,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchEvalStatusPage" + "$ref": "#/components/schemas/PatchFunction" } } } }, "responses": { "200": { - "description": "Returns the eval_status_page object", + "description": "Returns the function object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalStatusPage" + "$ref": "#/components/schemas/Function" } } } @@ -24413,12 +24674,12 @@ } }, "delete": { - "operationId": "deleteEvalStatusPageId", + "operationId": "deleteFunctionId", "tags": [ - "EvalStatusPages" + "Functions" ], - "description": "Delete a eval_status_page object by its id", - "summary": "Delete eval_status_page", + "description": "Delete a function object by its id", + "summary": "Delete function", "security": [ { "bearerAuth": [] @@ -24427,16 +24688,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/EvalStatusPageIdParam" + "$ref": "#/components/parameters/FunctionIdParam" } ], "responses": { "200": { - "description": "Returns the deleted eval_status_page object", + "description": "Returns the deleted function object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EvalStatusPage" + "$ref": "#/components/schemas/Function" } } } @@ -24526,16 +24787,16 @@ } }, "options": { - "operationId": "optionsEvalStatusPageId", + "operationId": "optionsFunctionId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/eval_status_page/{eval_status_page_id}`)", + "summary": "Enable CORS (`/v1/function/{function_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/EvalStatusPageIdParam" + "$ref": "#/components/parameters/FunctionIdParam" } ], "responses": { @@ -24588,60 +24849,165 @@ } } }, - "/v1/function": { + "/v1/function/{function_id}/invoke": { "post": { + "operationId": "postFunctionIdInvoke", "tags": [ "Functions" ], + "description": "Invoke a function.", + "summary": "Invoke function", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postFunction", - "description": "Create a new function. If there is an existing function in the project with the same slug as the one specified in the request, will return the existing function unmodified", - "summary": "Create function", + "parameters": [ + { + "$ref": "#/components/parameters/FunctionIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new function object", - "required": false, + "description": "Function invocation parameters", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateFunction" + "$ref": "#/components/schemas/InvokeApi" } } } }, "responses": { "200": { - "description": "Returns the new function object", + "description": "Function invocation response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "nullable": true } } } - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { + } + } + }, + "options": { + "operationId": "optionsFunctionIdInvoke", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/function/{function_id}/invoke`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/FunctionIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { "schema": { "type": "string" } }, - "application/json": { + "Access-Control-Allow-Headers": { "schema": { - "nullable": true + "type": "string" } - } - } - }, - "401": { - "description": "No valid API key provided", - "content": { + }, + "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/view": { + "post": { + "tags": [ + "Views" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "operationId": "postView", + "description": "Create a new view. If there is an existing view with the same name as the one specified in the request, will return the existing view unmodified", + "summary": "Create view", + "requestBody": { + "description": "Any desired information about the new view object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateView" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new view object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/View" + } + } + } + }, + "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" @@ -24710,7 +25076,7 @@ }, "put": { "tags": [ - "Functions" + "Views" ], "security": [ { @@ -24718,27 +25084,27 @@ }, {} ], - "operationId": "putFunction", - "description": "Create or replace function. If there is an existing function in the project with the same slug as the one specified in the request, will replace the existing function with the provided fields", - "summary": "Create or replace function", + "operationId": "putView", + "description": "Create or replace view. If there is an existing view with the same name as the one specified in the request, will replace the existing view with the provided fields", + "summary": "Create or replace view", "requestBody": { - "description": "Any desired information about the new function object", + "description": "Any desired information about the new view object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateFunction" + "$ref": "#/components/schemas/CreateView" } } } }, "responses": { "200": { - "description": "Returns the new function object", + "description": "Returns the new view object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/View" } } } @@ -24828,12 +25194,12 @@ } }, "get": { - "operationId": "getFunction", + "operationId": "getView", "tags": [ - "Functions" + "Views" ], - "description": "List out all functions. The functions are sorted by creation date, with the most recently-created functions coming first", - "summary": "List functions", + "description": "List out all views. The views are sorted by creation date, with the most recently-created views coming first", + "summary": "List views", "security": [ { "bearerAuth": [] @@ -24854,30 +25220,21 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/FunctionName" - }, - { - "$ref": "#/components/parameters/ProjectName" - }, - { - "$ref": "#/components/parameters/ProjectIdQuery" - }, - { - "$ref": "#/components/parameters/Slug" + "$ref": "#/components/parameters/ViewName" }, { - "$ref": "#/components/parameters/PromptVersion" + "$ref": "#/components/parameters/ViewType" }, { - "$ref": "#/components/parameters/PromptEnvironment" + "$ref": "#/components/parameters/AclObjectType" }, { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/AclObjectId" } ], "responses": { "200": { - "description": "Returns a list of function objects", + "description": "Returns a list of view objects", "content": { "application/json": { "schema": { @@ -24886,9 +25243,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/View" }, - "description": "A list of function objects" + "description": "A list of view objects" } }, "required": [ @@ -24984,9 +25341,9 @@ } }, "options": { - "operationId": "optionsFunction", + "operationId": "optionsView", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/function`)", + "summary": "Enable CORS (`/v1/view`)", "security": [], "tags": [ "CORS" @@ -25041,14 +25398,14 @@ } } }, - "/v1/function/{function_id}": { + "/v1/view/{view_id}": { "get": { - "operationId": "getFunctionId", + "operationId": "getViewId", "tags": [ - "Functions" + "Views" ], - "description": "Get a function object by its id", - "summary": "Get function", + "description": "Get a view object by its id", + "summary": "Get view", "security": [ { "bearerAuth": [] @@ -25057,22 +25414,22 @@ ], "parameters": [ { - "$ref": "#/components/parameters/FunctionIdParam" + "$ref": "#/components/parameters/ViewIdParam" }, { - "$ref": "#/components/parameters/PromptVersion" + "$ref": "#/components/parameters/AclObjectType" }, { - "$ref": "#/components/parameters/PromptEnvironment" + "$ref": "#/components/parameters/AclObjectId" } ], "responses": { "200": { - "description": "Returns the function object", + "description": "Returns the view object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/View" } } } @@ -25162,12 +25519,12 @@ } }, "patch": { - "operationId": "patchFunctionId", + "operationId": "patchViewId", "tags": [ - "Functions" + "Views" ], - "description": "Partially update a function 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 function", + "description": "Partially update a view 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 view", "security": [ { "bearerAuth": [] @@ -25176,7 +25533,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/FunctionIdParam" + "$ref": "#/components/parameters/ViewIdParam" } ], "requestBody": { @@ -25185,18 +25542,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchFunction" + "$ref": "#/components/schemas/PatchView" } } } }, "responses": { "200": { - "description": "Returns the function object", + "description": "Returns the view object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/View" } } } @@ -25286,12 +25643,12 @@ } }, "delete": { - "operationId": "deleteFunctionId", + "operationId": "deleteViewId", "tags": [ - "Functions" + "Views" ], - "description": "Delete a function object by its id", - "summary": "Delete function", + "description": "Delete a view object by its id", + "summary": "Delete view", "security": [ { "bearerAuth": [] @@ -25300,16 +25657,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/FunctionIdParam" + "$ref": "#/components/parameters/ViewIdParam" } ], + "requestBody": { + "description": "Additional parameters for the delete operation", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteView" + } + } + } + }, "responses": { "200": { - "description": "Returns the deleted function object", + "description": "Returns the deleted view object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/View" } } } @@ -25399,16 +25767,16 @@ } }, "options": { - "operationId": "optionsFunctionId", + "operationId": "optionsViewId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/function/{function_id}`)", + "summary": "Enable CORS (`/v1/view/{view_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/FunctionIdParam" + "$ref": "#/components/parameters/ViewIdParam" } ], "responses": { @@ -25461,14 +25829,14 @@ } } }, - "/v1/function/{function_id}/invoke": { - "post": { - "operationId": "postFunctionIdInvoke", + "/v1/organization": { + "get": { + "operationId": "getOrganization", "tags": [ - "Functions" + "Organizations" ], - "description": "Invoke a function.", - "summary": "Invoke function", + "description": "List out all organizations. The organizations are sorted by creation date, with the most recently-created organizations coming first", + "summary": "List organizations", "security": [ { "bearerAuth": [] @@ -25477,76 +25845,44 @@ ], "parameters": [ { - "$ref": "#/components/parameters/FunctionIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/OrgName" } ], - "requestBody": { - "description": "Function invocation parameters", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeApi" - } - } - } - }, "responses": { "200": { - "description": "Function invocation response", + "description": "Returns a list of organization objects", "content": { "application/json": { "schema": { - "nullable": true - } - } - } - } - } - }, - "options": { - "operationId": "optionsFunctionIdInvoke", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/function/{function_id}/invoke`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/FunctionIdParam" - } - ], - "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" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Organization" + }, + "description": "A list of organization objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } - }, - "content": {} + } }, "400": { "description": "The request was unacceptable, often due to missing a required parameter", @@ -25562,48 +25898,24 @@ } } } - } - } - } - }, - "/v1/view": { - "post": { - "tags": [ - "Views" - ], - "security": [ - { - "bearerAuth": [] }, - {} - ], - "operationId": "postView", - "description": "Create a new view. If there is an existing view with the same name as the one specified in the request, will return the existing view unmodified", - "summary": "Create view", - "requestBody": { - "description": "Any desired information about the new view object", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateView" - } - } - } - }, - "responses": { - "200": { - "description": "Returns the new view object", + "401": { + "description": "No valid API key provided", "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, "application/json": { "schema": { - "$ref": "#/components/schemas/View" + "nullable": true } } } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "403": { + "description": "The API key doesn’t have permissions to perform the request", "content": { "text/plain": { "schema": { @@ -25617,8 +25929,15 @@ } } }, - "401": { - "description": "No valid API key provided", + "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": { @@ -25632,8 +25951,8 @@ } } }, - "403": { - "description": "The API key doesn’t have permissions to perform the request", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -25646,31 +25965,51 @@ } } } - }, - "429": { - "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + } + } + }, + "options": { + "operationId": "optionsOrganization", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/organization`)", + "security": [], + "tags": [ + "CORS" + ], + "responses": { + "200": { + "description": "Response for CORS method", "headers": { - "Retry-After": { + "Access-Control-Allow-Credentials": { "schema": { "type": "string" } - } - }, - "content": { - "text/plain": { + }, + "Access-Control-Allow-Headers": { "schema": { "type": "string" } }, - "application/json": { + "Access-Control-Allow-Methods": { "schema": { - "nullable": true + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "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": { @@ -25685,38 +26024,34 @@ } } } - }, - "put": { + } + }, + "/v1/organization/{organization_id}": { + "get": { + "operationId": "getOrganizationId", "tags": [ - "Views" + "Organizations" ], + "description": "Get an organization object by its id", + "summary": "Get organization", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putView", - "description": "Create or replace view. If there is an existing view with the same name as the one specified in the request, will replace the existing view with the provided fields", - "summary": "Create or replace view", - "requestBody": { - "description": "Any desired information about the new view object", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateView" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new view object", + "description": "Returns the organization object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/View" + "$ref": "#/components/schemas/Organization" } } } @@ -25805,13 +26140,13 @@ } } }, - "get": { - "operationId": "getView", + "patch": { + "operationId": "patchOrganizationId", "tags": [ - "Views" + "Organizations" ], - "description": "List out all views. The views are sorted by creation date, with the most recently-created views coming first", - "summary": "List views", + "description": "Partially update an organization 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 organization", "security": [ { "bearerAuth": [] @@ -25820,50 +26155,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/ViewName" - }, - { - "$ref": "#/components/parameters/ViewType" - }, - { - "$ref": "#/components/parameters/AclObjectType" - }, - { - "$ref": "#/components/parameters/AclObjectId" + "$ref": "#/components/parameters/OrganizationIdParam" } ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchOrganization" + } + } + } + }, "responses": { "200": { - "description": "Returns a list of view objects", + "description": "Returns the organization object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/View" - }, - "description": "A list of view objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/Organization" } } } @@ -25953,13 +26265,18 @@ } }, "options": { - "operationId": "optionsView", + "operationId": "optionsOrganizationId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/view`)", + "summary": "Enable CORS (`/v1/organization/{organization_id}`)", "security": [], "tags": [ "CORS" ], + "parameters": [ + { + "$ref": "#/components/parameters/OrganizationIdParam" + } + ], "responses": { "200": { "description": "Response for CORS method", @@ -26010,38 +26327,38 @@ } } }, - "/v1/view/{view_id}": { - "get": { - "operationId": "getViewId", + "/v1/organization/members": { + "patch": { + "operationId": "patchOrganizationMembers", "tags": [ - "Views" + "Organizations" ], - "description": "Get a view object by its id", - "summary": "Get view", + "description": "Modify organization membership", + "summary": "Modify organization membership", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ViewIdParam" - }, - { - "$ref": "#/components/parameters/AclObjectType" - }, - { - "$ref": "#/components/parameters/AclObjectId" + "requestBody": { + "description": "Members to add/remove", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchOrganizationMembers" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the view object", + "description": "A success status", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/View" + "$ref": "#/components/schemas/PatchOrganizationMembersOutput" } } } @@ -26130,115 +26447,48 @@ } } }, - "patch": { - "operationId": "patchViewId", + "options": { + "operationId": "optionsOrganizationMembers", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/organization/members`)", + "security": [], "tags": [ - "Views" - ], - "description": "Partially update a view 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 view", - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "parameters": [ - { - "$ref": "#/components/parameters/ViewIdParam" - } + "CORS" ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchView" - } - } - } - }, "responses": { "200": { - "description": "Returns the view object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/View" - } - } - } - }, - "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": { @@ -26253,43 +26503,54 @@ } } } - }, - "delete": { - "operationId": "deleteViewId", + } + }, + "/v1/api_key": { + "post": { "tags": [ - "Views" + "ApiKeys" ], - "description": "Delete a view object by its id", - "summary": "Delete view", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ViewIdParam" - } - ], + "operationId": "postApiKey", + "description": "Create a new api_key. It is possible to have multiple API keys with the same name. There is no de-duplication", + "summary": "Create api_key", "requestBody": { - "description": "Additional parameters for the delete operation", + "description": "Any desired information about the new api_key object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteView" + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the api key. Does not have to be unique" + }, + "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 API key belongs in." + } + }, + "required": [ + "name" + ] } } } }, "responses": { "200": { - "description": "Returns the deleted view object", + "description": "Returns an object containing the raw API key. This is the only time the raw API key will be exposed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/View" + "$ref": "#/components/schemas/CreateApiKeyOutput" } } } @@ -26347,84 +26608,22 @@ "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": "optionsViewId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/view/{view_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ViewIdParam" - } - ], - "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": { + }, + "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": { @@ -26439,16 +26638,14 @@ } } } - } - }, - "/v1/organization": { + }, "get": { - "operationId": "getOrganization", + "operationId": "getApiKey", "tags": [ - "Organizations" + "ApiKeys" ], - "description": "List out all organizations. The organizations are sorted by creation date, with the most recently-created organizations coming first", - "summary": "List organizations", + "description": "List out all api_keys. The api_keys are sorted by creation date, with the most recently-created api_keys coming first", + "summary": "List api_keys", "security": [ { "bearerAuth": [] @@ -26468,13 +26665,16 @@ { "$ref": "#/components/parameters/Ids" }, + { + "$ref": "#/components/parameters/ApiKeyName" + }, { "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns a list of organization objects", + "description": "Returns a list of api_key objects", "content": { "application/json": { "schema": { @@ -26483,9 +26683,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/Organization" + "$ref": "#/components/schemas/ApiKey" }, - "description": "A list of organization objects" + "description": "A list of api_key objects" } }, "required": [ @@ -26581,9 +26781,9 @@ } }, "options": { - "operationId": "optionsOrganization", + "operationId": "optionsApiKey", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/organization`)", + "summary": "Enable CORS (`/v1/api_key`)", "security": [], "tags": [ "CORS" @@ -26638,14 +26838,14 @@ } } }, - "/v1/organization/{organization_id}": { + "/v1/api_key/{api_key_id}": { "get": { - "operationId": "getOrganizationId", + "operationId": "getApiKeyId", "tags": [ - "Organizations" + "ApiKeys" ], - "description": "Get an organization object by its id", - "summary": "Get organization", + "description": "Get an api_key object by its id", + "summary": "Get api_key", "security": [ { "bearerAuth": [] @@ -26654,16 +26854,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationIdParam" + "$ref": "#/components/parameters/ApiKeyIdParam" } ], "responses": { "200": { - "description": "Returns the organization object", + "description": "Returns the api_key object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Organization" + "$ref": "#/components/schemas/ApiKey" } } } @@ -26752,13 +26952,13 @@ } } }, - "patch": { - "operationId": "patchOrganizationId", + "delete": { + "operationId": "deleteApiKeyId", "tags": [ - "Organizations" + "ApiKeys" ], - "description": "Partially update an organization 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 organization", + "description": "Delete an api_key object by its id", + "summary": "Delete api_key", "security": [ { "bearerAuth": [] @@ -26767,27 +26967,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationIdParam" + "$ref": "#/components/parameters/ApiKeyIdParam" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchOrganization" - } - } - } - }, "responses": { "200": { - "description": "Returns the organization object", + "description": "Returns the deleted api_key object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Organization" + "$ref": "#/components/schemas/ApiKey" } } } @@ -26877,16 +27066,16 @@ } }, "options": { - "operationId": "optionsOrganizationId", + "operationId": "optionsApiKeyId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/organization/{organization_id}`)", + "summary": "Enable CORS (`/v1/api_key/{api_key_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationIdParam" + "$ref": "#/components/parameters/ApiKeyIdParam" } ], "responses": { @@ -26939,38 +27128,195 @@ } } }, - "/v1/organization/members": { - "patch": { - "operationId": "patchOrganizationMembers", + "/v1/service_token": { + "post": { "tags": [ - "Organizations" + "ServiceTokens" ], - "description": "Modify organization membership", - "summary": "Modify organization membership", "security": [ { "bearerAuth": [] }, {} ], + "operationId": "postServiceToken", + "description": "Create a new service_token. It is possible to have multiple API keys with the same name. There is no de-duplication", + "summary": "Create service_token", "requestBody": { - "description": "Members to add/remove", + "description": "Any desired information about the new service_token object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchOrganizationMembers" + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the service token. Does not have to be unique" + }, + "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 Service token belongs in." + }, + "service_account_id": { + "type": "string", + "description": "The service account ID this service token should belong to. You can create a service account in the Braintrust [organization settings page](https://www.braintrustdata.com/app/settings?subroute=service-tokens) or using the [modify organization membership endpoint](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership)" + } + }, + "required": [ + "name", + "service_account_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Returns an object containing the raw service token. This is the only time the raw API key will be exposed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceTokenOutput" + } + } + } + }, + "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": [ + "ServiceTokens" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "operationId": "putServiceToken", + "description": "Create or replace service_token. If there is an existing service_token with the same name as the one specified in the request, will replace the existing service_token with the provided fields", + "summary": "Create or replace service_token", + "requestBody": { + "description": "Any desired information about the new service_token object", + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the service token. Does not have to be unique" + }, + "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 Service token belongs in." + }, + "service_account_id": { + "type": "string", + "description": "The service account ID this service token should belong to. You can create a service account in the Braintrust [organization settings page](https://www.braintrustdata.com/app/settings?subroute=service-tokens) or using the [modify organization membership endpoint](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership)" + } + }, + "required": [ + "name", + "service_account_id" + ] } } } }, "responses": { "200": { - "description": "A success status", + "description": "Returns an object containing the raw service token. This is the only time the raw API key will be exposed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchOrganizationMembersOutput" + "$ref": "#/components/schemas/CreateServiceTokenOutput" } } } @@ -27059,110 +27405,37 @@ } } }, - "options": { - "operationId": "optionsOrganizationMembers", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/organization/members`)", - "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/api_key": { - "post": { + "delete": { + "operationId": "deleteServiceToken", "tags": [ - "ApiKeys" + "ServiceTokens" ], + "description": "Delete a single service_token", + "summary": "Delete single service_token", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postApiKey", - "description": "Create a new api_key. It is possible to have multiple API keys with the same name. There is no de-duplication", - "summary": "Create api_key", "requestBody": { - "description": "Any desired information about the new api_key object", + "description": "Parameters which uniquely specify the service_token to delete", "required": false, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the api key. Does not have to be unique" - }, - "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 API key belongs in." - } - }, - "required": [ - "name" - ] + "$ref": "#/components/schemas/DeleteServiceToken" } } } }, "responses": { "200": { - "description": "Returns an object containing the raw API key. This is the only time the raw API key will be exposed", + "description": "Returns the deleted service_token object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateApiKeyOutput" + "$ref": "#/components/schemas/ServiceToken" } } } @@ -27252,12 +27525,12 @@ } }, "get": { - "operationId": "getApiKey", + "operationId": "getServiceToken", "tags": [ - "ApiKeys" + "ServiceTokens" ], - "description": "List out all api_keys. The api_keys are sorted by creation date, with the most recently-created api_keys coming first", - "summary": "List api_keys", + "description": "List out all service_tokens. The service_tokens are sorted by creation date, with the most recently-created service_tokens coming first", + "summary": "List service_tokens", "security": [ { "bearerAuth": [] @@ -27278,7 +27551,7 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/ApiKeyName" + "$ref": "#/components/parameters/ServiceTokenName" }, { "$ref": "#/components/parameters/OrgName" @@ -27286,7 +27559,7 @@ ], "responses": { "200": { - "description": "Returns a list of api_key objects", + "description": "Returns a list of service_token objects", "content": { "application/json": { "schema": { @@ -27295,9 +27568,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/ApiKey" + "$ref": "#/components/schemas/ServiceToken" }, - "description": "A list of api_key objects" + "description": "A list of service_token objects" } }, "required": [ @@ -27393,9 +27666,9 @@ } }, "options": { - "operationId": "optionsApiKey", + "operationId": "optionsServiceToken", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/api_key`)", + "summary": "Enable CORS (`/v1/service_token`)", "security": [], "tags": [ "CORS" @@ -27450,14 +27723,14 @@ } } }, - "/v1/api_key/{api_key_id}": { + "/v1/service_token/{service_token_id}": { "get": { - "operationId": "getApiKeyId", + "operationId": "getServiceTokenId", "tags": [ - "ApiKeys" + "ServiceTokens" ], - "description": "Get an api_key object by its id", - "summary": "Get api_key", + "description": "Get a service_token object by its id", + "summary": "Get service_token", "security": [ { "bearerAuth": [] @@ -27466,16 +27739,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ApiKeyIdParam" + "$ref": "#/components/parameters/ServiceTokenIdParam" } ], "responses": { "200": { - "description": "Returns the api_key object", + "description": "Returns the service_token object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKey" + "$ref": "#/components/schemas/ServiceToken" } } } @@ -27565,12 +27838,12 @@ } }, "delete": { - "operationId": "deleteApiKeyId", + "operationId": "deleteServiceTokenId", "tags": [ - "ApiKeys" + "ServiceTokens" ], - "description": "Delete an api_key object by its id", - "summary": "Delete api_key", + "description": "Delete a service_token object by its id", + "summary": "Delete service_token", "security": [ { "bearerAuth": [] @@ -27579,16 +27852,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ApiKeyIdParam" + "$ref": "#/components/parameters/ServiceTokenIdParam" } ], "responses": { "200": { - "description": "Returns the deleted api_key object", + "description": "Returns the deleted service_token object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKey" + "$ref": "#/components/schemas/ServiceToken" } } } @@ -27678,16 +27951,16 @@ } }, "options": { - "operationId": "optionsApiKeyId", + "operationId": "optionsServiceTokenId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/api_key/{api_key_id}`)", + "summary": "Enable CORS (`/v1/service_token/{service_token_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/ApiKeyIdParam" + "$ref": "#/components/parameters/ServiceTokenIdParam" } ], "responses": { @@ -27740,10 +28013,10 @@ } } }, - "/v1/service_token": { + "/v1/ai_secret": { "post": { "tags": [ - "ServiceTokens" + "AiSecrets" ], "security": [ { @@ -27751,46 +28024,27 @@ }, {} ], - "operationId": "postServiceToken", - "description": "Create a new service_token. It is possible to have multiple API keys with the same name. There is no de-duplication", - "summary": "Create service_token", + "operationId": "postAiSecret", + "description": "Create a new ai_secret. If there is an existing ai_secret with the same name as the one specified in the request, will return the existing ai_secret unmodified", + "summary": "Create ai_secret", "requestBody": { - "description": "Any desired information about the new service_token object", + "description": "Any desired information about the new ai_secret object", "required": false, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the service token. Does not have to be unique" - }, - "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 Service token belongs in." - }, - "service_account_id": { - "type": "string", - "description": "The service account ID this service token should belong to. You can create a service account in the Braintrust [organization settings page](https://www.braintrustdata.com/app/settings?subroute=service-tokens) or using the [modify organization membership endpoint](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership)" - } - }, - "required": [ - "name", - "service_account_id" - ] + "$ref": "#/components/schemas/CreateAISecret" } } } }, "responses": { "200": { - "description": "Returns an object containing the raw service token. This is the only time the raw API key will be exposed", + "description": "Returns the new ai_secret object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateServiceTokenOutput" + "$ref": "#/components/schemas/AISecret" } } } @@ -27881,7 +28135,7 @@ }, "put": { "tags": [ - "ServiceTokens" + "AiSecrets" ], "security": [ { @@ -27889,46 +28143,27 @@ }, {} ], - "operationId": "putServiceToken", - "description": "Create or replace service_token. If there is an existing service_token with the same name as the one specified in the request, will replace the existing service_token with the provided fields", - "summary": "Create or replace service_token", + "operationId": "putAiSecret", + "description": "Create or replace ai_secret. If there is an existing ai_secret with the same name as the one specified in the request, will replace the existing ai_secret with the provided fields", + "summary": "Create or replace ai_secret", "requestBody": { - "description": "Any desired information about the new service_token object", + "description": "Any desired information about the new ai_secret object", "required": false, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the service token. Does not have to be unique" - }, - "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 Service token belongs in." - }, - "service_account_id": { - "type": "string", - "description": "The service account ID this service token should belong to. You can create a service account in the Braintrust [organization settings page](https://www.braintrustdata.com/app/settings?subroute=service-tokens) or using the [modify organization membership endpoint](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership)" - } - }, - "required": [ - "name", - "service_account_id" - ] + "$ref": "#/components/schemas/CreateAISecret" } } } }, "responses": { "200": { - "description": "Returns an object containing the raw service token. This is the only time the raw API key will be exposed", + "description": "Returns the new ai_secret object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateServiceTokenOutput" + "$ref": "#/components/schemas/AISecret" } } } @@ -28018,12 +28253,12 @@ } }, "delete": { - "operationId": "deleteServiceToken", + "operationId": "deleteAiSecret", "tags": [ - "ServiceTokens" + "AiSecrets" ], - "description": "Delete a single service_token", - "summary": "Delete single service_token", + "description": "Delete a single ai_secret", + "summary": "Delete single ai_secret", "security": [ { "bearerAuth": [] @@ -28031,23 +28266,23 @@ {} ], "requestBody": { - "description": "Parameters which uniquely specify the service_token to delete", + "description": "Parameters which uniquely specify the ai_secret to delete", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteServiceToken" + "$ref": "#/components/schemas/DeleteAISecret" } } } }, "responses": { "200": { - "description": "Returns the deleted service_token object", + "description": "Returns the deleted ai_secret object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceToken" + "$ref": "#/components/schemas/AISecret" } } } @@ -28137,12 +28372,12 @@ } }, "get": { - "operationId": "getServiceToken", + "operationId": "getAiSecret", "tags": [ - "ServiceTokens" + "AiSecrets" ], - "description": "List out all service_tokens. The service_tokens are sorted by creation date, with the most recently-created service_tokens coming first", - "summary": "List service_tokens", + "description": "List out all ai_secrets. The ai_secrets are sorted by creation date, with the most recently-created ai_secrets coming first", + "summary": "List ai_secrets", "security": [ { "bearerAuth": [] @@ -28163,15 +28398,18 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/ServiceTokenName" + "$ref": "#/components/parameters/AiSecretName" }, { "$ref": "#/components/parameters/OrgName" + }, + { + "$ref": "#/components/parameters/AISecretType" } ], "responses": { "200": { - "description": "Returns a list of service_token objects", + "description": "Returns a list of ai_secret objects", "content": { "application/json": { "schema": { @@ -28180,9 +28418,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/ServiceToken" + "$ref": "#/components/schemas/AISecret" }, - "description": "A list of service_token objects" + "description": "A list of ai_secret objects" } }, "required": [ @@ -28278,9 +28516,9 @@ } }, "options": { - "operationId": "optionsServiceToken", + "operationId": "optionsAiSecret", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/service_token`)", + "summary": "Enable CORS (`/v1/ai_secret`)", "security": [], "tags": [ "CORS" @@ -28335,14 +28573,14 @@ } } }, - "/v1/service_token/{service_token_id}": { + "/v1/ai_secret/{ai_secret_id}": { "get": { - "operationId": "getServiceTokenId", + "operationId": "getAiSecretId", "tags": [ - "ServiceTokens" + "AiSecrets" ], - "description": "Get a service_token object by its id", - "summary": "Get service_token", + "description": "Get an ai_secret object by its id", + "summary": "Get ai_secret", "security": [ { "bearerAuth": [] @@ -28351,16 +28589,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ServiceTokenIdParam" + "$ref": "#/components/parameters/AiSecretIdParam" } ], "responses": { "200": { - "description": "Returns the service_token object", + "description": "Returns the ai_secret object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceToken" + "$ref": "#/components/schemas/AISecret" } } } @@ -28449,13 +28687,13 @@ } } }, - "delete": { - "operationId": "deleteServiceTokenId", + "patch": { + "operationId": "patchAiSecretId", "tags": [ - "ServiceTokens" + "AiSecrets" ], - "description": "Delete a service_token object by its id", - "summary": "Delete service_token", + "description": "Partially update an ai_secret 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 ai_secret", "security": [ { "bearerAuth": [] @@ -28464,16 +28702,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ServiceTokenIdParam" + "$ref": "#/components/parameters/AiSecretIdParam" } ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchAISecret" + } + } + } + }, "responses": { "200": { - "description": "Returns the deleted service_token object", + "description": "Returns the ai_secret object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceToken" + "$ref": "#/components/schemas/AISecret" } } } @@ -28562,97 +28811,27 @@ } } }, - "options": { - "operationId": "optionsServiceTokenId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/service_token/{service_token_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ServiceTokenIdParam" - } - ], - "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/ai_secret": { - "post": { + "delete": { + "operationId": "deleteAiSecretId", "tags": [ "AiSecrets" ], + "description": "Delete an ai_secret object by its id", + "summary": "Delete ai_secret", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postAiSecret", - "description": "Create a new ai_secret. If there is an existing ai_secret with the same name as the one specified in the request, will return the existing ai_secret unmodified", - "summary": "Create ai_secret", - "requestBody": { - "description": "Any desired information about the new ai_secret object", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAISecret" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/AiSecretIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new ai_secret object", + "description": "Returns the deleted ai_secret object", "content": { "application/json": { "schema": { @@ -28745,9 +28924,73 @@ } } }, - "put": { + "options": { + "operationId": "optionsAiSecretId", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/ai_secret/{ai_secret_id}`)", + "security": [], "tags": [ - "AiSecrets" + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/AiSecretIdParam" + } + ], + "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/env_var": { + "post": { + "tags": [ + "EnvVars" ], "security": [ { @@ -28755,27 +28998,70 @@ }, {} ], - "operationId": "putAiSecret", - "description": "Create or replace ai_secret. If there is an existing ai_secret with the same name as the one specified in the request, will replace the existing ai_secret with the provided fields", - "summary": "Create or replace ai_secret", + "operationId": "postEnvVar", + "description": "Create a new env_var. If there is an existing env_var with the same name as the one specified in the request, will return the existing env_var unmodified", + "summary": "Create env_var", "requestBody": { - "description": "Any desired information about the new ai_secret object", + "description": "Any desired information about the new env_var object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAISecret" + "type": "object", + "properties": { + "object_type": { + "type": "string", + "enum": [ + "organization", + "project", + "function" + ], + "description": "The type of the object the environment variable is scoped for" + }, + "object_id": { + "type": "string", + "format": "uuid", + "description": "The id of the object the environment variable is scoped for" + }, + "name": { + "type": "string", + "description": "The name of the environment variable" + }, + "value": { + "type": "string", + "nullable": true, + "description": "The value of the environment variable. Will be encrypted at rest." + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "Optional metadata associated with the environment variable when managed via the function secrets API" + }, + "secret_type": { + "type": "string", + "nullable": true, + "description": "Optional classification for the secret (for example, the AI provider name)" + } + }, + "required": [ + "object_type", + "object_id", + "name" + ] } } } }, "responses": { "200": { - "description": "Returns the new ai_secret object", + "description": "Returns the new env_var object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" } } } @@ -28864,37 +29150,80 @@ } } }, - "delete": { - "operationId": "deleteAiSecret", + "put": { "tags": [ - "AiSecrets" + "EnvVars" ], - "description": "Delete a single ai_secret", - "summary": "Delete single ai_secret", "security": [ { "bearerAuth": [] }, {} ], + "operationId": "putEnvVar", + "description": "Create or replace env_var. If there is an existing env_var with the same name as the one specified in the request, will replace the existing env_var with the provided fields", + "summary": "Create or replace env_var", "requestBody": { - "description": "Parameters which uniquely specify the ai_secret to delete", + "description": "Any desired information about the new env_var object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteAISecret" + "type": "object", + "properties": { + "object_type": { + "type": "string", + "enum": [ + "organization", + "project", + "function" + ], + "description": "The type of the object the environment variable is scoped for" + }, + "object_id": { + "type": "string", + "format": "uuid", + "description": "The id of the object the environment variable is scoped for" + }, + "name": { + "type": "string", + "description": "The name of the environment variable" + }, + "value": { + "type": "string", + "nullable": true, + "description": "The value of the environment variable. Will be encrypted at rest." + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "Optional metadata associated with the environment variable when managed via the function secrets API" + }, + "secret_type": { + "type": "string", + "nullable": true, + "description": "Optional classification for the secret (for example, the AI provider name)" + } + }, + "required": [ + "object_type", + "object_id", + "name" + ] } } } }, "responses": { "200": { - "description": "Returns the deleted ai_secret object", + "description": "Returns the new env_var object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" } } } @@ -28984,12 +29313,12 @@ } }, "get": { - "operationId": "getAiSecret", + "operationId": "getEnvVar", "tags": [ - "AiSecrets" + "EnvVars" ], - "description": "List out all ai_secrets. The ai_secrets are sorted by creation date, with the most recently-created ai_secrets coming first", - "summary": "List ai_secrets", + "description": "List out all env_vars. The env_vars are sorted by creation date, with the most recently-created env_vars coming first", + "summary": "List env_vars", "security": [ { "bearerAuth": [] @@ -29000,28 +29329,22 @@ { "$ref": "#/components/parameters/AppLimitParam" }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, { "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/AiSecretName" + "$ref": "#/components/parameters/EnvVarName" }, { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/EnvVarObjectType" }, { - "$ref": "#/components/parameters/AISecretType" + "$ref": "#/components/parameters/EnvVarObjectId" } ], "responses": { "200": { - "description": "Returns a list of ai_secret objects", + "description": "Returns a list of env_var objects", "content": { "application/json": { "schema": { @@ -29030,9 +29353,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" }, - "description": "A list of ai_secret objects" + "description": "A list of env_var objects" } }, "required": [ @@ -29128,9 +29451,9 @@ } }, "options": { - "operationId": "optionsAiSecret", + "operationId": "optionsEnvVar", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/ai_secret`)", + "summary": "Enable CORS (`/v1/env_var`)", "security": [], "tags": [ "CORS" @@ -29185,14 +29508,14 @@ } } }, - "/v1/ai_secret/{ai_secret_id}": { + "/v1/env_var/{env_var_id}": { "get": { - "operationId": "getAiSecretId", + "operationId": "getEnvVarId", "tags": [ - "AiSecrets" + "EnvVars" ], - "description": "Get an ai_secret object by its id", - "summary": "Get ai_secret", + "description": "Get an env_var object by its id", + "summary": "Get env_var", "security": [ { "bearerAuth": [] @@ -29201,16 +29524,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AiSecretIdParam" + "$ref": "#/components/parameters/EnvVarIdParam" } ], "responses": { "200": { - "description": "Returns the ai_secret object", + "description": "Returns the env_var object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" } } } @@ -29300,12 +29623,12 @@ } }, "patch": { - "operationId": "patchAiSecretId", + "operationId": "patchEnvVarId", "tags": [ - "AiSecrets" + "EnvVars" ], - "description": "Partially update an ai_secret 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 ai_secret", + "description": "Partially update an env_var 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 env_var", "security": [ { "bearerAuth": [] @@ -29314,7 +29637,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AiSecretIdParam" + "$ref": "#/components/parameters/EnvVarIdParam" } ], "requestBody": { @@ -29323,18 +29646,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchAISecret" + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the environment variable" + }, + "value": { + "type": "string", + "nullable": true, + "description": "The value of the environment variable. Will be encrypted at rest." + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "Optional metadata associated with the environment variable when managed via the function secrets API" + }, + "secret_type": { + "type": "string", + "nullable": true, + "description": "Optional classification for the secret (for example, the AI provider name)" + } + }, + "required": [ + "name" + ] } } } }, "responses": { "200": { - "description": "Returns the ai_secret object", + "description": "Returns the env_var object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" } } } @@ -29424,12 +29774,12 @@ } }, "delete": { - "operationId": "deleteAiSecretId", + "operationId": "deleteEnvVarId", "tags": [ - "AiSecrets" + "EnvVars" ], - "description": "Delete an ai_secret object by its id", - "summary": "Delete ai_secret", + "description": "Delete an env_var object by its id", + "summary": "Delete env_var", "security": [ { "bearerAuth": [] @@ -29438,16 +29788,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AiSecretIdParam" + "$ref": "#/components/parameters/EnvVarIdParam" } ], "responses": { "200": { - "description": "Returns the deleted ai_secret object", + "description": "Returns the deleted env_var object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/EnvVar" } } } @@ -29537,16 +29887,16 @@ } }, "options": { - "operationId": "optionsAiSecretId", + "operationId": "optionsEnvVarId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/ai_secret/{ai_secret_id}`)", + "summary": "Enable CORS (`/v1/env_var/{env_var_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/AiSecretIdParam" + "$ref": "#/components/parameters/EnvVarIdParam" } ], "responses": { @@ -29588,92 +29938,49 @@ "schema": { "type": "string" } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/env_var": { - "post": { - "tags": [ - "EnvVars" - ], - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "operationId": "postEnvVar", - "description": "Create a new env_var. If there is an existing env_var with the same name as the one specified in the request, will return the existing env_var unmodified", - "summary": "Create env_var", - "requestBody": { - "description": "Any desired information about the new env_var object", - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "object_type": { - "type": "string", - "enum": [ - "organization", - "project", - "function" - ], - "description": "The type of the object the environment variable is scoped for" - }, - "object_id": { - "type": "string", - "format": "uuid", - "description": "The id of the object the environment variable is scoped for" - }, - "name": { - "type": "string", - "description": "The name of the environment variable" - }, - "value": { - "type": "string", - "nullable": true, - "description": "The value of the environment variable. Will be encrypted at rest." - }, - "metadata": { - "type": "object", - "nullable": true, - "additionalProperties": { - "nullable": true - }, - "description": "Optional metadata associated with the environment variable when managed via the function secrets API" - }, - "secret_type": { - "type": "string", - "nullable": true, - "description": "Optional classification for the secret (for example, the AI provider name)" - } - }, - "required": [ - "object_type", - "object_id", - "name" - ] + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/mcp_server": { + "post": { + "tags": [ + "McpServers" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "operationId": "postMcpServer", + "description": "Create a new mcp_server. If there is an existing mcp_server with the same name as the one specified in the request, will return the existing mcp_server unmodified", + "summary": "Create mcp_server", + "requestBody": { + "description": "Any desired information about the new mcp_server object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMCPServer" } } } }, "responses": { "200": { - "description": "Returns the new env_var object", + "description": "Returns the new mcp_server object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" } } } @@ -29764,7 +30071,7 @@ }, "put": { "tags": [ - "EnvVars" + "McpServers" ], "security": [ { @@ -29772,70 +30079,27 @@ }, {} ], - "operationId": "putEnvVar", - "description": "Create or replace env_var. If there is an existing env_var with the same name as the one specified in the request, will replace the existing env_var with the provided fields", - "summary": "Create or replace env_var", + "operationId": "putMcpServer", + "description": "Create or replace mcp_server. If there is an existing mcp_server with the same name as the one specified in the request, will replace the existing mcp_server with the provided fields", + "summary": "Create or replace mcp_server", "requestBody": { - "description": "Any desired information about the new env_var object", + "description": "Any desired information about the new mcp_server object", "required": false, "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "object_type": { - "type": "string", - "enum": [ - "organization", - "project", - "function" - ], - "description": "The type of the object the environment variable is scoped for" - }, - "object_id": { - "type": "string", - "format": "uuid", - "description": "The id of the object the environment variable is scoped for" - }, - "name": { - "type": "string", - "description": "The name of the environment variable" - }, - "value": { - "type": "string", - "nullable": true, - "description": "The value of the environment variable. Will be encrypted at rest." - }, - "metadata": { - "type": "object", - "nullable": true, - "additionalProperties": { - "nullable": true - }, - "description": "Optional metadata associated with the environment variable when managed via the function secrets API" - }, - "secret_type": { - "type": "string", - "nullable": true, - "description": "Optional classification for the secret (for example, the AI provider name)" - } - }, - "required": [ - "object_type", - "object_id", - "name" - ] + "$ref": "#/components/schemas/CreateMCPServer" } } } }, "responses": { "200": { - "description": "Returns the new env_var object", + "description": "Returns the new mcp_server object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" } } } @@ -29925,12 +30189,12 @@ } }, "get": { - "operationId": "getEnvVar", + "operationId": "getMcpServer", "tags": [ - "EnvVars" + "McpServers" ], - "description": "List out all env_vars. The env_vars are sorted by creation date, with the most recently-created env_vars coming first", - "summary": "List env_vars", + "description": "List out all mcp_servers. The mcp_servers are sorted by creation date, with the most recently-created mcp_servers coming first", + "summary": "List mcp_servers", "security": [ { "bearerAuth": [] @@ -29942,21 +30206,24 @@ "$ref": "#/components/parameters/AppLimitParam" }, { - "$ref": "#/components/parameters/Ids" + "$ref": "#/components/parameters/StartingAfter" }, { - "$ref": "#/components/parameters/EnvVarName" + "$ref": "#/components/parameters/EndingBefore" }, { - "$ref": "#/components/parameters/EnvVarObjectType" + "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/EnvVarObjectId" + "$ref": "#/components/parameters/McpServerName" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns a list of env_var objects", + "description": "Returns a list of mcp_server objects", "content": { "application/json": { "schema": { @@ -29965,9 +30232,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" }, - "description": "A list of env_var objects" + "description": "A list of mcp_server objects" } }, "required": [ @@ -30063,9 +30330,9 @@ } }, "options": { - "operationId": "optionsEnvVar", + "operationId": "optionsMcpServer", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/env_var`)", + "summary": "Enable CORS (`/v1/mcp_server`)", "security": [], "tags": [ "CORS" @@ -30120,14 +30387,14 @@ } } }, - "/v1/env_var/{env_var_id}": { + "/v1/mcp_server/{mcp_server_id}": { "get": { - "operationId": "getEnvVarId", + "operationId": "getMcpServerId", "tags": [ - "EnvVars" + "McpServers" ], - "description": "Get an env_var object by its id", - "summary": "Get env_var", + "description": "Get a mcp_server object by its id", + "summary": "Get mcp_server", "security": [ { "bearerAuth": [] @@ -30136,16 +30403,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/EnvVarIdParam" + "$ref": "#/components/parameters/McpServerIdParam" } ], "responses": { "200": { - "description": "Returns the env_var object", + "description": "Returns the mcp_server object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" } } } @@ -30235,12 +30502,12 @@ } }, "patch": { - "operationId": "patchEnvVarId", + "operationId": "patchMcpServerId", "tags": [ - "EnvVars" + "McpServers" ], - "description": "Partially update an env_var 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 env_var", + "description": "Partially update a mcp_server 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 mcp_server", "security": [ { "bearerAuth": [] @@ -30249,7 +30516,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/EnvVarIdParam" + "$ref": "#/components/parameters/McpServerIdParam" } ], "requestBody": { @@ -30258,45 +30525,18 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the environment variable" - }, - "value": { - "type": "string", - "nullable": true, - "description": "The value of the environment variable. Will be encrypted at rest." - }, - "metadata": { - "type": "object", - "nullable": true, - "additionalProperties": { - "nullable": true - }, - "description": "Optional metadata associated with the environment variable when managed via the function secrets API" - }, - "secret_type": { - "type": "string", - "nullable": true, - "description": "Optional classification for the secret (for example, the AI provider name)" - } - }, - "required": [ - "name" - ] + "$ref": "#/components/schemas/PatchMCPServer" } } } }, "responses": { "200": { - "description": "Returns the env_var object", + "description": "Returns the mcp_server object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" } } } @@ -30386,12 +30626,12 @@ } }, "delete": { - "operationId": "deleteEnvVarId", + "operationId": "deleteMcpServerId", "tags": [ - "EnvVars" + "McpServers" ], - "description": "Delete an env_var object by its id", - "summary": "Delete env_var", + "description": "Delete a mcp_server object by its id", + "summary": "Delete mcp_server", "security": [ { "bearerAuth": [] @@ -30400,16 +30640,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/EnvVarIdParam" + "$ref": "#/components/parameters/McpServerIdParam" } ], "responses": { "200": { - "description": "Returns the deleted env_var object", + "description": "Returns the deleted mcp_server object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvVar" + "$ref": "#/components/schemas/MCPServer" } } } @@ -30499,16 +30739,16 @@ } }, "options": { - "operationId": "optionsEnvVarId", + "operationId": "optionsMcpServerId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/env_var/{env_var_id}`)", + "summary": "Enable CORS (`/v1/mcp_server/{mcp_server_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/EnvVarIdParam" + "$ref": "#/components/parameters/McpServerIdParam" } ], "responses": { @@ -30561,10 +30801,10 @@ } } }, - "/v1/mcp_server": { + "/v1/dataset_snapshot": { "post": { "tags": [ - "McpServers" + "DatasetSnapshots" ], "security": [ { @@ -30572,27 +30812,27 @@ }, {} ], - "operationId": "postMcpServer", - "description": "Create a new mcp_server. If there is an existing mcp_server with the same name as the one specified in the request, will return the existing mcp_server unmodified", - "summary": "Create mcp_server", + "operationId": "postDatasetSnapshot", + "description": "Create a new dataset_snapshot. If there is an existing dataset_snapshot with the same name as the one specified in the request, will return the existing dataset_snapshot unmodified", + "summary": "Create dataset_snapshot", "requestBody": { - "description": "Any desired information about the new mcp_server object", + "description": "Any desired information about the new dataset_snapshot object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateMCPServer" + "$ref": "#/components/schemas/CreateDatasetSnapshot" } } } }, "responses": { "200": { - "description": "Returns the new mcp_server object", + "description": "Returns the new dataset_snapshot object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" } } } @@ -30683,7 +30923,7 @@ }, "put": { "tags": [ - "McpServers" + "DatasetSnapshots" ], "security": [ { @@ -30691,27 +30931,27 @@ }, {} ], - "operationId": "putMcpServer", - "description": "Create or replace mcp_server. If there is an existing mcp_server with the same name as the one specified in the request, will replace the existing mcp_server with the provided fields", - "summary": "Create or replace mcp_server", + "operationId": "putDatasetSnapshot", + "description": "Create or replace dataset_snapshot. If there is an existing dataset_snapshot with the same name as the one specified in the request, will replace the existing dataset_snapshot with the provided fields", + "summary": "Create or replace dataset_snapshot", "requestBody": { - "description": "Any desired information about the new mcp_server object", + "description": "Any desired information about the new dataset_snapshot object", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateMCPServer" + "$ref": "#/components/schemas/CreateDatasetSnapshot" } } } }, "responses": { "200": { - "description": "Returns the new mcp_server object", + "description": "Returns the new dataset_snapshot object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" } } } @@ -30801,12 +31041,12 @@ } }, "get": { - "operationId": "getMcpServer", + "operationId": "getDatasetSnapshot", "tags": [ - "McpServers" + "DatasetSnapshots" ], - "description": "List out all mcp_servers. The mcp_servers are sorted by creation date, with the most recently-created mcp_servers coming first", - "summary": "List mcp_servers", + "description": "List out all dataset_snapshots. The dataset_snapshots are sorted by creation date, with the most recently-created dataset_snapshots coming first", + "summary": "List dataset_snapshots", "security": [ { "bearerAuth": [] @@ -30827,7 +31067,7 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/McpServerName" + "$ref": "#/components/parameters/DatasetSnapshotName" }, { "$ref": "#/components/parameters/OrgName" @@ -30835,7 +31075,7 @@ ], "responses": { "200": { - "description": "Returns a list of mcp_server objects", + "description": "Returns a list of dataset_snapshot objects", "content": { "application/json": { "schema": { @@ -30844,9 +31084,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" }, - "description": "A list of mcp_server objects" + "description": "A list of dataset_snapshot objects" } }, "required": [ @@ -30942,9 +31182,9 @@ } }, "options": { - "operationId": "optionsMcpServer", + "operationId": "optionsDatasetSnapshot", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/mcp_server`)", + "summary": "Enable CORS (`/v1/dataset_snapshot`)", "security": [], "tags": [ "CORS" @@ -30999,14 +31239,14 @@ } } }, - "/v1/mcp_server/{mcp_server_id}": { + "/v1/dataset_snapshot/{dataset_snapshot_id}": { "get": { - "operationId": "getMcpServerId", + "operationId": "getDatasetSnapshotId", "tags": [ - "McpServers" + "DatasetSnapshots" ], - "description": "Get a mcp_server object by its id", - "summary": "Get mcp_server", + "description": "Get a dataset_snapshot object by its id", + "summary": "Get dataset_snapshot", "security": [ { "bearerAuth": [] @@ -31015,16 +31255,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/McpServerIdParam" + "$ref": "#/components/parameters/DatasetSnapshotIdParam" } ], "responses": { "200": { - "description": "Returns the mcp_server object", + "description": "Returns the dataset_snapshot object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" } } } @@ -31114,12 +31354,12 @@ } }, "patch": { - "operationId": "patchMcpServerId", + "operationId": "patchDatasetSnapshotId", "tags": [ - "McpServers" + "DatasetSnapshots" ], - "description": "Partially update a mcp_server 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 mcp_server", + "description": "Partially update a dataset_snapshot 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_snapshot", "security": [ { "bearerAuth": [] @@ -31128,7 +31368,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/McpServerIdParam" + "$ref": "#/components/parameters/DatasetSnapshotIdParam" } ], "requestBody": { @@ -31137,18 +31377,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchMCPServer" + "$ref": "#/components/schemas/PatchDatasetSnapshot" } } } }, "responses": { "200": { - "description": "Returns the mcp_server object", + "description": "Returns the dataset_snapshot object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" } } } @@ -31238,12 +31478,12 @@ } }, "delete": { - "operationId": "deleteMcpServerId", + "operationId": "deleteDatasetSnapshotId", "tags": [ - "McpServers" + "DatasetSnapshots" ], - "description": "Delete a mcp_server object by its id", - "summary": "Delete mcp_server", + "description": "Delete a dataset_snapshot object by its id", + "summary": "Delete dataset_snapshot", "security": [ { "bearerAuth": [] @@ -31252,16 +31492,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/McpServerIdParam" + "$ref": "#/components/parameters/DatasetSnapshotIdParam" } ], "responses": { "200": { - "description": "Returns the deleted mcp_server object", + "description": "Returns the deleted dataset_snapshot object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MCPServer" + "$ref": "#/components/schemas/DatasetSnapshot" } } } @@ -31351,16 +31591,16 @@ } }, "options": { - "operationId": "optionsMcpServerId", + "operationId": "optionsDatasetSnapshotId", "description": "Enable CORS", - "summary": "Enable CORS (`/v1/mcp_server/{mcp_server_id}`)", + "summary": "Enable CORS (`/v1/dataset_snapshot/{dataset_snapshot_id}`)", "security": [], "tags": [ "CORS" ], "parameters": [ { - "$ref": "#/components/parameters/McpServerIdParam" + "$ref": "#/components/parameters/DatasetSnapshotIdParam" } ], "responses": { diff --git a/openapi/spec.yaml b/openapi/spec.yaml index cb7c561..d2255ae 100644 --- a/openapi/spec.yaml +++ b/openapi/spec.yaml @@ -80,10 +80,6 @@ components: type: string format: uuid description: SpanIframe id - EvalStatusPageIdParam: - type: string - format: uuid - description: EvalStatusPage id FunctionIdParam: type: string format: uuid @@ -116,6 +112,10 @@ components: type: string format: uuid description: McpServer id + DatasetSnapshotIdParam: + type: string + format: uuid + description: DatasetSnapshot id ProjectIdQuery: type: string format: uuid @@ -153,9 +153,6 @@ components: SpanIframeName: type: string description: Name of the span_iframe to search for - EvalStatusPageName: - type: string - description: Name of the eval_status_page to search for FunctionName: type: string description: Name of the function to search for @@ -177,6 +174,9 @@ components: McpServerName: type: string description: Name of the mcp_server to search for + DatasetSnapshotName: + type: string + description: Name of the dataset_snapshot to search for OrgName: type: string description: Filter search results to within a particular organization @@ -714,6 +714,14 @@ components: description: Name of the span, for display purposes only type: $ref: "#/components/schemas/SpanType" + purpose: + type: string + nullable: true + enum: + - scorer + - null + description: A special value that indicates the span was generated by a scoring + automation additionalProperties: nullable: true description: Human-identifying attributes of the span, such as name, type, etc. @@ -1617,6 +1625,30 @@ components: description: Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified. + internal_metadata: + type: object + nullable: true + properties: + dataset_filter: + type: object + nullable: true + additionalProperties: + nullable: true + description: BTQL filter payload used to evaluate a subset of a linked dataset. + additionalProperties: + nullable: true + description: Braintrust-controlled metadata about the experiment. + parameters_id: + type: string + nullable: true + format: uuid + description: Identifier of the linked saved parameters object, or null if the + experiment is not linked to saved parameters + parameters_version: + type: string + nullable: true + description: Version number of the linked saved parameters object the experiment + was run against. public: type: boolean description: Whether or not the experiment is public. Public experiments can be @@ -1679,6 +1711,30 @@ components: description: Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified. + internal_metadata: + type: object + nullable: true + properties: + dataset_filter: + type: object + nullable: true + additionalProperties: + nullable: true + description: BTQL filter payload used to evaluate a subset of a linked dataset. + additionalProperties: + nullable: true + description: Braintrust-controlled metadata about the experiment. + parameters_id: + type: string + nullable: true + format: uuid + description: Identifier of the linked saved parameters object, or null if the + experiment is not linked to saved parameters + parameters_version: + type: string + nullable: true + description: Version number of the linked saved parameters object the experiment + was run against. public: type: boolean nullable: true @@ -1736,6 +1792,30 @@ components: description: Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified. + internal_metadata: + type: object + nullable: true + properties: + dataset_filter: + type: object + nullable: true + additionalProperties: + nullable: true + description: BTQL filter payload used to evaluate a subset of a linked dataset. + additionalProperties: + nullable: true + description: Braintrust-controlled metadata about the experiment. + parameters_id: + type: string + nullable: true + format: uuid + description: Identifier of the linked saved parameters object, or null if the + experiment is not linked to saved parameters + parameters_version: + type: string + nullable: true + description: Version number of the linked saved parameters object the experiment + was run against. public: type: boolean nullable: true @@ -2567,6 +2647,12 @@ components: nullable: true format: uuid description: Identifies the user who created the dataset + tags: + type: array + nullable: true + items: + type: string + description: A list of tags for the dataset metadata: type: object nullable: true @@ -2596,6 +2682,12 @@ components: type: string nullable: true description: Textual description of the dataset + tags: + type: array + nullable: true + items: + type: string + description: A list of tags for the dataset metadata: type: object nullable: true @@ -2616,6 +2708,12 @@ components: type: string nullable: true description: Textual description of the dataset + tags: + type: array + nullable: true + items: + type: string + description: A list of tags for the dataset metadata: type: object nullable: true @@ -4467,8 +4565,54 @@ components: nullable: true format: date-time description: Date of user creation + last_active_at: + type: number + nullable: true + description: Unix timestamp in milliseconds of the user's last activity, when + available required: - id + 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 + enum: + - group + group_by: + type: string + description: Field path to group by, e.g. metadata.session_id + idle_seconds: + type: number + description: "Optional: trigger after this many seconds of inactivity" + required: + - type + - group_by + description: Process spans/traces grouped by a field (e.g., session_id) RetentionObjectType: type: string enum: @@ -4521,47 +4665,6 @@ components: the current span matches. required: - function - 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 - enum: - - group - group_by: - type: string - description: Field path to group by, e.g. metadata.session_id - idle_seconds: - type: number - description: "Optional: trigger after this many seconds of inactivity" - required: - - type - - group_by - description: Process spans/traces grouped by a field (e.g., session_id) TopicAutomationDataScope: anyOf: - type: object @@ -4661,6 +4764,17 @@ components: type: string nullable: true description: Optional BTQL filter applied before topic automation. + rerun_seconds: + type: number + nullable: true + minimum: 600 + description: How often to recompute topic maps + relabel_overlap_seconds: + type: number + nullable: true + minimum: 60 + description: How much recent history to relabel after a new topic map version + becomes active backfill_time_range: anyOf: - type: string @@ -4674,7 +4788,7 @@ components: - from - to - type: "null" - description: Optional default time range for backfill operations. + description: Topic window used for classification coverage and initial backfill. required: - event_type - sampling_rate @@ -4710,7 +4824,7 @@ components: nullable: true description: Textual description of the project automation config: - anyOf: + oneOf: - type: object properties: event_type: @@ -4806,6 +4920,14 @@ components: - type - btql_query description: The definition of what to export + scope: + anyOf: + - $ref: "#/components/schemas/SpanScope" + - $ref: "#/components/schemas/TraceScope" + - $ref: "#/components/schemas/GroupScope" + - type: "null" + description: Execution scope for export automation. Defaults to span-level + execution. export_path: type: string description: The path to export the results to. It should include the storage @@ -4841,6 +4963,18 @@ components: - type - role_arn - external_id + - type: object + properties: + type: + type: string + enum: + - gcp_service_account + service_account_email: + type: string + description: The GCP service account email to impersonate + required: + - type + - service_account_email batch_size: type: number nullable: true @@ -4943,7 +5077,7 @@ components: nullable: true description: Textual description of the project automation config: - anyOf: + oneOf: - type: object properties: event_type: @@ -5039,6 +5173,14 @@ components: - type - btql_query description: The definition of what to export + scope: + anyOf: + - $ref: "#/components/schemas/SpanScope" + - $ref: "#/components/schemas/TraceScope" + - $ref: "#/components/schemas/GroupScope" + - type: "null" + description: Execution scope for export automation. Defaults to span-level + execution. export_path: type: string description: The path to export the results to. It should include the storage @@ -5074,6 +5216,18 @@ components: - type - role_arn - external_id + - type: object + properties: + type: + type: string + enum: + - gcp_service_account + service_account_email: + type: string + description: The GCP service account email to impersonate + required: + - type + - service_account_email batch_size: type: number nullable: true @@ -5171,7 +5325,7 @@ components: nullable: true description: Textual description of the project automation config: - anyOf: + oneOf: - type: object properties: event_type: @@ -5267,6 +5421,14 @@ components: - type - btql_query description: The definition of what to export + scope: + anyOf: + - $ref: "#/components/schemas/SpanScope" + - $ref: "#/components/schemas/TraceScope" + - $ref: "#/components/schemas/GroupScope" + - type: "null" + description: Execution scope for export automation. Defaults to span-level + execution. export_path: type: string description: The path to export the results to. It should include the storage @@ -5302,6 +5464,18 @@ components: - type - role_arn - external_id + - type: object + properties: + type: + type: string + enum: + - gcp_service_account + service_account_email: + type: string + description: The GCP service account email to impersonate + required: + - type + - service_account_email batch_size: type: number nullable: true @@ -5382,7 +5556,7 @@ components: - event_type - action - $ref: "#/components/schemas/TopicAutomationConfig" - - type: "null" + - nullable: true description: The configuration for the automation rule ProjectScoreCategory: type: object @@ -5773,154 +5947,7 @@ components: type: string nullable: true description: Textual description of the span iframe - EvalStatusPageTheme: - type: string - enum: - - light - - dark - description: The theme for the page - EvalStatusPageConfig: - type: object - properties: - score_columns: - type: array - nullable: true - items: - type: string - description: The score columns to display on the page - metric_columns: - type: array - nullable: true - items: - type: string - description: The metric columns to display on the page - grouping_field: - type: string - nullable: true - description: The metadata field to use for grouping experiments (model) - filter: - type: string - nullable: true - description: BTQL filter to apply to experiment data - sort_by: - type: string - nullable: true - description: "Field to sort results by (format: 'score:' or - 'metric:')" - sort_order: - type: string - nullable: true - enum: - - asc - - desc - - null - description: Sort order (ascending or descending) - api_key: - type: string - nullable: true - description: The API key used for fetching experiment data - description: Configuration for what data to display - EvalStatusPage: - type: object - properties: - id: - type: string - format: uuid - description: Unique identifier for the eval status page - project_id: - type: string - format: uuid - description: Unique identifier for the project that the eval status page belongs - under - user_id: - type: string - nullable: true - format: uuid - description: Identifies the user who created the eval status page - created: - type: string - nullable: true - format: date-time - description: Date of eval status page creation - deleted_at: - type: string - nullable: true - format: date-time - description: Date of eval status page deletion, or null if the eval status page - is still active - name: - type: string - description: Name of the eval status page - description: - type: string - nullable: true - description: Textual description of the eval status page - logo_url: - type: string - nullable: true - description: URL of the logo to display on the page - theme: - $ref: "#/components/schemas/EvalStatusPageTheme" - config: - $ref: "#/components/schemas/EvalStatusPageConfig" - required: - - id - - project_id - - name - - theme - - config - description: A public eval status page that displays aggregate experiment results - CreateEvalStatusPage: - type: object - properties: - project_id: - type: string - format: uuid - description: Unique identifier for the project that the eval status page belongs - under - name: - type: string - description: Name of the eval status page - description: - type: string - nullable: true - description: Textual description of the eval status page - logo_url: - type: string - nullable: true - description: URL of the logo to display on the page - theme: - $ref: "#/components/schemas/EvalStatusPageTheme" - config: - $ref: "#/components/schemas/EvalStatusPageConfig" - required: - - project_id - - name - - theme - - config - description: A public eval status page that displays aggregate experiment results - PatchEvalStatusPage: - type: object - properties: - name: - type: string - nullable: true - description: Name of the eval status page - description: - type: string - nullable: true - description: Textual description of the eval status page - logo_url: - type: string - nullable: true - description: URL of the logo to display on the page - theme: - $ref: "#/components/schemas/EvalStatusPageTheme" - nullable: true - config: - $ref: "#/components/schemas/EvalStatusPageConfig" - nullable: true - CodeBundle: + CodeBundle: type: object properties: runtime_context: @@ -6401,6 +6428,46 @@ components: - type - prompt title: facet + TopicMapGenerationSettings: + type: object + properties: + algorithm: + type: string + enum: + - hdbscan + - kmeans + dimension_reduction: + type: string + enum: + - umap + - pca + - none + sample_size: + type: integer + minimum: 0 + exclusiveMinimum: true + n_clusters: + type: integer + minimum: 0 + exclusiveMinimum: true + min_cluster_size: + type: integer + minimum: 0 + exclusiveMinimum: true + min_samples: + type: integer + minimum: 0 + exclusiveMinimum: true + hierarchy_threshold: + type: integer + minimum: 0 + exclusiveMinimum: true + naming_model: + type: string + required: + - algorithm + - dimension_reduction + description: Clustering and naming settings used to generate this topic map TopicMapData: type: object properties: @@ -6425,6 +6492,8 @@ components: additionalProperties: type: string description: Mapping from topic_id to topic name + generation_settings: + $ref: "#/components/schemas/TopicMapGenerationSettings" distance_threshold: type: number description: Maximum distance to nearest centroid. If exceeded, returns no_match. @@ -7222,6 +7291,9 @@ components: layout: type: string nullable: true + topicMapReportKey: + type: string + nullable: true chartHeight: type: number nullable: true @@ -7327,7 +7399,11 @@ components: enum: - traces - spans + - topics - null + cluster: + type: string + nullable: true freezeColumns: type: boolean nullable: true @@ -8134,6 +8210,72 @@ components: type: string nullable: true description: Textual description of the MCP server + DatasetSnapshot: + type: object + properties: + id: + type: string + format: uuid + description: Unique identifier for the dataset snapshot + dataset_id: + type: string + format: uuid + description: Unique identifier for the dataset that this snapshot belongs to + name: + type: string + description: Name of the dataset snapshot + description: + type: string + nullable: true + xact_id: + type: string + description: Transaction id of the brainstore version at the time of the snapshot + created: + type: string + nullable: true + format: date-time + description: Date of dataset snapshot creation + required: + - id + - dataset_id + - name + - description + - xact_id + - created + CreateDatasetSnapshot: + type: object + properties: + dataset_id: + type: string + format: uuid + description: Unique identifier for the dataset that this snapshot belongs to + name: + type: string + minLength: 1 + description: Name of the dataset snapshot + description: + type: string + nullable: true + description: Textual description of the dataset snapshot + xact_id: + type: string + minLength: 1 + description: Transaction id of the brainstore version at the time of the snapshot + required: + - dataset_id + - name + - xact_id + PatchDatasetSnapshot: + type: object + properties: + name: + type: string + nullable: true + description: Name of the dataset snapshot + description: + type: string + nullable: true + description: Textual description of the dataset snapshot Environment: type: object properties: @@ -8484,6 +8626,11 @@ components: code: type: string description: The inline code to execute + function_type: + allOf: + - $ref: "#/components/schemas/FunctionTypeEnum" + - description: The function type for inline code. Required when invoking inline + preprocessors. name: type: string nullable: true @@ -8567,6 +8714,15 @@ components: properties: dataset_id: type: string + dataset_version: + type: string + nullable: true + description: The version of the dataset to evaluate + dataset_environment: + type: string + nullable: true + description: The environment tag that resolves to the dataset version to + evaluate _internal_btql: type: object nullable: true @@ -8582,6 +8738,15 @@ components: type: string dataset_name: type: string + dataset_version: + type: string + nullable: true + description: The version of the dataset to evaluate + dataset_environment: + type: string + nullable: true + description: The environment tag that resolves to the dataset version to + evaluate _internal_btql: type: object nullable: true @@ -8805,13 +8970,6 @@ components: description: SpanIframe id name: span_iframe_id in: path - EvalStatusPageIdParam: - schema: - $ref: "#/components/schemas/EvalStatusPageIdParam" - required: true - description: EvalStatusPage id - name: eval_status_page_id - in: path FunctionIdParam: schema: $ref: "#/components/schemas/FunctionIdParam" @@ -8868,6 +9026,13 @@ components: description: McpServer id name: mcp_server_id in: path + DatasetSnapshotIdParam: + schema: + $ref: "#/components/schemas/DatasetSnapshotIdParam" + required: true + description: DatasetSnapshot id + name: dataset_snapshot_id + in: path ProjectIdQuery: schema: $ref: "#/components/schemas/ProjectIdQuery" @@ -8963,14 +9128,6 @@ components: name: span_iframe_name in: query allowReserved: true - EvalStatusPageName: - schema: - $ref: "#/components/schemas/EvalStatusPageName" - required: false - description: Name of the eval_status_page to search for - name: eval_status_page_name - in: query - allowReserved: true FunctionName: schema: $ref: "#/components/schemas/FunctionName" @@ -9027,6 +9184,14 @@ components: name: mcp_server_name in: query allowReserved: true + DatasetSnapshotName: + schema: + $ref: "#/components/schemas/DatasetSnapshotName" + required: false + description: Name of the dataset_snapshot to search for + name: dataset_snapshot_name + in: query + allowReserved: true OrgName: schema: $ref: "#/components/schemas/OrgName" @@ -16886,32 +17051,32 @@ paths: application/json: schema: nullable: true - /v1/eval_status_page: + /v1/function: post: tags: - - EvalStatusPages + - Functions security: - bearerAuth: [] - {} - operationId: postEvalStatusPage - description: Create a new eval_status_page. If there is an existing - eval_status_page with the same name as the one specified in the request, - will return the existing eval_status_page unmodified - summary: Create eval_status_page + operationId: postFunction + description: Create a new function. If there is an existing function in the + project with the same slug as the one specified in the request, will + return the existing function unmodified + summary: Create function requestBody: - description: Any desired information about the new eval_status_page object + description: Any desired information about the new function object required: false content: application/json: schema: - $ref: "#/components/schemas/CreateEvalStatusPage" + $ref: "#/components/schemas/CreateFunction" responses: "200": - description: Returns the new eval_status_page object + description: Returns the new function object content: application/json: schema: - $ref: "#/components/schemas/EvalStatusPage" + $ref: "#/components/schemas/Function" "400": description: The request was unacceptable, often due to missing a required parameter @@ -16965,29 +17130,29 @@ paths: nullable: true put: tags: - - EvalStatusPages + - Functions security: - bearerAuth: [] - {} - operationId: putEvalStatusPage - description: Create or replace eval_status_page. If there is an existing - eval_status_page with the same name as the one specified in the request, - will replace the existing eval_status_page with the provided fields - summary: Create or replace eval_status_page + operationId: putFunction + description: Create or replace function. If there is an existing function in the + project with the same slug as the one specified in the request, will + replace the existing function with the provided fields + summary: Create or replace function requestBody: - description: Any desired information about the new eval_status_page object + description: Any desired information about the new function object required: false content: application/json: schema: - $ref: "#/components/schemas/CreateEvalStatusPage" + $ref: "#/components/schemas/CreateFunction" responses: "200": - description: Returns the new eval_status_page object + description: Returns the new function object content: application/json: schema: - $ref: "#/components/schemas/EvalStatusPage" + $ref: "#/components/schemas/Function" "400": description: The request was unacceptable, often due to missing a required parameter @@ -17040,13 +17205,12 @@ paths: schema: nullable: true get: - operationId: getEvalStatusPage + operationId: getFunction tags: - - EvalStatusPages - description: List out all eval_status_pages. The eval_status_pages are sorted by - creation date, with the most recently-created eval_status_pages coming - first - summary: List eval_status_pages + - Functions + description: List out all functions. The functions are sorted by creation date, + with the most recently-created functions coming first + summary: List functions security: - bearerAuth: [] - {} @@ -17055,11 +17219,16 @@ paths: - $ref: "#/components/parameters/StartingAfter" - $ref: "#/components/parameters/EndingBefore" - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/EvalStatusPageName" + - $ref: "#/components/parameters/FunctionName" + - $ref: "#/components/parameters/ProjectName" + - $ref: "#/components/parameters/ProjectIdQuery" + - $ref: "#/components/parameters/Slug" + - $ref: "#/components/parameters/PromptVersion" + - $ref: "#/components/parameters/PromptEnvironment" - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of eval_status_page objects + description: Returns a list of function objects content: application/json: schema: @@ -17068,8 +17237,8 @@ paths: objects: type: array items: - $ref: "#/components/schemas/EvalStatusPage" - description: A list of eval_status_page objects + $ref: "#/components/schemas/Function" + description: A list of function objects required: - objects additionalProperties: false @@ -17125,9 +17294,9 @@ paths: schema: nullable: true options: - operationId: optionsEvalStatusPage + operationId: optionsFunction description: Enable CORS - summary: Enable CORS (`/v1/eval_status_page`) + summary: Enable CORS (`/v1/function`) security: [] tags: - CORS @@ -17161,25 +17330,27 @@ paths: application/json: schema: nullable: true - /v1/eval_status_page/{eval_status_page_id}: + /v1/function/{function_id}: get: - operationId: getEvalStatusPageId + operationId: getFunctionId tags: - - EvalStatusPages - description: Get a eval_status_page object by its id - summary: Get eval_status_page + - Functions + description: Get a function object by its id + summary: Get function security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/EvalStatusPageIdParam" + - $ref: "#/components/parameters/FunctionIdParam" + - $ref: "#/components/parameters/PromptVersion" + - $ref: "#/components/parameters/PromptEnvironment" responses: "200": - description: Returns the eval_status_page object + description: Returns the function object content: application/json: schema: - $ref: "#/components/schemas/EvalStatusPage" + $ref: "#/components/schemas/Function" "400": description: The request was unacceptable, often due to missing a required parameter @@ -17232,33 +17403,33 @@ paths: schema: nullable: true patch: - operationId: patchEvalStatusPageId + operationId: patchFunctionId tags: - - EvalStatusPages - description: Partially update a eval_status_page 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 eval_status_page + - Functions + description: Partially update a function 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 function security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/EvalStatusPageIdParam" + - $ref: "#/components/parameters/FunctionIdParam" requestBody: description: Fields to update required: false content: application/json: schema: - $ref: "#/components/schemas/PatchEvalStatusPage" + $ref: "#/components/schemas/PatchFunction" responses: "200": - description: Returns the eval_status_page object + description: Returns the function object content: application/json: schema: - $ref: "#/components/schemas/EvalStatusPage" + $ref: "#/components/schemas/Function" "400": description: The request was unacceptable, often due to missing a required parameter @@ -17311,23 +17482,23 @@ paths: schema: nullable: true delete: - operationId: deleteEvalStatusPageId + operationId: deleteFunctionId tags: - - EvalStatusPages - description: Delete a eval_status_page object by its id - summary: Delete eval_status_page + - Functions + description: Delete a function object by its id + summary: Delete function security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/EvalStatusPageIdParam" + - $ref: "#/components/parameters/FunctionIdParam" responses: "200": - description: Returns the deleted eval_status_page object + description: Returns the deleted function object content: application/json: schema: - $ref: "#/components/schemas/EvalStatusPage" + $ref: "#/components/schemas/Function" "400": description: The request was unacceptable, often due to missing a required parameter @@ -17380,14 +17551,14 @@ paths: schema: nullable: true options: - operationId: optionsEvalStatusPageId + operationId: optionsFunctionId description: Enable CORS - summary: Enable CORS (`/v1/eval_status_page/{eval_status_page_id}`) + summary: Enable CORS (`/v1/function/{function_id}`) security: [] tags: - CORS parameters: - - $ref: "#/components/parameters/EvalStatusPageIdParam" + - $ref: "#/components/parameters/FunctionIdParam" responses: "200": description: Response for CORS method @@ -17418,53 +17589,63 @@ paths: application/json: schema: nullable: true - /v1/function: + /v1/function/{function_id}/invoke: post: + operationId: postFunctionIdInvoke tags: - Functions + description: Invoke a function. + summary: Invoke function security: - bearerAuth: [] - {} - operationId: postFunction - description: Create a new function. If there is an existing function in the - project with the same slug as the one specified in the request, will - return the existing function unmodified - summary: Create function + parameters: + - $ref: "#/components/parameters/FunctionIdParam" requestBody: - description: Any desired information about the new function object - required: false + description: Function invocation parameters content: application/json: schema: - $ref: "#/components/schemas/CreateFunction" + $ref: "#/components/schemas/InvokeApi" responses: "200": - description: Returns the new function object + description: Function invocation response content: application/json: schema: - $ref: "#/components/schemas/Function" - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: + nullable: true + options: + operationId: optionsFunctionIdInvoke + description: Enable CORS + summary: Enable CORS (`/v1/function/{function_id}/invoke`) + security: [] + tags: + - CORS + parameters: + - $ref: "#/components/parameters/FunctionIdParam" + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: schema: type: string - application/json: + Access-Control-Allow-Headers: schema: - nullable: true - "401": - description: No valid API key provided - content: - text/plain: + type: string + Access-Control-Allow-Methods: schema: type: string - application/json: + Access-Control-Allow-Origin: schema: - nullable: true - "403": - description: The API key doesn’t have permissions to perform the request + 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: @@ -17472,11 +17653,65 @@ paths: 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: + /v1/view: + post: + tags: + - Views + security: + - bearerAuth: [] + - {} + operationId: postView + description: Create a new view. If there is an existing view with the same name + as the one specified in the request, will return the existing view + unmodified + summary: Create view + requestBody: + description: Any desired information about the new view object + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateView" + responses: + "200": + description: Returns the new view object + content: + application/json: + schema: + $ref: "#/components/schemas/View" + "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: @@ -17497,29 +17732,29 @@ paths: nullable: true put: tags: - - Functions + - Views security: - bearerAuth: [] - {} - operationId: putFunction - description: Create or replace function. If there is an existing function in the - project with the same slug as the one specified in the request, will - replace the existing function with the provided fields - summary: Create or replace function + operationId: putView + description: Create or replace view. If there is an existing view with the same + name as the one specified in the request, will replace the existing view + with the provided fields + summary: Create or replace view requestBody: - description: Any desired information about the new function object + description: Any desired information about the new view object required: false content: application/json: schema: - $ref: "#/components/schemas/CreateFunction" + $ref: "#/components/schemas/CreateView" responses: "200": - description: Returns the new function object + description: Returns the new view object content: application/json: schema: - $ref: "#/components/schemas/Function" + $ref: "#/components/schemas/View" "400": description: The request was unacceptable, often due to missing a required parameter @@ -17572,12 +17807,12 @@ paths: schema: nullable: true get: - operationId: getFunction + operationId: getView tags: - - Functions - description: List out all functions. The functions are sorted by creation date, - with the most recently-created functions coming first - summary: List functions + - Views + description: List out all views. The views are sorted by creation date, with the + most recently-created views coming first + summary: List views security: - bearerAuth: [] - {} @@ -17586,16 +17821,13 @@ paths: - $ref: "#/components/parameters/StartingAfter" - $ref: "#/components/parameters/EndingBefore" - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/FunctionName" - - $ref: "#/components/parameters/ProjectName" - - $ref: "#/components/parameters/ProjectIdQuery" - - $ref: "#/components/parameters/Slug" - - $ref: "#/components/parameters/PromptVersion" - - $ref: "#/components/parameters/PromptEnvironment" - - $ref: "#/components/parameters/OrgName" + - $ref: "#/components/parameters/ViewName" + - $ref: "#/components/parameters/ViewType" + - $ref: "#/components/parameters/AclObjectType" + - $ref: "#/components/parameters/AclObjectId" responses: "200": - description: Returns a list of function objects + description: Returns a list of view objects content: application/json: schema: @@ -17604,8 +17836,8 @@ paths: objects: type: array items: - $ref: "#/components/schemas/Function" - description: A list of function objects + $ref: "#/components/schemas/View" + description: A list of view objects required: - objects additionalProperties: false @@ -17661,9 +17893,9 @@ paths: schema: nullable: true options: - operationId: optionsFunction + operationId: optionsView description: Enable CORS - summary: Enable CORS (`/v1/function`) + summary: Enable CORS (`/v1/view`) security: [] tags: - CORS @@ -17697,27 +17929,27 @@ paths: application/json: schema: nullable: true - /v1/function/{function_id}: + /v1/view/{view_id}: get: - operationId: getFunctionId + operationId: getViewId tags: - - Functions - description: Get a function object by its id - summary: Get function + - Views + description: Get a view object by its id + summary: Get view security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/FunctionIdParam" - - $ref: "#/components/parameters/PromptVersion" - - $ref: "#/components/parameters/PromptEnvironment" + - $ref: "#/components/parameters/ViewIdParam" + - $ref: "#/components/parameters/AclObjectType" + - $ref: "#/components/parameters/AclObjectId" responses: "200": - description: Returns the function object + description: Returns the view object content: application/json: schema: - $ref: "#/components/schemas/Function" + $ref: "#/components/schemas/View" "400": description: The request was unacceptable, often due to missing a required parameter @@ -17770,33 +18002,33 @@ paths: schema: nullable: true patch: - operationId: patchFunctionId + operationId: patchViewId tags: - - Functions - description: Partially update a function object. Specify the fields to update in - the payload. Any object-type fields will be deep-merged with existing + - Views + description: Partially update a view 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 function + summary: Partially update view security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/FunctionIdParam" + - $ref: "#/components/parameters/ViewIdParam" requestBody: description: Fields to update required: false content: application/json: schema: - $ref: "#/components/schemas/PatchFunction" + $ref: "#/components/schemas/PatchView" responses: "200": - description: Returns the function object + description: Returns the view object content: application/json: schema: - $ref: "#/components/schemas/Function" + $ref: "#/components/schemas/View" "400": description: The request was unacceptable, often due to missing a required parameter @@ -17849,23 +18081,30 @@ paths: schema: nullable: true delete: - operationId: deleteFunctionId + operationId: deleteViewId tags: - - Functions - description: Delete a function object by its id - summary: Delete function + - Views + description: Delete a view object by its id + summary: Delete view security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/FunctionIdParam" + - $ref: "#/components/parameters/ViewIdParam" + requestBody: + description: Additional parameters for the delete operation + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteView" responses: "200": - description: Returns the deleted function object + description: Returns the deleted view object content: application/json: schema: - $ref: "#/components/schemas/Function" + $ref: "#/components/schemas/View" "400": description: The request was unacceptable, often due to missing a required parameter @@ -17918,14 +18157,14 @@ paths: schema: nullable: true options: - operationId: optionsFunctionId + operationId: optionsViewId description: Enable CORS - summary: Enable CORS (`/v1/function/{function_id}`) + summary: Enable CORS (`/v1/view/{view_id}`) security: [] tags: - CORS parameters: - - $ref: "#/components/parameters/FunctionIdParam" + - $ref: "#/components/parameters/ViewIdParam" responses: "200": description: Response for CORS method @@ -17956,63 +18195,60 @@ paths: application/json: schema: nullable: true - /v1/function/{function_id}/invoke: - post: - operationId: postFunctionIdInvoke + /v1/organization: + get: + operationId: getOrganization tags: - - Functions - description: Invoke a function. - summary: Invoke function + - Organizations + description: List out all organizations. The organizations are sorted by + creation date, with the most recently-created organizations coming first + summary: List organizations security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/FunctionIdParam" - requestBody: - description: Function invocation parameters - content: - application/json: - schema: - $ref: "#/components/schemas/InvokeApi" + - $ref: "#/components/parameters/AppLimitParam" + - $ref: "#/components/parameters/StartingAfter" + - $ref: "#/components/parameters/EndingBefore" + - $ref: "#/components/parameters/Ids" + - $ref: "#/components/parameters/OrgName" responses: "200": - description: Function invocation response + description: Returns a list of organization objects content: application/json: schema: - nullable: true - options: - operationId: optionsFunctionIdInvoke - description: Enable CORS - summary: Enable CORS (`/v1/function/{function_id}/invoke`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/FunctionIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: + type: object + properties: + objects: + type: array + items: + $ref: "#/components/schemas/Organization" + description: A list of organization 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-Methods: + application/json: schema: - type: string - Access-Control-Allow-Origin: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: schema: type: string - Access-Control-Max-Age: + application/json: schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request content: text/plain: schema: @@ -18020,35 +18256,13 @@ paths: application/json: schema: nullable: true - /v1/view: - post: - tags: - - Views - security: - - bearerAuth: [] - - {} - operationId: postView - description: Create a new view. If there is an existing view with the same name - as the one specified in the request, will return the existing view - unmodified - summary: Create view - requestBody: - description: Any desired information about the new view object - required: false - content: - application/json: - schema: - $ref: "#/components/schemas/CreateView" - responses: - "200": - description: Returns the new view object - content: - application/json: + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: schema: - $ref: "#/components/schemas/View" - "400": - description: The request was unacceptable, often due to missing a required - parameter + type: string content: text/plain: schema: @@ -18056,8 +18270,8 @@ paths: application/json: schema: nullable: true - "401": - description: No valid API key provided + "500": + description: Something went wrong on Braintrust's end. (These are rare.) content: text/plain: schema: @@ -18065,31 +18279,36 @@ paths: application/json: schema: nullable: true - "403": - description: The API key doesn’t have permissions to perform the request - content: - text/plain: + options: + operationId: optionsOrganization + description: Enable CORS + summary: Enable CORS (`/v1/organization`) + security: [] + tags: + - CORS + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: schema: type: string - application/json: + Access-Control-Allow-Headers: schema: - nullable: true - "429": - description: Too many requests hit the API too quickly. We recommend an - exponential backoff of your requests - headers: - Retry-After: + 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 - "500": - description: Something went wrong on Braintrust's end. (These are rare.) + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter content: text/plain: schema: @@ -18097,31 +18316,25 @@ paths: application/json: schema: nullable: true - put: + /v1/organization/{organization_id}: + get: + operationId: getOrganizationId tags: - - Views + - Organizations + description: Get an organization object by its id + summary: Get organization security: - bearerAuth: [] - {} - operationId: putView - description: Create or replace view. If there is an existing view with the same - name as the one specified in the request, will replace the existing view - with the provided fields - summary: Create or replace view - requestBody: - description: Any desired information about the new view object - required: false - content: - application/json: - schema: - $ref: "#/components/schemas/CreateView" + parameters: + - $ref: "#/components/parameters/OrganizationIdParam" responses: "200": - description: Returns the new view object + description: Returns the organization object content: application/json: schema: - $ref: "#/components/schemas/View" + $ref: "#/components/schemas/Organization" "400": description: The request was unacceptable, often due to missing a required parameter @@ -18173,41 +18386,34 @@ paths: application/json: schema: nullable: true - get: - operationId: getView + patch: + operationId: patchOrganizationId tags: - - Views - description: List out all views. The views are sorted by creation date, with the - most recently-created views coming first - summary: List views + - Organizations + description: Partially update an organization 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 organization security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/AppLimitParam" - - $ref: "#/components/parameters/StartingAfter" - - $ref: "#/components/parameters/EndingBefore" - - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/ViewName" - - $ref: "#/components/parameters/ViewType" - - $ref: "#/components/parameters/AclObjectType" - - $ref: "#/components/parameters/AclObjectId" + - $ref: "#/components/parameters/OrganizationIdParam" + requestBody: + description: Fields to update + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/PatchOrganization" responses: "200": - description: Returns a list of view objects + description: Returns the organization object content: application/json: schema: - type: object - properties: - objects: - type: array - items: - $ref: "#/components/schemas/View" - description: A list of view objects - required: - - objects - additionalProperties: false + $ref: "#/components/schemas/Organization" "400": description: The request was unacceptable, often due to missing a required parameter @@ -18260,12 +18466,14 @@ paths: schema: nullable: true options: - operationId: optionsView + operationId: optionsOrganizationId description: Enable CORS - summary: Enable CORS (`/v1/view`) + summary: Enable CORS (`/v1/organization/{organization_id}`) security: [] tags: - CORS + parameters: + - $ref: "#/components/parameters/OrganizationIdParam" responses: "200": description: Response for CORS method @@ -18296,27 +18504,30 @@ paths: application/json: schema: nullable: true - /v1/view/{view_id}: - get: - operationId: getViewId + /v1/organization/members: + patch: + operationId: patchOrganizationMembers tags: - - Views - description: Get a view object by its id - summary: Get view + - Organizations + description: Modify organization membership + summary: Modify organization membership security: - bearerAuth: [] - {} - parameters: - - $ref: "#/components/parameters/ViewIdParam" - - $ref: "#/components/parameters/AclObjectType" - - $ref: "#/components/parameters/AclObjectId" + requestBody: + description: Members to add/remove + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/PatchOrganizationMembers" responses: "200": - description: Returns the view object + description: A success status content: application/json: schema: - $ref: "#/components/schemas/View" + $ref: "#/components/schemas/PatchOrganizationMembersOutput" "400": description: The request was unacceptable, often due to missing a required parameter @@ -18368,34 +18579,82 @@ paths: application/json: schema: nullable: true - patch: - operationId: patchViewId + options: + operationId: optionsOrganizationMembers + description: Enable CORS + summary: Enable CORS (`/v1/organization/members`) + security: [] tags: - - Views - description: Partially update a view 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 view + - 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/api_key: + post: + tags: + - ApiKeys security: - bearerAuth: [] - {} - parameters: - - $ref: "#/components/parameters/ViewIdParam" + operationId: postApiKey + description: Create a new api_key. It is possible to have multiple API keys with + the same name. There is no de-duplication + summary: Create api_key requestBody: - description: Fields to update + description: Any desired information about the new api_key object required: false content: application/json: schema: - $ref: "#/components/schemas/PatchView" + type: object + properties: + name: + type: string + description: Name of the api key. Does not have to be unique + 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 API key belongs in. + required: + - name responses: "200": - description: Returns the view object + description: Returns an object containing the raw API key. This is the only time + the raw API key will be exposed content: application/json: schema: - $ref: "#/components/schemas/View" + $ref: "#/components/schemas/CreateApiKeyOutput" "400": description: The request was unacceptable, often due to missing a required parameter @@ -18447,31 +18706,39 @@ paths: application/json: schema: nullable: true - delete: - operationId: deleteViewId + get: + operationId: getApiKey tags: - - Views - description: Delete a view object by its id - summary: Delete view + - ApiKeys + description: List out all api_keys. The api_keys are sorted by creation date, + with the most recently-created api_keys coming first + summary: List api_keys security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/ViewIdParam" - requestBody: - description: Additional parameters for the delete operation - required: false - content: - application/json: - schema: - $ref: "#/components/schemas/DeleteView" + - $ref: "#/components/parameters/AppLimitParam" + - $ref: "#/components/parameters/StartingAfter" + - $ref: "#/components/parameters/EndingBefore" + - $ref: "#/components/parameters/Ids" + - $ref: "#/components/parameters/ApiKeyName" + - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns the deleted view object + description: Returns a list of api_key objects content: application/json: schema: - $ref: "#/components/schemas/View" + type: object + properties: + objects: + type: array + items: + $ref: "#/components/schemas/ApiKey" + description: A list of api_key objects + required: + - objects + additionalProperties: false "400": description: The request was unacceptable, often due to missing a required parameter @@ -18524,14 +18791,12 @@ paths: schema: nullable: true options: - operationId: optionsViewId + operationId: optionsApiKey description: Enable CORS - summary: Enable CORS (`/v1/view/{view_id}`) + summary: Enable CORS (`/v1/api_key`) security: [] tags: - CORS - parameters: - - $ref: "#/components/parameters/ViewIdParam" responses: "200": description: Response for CORS method @@ -18562,39 +18827,25 @@ paths: application/json: schema: nullable: true - /v1/organization: + /v1/api_key/{api_key_id}: get: - operationId: getOrganization + operationId: getApiKeyId tags: - - Organizations - description: List out all organizations. The organizations are sorted by - creation date, with the most recently-created organizations coming first - summary: List organizations + - ApiKeys + description: Get an api_key object by its id + summary: Get api_key security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/AppLimitParam" - - $ref: "#/components/parameters/StartingAfter" - - $ref: "#/components/parameters/EndingBefore" - - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/OrgName" + - $ref: "#/components/parameters/ApiKeyIdParam" responses: "200": - description: Returns a list of organization objects + description: Returns the api_key object content: application/json: schema: - type: object - properties: - objects: - type: array - items: - $ref: "#/components/schemas/Organization" - description: A list of organization objects - required: - - objects - additionalProperties: false + $ref: "#/components/schemas/ApiKey" "400": description: The request was unacceptable, often due to missing a required parameter @@ -18646,62 +18897,24 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsOrganization - description: Enable CORS - summary: Enable CORS (`/v1/organization`) - 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/organization/{organization_id}: - get: - operationId: getOrganizationId + delete: + operationId: deleteApiKeyId tags: - - Organizations - description: Get an organization object by its id - summary: Get organization + - ApiKeys + description: Delete an api_key object by its id + summary: Delete api_key security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/OrganizationIdParam" + - $ref: "#/components/parameters/ApiKeyIdParam" responses: "200": - description: Returns the organization object + description: Returns the deleted api_key object content: application/json: schema: - $ref: "#/components/schemas/Organization" + $ref: "#/components/schemas/ApiKey" "400": description: The request was unacceptable, often due to missing a required parameter @@ -18753,34 +18966,93 @@ paths: application/json: schema: nullable: true - patch: - operationId: patchOrganizationId + options: + operationId: optionsApiKeyId + description: Enable CORS + summary: Enable CORS (`/v1/api_key/{api_key_id}`) + security: [] tags: - - Organizations - description: Partially update an organization 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 organization + - CORS + parameters: + - $ref: "#/components/parameters/ApiKeyIdParam" + 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/service_token: + post: + tags: + - ServiceTokens security: - bearerAuth: [] - {} - parameters: - - $ref: "#/components/parameters/OrganizationIdParam" + operationId: postServiceToken + description: Create a new service_token. It is possible to have multiple API + keys with the same name. There is no de-duplication + summary: Create service_token requestBody: - description: Fields to update + description: Any desired information about the new service_token object required: false content: application/json: schema: - $ref: "#/components/schemas/PatchOrganization" + type: object + properties: + name: + type: string + description: Name of the service token. Does not have to be unique + 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 Service token belongs in. + service_account_id: + type: string + description: The service account ID this service token should belong to. You can + create a service account in the Braintrust [organization + settings + page](https://www.braintrustdata.com/app/settings?subroute=service-tokens) + or using the [modify organization membership + endpoint](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership) + required: + - name + - service_account_id responses: "200": - description: Returns the organization object + description: Returns an object containing the raw service token. This is the + only time the raw API key will be exposed content: application/json: schema: - $ref: "#/components/schemas/Organization" + $ref: "#/components/schemas/CreateServiceTokenOutput" "400": description: The request was unacceptable, often due to missing a required parameter @@ -18832,69 +19104,54 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsOrganizationId - description: Enable CORS - summary: Enable CORS (`/v1/organization/{organization_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/OrganizationIdParam" - 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/organization/members: - patch: - operationId: patchOrganizationMembers + put: tags: - - Organizations - description: Modify organization membership - summary: Modify organization membership + - ServiceTokens security: - bearerAuth: [] - {} + operationId: putServiceToken + description: Create or replace service_token. If there is an existing + service_token with the same name as the one specified in the request, + will replace the existing service_token with the provided fields + summary: Create or replace service_token requestBody: - description: Members to add/remove + description: Any desired information about the new service_token object required: false content: application/json: schema: - $ref: "#/components/schemas/PatchOrganizationMembers" + type: object + properties: + name: + type: string + description: Name of the service token. Does not have to be unique + 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 Service token belongs in. + service_account_id: + type: string + description: The service account ID this service token should belong to. You can + create a service account in the Braintrust [organization + settings + page](https://www.braintrustdata.com/app/settings?subroute=service-tokens) + or using the [modify organization membership + endpoint](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership) + required: + - name + - service_account_id responses: "200": - description: A success status + description: Returns an object containing the raw service token. This is the + only time the raw API key will be exposed content: application/json: schema: - $ref: "#/components/schemas/PatchOrganizationMembersOutput" + $ref: "#/components/schemas/CreateServiceTokenOutput" "400": description: The request was unacceptable, often due to missing a required parameter @@ -18946,82 +19203,29 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsOrganizationMembers - description: Enable CORS - summary: Enable CORS (`/v1/organization/members`) - 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/api_key: - post: + delete: + operationId: deleteServiceToken tags: - - ApiKeys + - ServiceTokens + description: Delete a single service_token + summary: Delete single service_token security: - bearerAuth: [] - {} - operationId: postApiKey - description: Create a new api_key. It is possible to have multiple API keys with - the same name. There is no de-duplication - summary: Create api_key requestBody: - description: Any desired information about the new api_key object + description: Parameters which uniquely specify the service_token to delete required: false content: application/json: schema: - type: object - properties: - name: - type: string - description: Name of the api key. Does not have to be unique - 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 API key belongs in. - required: - - name + $ref: "#/components/schemas/DeleteServiceToken" responses: "200": - description: Returns an object containing the raw API key. This is the only time - the raw API key will be exposed + description: Returns the deleted service_token object content: application/json: schema: - $ref: "#/components/schemas/CreateApiKeyOutput" + $ref: "#/components/schemas/ServiceToken" "400": description: The request was unacceptable, often due to missing a required parameter @@ -19074,12 +19278,13 @@ paths: schema: nullable: true get: - operationId: getApiKey + operationId: getServiceToken tags: - - ApiKeys - description: List out all api_keys. The api_keys are sorted by creation date, - with the most recently-created api_keys coming first - summary: List api_keys + - ServiceTokens + description: List out all service_tokens. The service_tokens are sorted by + creation date, with the most recently-created service_tokens coming + first + summary: List service_tokens security: - bearerAuth: [] - {} @@ -19088,11 +19293,11 @@ paths: - $ref: "#/components/parameters/StartingAfter" - $ref: "#/components/parameters/EndingBefore" - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/ApiKeyName" + - $ref: "#/components/parameters/ServiceTokenName" - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of api_key objects + description: Returns a list of service_token objects content: application/json: schema: @@ -19101,8 +19306,8 @@ paths: objects: type: array items: - $ref: "#/components/schemas/ApiKey" - description: A list of api_key objects + $ref: "#/components/schemas/ServiceToken" + description: A list of service_token objects required: - objects additionalProperties: false @@ -19158,9 +19363,9 @@ paths: schema: nullable: true options: - operationId: optionsApiKey + operationId: optionsServiceToken description: Enable CORS - summary: Enable CORS (`/v1/api_key`) + summary: Enable CORS (`/v1/service_token`) security: [] tags: - CORS @@ -19194,25 +19399,25 @@ paths: application/json: schema: nullable: true - /v1/api_key/{api_key_id}: + /v1/service_token/{service_token_id}: get: - operationId: getApiKeyId + operationId: getServiceTokenId tags: - - ApiKeys - description: Get an api_key object by its id - summary: Get api_key + - ServiceTokens + description: Get a service_token object by its id + summary: Get service_token security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/ApiKeyIdParam" + - $ref: "#/components/parameters/ServiceTokenIdParam" responses: "200": - description: Returns the api_key object + description: Returns the service_token object content: application/json: schema: - $ref: "#/components/schemas/ApiKey" + $ref: "#/components/schemas/ServiceToken" "400": description: The request was unacceptable, often due to missing a required parameter @@ -19265,23 +19470,23 @@ paths: schema: nullable: true delete: - operationId: deleteApiKeyId + operationId: deleteServiceTokenId tags: - - ApiKeys - description: Delete an api_key object by its id - summary: Delete api_key + - ServiceTokens + description: Delete a service_token object by its id + summary: Delete service_token security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/ApiKeyIdParam" + - $ref: "#/components/parameters/ServiceTokenIdParam" responses: "200": - description: Returns the deleted api_key object + description: Returns the deleted service_token object content: application/json: schema: - $ref: "#/components/schemas/ApiKey" + $ref: "#/components/schemas/ServiceToken" "400": description: The request was unacceptable, often due to missing a required parameter @@ -19334,14 +19539,14 @@ paths: schema: nullable: true options: - operationId: optionsApiKeyId + operationId: optionsServiceTokenId description: Enable CORS - summary: Enable CORS (`/v1/api_key/{api_key_id}`) + summary: Enable CORS (`/v1/service_token/{service_token_id}`) security: [] tags: - CORS parameters: - - $ref: "#/components/parameters/ApiKeyIdParam" + - $ref: "#/components/parameters/ServiceTokenIdParam" responses: "200": description: Response for CORS method @@ -19372,54 +19577,32 @@ paths: application/json: schema: nullable: true - /v1/service_token: + /v1/ai_secret: post: tags: - - ServiceTokens + - AiSecrets security: - bearerAuth: [] - {} - operationId: postServiceToken - description: Create a new service_token. It is possible to have multiple API - keys with the same name. There is no de-duplication - summary: Create service_token + operationId: postAiSecret + description: Create a new ai_secret. If there is an existing ai_secret with the + same name as the one specified in the request, will return the existing + ai_secret unmodified + summary: Create ai_secret requestBody: - description: Any desired information about the new service_token object + description: Any desired information about the new ai_secret object required: false content: application/json: schema: - type: object - properties: - name: - type: string - description: Name of the service token. Does not have to be unique - 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 Service token belongs in. - service_account_id: - type: string - description: The service account ID this service token should belong to. You can - create a service account in the Braintrust [organization - settings - page](https://www.braintrustdata.com/app/settings?subroute=service-tokens) - or using the [modify organization membership - endpoint](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership) - required: - - name - - service_account_id + $ref: "#/components/schemas/CreateAISecret" responses: "200": - description: Returns an object containing the raw service token. This is the - only time the raw API key will be exposed + description: Returns the new ai_secret object content: application/json: schema: - $ref: "#/components/schemas/CreateServiceTokenOutput" + $ref: "#/components/schemas/AISecret" "400": description: The request was unacceptable, often due to missing a required parameter @@ -19473,52 +19656,29 @@ paths: nullable: true put: tags: - - ServiceTokens + - AiSecrets security: - bearerAuth: [] - {} - operationId: putServiceToken - description: Create or replace service_token. If there is an existing - service_token with the same name as the one specified in the request, - will replace the existing service_token with the provided fields - summary: Create or replace service_token + operationId: putAiSecret + description: Create or replace ai_secret. If there is an existing ai_secret with + the same name as the one specified in the request, will replace the + existing ai_secret with the provided fields + summary: Create or replace ai_secret requestBody: - description: Any desired information about the new service_token object + description: Any desired information about the new ai_secret object required: false content: application/json: schema: - type: object - properties: - name: - type: string - description: Name of the service token. Does not have to be unique - 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 Service token belongs in. - service_account_id: - type: string - description: The service account ID this service token should belong to. You can - create a service account in the Braintrust [organization - settings - page](https://www.braintrustdata.com/app/settings?subroute=service-tokens) - or using the [modify organization membership - endpoint](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership) - required: - - name - - service_account_id + $ref: "#/components/schemas/CreateAISecret" responses: "200": - description: Returns an object containing the raw service token. This is the - only time the raw API key will be exposed + description: Returns the new ai_secret object content: application/json: schema: - $ref: "#/components/schemas/CreateServiceTokenOutput" + $ref: "#/components/schemas/AISecret" "400": description: The request was unacceptable, often due to missing a required parameter @@ -19571,28 +19731,28 @@ paths: schema: nullable: true delete: - operationId: deleteServiceToken + operationId: deleteAiSecret tags: - - ServiceTokens - description: Delete a single service_token - summary: Delete single service_token + - AiSecrets + description: Delete a single ai_secret + summary: Delete single ai_secret security: - bearerAuth: [] - {} requestBody: - description: Parameters which uniquely specify the service_token to delete + description: Parameters which uniquely specify the ai_secret to delete required: false content: application/json: schema: - $ref: "#/components/schemas/DeleteServiceToken" + $ref: "#/components/schemas/DeleteAISecret" responses: "200": - description: Returns the deleted service_token object + description: Returns the deleted ai_secret object content: application/json: schema: - $ref: "#/components/schemas/ServiceToken" + $ref: "#/components/schemas/AISecret" "400": description: The request was unacceptable, often due to missing a required parameter @@ -19645,13 +19805,12 @@ paths: schema: nullable: true get: - operationId: getServiceToken + operationId: getAiSecret tags: - - ServiceTokens - description: List out all service_tokens. The service_tokens are sorted by - creation date, with the most recently-created service_tokens coming - first - summary: List service_tokens + - AiSecrets + description: List out all ai_secrets. The ai_secrets are sorted by creation + date, with the most recently-created ai_secrets coming first + summary: List ai_secrets security: - bearerAuth: [] - {} @@ -19660,11 +19819,12 @@ paths: - $ref: "#/components/parameters/StartingAfter" - $ref: "#/components/parameters/EndingBefore" - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/ServiceTokenName" + - $ref: "#/components/parameters/AiSecretName" - $ref: "#/components/parameters/OrgName" + - $ref: "#/components/parameters/AISecretType" responses: "200": - description: Returns a list of service_token objects + description: Returns a list of ai_secret objects content: application/json: schema: @@ -19673,8 +19833,8 @@ paths: objects: type: array items: - $ref: "#/components/schemas/ServiceToken" - description: A list of service_token objects + $ref: "#/components/schemas/AISecret" + description: A list of ai_secret objects required: - objects additionalProperties: false @@ -19730,9 +19890,9 @@ paths: schema: nullable: true options: - operationId: optionsServiceToken + operationId: optionsAiSecret description: Enable CORS - summary: Enable CORS (`/v1/service_token`) + summary: Enable CORS (`/v1/ai_secret`) security: [] tags: - CORS @@ -19766,25 +19926,25 @@ paths: application/json: schema: nullable: true - /v1/service_token/{service_token_id}: + /v1/ai_secret/{ai_secret_id}: get: - operationId: getServiceTokenId + operationId: getAiSecretId tags: - - ServiceTokens - description: Get a service_token object by its id - summary: Get service_token + - AiSecrets + description: Get an ai_secret object by its id + summary: Get ai_secret security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/ServiceTokenIdParam" + - $ref: "#/components/parameters/AiSecretIdParam" responses: "200": - description: Returns the service_token object + description: Returns the ai_secret object content: application/json: schema: - $ref: "#/components/schemas/ServiceToken" + $ref: "#/components/schemas/AISecret" "400": description: The request was unacceptable, often due to missing a required parameter @@ -19836,24 +19996,34 @@ paths: application/json: schema: nullable: true - delete: - operationId: deleteServiceTokenId + patch: + operationId: patchAiSecretId tags: - - ServiceTokens - description: Delete a service_token object by its id - summary: Delete service_token + - AiSecrets + description: Partially update an ai_secret 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 ai_secret security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/ServiceTokenIdParam" + - $ref: "#/components/parameters/AiSecretIdParam" + requestBody: + description: Fields to update + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/PatchAISecret" responses: "200": - description: Returns the deleted service_token object + description: Returns the ai_secret object content: application/json: schema: - $ref: "#/components/schemas/ServiceToken" + $ref: "#/components/schemas/AISecret" "400": description: The request was unacceptable, often due to missing a required parameter @@ -19905,67 +20075,20 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsServiceTokenId - description: Enable CORS - summary: Enable CORS (`/v1/service_token/{service_token_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ServiceTokenIdParam" - 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/ai_secret: - post: + delete: + operationId: deleteAiSecretId tags: - AiSecrets + description: Delete an ai_secret object by its id + summary: Delete ai_secret security: - bearerAuth: [] - {} - operationId: postAiSecret - description: Create a new ai_secret. If there is an existing ai_secret with the - same name as the one specified in the request, will return the existing - ai_secret unmodified - summary: Create ai_secret - requestBody: - description: Any desired information about the new ai_secret object - required: false - content: - application/json: - schema: - $ref: "#/components/schemas/CreateAISecret" + parameters: + - $ref: "#/components/parameters/AiSecretIdParam" responses: "200": - description: Returns the new ai_secret object + description: Returns the deleted ai_secret object content: application/json: schema: @@ -20021,31 +20144,106 @@ paths: application/json: schema: nullable: true - put: + options: + operationId: optionsAiSecretId + description: Enable CORS + summary: Enable CORS (`/v1/ai_secret/{ai_secret_id}`) + security: [] tags: - - AiSecrets + - CORS + parameters: + - $ref: "#/components/parameters/AiSecretIdParam" + 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/env_var: + post: + tags: + - EnvVars security: - bearerAuth: [] - {} - operationId: putAiSecret - description: Create or replace ai_secret. If there is an existing ai_secret with - the same name as the one specified in the request, will replace the - existing ai_secret with the provided fields - summary: Create or replace ai_secret + operationId: postEnvVar + description: Create a new env_var. If there is an existing env_var with the same + name as the one specified in the request, will return the existing + env_var unmodified + summary: Create env_var requestBody: - description: Any desired information about the new ai_secret object + description: Any desired information about the new env_var object required: false content: application/json: schema: - $ref: "#/components/schemas/CreateAISecret" + type: object + properties: + object_type: + type: string + enum: + - organization + - project + - function + description: The type of the object the environment variable is scoped for + object_id: + type: string + format: uuid + description: The id of the object the environment variable is scoped for + name: + type: string + description: The name of the environment variable + value: + type: string + nullable: true + description: The value of the environment variable. Will be encrypted at rest. + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + description: Optional metadata associated with the environment variable when + managed via the function secrets API + secret_type: + type: string + nullable: true + description: Optional classification for the secret (for example, the AI + provider name) + required: + - object_type + - object_id + - name responses: "200": - description: Returns the new ai_secret object + description: Returns the new env_var object content: application/json: schema: - $ref: "#/components/schemas/AISecret" + $ref: "#/components/schemas/EnvVar" "400": description: The request was unacceptable, often due to missing a required parameter @@ -20097,29 +20295,66 @@ paths: application/json: schema: nullable: true - delete: - operationId: deleteAiSecret + put: tags: - - AiSecrets - description: Delete a single ai_secret - summary: Delete single ai_secret + - EnvVars security: - bearerAuth: [] - {} + operationId: putEnvVar + description: Create or replace env_var. If there is an existing env_var with the + same name as the one specified in the request, will replace the existing + env_var with the provided fields + summary: Create or replace env_var requestBody: - description: Parameters which uniquely specify the ai_secret to delete + description: Any desired information about the new env_var object required: false content: application/json: schema: - $ref: "#/components/schemas/DeleteAISecret" + type: object + properties: + object_type: + type: string + enum: + - organization + - project + - function + description: The type of the object the environment variable is scoped for + object_id: + type: string + format: uuid + description: The id of the object the environment variable is scoped for + name: + type: string + description: The name of the environment variable + value: + type: string + nullable: true + description: The value of the environment variable. Will be encrypted at rest. + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + description: Optional metadata associated with the environment variable when + managed via the function secrets API + secret_type: + type: string + nullable: true + description: Optional classification for the secret (for example, the AI + provider name) + required: + - object_type + - object_id + - name responses: "200": - description: Returns the deleted ai_secret object + description: Returns the new env_var object content: application/json: schema: - $ref: "#/components/schemas/AISecret" + $ref: "#/components/schemas/EnvVar" "400": description: The request was unacceptable, often due to missing a required parameter @@ -20172,26 +20407,24 @@ paths: schema: nullable: true get: - operationId: getAiSecret + operationId: getEnvVar tags: - - AiSecrets - description: List out all ai_secrets. The ai_secrets are sorted by creation - date, with the most recently-created ai_secrets coming first - summary: List ai_secrets + - EnvVars + description: List out all env_vars. The env_vars are sorted by creation date, + with the most recently-created env_vars coming first + summary: List env_vars security: - bearerAuth: [] - {} parameters: - $ref: "#/components/parameters/AppLimitParam" - - $ref: "#/components/parameters/StartingAfter" - - $ref: "#/components/parameters/EndingBefore" - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/AiSecretName" - - $ref: "#/components/parameters/OrgName" - - $ref: "#/components/parameters/AISecretType" + - $ref: "#/components/parameters/EnvVarName" + - $ref: "#/components/parameters/EnvVarObjectType" + - $ref: "#/components/parameters/EnvVarObjectId" responses: "200": - description: Returns a list of ai_secret objects + description: Returns a list of env_var objects content: application/json: schema: @@ -20200,8 +20433,8 @@ paths: objects: type: array items: - $ref: "#/components/schemas/AISecret" - description: A list of ai_secret objects + $ref: "#/components/schemas/EnvVar" + description: A list of env_var objects required: - objects additionalProperties: false @@ -20257,9 +20490,9 @@ paths: schema: nullable: true options: - operationId: optionsAiSecret + operationId: optionsEnvVar description: Enable CORS - summary: Enable CORS (`/v1/ai_secret`) + summary: Enable CORS (`/v1/env_var`) security: [] tags: - CORS @@ -20293,25 +20526,25 @@ paths: application/json: schema: nullable: true - /v1/ai_secret/{ai_secret_id}: + /v1/env_var/{env_var_id}: get: - operationId: getAiSecretId + operationId: getEnvVarId tags: - - AiSecrets - description: Get an ai_secret object by its id - summary: Get ai_secret + - EnvVars + description: Get an env_var object by its id + summary: Get env_var security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/AiSecretIdParam" + - $ref: "#/components/parameters/EnvVarIdParam" responses: "200": - description: Returns the ai_secret object + description: Returns the env_var object content: application/json: schema: - $ref: "#/components/schemas/AISecret" + $ref: "#/components/schemas/EnvVar" "400": description: The request was unacceptable, often due to missing a required parameter @@ -20364,33 +20597,55 @@ paths: schema: nullable: true patch: - operationId: patchAiSecretId + operationId: patchEnvVarId tags: - - AiSecrets - description: Partially update an ai_secret object. Specify the fields to update - in the payload. Any object-type fields will be deep-merged with existing + - EnvVars + description: Partially update an env_var 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 ai_secret + summary: Partially update env_var security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/AiSecretIdParam" + - $ref: "#/components/parameters/EnvVarIdParam" requestBody: description: Fields to update required: false content: application/json: schema: - $ref: "#/components/schemas/PatchAISecret" + type: object + properties: + name: + type: string + description: The name of the environment variable + value: + type: string + nullable: true + description: The value of the environment variable. Will be encrypted at rest. + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + description: Optional metadata associated with the environment variable when + managed via the function secrets API + secret_type: + type: string + nullable: true + description: Optional classification for the secret (for example, the AI + provider name) + required: + - name responses: "200": - description: Returns the ai_secret object + description: Returns the env_var object content: application/json: schema: - $ref: "#/components/schemas/AISecret" + $ref: "#/components/schemas/EnvVar" "400": description: The request was unacceptable, often due to missing a required parameter @@ -20443,23 +20698,23 @@ paths: schema: nullable: true delete: - operationId: deleteAiSecretId + operationId: deleteEnvVarId tags: - - AiSecrets - description: Delete an ai_secret object by its id - summary: Delete ai_secret + - EnvVars + description: Delete an env_var object by its id + summary: Delete env_var security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/AiSecretIdParam" + - $ref: "#/components/parameters/EnvVarIdParam" responses: "200": - description: Returns the deleted ai_secret object + description: Returns the deleted env_var object content: application/json: schema: - $ref: "#/components/schemas/AISecret" + $ref: "#/components/schemas/EnvVar" "400": description: The request was unacceptable, often due to missing a required parameter @@ -20512,14 +20767,14 @@ paths: schema: nullable: true options: - operationId: optionsAiSecretId + operationId: optionsEnvVarId description: Enable CORS - summary: Enable CORS (`/v1/ai_secret/{ai_secret_id}`) + summary: Enable CORS (`/v1/env_var/{env_var_id}`) security: [] tags: - CORS parameters: - - $ref: "#/components/parameters/AiSecretIdParam" + - $ref: "#/components/parameters/EnvVarIdParam" responses: "200": description: Response for CORS method @@ -20540,77 +20795,42 @@ paths: 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/env_var: - post: - tags: - - EnvVars - security: - - bearerAuth: [] - - {} - operationId: postEnvVar - description: Create a new env_var. If there is an existing env_var with the same - name as the one specified in the request, will return the existing - env_var unmodified - summary: Create env_var - requestBody: - description: Any desired information about the new env_var object - required: false - content: - application/json: - schema: - type: object - properties: - object_type: - type: string - enum: - - organization - - project - - function - description: The type of the object the environment variable is scoped for - object_id: - type: string - format: uuid - description: The id of the object the environment variable is scoped for - name: - type: string - description: The name of the environment variable - value: - type: string - nullable: true - description: The value of the environment variable. Will be encrypted at rest. - metadata: - type: object - nullable: true - additionalProperties: - nullable: true - description: Optional metadata associated with the environment variable when - managed via the function secrets API - secret_type: - type: string - nullable: true - description: Optional classification for the secret (for example, the AI - provider name) - required: - - object_type - - object_id - - name + "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/mcp_server: + post: + tags: + - McpServers + security: + - bearerAuth: [] + - {} + operationId: postMcpServer + description: Create a new mcp_server. If there is an existing mcp_server with + the same name as the one specified in the request, will return the + existing mcp_server unmodified + summary: Create mcp_server + requestBody: + description: Any desired information about the new mcp_server object + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateMCPServer" responses: "200": - description: Returns the new env_var object + description: Returns the new mcp_server object content: application/json: schema: - $ref: "#/components/schemas/EnvVar" + $ref: "#/components/schemas/MCPServer" "400": description: The request was unacceptable, often due to missing a required parameter @@ -20664,64 +20884,29 @@ paths: nullable: true put: tags: - - EnvVars + - McpServers security: - bearerAuth: [] - {} - operationId: putEnvVar - description: Create or replace env_var. If there is an existing env_var with the - same name as the one specified in the request, will replace the existing - env_var with the provided fields - summary: Create or replace env_var + operationId: putMcpServer + description: Create or replace mcp_server. If there is an existing mcp_server + with the same name as the one specified in the request, will replace the + existing mcp_server with the provided fields + summary: Create or replace mcp_server requestBody: - description: Any desired information about the new env_var object + description: Any desired information about the new mcp_server object required: false content: application/json: schema: - type: object - properties: - object_type: - type: string - enum: - - organization - - project - - function - description: The type of the object the environment variable is scoped for - object_id: - type: string - format: uuid - description: The id of the object the environment variable is scoped for - name: - type: string - description: The name of the environment variable - value: - type: string - nullable: true - description: The value of the environment variable. Will be encrypted at rest. - metadata: - type: object - nullable: true - additionalProperties: - nullable: true - description: Optional metadata associated with the environment variable when - managed via the function secrets API - secret_type: - type: string - nullable: true - description: Optional classification for the secret (for example, the AI - provider name) - required: - - object_type - - object_id - - name + $ref: "#/components/schemas/CreateMCPServer" responses: "200": - description: Returns the new env_var object + description: Returns the new mcp_server object content: application/json: schema: - $ref: "#/components/schemas/EnvVar" + $ref: "#/components/schemas/MCPServer" "400": description: The request was unacceptable, often due to missing a required parameter @@ -20774,24 +20959,25 @@ paths: schema: nullable: true get: - operationId: getEnvVar + operationId: getMcpServer tags: - - EnvVars - description: List out all env_vars. The env_vars are sorted by creation date, - with the most recently-created env_vars coming first - summary: List env_vars + - McpServers + description: List out all mcp_servers. The mcp_servers are sorted by creation + date, with the most recently-created mcp_servers coming first + summary: List mcp_servers security: - bearerAuth: [] - {} parameters: - $ref: "#/components/parameters/AppLimitParam" + - $ref: "#/components/parameters/StartingAfter" + - $ref: "#/components/parameters/EndingBefore" - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/EnvVarName" - - $ref: "#/components/parameters/EnvVarObjectType" - - $ref: "#/components/parameters/EnvVarObjectId" + - $ref: "#/components/parameters/McpServerName" + - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of env_var objects + description: Returns a list of mcp_server objects content: application/json: schema: @@ -20800,8 +20986,8 @@ paths: objects: type: array items: - $ref: "#/components/schemas/EnvVar" - description: A list of env_var objects + $ref: "#/components/schemas/MCPServer" + description: A list of mcp_server objects required: - objects additionalProperties: false @@ -20857,9 +21043,9 @@ paths: schema: nullable: true options: - operationId: optionsEnvVar + operationId: optionsMcpServer description: Enable CORS - summary: Enable CORS (`/v1/env_var`) + summary: Enable CORS (`/v1/mcp_server`) security: [] tags: - CORS @@ -20893,25 +21079,25 @@ paths: application/json: schema: nullable: true - /v1/env_var/{env_var_id}: + /v1/mcp_server/{mcp_server_id}: get: - operationId: getEnvVarId + operationId: getMcpServerId tags: - - EnvVars - description: Get an env_var object by its id - summary: Get env_var + - McpServers + description: Get a mcp_server object by its id + summary: Get mcp_server security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/EnvVarIdParam" + - $ref: "#/components/parameters/McpServerIdParam" responses: "200": - description: Returns the env_var object + description: Returns the mcp_server object content: application/json: schema: - $ref: "#/components/schemas/EnvVar" + $ref: "#/components/schemas/MCPServer" "400": description: The request was unacceptable, often due to missing a required parameter @@ -20964,55 +21150,33 @@ paths: schema: nullable: true patch: - operationId: patchEnvVarId + operationId: patchMcpServerId tags: - - EnvVars - description: Partially update an env_var object. Specify the fields to update in - the payload. Any object-type fields will be deep-merged with existing + - McpServers + description: Partially update a mcp_server 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 env_var + summary: Partially update mcp_server security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/EnvVarIdParam" + - $ref: "#/components/parameters/McpServerIdParam" requestBody: description: Fields to update required: false content: application/json: schema: - type: object - properties: - name: - type: string - description: The name of the environment variable - value: - type: string - nullable: true - description: The value of the environment variable. Will be encrypted at rest. - metadata: - type: object - nullable: true - additionalProperties: - nullable: true - description: Optional metadata associated with the environment variable when - managed via the function secrets API - secret_type: - type: string - nullable: true - description: Optional classification for the secret (for example, the AI - provider name) - required: - - name + $ref: "#/components/schemas/PatchMCPServer" responses: "200": - description: Returns the env_var object + description: Returns the mcp_server object content: application/json: schema: - $ref: "#/components/schemas/EnvVar" + $ref: "#/components/schemas/MCPServer" "400": description: The request was unacceptable, often due to missing a required parameter @@ -21065,23 +21229,23 @@ paths: schema: nullable: true delete: - operationId: deleteEnvVarId + operationId: deleteMcpServerId tags: - - EnvVars - description: Delete an env_var object by its id - summary: Delete env_var + - McpServers + description: Delete a mcp_server object by its id + summary: Delete mcp_server security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/EnvVarIdParam" + - $ref: "#/components/parameters/McpServerIdParam" responses: "200": - description: Returns the deleted env_var object + description: Returns the deleted mcp_server object content: application/json: schema: - $ref: "#/components/schemas/EnvVar" + $ref: "#/components/schemas/MCPServer" "400": description: The request was unacceptable, often due to missing a required parameter @@ -21134,14 +21298,14 @@ paths: schema: nullable: true options: - operationId: optionsEnvVarId + operationId: optionsMcpServerId description: Enable CORS - summary: Enable CORS (`/v1/env_var/{env_var_id}`) + summary: Enable CORS (`/v1/mcp_server/{mcp_server_id}`) security: [] tags: - CORS parameters: - - $ref: "#/components/parameters/EnvVarIdParam" + - $ref: "#/components/parameters/McpServerIdParam" responses: "200": description: Response for CORS method @@ -21172,32 +21336,32 @@ paths: application/json: schema: nullable: true - /v1/mcp_server: + /v1/dataset_snapshot: post: tags: - - McpServers + - DatasetSnapshots security: - bearerAuth: [] - {} - operationId: postMcpServer - description: Create a new mcp_server. If there is an existing mcp_server with - the same name as the one specified in the request, will return the - existing mcp_server unmodified - summary: Create mcp_server + operationId: postDatasetSnapshot + description: Create a new dataset_snapshot. If there is an existing + dataset_snapshot with the same name as the one specified in the request, + will return the existing dataset_snapshot unmodified + summary: Create dataset_snapshot requestBody: - description: Any desired information about the new mcp_server object + description: Any desired information about the new dataset_snapshot object required: false content: application/json: schema: - $ref: "#/components/schemas/CreateMCPServer" + $ref: "#/components/schemas/CreateDatasetSnapshot" responses: "200": - description: Returns the new mcp_server object + description: Returns the new dataset_snapshot object content: application/json: schema: - $ref: "#/components/schemas/MCPServer" + $ref: "#/components/schemas/DatasetSnapshot" "400": description: The request was unacceptable, often due to missing a required parameter @@ -21251,29 +21415,29 @@ paths: nullable: true put: tags: - - McpServers + - DatasetSnapshots security: - bearerAuth: [] - {} - operationId: putMcpServer - description: Create or replace mcp_server. If there is an existing mcp_server - with the same name as the one specified in the request, will replace the - existing mcp_server with the provided fields - summary: Create or replace mcp_server + operationId: putDatasetSnapshot + description: Create or replace dataset_snapshot. If there is an existing + dataset_snapshot with the same name as the one specified in the request, + will replace the existing dataset_snapshot with the provided fields + summary: Create or replace dataset_snapshot requestBody: - description: Any desired information about the new mcp_server object + description: Any desired information about the new dataset_snapshot object required: false content: application/json: schema: - $ref: "#/components/schemas/CreateMCPServer" + $ref: "#/components/schemas/CreateDatasetSnapshot" responses: "200": - description: Returns the new mcp_server object + description: Returns the new dataset_snapshot object content: application/json: schema: - $ref: "#/components/schemas/MCPServer" + $ref: "#/components/schemas/DatasetSnapshot" "400": description: The request was unacceptable, often due to missing a required parameter @@ -21326,12 +21490,13 @@ paths: schema: nullable: true get: - operationId: getMcpServer + operationId: getDatasetSnapshot tags: - - McpServers - description: List out all mcp_servers. The mcp_servers are sorted by creation - date, with the most recently-created mcp_servers coming first - summary: List mcp_servers + - DatasetSnapshots + description: List out all dataset_snapshots. The dataset_snapshots are sorted by + creation date, with the most recently-created dataset_snapshots coming + first + summary: List dataset_snapshots security: - bearerAuth: [] - {} @@ -21340,11 +21505,11 @@ paths: - $ref: "#/components/parameters/StartingAfter" - $ref: "#/components/parameters/EndingBefore" - $ref: "#/components/parameters/Ids" - - $ref: "#/components/parameters/McpServerName" + - $ref: "#/components/parameters/DatasetSnapshotName" - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of mcp_server objects + description: Returns a list of dataset_snapshot objects content: application/json: schema: @@ -21353,8 +21518,8 @@ paths: objects: type: array items: - $ref: "#/components/schemas/MCPServer" - description: A list of mcp_server objects + $ref: "#/components/schemas/DatasetSnapshot" + description: A list of dataset_snapshot objects required: - objects additionalProperties: false @@ -21410,9 +21575,9 @@ paths: schema: nullable: true options: - operationId: optionsMcpServer + operationId: optionsDatasetSnapshot description: Enable CORS - summary: Enable CORS (`/v1/mcp_server`) + summary: Enable CORS (`/v1/dataset_snapshot`) security: [] tags: - CORS @@ -21446,25 +21611,25 @@ paths: application/json: schema: nullable: true - /v1/mcp_server/{mcp_server_id}: + /v1/dataset_snapshot/{dataset_snapshot_id}: get: - operationId: getMcpServerId + operationId: getDatasetSnapshotId tags: - - McpServers - description: Get a mcp_server object by its id - summary: Get mcp_server + - DatasetSnapshots + description: Get a dataset_snapshot object by its id + summary: Get dataset_snapshot security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/McpServerIdParam" + - $ref: "#/components/parameters/DatasetSnapshotIdParam" responses: "200": - description: Returns the mcp_server object + description: Returns the dataset_snapshot object content: application/json: schema: - $ref: "#/components/schemas/MCPServer" + $ref: "#/components/schemas/DatasetSnapshot" "400": description: The request was unacceptable, often due to missing a required parameter @@ -21517,33 +21682,33 @@ paths: schema: nullable: true patch: - operationId: patchMcpServerId + operationId: patchDatasetSnapshotId tags: - - McpServers - description: Partially update a mcp_server 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 mcp_server + - DatasetSnapshots + description: Partially update a dataset_snapshot 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_snapshot security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/McpServerIdParam" + - $ref: "#/components/parameters/DatasetSnapshotIdParam" requestBody: description: Fields to update required: false content: application/json: schema: - $ref: "#/components/schemas/PatchMCPServer" + $ref: "#/components/schemas/PatchDatasetSnapshot" responses: "200": - description: Returns the mcp_server object + description: Returns the dataset_snapshot object content: application/json: schema: - $ref: "#/components/schemas/MCPServer" + $ref: "#/components/schemas/DatasetSnapshot" "400": description: The request was unacceptable, often due to missing a required parameter @@ -21596,23 +21761,23 @@ paths: schema: nullable: true delete: - operationId: deleteMcpServerId + operationId: deleteDatasetSnapshotId tags: - - McpServers - description: Delete a mcp_server object by its id - summary: Delete mcp_server + - DatasetSnapshots + description: Delete a dataset_snapshot object by its id + summary: Delete dataset_snapshot security: - bearerAuth: [] - {} parameters: - - $ref: "#/components/parameters/McpServerIdParam" + - $ref: "#/components/parameters/DatasetSnapshotIdParam" responses: "200": - description: Returns the deleted mcp_server object + description: Returns the deleted dataset_snapshot object content: application/json: schema: - $ref: "#/components/schemas/MCPServer" + $ref: "#/components/schemas/DatasetSnapshot" "400": description: The request was unacceptable, often due to missing a required parameter @@ -21665,14 +21830,14 @@ paths: schema: nullable: true options: - operationId: optionsMcpServerId + operationId: optionsDatasetSnapshotId description: Enable CORS - summary: Enable CORS (`/v1/mcp_server/{mcp_server_id}`) + summary: Enable CORS (`/v1/dataset_snapshot/{dataset_snapshot_id}`) security: [] tags: - CORS parameters: - - $ref: "#/components/parameters/McpServerIdParam" + - $ref: "#/components/parameters/DatasetSnapshotIdParam" responses: "200": description: Response for CORS method From e4c9ea4842c7bd441565654f9c200cf510475f52 Mon Sep 17 00:00:00 2001 From: Ankur Goyal Date: Sat, 25 Apr 2026 10:18:42 -0700 Subject: [PATCH 2/2] bump --- openapi/spec.json | 54 +++++++++++++++++++++++++++++++++++++++++++++++ openapi/spec.yaml | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) diff --git a/openapi/spec.json b/openapi/spec.json index 6de3269..c8aa922 100644 --- a/openapi/spec.json +++ b/openapi/spec.json @@ -1685,6 +1685,24 @@ "nullable": true, "description": "Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified." }, + "internal_metadata": { + "type": "object", + "nullable": true, + "properties": { + "dataset_filter": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "BTQL filter payload used to evaluate a subset of a linked dataset." + } + }, + "additionalProperties": { + "nullable": true + }, + "description": "Braintrust-controlled metadata about the experiment." + }, "parameters_id": { "type": "string", "nullable": true, @@ -1769,6 +1787,24 @@ "nullable": true, "description": "Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified." }, + "internal_metadata": { + "type": "object", + "nullable": true, + "properties": { + "dataset_filter": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "BTQL filter payload used to evaluate a subset of a linked dataset." + } + }, + "additionalProperties": { + "nullable": true + }, + "description": "Braintrust-controlled metadata about the experiment." + }, "parameters_id": { "type": "string", "nullable": true, @@ -1844,6 +1880,24 @@ "nullable": true, "description": "Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified." }, + "internal_metadata": { + "type": "object", + "nullable": true, + "properties": { + "dataset_filter": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "BTQL filter payload used to evaluate a subset of a linked dataset." + } + }, + "additionalProperties": { + "nullable": true + }, + "description": "Braintrust-controlled metadata about the experiment." + }, "parameters_id": { "type": "string", "nullable": true, diff --git a/openapi/spec.yaml b/openapi/spec.yaml index 701155e..d2255ae 100644 --- a/openapi/spec.yaml +++ b/openapi/spec.yaml @@ -1625,6 +1625,19 @@ components: description: Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified. + internal_metadata: + type: object + nullable: true + properties: + dataset_filter: + type: object + nullable: true + additionalProperties: + nullable: true + description: BTQL filter payload used to evaluate a subset of a linked dataset. + additionalProperties: + nullable: true + description: Braintrust-controlled metadata about the experiment. parameters_id: type: string nullable: true @@ -1698,6 +1711,19 @@ components: description: Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified. + internal_metadata: + type: object + nullable: true + properties: + dataset_filter: + type: object + nullable: true + additionalProperties: + nullable: true + description: BTQL filter payload used to evaluate a subset of a linked dataset. + additionalProperties: + nullable: true + description: Braintrust-controlled metadata about the experiment. parameters_id: type: string nullable: true @@ -1766,6 +1792,19 @@ components: description: Version number of the linked dataset the experiment was run against. This can be used to reproduce the experiment after the dataset has been modified. + internal_metadata: + type: object + nullable: true + properties: + dataset_filter: + type: object + nullable: true + additionalProperties: + nullable: true + description: BTQL filter payload used to evaluate a subset of a linked dataset. + additionalProperties: + nullable: true + description: Braintrust-controlled metadata about the experiment. parameters_id: type: string nullable: true