From 0f80a91f10fb6f85a3c6ab5c0facf781d58ba0c2 Mon Sep 17 00:00:00 2001 From: "braintrust-bot[bot]" <215900051+braintrust-bot[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 16:43:17 +0000 Subject: [PATCH] chore: sync OpenAPI spec --- openapi/spec.json | 1047 +++++++++++++++++++++++++++++++++++++++++++++ openapi/spec.yaml | 689 +++++++++++++++++++++++++++++ 2 files changed, 1736 insertions(+) diff --git a/openapi/spec.json b/openapi/spec.json index 3869341..f22ef71 100644 --- a/openapi/spec.json +++ b/openapi/spec.json @@ -139,6 +139,11 @@ "format": "uuid", "description": "McpServer id" }, + "DatasetSnapshotIdParam": { + "type": "string", + "format": "uuid", + "description": "DatasetSnapshot id" + }, "ProjectIdQuery": { "type": "string", "format": "uuid", @@ -220,6 +225,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 +824,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 +1694,17 @@ "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." }, + "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 +1778,17 @@ "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." }, + "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 +1853,17 @@ "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." }, + "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 +2642,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 +2688,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 +2723,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,6 +5011,11 @@ "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": [ @@ -10069,6 +10149,92 @@ } } }, + "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": { @@ -10553,6 +10719,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, @@ -11063,6 +11239,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" @@ -11262,6 +11447,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" @@ -31413,6 +31608,858 @@ } } }, + "/v1/dataset_snapshot": { + "post": { + "tags": [ + "DatasetSnapshots" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "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 dataset_snapshot object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDatasetSnapshot" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new dataset_snapshot object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetSnapshot" + } + } + } + }, + "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": [ + "DatasetSnapshots" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "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 dataset_snapshot object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDatasetSnapshot" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new dataset_snapshot object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetSnapshot" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "get": { + "operationId": "getDatasetSnapshot", + "tags": [ + "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": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/DatasetSnapshotName" + }, + { + "$ref": "#/components/parameters/OrgName" + } + ], + "responses": { + "200": { + "description": "Returns a list of dataset_snapshot objects", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetSnapshot" + }, + "description": "A list of dataset_snapshot objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsDatasetSnapshot", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/dataset_snapshot`)", + "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/dataset_snapshot/{dataset_snapshot_id}": { + "get": { + "operationId": "getDatasetSnapshotId", + "tags": [ + "DatasetSnapshots" + ], + "description": "Get a dataset_snapshot object by its id", + "summary": "Get dataset_snapshot", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/DatasetSnapshotIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the dataset_snapshot object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetSnapshot" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "patch": { + "operationId": "patchDatasetSnapshotId", + "tags": [ + "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/DatasetSnapshotIdParam" + } + ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchDatasetSnapshot" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the dataset_snapshot object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetSnapshot" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "delete": { + "operationId": "deleteDatasetSnapshotId", + "tags": [ + "DatasetSnapshots" + ], + "description": "Delete a dataset_snapshot object by its id", + "summary": "Delete dataset_snapshot", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/DatasetSnapshotIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the deleted dataset_snapshot object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DatasetSnapshot" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsDatasetSnapshotId", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/dataset_snapshot/{dataset_snapshot_id}`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/DatasetSnapshotIdParam" + } + ], + "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 + } + } + } + } + } + } + }, "/environment": { "get": { "operationId": "listEnvironments", diff --git a/openapi/spec.yaml b/openapi/spec.yaml index cb7c561..0b88535 100644 --- a/openapi/spec.yaml +++ b/openapi/spec.yaml @@ -116,6 +116,10 @@ components: type: string format: uuid description: McpServer id + DatasetSnapshotIdParam: + type: string + format: uuid + description: DatasetSnapshot id ProjectIdQuery: type: string format: uuid @@ -177,6 +181,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 +721,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 +1632,17 @@ 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. + 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 +1705,17 @@ 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. + 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 +1773,17 @@ 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. + 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 +2615,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 +2650,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 +2676,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,6 +4533,11 @@ 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 RetentionObjectType: @@ -8134,6 +8205,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 +8621,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 @@ -8868,6 +9010,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" @@ -9027,6 +9176,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" @@ -21703,6 +21860,538 @@ paths: application/json: schema: nullable: true + /v1/dataset_snapshot: + post: + tags: + - DatasetSnapshots + security: + - bearerAuth: [] + - {} + 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 dataset_snapshot object + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateDatasetSnapshot" + responses: + "200": + description: Returns the new dataset_snapshot object + content: + application/json: + schema: + $ref: "#/components/schemas/DatasetSnapshot" + "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: + - DatasetSnapshots + security: + - bearerAuth: [] + - {} + 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 dataset_snapshot object + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateDatasetSnapshot" + responses: + "200": + description: Returns the new dataset_snapshot object + content: + application/json: + schema: + $ref: "#/components/schemas/DatasetSnapshot" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + get: + operationId: getDatasetSnapshot + tags: + - 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: [] + - {} + parameters: + - $ref: "#/components/parameters/AppLimitParam" + - $ref: "#/components/parameters/StartingAfter" + - $ref: "#/components/parameters/EndingBefore" + - $ref: "#/components/parameters/Ids" + - $ref: "#/components/parameters/DatasetSnapshotName" + - $ref: "#/components/parameters/OrgName" + responses: + "200": + description: Returns a list of dataset_snapshot objects + content: + application/json: + schema: + type: object + properties: + objects: + type: array + items: + $ref: "#/components/schemas/DatasetSnapshot" + description: A list of dataset_snapshot objects + required: + - objects + additionalProperties: false + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsDatasetSnapshot + description: Enable CORS + summary: Enable CORS (`/v1/dataset_snapshot`) + 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/dataset_snapshot/{dataset_snapshot_id}: + get: + operationId: getDatasetSnapshotId + tags: + - DatasetSnapshots + description: Get a dataset_snapshot object by its id + summary: Get dataset_snapshot + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/DatasetSnapshotIdParam" + responses: + "200": + description: Returns the dataset_snapshot object + content: + application/json: + schema: + $ref: "#/components/schemas/DatasetSnapshot" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + patch: + operationId: patchDatasetSnapshotId + tags: + - 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/DatasetSnapshotIdParam" + requestBody: + description: Fields to update + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/PatchDatasetSnapshot" + responses: + "200": + description: Returns the dataset_snapshot object + content: + application/json: + schema: + $ref: "#/components/schemas/DatasetSnapshot" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + delete: + operationId: deleteDatasetSnapshotId + tags: + - DatasetSnapshots + description: Delete a dataset_snapshot object by its id + summary: Delete dataset_snapshot + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/DatasetSnapshotIdParam" + responses: + "200": + description: Returns the deleted dataset_snapshot object + content: + application/json: + schema: + $ref: "#/components/schemas/DatasetSnapshot" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: + schema: + type: string + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsDatasetSnapshotId + description: Enable CORS + summary: Enable CORS (`/v1/dataset_snapshot/{dataset_snapshot_id}`) + security: [] + tags: + - CORS + parameters: + - $ref: "#/components/parameters/DatasetSnapshotIdParam" + 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 /environment: get: operationId: listEnvironments