From 90c41fbc6b18d4be9da855362cbdeab1d73622de Mon Sep 17 00:00:00 2001 From: "braintrust-bot[bot]" <215900051+braintrust-bot[bot]@users.noreply.github.com> Date: Fri, 30 Oct 2026 15:15:21 +0000 Subject: [PATCH] chore: sync OpenAPI spec --- openapi/spec.json | 10336 +++++++++++++------------------------------- openapi/spec.yaml | 3767 +++------------- 2 files changed, 3675 insertions(+), 10428 deletions(-) diff --git a/openapi/spec.json b/openapi/spec.json index da62465..d263fe5 100644 --- a/openapi/spec.json +++ b/openapi/spec.json @@ -3419,6 +3419,58 @@ ], "description": "Summary of a dataset" }, + "DatasetRestorePreviewResponse": { + "type": "object", + "properties": { + "rows_to_restore": { + "type": "integer", + "description": "Number of rows that would be restored to their value at the requested version" + }, + "rows_to_delete": { + "type": "integer", + "description": "Number of rows created after the requested version that would be deleted" + } + }, + "required": [ + "rows_to_restore", + "rows_to_delete" + ] + }, + "DatasetRestoreRequest": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "The dataset version to restore to, such as the `xact_id` of a dataset snapshot" + } + }, + "required": [ + "version" + ] + }, + "DatasetRestoreResponse": { + "type": "object", + "properties": { + "xact_id": { + "type": "string", + "nullable": true, + "description": "Transaction id of the restore, or null if the restore made no changes" + }, + "rows_restored": { + "type": "integer", + "description": "Number of rows restored to their value at the requested version" + }, + "rows_deleted": { + "type": "integer", + "description": "Number of rows created after the requested version that were deleted" + } + }, + "required": [ + "xact_id", + "rows_restored", + "rows_deleted" + ] + }, "ChatCompletionContentPartText": { "type": "object", "properties": { @@ -4067,10 +4119,7 @@ "additionalProperties": { "nullable": true }, - "title": "object", - "x-stainless-skip": [ - "go" - ] + "title": "object" }, { "type": "string", @@ -4303,10 +4352,7 @@ "additionalProperties": { "nullable": true }, - "title": "OpenAIModelParams", - "x-stainless-skip": [ - "go" - ] + "title": "OpenAIModelParams" }, { "type": "object", @@ -4350,10 +4396,7 @@ "additionalProperties": { "nullable": true }, - "title": "AnthropicModelParams", - "x-stainless-skip": [ - "go" - ] + "title": "AnthropicModelParams" }, { "type": "object", @@ -4383,10 +4426,7 @@ "additionalProperties": { "nullable": true }, - "title": "GoogleModelParams", - "x-stainless-skip": [ - "go" - ] + "title": "GoogleModelParams" }, { "type": "object", @@ -4410,10 +4450,7 @@ "additionalProperties": { "nullable": true }, - "title": "WindowAIModelParams", - "x-stainless-skip": [ - "go" - ] + "title": "WindowAIModelParams" }, { "type": "object", @@ -4431,10 +4468,7 @@ "additionalProperties": { "nullable": true }, - "title": "JsCompletionParams", - "x-stainless-skip": [ - "go" - ] + "title": "JsCompletionParams" } ] }, @@ -8516,10 +8550,7 @@ "type": "number" }, "description": "For weighted-type project scores, the weights of each score", - "title": "weighted", - "x-stainless-skip": [ - "go" - ] + "title": "weighted" }, { "type": "array", @@ -11403,6 +11434,9 @@ "InvokeApi": { "type": "object", "properties": { + "request_source": { + "type": "string" + }, "input": { "nullable": true, "description": "Argument to the function, which can be any JSON serializable value" @@ -15052,46 +15086,161 @@ } } } - }, - "options": { - "operationId": "optionsProject", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project`)", - "security": [], + } + }, + "/v1/project/{project_id}": { + "get": { + "operationId": "getProjectId", "tags": [ - "CORS" + "Projects" + ], + "description": "Get a project object by its id", + "summary": "Get project", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } ], "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns the project object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Headers": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "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 + } } - }, - "content": {} + } + } + } + }, + "patch": { + "operationId": "patchProjectId", + "tags": [ + "Projects" + ], + "description": "Partially update a project object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update project", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/ProjectIdParam" + } + ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchProject" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the project object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + } }, "400": { "description": "The request was unacceptable, often due to missing a required parameter", @@ -15107,18 +15256,83 @@ } } } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { + "schema": { + "type": "string" + } + } + }, + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } } } - } - }, - "/v1/project/{project_id}": { - "get": { - "operationId": "getProjectId", + }, + "delete": { + "operationId": "deleteProjectId", "tags": [ "Projects" ], - "description": "Get a project object by its id", - "summary": "Get project", + "description": "Delete a project object by its id", + "summary": "Delete project", "security": [ { "bearerAuth": [] @@ -15132,7 +15346,7 @@ ], "responses": { "200": { - "description": "Returns the project object", + "description": "Returns the deleted project object", "content": { "application/json": { "schema": { @@ -15224,14 +15438,16 @@ } } } - }, - "patch": { - "operationId": "patchProjectId", + } + }, + "/v1/project_logs/{project_id}/insert": { + "post": { + "operationId": "postProjectLogsIdInsert", "tags": [ - "Projects" + "Logs" ], - "description": "Partially update a project object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update project", + "description": "Insert a set of events into the project logs", + "summary": "Insert project logs events", "security": [ { "bearerAuth": [] @@ -15244,23 +15460,23 @@ } ], "requestBody": { - "description": "Fields to update", - "required": false, + "description": "An array of project logs events to insert", + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchProject" + "$ref": "#/components/schemas/InsertProjectLogsEventRequest" } } } }, "responses": { "200": { - "description": "Returns the project object", + "description": "Returns the inserted row ids", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Project" + "$ref": "#/components/schemas/InsertEventsResponse" } } } @@ -15348,14 +15564,16 @@ } } } - }, - "delete": { - "operationId": "deleteProjectId", + } + }, + "/v1/project_logs/{project_id}/fetch": { + "post": { + "operationId": "postProjectLogsIdFetch", "tags": [ - "Projects" + "Logs" ], - "description": "Delete a project object by its id", - "summary": "Delete project", + "description": "Fetch the events in a project logs. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch project logs (POST form)", "security": [ { "bearerAuth": [] @@ -15367,13 +15585,24 @@ "$ref": "#/components/parameters/ProjectIdParam" } ], + "requestBody": { + "description": "Filters for the fetch query", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchEventsRequest" + } + } + } + }, "responses": { "200": { - "description": "Returns the deleted project object", + "description": "Returns the fetched rows", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Project" + "$ref": "#/components/schemas/FetchProjectLogsEventsResponse" } } } @@ -15462,53 +15691,116 @@ } } }, - "options": { - "operationId": "optionsProjectId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project/{project_id}`)", - "security": [], + "get": { + "operationId": "getProjectLogsIdFetch", "tags": [ - "CORS" + "Logs" + ], + "description": "Fetch the events in a project logs. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch project logs (GET form)", + "security": [ + { + "bearerAuth": [] + }, + {} ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdParam" + }, + { + "$ref": "#/components/parameters/FetchLimitParam" + }, + { + "$ref": "#/components/parameters/MaxXactId" + }, + { + "$ref": "#/components/parameters/MaxRootSpanId" + }, + { + "$ref": "#/components/parameters/Version" } ], "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns the fetched rows", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/FetchProjectLogsEventsResponse" } - }, - "Access-Control-Allow-Headers": { + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } } }, - "content": {} + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -15525,14 +15817,14 @@ } } }, - "/v1/project_logs/{project_id}/insert": { + "/v1/project_logs/{project_id}/feedback": { "post": { - "operationId": "postProjectLogsIdInsert", + "operationId": "postProjectLogsIdFeedback", "tags": [ "Logs" ], - "description": "Insert a set of events into the project logs", - "summary": "Insert project logs events", + "description": "Log feedback for a set of project logs events", + "summary": "Feedback for project logs events", "security": [ { "bearerAuth": [] @@ -15545,23 +15837,23 @@ } ], "requestBody": { - "description": "An array of project logs events to insert", + "description": "An array of feedback objects", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsertProjectLogsEventRequest" + "$ref": "#/components/schemas/FeedbackProjectLogsEventRequest" } } } }, "responses": { "200": { - "description": "Returns the inserted row ids", + "description": "Returns a success status", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsertEventsResponse" + "$ref": "#/components/schemas/FeedbackResponseSchema" } } } @@ -15649,107 +15941,40 @@ } } } - }, - "options": { - "operationId": "optionsProjectLogsIdInsert", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_logs/{project_id}/insert`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/project_logs/{project_id}/fetch": { + "/v1/experiment": { "post": { - "operationId": "postProjectLogsIdFetch", "tags": [ - "Logs" + "Experiments" ], - "description": "Fetch the events in a project logs. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch project logs (POST form)", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectIdParam" - } - ], + "operationId": "postExperiment", + "description": "Create a new experiment. If there is an existing experiment in the project with the same name as the one specified in the request, will return the existing experiment unmodified", + "summary": "Create experiment", "requestBody": { - "description": "Filters for the fetch query", - "required": false, + "description": "Any desired information about the new experiment object", + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchEventsRequest" + "$ref": "#/components/schemas/CreateExperiment" } } } }, "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns the new experiment object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchProjectLogsEventsResponse" + "$ref": "#/components/schemas/Experiment" } } } @@ -15839,12 +16064,12 @@ } }, "get": { - "operationId": "getProjectLogsIdFetch", + "operationId": "getExperiment", "tags": [ - "Logs" + "Experiments" ], - "description": "Fetch the events in a project logs. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch project logs (GET form)", + "description": "List out all experiments. The experiments are sorted by creation date, with the most recently-created experiments coming first", + "summary": "List experiments", "security": [ { "bearerAuth": [] @@ -15853,28 +16078,50 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectIdParam" + "$ref": "#/components/parameters/AppLimitWithDefaultParam" }, { - "$ref": "#/components/parameters/FetchLimitParam" + "$ref": "#/components/parameters/StartingAfter" }, { - "$ref": "#/components/parameters/MaxXactId" + "$ref": "#/components/parameters/EndingBefore" }, { - "$ref": "#/components/parameters/MaxRootSpanId" + "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/Version" + "$ref": "#/components/parameters/ExperimentName" + }, + { + "$ref": "#/components/parameters/ProjectName" + }, + { + "$ref": "#/components/parameters/ProjectIdQuery" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns a list of experiment objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchProjectLogsEventsResponse" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Experiment" + }, + "description": "A list of experiment objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -15962,78 +16209,16 @@ } } } - }, - "options": { - "operationId": "optionsProjectLogsIdFetch", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_logs/{project_id}/fetch`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/project_logs/{project_id}/feedback": { - "post": { - "operationId": "postProjectLogsIdFeedback", + "/v1/experiment/{experiment_id}": { + "get": { + "operationId": "getExperimentId", "tags": [ - "Logs" + "Experiments" ], - "description": "Log feedback for a set of project logs events", - "summary": "Feedback for project logs events", + "description": "Get an experiment object by its id", + "summary": "Get experiment", "security": [ { "bearerAuth": [] @@ -16042,27 +16227,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectIdParam" + "$ref": "#/components/parameters/ExperimentIdParam" } ], - "requestBody": { - "description": "An array of feedback objects", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackProjectLogsEventRequest" - } - } - } - }, "responses": { "200": { - "description": "Returns a success status", + "description": "Returns the experiment object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackResponseSchema" + "$ref": "#/components/schemas/Experiment" } } } @@ -16151,97 +16325,38 @@ } } }, - "options": { - "operationId": "optionsProjectLogsIdFeedback", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_logs/{project_id}/feedback`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/experiment": { - "post": { + "patch": { + "operationId": "patchExperimentId", "tags": [ "Experiments" ], + "description": "Partially update an experiment object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update experiment", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postExperiment", - "description": "Create a new experiment. If there is an existing experiment in the project with the same name as the one specified in the request, will return the existing experiment unmodified", - "summary": "Create experiment", + "parameters": [ + { + "$ref": "#/components/parameters/ExperimentIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new experiment object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateExperiment" + "$ref": "#/components/schemas/PatchExperiment" } } } }, "responses": { "200": { - "description": "Returns the new experiment object", + "description": "Returns the experiment object", "content": { "application/json": { "schema": { @@ -16334,13 +16449,13 @@ } } }, - "get": { - "operationId": "getExperiment", + "delete": { + "operationId": "deleteExperimentId", "tags": [ "Experiments" ], - "description": "List out all experiments. The experiments are sorted by creation date, with the most recently-created experiments coming first", - "summary": "List experiments", + "description": "Delete an experiment object by its id", + "summary": "Delete experiment", "security": [ { "bearerAuth": [] @@ -16349,50 +16464,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitWithDefaultParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/ExperimentName" - }, - { - "$ref": "#/components/parameters/ProjectName" - }, - { - "$ref": "#/components/parameters/ProjectIdQuery" - }, - { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/ExperimentIdParam" } ], "responses": { "200": { - "description": "Returns a list of experiment objects", + "description": "Returns the deleted experiment object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Experiment" - }, - "description": "A list of experiment objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/Experiment" } } } @@ -16480,73 +16561,16 @@ } } } - }, - "options": { - "operationId": "optionsExperiment", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/experiment/{experiment_id}": { - "get": { - "operationId": "getExperimentId", + "/v1/experiment/{experiment_id}/insert": { + "post": { + "operationId": "postExperimentIdInsert", "tags": [ "Experiments" ], - "description": "Get an experiment object by its id", - "summary": "Get experiment", + "description": "Insert a set of events into the experiment", + "summary": "Insert experiment events", "security": [ { "bearerAuth": [] @@ -16558,13 +16582,24 @@ "$ref": "#/components/parameters/ExperimentIdParam" } ], + "requestBody": { + "description": "An array of experiment events to insert", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InsertExperimentEventRequest" + } + } + } + }, "responses": { "200": { - "description": "Returns the experiment object", + "description": "Returns the inserted row ids", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Experiment" + "$ref": "#/components/schemas/InsertEventsResponse" } } } @@ -16652,14 +16687,16 @@ } } } - }, - "patch": { - "operationId": "patchExperimentId", + } + }, + "/v1/experiment/{experiment_id}/fetch": { + "post": { + "operationId": "postExperimentIdFetch", "tags": [ "Experiments" ], - "description": "Partially update an experiment object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update experiment", + "description": "Fetch the events in an experiment. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch experiment (POST form)", "security": [ { "bearerAuth": [] @@ -16672,23 +16709,23 @@ } ], "requestBody": { - "description": "Fields to update", + "description": "Filters for the fetch query", "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchExperiment" + "$ref": "#/components/schemas/FetchEventsRequest" } } } }, "responses": { "200": { - "description": "Returns the experiment object", + "description": "Returns the fetched rows", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Experiment" + "$ref": "#/components/schemas/FetchExperimentEventsResponse" } } } @@ -16777,13 +16814,13 @@ } } }, - "delete": { - "operationId": "deleteExperimentId", + "get": { + "operationId": "getExperimentIdFetch", "tags": [ "Experiments" ], - "description": "Delete an experiment object by its id", - "summary": "Delete experiment", + "description": "Fetch the events in an experiment. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch experiment (GET form)", "security": [ { "bearerAuth": [] @@ -16793,15 +16830,27 @@ "parameters": [ { "$ref": "#/components/parameters/ExperimentIdParam" + }, + { + "$ref": "#/components/parameters/FetchLimitParam" + }, + { + "$ref": "#/components/parameters/MaxXactId" + }, + { + "$ref": "#/components/parameters/MaxRootSpanId" + }, + { + "$ref": "#/components/parameters/Version" } ], "responses": { "200": { - "description": "Returns the deleted experiment object", + "description": "Returns the fetched rows", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Experiment" + "$ref": "#/components/schemas/FetchExperimentEventsResponse" } } } @@ -16889,78 +16938,16 @@ } } } - }, - "options": { - "operationId": "optionsExperimentId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment/{experiment_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/experiment/{experiment_id}/insert": { + "/v1/experiment/{experiment_id}/feedback": { "post": { - "operationId": "postExperimentIdInsert", + "operationId": "postExperimentIdFeedback", "tags": [ "Experiments" ], - "description": "Insert a set of events into the experiment", - "summary": "Insert experiment events", + "description": "Log feedback for a set of experiment events", + "summary": "Feedback for experiment events", "security": [ { "bearerAuth": [] @@ -16973,23 +16960,23 @@ } ], "requestBody": { - "description": "An array of experiment events to insert", + "description": "An array of feedback objects", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsertExperimentEventRequest" + "$ref": "#/components/schemas/FeedbackExperimentEventRequest" } } } }, "responses": { "200": { - "description": "Returns the inserted row ids", + "description": "Returns a success status", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsertEventsResponse" + "$ref": "#/components/schemas/FeedbackResponseSchema" } } } @@ -17077,54 +17064,112 @@ } } } - }, - "options": { - "operationId": "optionsExperimentIdInsert", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment/{experiment_id}/insert`)", - "security": [], + } + }, + "/v1/experiment/{experiment_id}/summarize": { + "get": { + "operationId": "getExperimentIdSummarize", "tags": [ - "CORS" + "Experiments" + ], + "description": "Return the experiment and project names and URLs. Set `summarize_scores=true` to include aggregate scores and metrics, with differences, improvements, and regressions relative to a comparison experiment. Use `comparison_experiment_id` to select the comparison; otherwise, the experiment's base experiment or the most recent experiment in the project is used.", + "summary": "Summarize experiment", + "security": [ + { + "bearerAuth": [] + } ], "parameters": [ { "$ref": "#/components/parameters/ExperimentIdParam" + }, + { + "$ref": "#/components/parameters/SummarizeScores" + }, + { + "$ref": "#/components/parameters/ComparisonExperimentId" } ], "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Experiment summary", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SummarizeExperimentResponse" } - }, - "Access-Control-Allow-Headers": { + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } } }, - "content": {} + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -17141,43 +17186,38 @@ } } }, - "/v1/experiment/{experiment_id}/fetch": { + "/v1/dataset": { "post": { - "operationId": "postExperimentIdFetch", "tags": [ - "Experiments" + "Datasets" ], - "description": "Fetch the events in an experiment. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch experiment (POST form)", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" - } - ], + "operationId": "postDataset", + "description": "Create a new dataset. If there is an existing dataset in the project with the same name as the one specified in the request, will return the existing dataset unmodified", + "summary": "Create dataset", "requestBody": { - "description": "Filters for the fetch query", - "required": false, + "description": "Any desired information about the new dataset object", + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchEventsRequest" + "$ref": "#/components/schemas/CreateDataset" } } } }, "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns the new dataset object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchExperimentEventsResponse" + "$ref": "#/components/schemas/Dataset" } } } @@ -17267,12 +17307,12 @@ } }, "get": { - "operationId": "getExperimentIdFetch", + "operationId": "getDataset", "tags": [ - "Experiments" + "Datasets" ], - "description": "Fetch the events in an experiment. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch experiment (GET form)", + "description": "List out all datasets. The datasets are sorted by creation date, with the most recently-created datasets coming first", + "summary": "List datasets", "security": [ { "bearerAuth": [] @@ -17281,28 +17321,50 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ExperimentIdParam" + "$ref": "#/components/parameters/AppLimitParam" }, { - "$ref": "#/components/parameters/FetchLimitParam" + "$ref": "#/components/parameters/StartingAfter" }, { - "$ref": "#/components/parameters/MaxXactId" + "$ref": "#/components/parameters/EndingBefore" }, { - "$ref": "#/components/parameters/MaxRootSpanId" + "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/Version" + "$ref": "#/components/parameters/DatasetName" + }, + { + "$ref": "#/components/parameters/ProjectName" + }, + { + "$ref": "#/components/parameters/ProjectIdQuery" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns a list of dataset objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchExperimentEventsResponse" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dataset" + }, + "description": "A list of dataset objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -17390,78 +17452,16 @@ } } } - }, - "options": { - "operationId": "optionsExperimentIdFetch", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment/{experiment_id}/fetch`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/experiment/{experiment_id}/feedback": { - "post": { - "operationId": "postExperimentIdFeedback", + "/v1/dataset/{dataset_id}": { + "get": { + "operationId": "getDatasetId", "tags": [ - "Experiments" + "Datasets" ], - "description": "Log feedback for a set of experiment events", - "summary": "Feedback for experiment events", + "description": "Get a dataset object by its id", + "summary": "Get dataset", "security": [ { "bearerAuth": [] @@ -17470,27 +17470,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ExperimentIdParam" + "$ref": "#/components/parameters/DatasetIdParam" } ], - "requestBody": { - "description": "An array of feedback objects", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FeedbackExperimentEventRequest" - } - } - } - }, "responses": { "200": { - "description": "Returns a success status", + "description": "Returns the dataset object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackResponseSchema" + "$ref": "#/components/schemas/Dataset" } } } @@ -17579,100 +17568,42 @@ } } }, - "options": { - "operationId": "optionsExperimentIdFeedback", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment/{experiment_id}/feedback`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ExperimentIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/experiment/{experiment_id}/summarize": { - "get": { - "operationId": "getExperimentIdSummarize", + "patch": { + "operationId": "patchDatasetId", "tags": [ - "Experiments" + "Datasets" ], - "description": "Summarize experiment", - "summary": "Summarize experiment", + "description": "Partially update a dataset object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update dataset", "security": [ { "bearerAuth": [] - } + }, + {} ], "parameters": [ { - "$ref": "#/components/parameters/ExperimentIdParam" - }, - { - "$ref": "#/components/parameters/SummarizeScores" - }, - { - "$ref": "#/components/parameters/ComparisonExperimentId" + "$ref": "#/components/parameters/DatasetIdParam" } ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchDataset" + } + } + } + }, "responses": { "200": { - "description": "Experiment summary", + "description": "Returns the dataset object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SummarizeExperimentResponse" + "$ref": "#/components/schemas/Dataset" } } } @@ -17761,53 +17692,104 @@ } } }, - "options": { - "operationId": "optionsExperimentIdSummarize", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/experiment/{experiment_id}/summarize`)", - "security": [], + "delete": { + "operationId": "deleteDatasetId", "tags": [ - "CORS" + "Datasets" + ], + "description": "Delete a dataset object by its id", + "summary": "Delete dataset", + "security": [ + { + "bearerAuth": [] + }, + {} ], "parameters": [ { - "$ref": "#/components/parameters/ExperimentIdParam" + "$ref": "#/components/parameters/DatasetIdParam" } ], "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns the deleted dataset object", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Dataset" } - }, - "Access-Control-Allow-Headers": { + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } } }, - "content": {} + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -17824,38 +17806,43 @@ } } }, - "/v1/dataset": { + "/v1/dataset/{dataset_id}/insert": { "post": { + "operationId": "postDatasetIdInsert", "tags": [ "Datasets" ], + "description": "Insert a set of events into the dataset", + "summary": "Insert dataset events", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postDataset", - "description": "Create a new dataset. If there is an existing dataset in the project with the same name as the one specified in the request, will return the existing dataset unmodified", - "summary": "Create dataset", + "parameters": [ + { + "$ref": "#/components/parameters/DatasetIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new dataset object", + "description": "An array of dataset events to insert", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateDataset" + "$ref": "#/components/schemas/InsertDatasetEventRequest" } } } }, "responses": { "200": { - "description": "Returns the new dataset object", + "description": "Returns the inserted row ids", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Dataset" + "$ref": "#/components/schemas/InsertEventsResponse" } } } @@ -17943,14 +17930,16 @@ } } } - }, - "get": { - "operationId": "getDataset", + } + }, + "/v1/dataset/{dataset_id}/fetch": { + "post": { + "operationId": "postDatasetIdFetch", "tags": [ "Datasets" ], - "description": "List out all datasets. The datasets are sorted by creation date, with the most recently-created datasets coming first", - "summary": "List datasets", + "description": "Fetch the events in a dataset. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch dataset (POST form)", "security": [ { "bearerAuth": [] @@ -17959,50 +17948,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/DatasetName" - }, - { - "$ref": "#/components/parameters/ProjectName" - }, - { - "$ref": "#/components/parameters/ProjectIdQuery" - }, - { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/DatasetIdParam" } ], + "requestBody": { + "description": "Filters for the fetch query", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FetchEventsRequest" + } + } + } + }, "responses": { "200": { - "description": "Returns a list of dataset objects", + "description": "Returns the fetched rows", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Dataset" - }, - "description": "A list of dataset objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/FetchDatasetEventsResponse" } } } @@ -18091,72 +18057,13 @@ } } }, - "options": { - "operationId": "optionsDataset", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset`)", - "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/{dataset_id}": { "get": { - "operationId": "getDatasetId", + "operationId": "getDatasetIdFetch", "tags": [ "Datasets" ], - "description": "Get a dataset object by its id", - "summary": "Get dataset", + "description": "Fetch the events in a dataset. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", + "summary": "Fetch dataset (GET form)", "security": [ { "bearerAuth": [] @@ -18166,15 +18073,27 @@ "parameters": [ { "$ref": "#/components/parameters/DatasetIdParam" + }, + { + "$ref": "#/components/parameters/FetchLimitParam" + }, + { + "$ref": "#/components/parameters/MaxXactId" + }, + { + "$ref": "#/components/parameters/MaxRootSpanId" + }, + { + "$ref": "#/components/parameters/Version" } ], "responses": { "200": { - "description": "Returns the dataset object", + "description": "Returns the fetched rows", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Dataset" + "$ref": "#/components/schemas/FetchDatasetEventsResponse" } } } @@ -18262,14 +18181,16 @@ } } } - }, - "patch": { - "operationId": "patchDatasetId", + } + }, + "/v1/dataset/{dataset_id}/feedback": { + "post": { + "operationId": "postDatasetIdFeedback", "tags": [ "Datasets" ], - "description": "Partially update a dataset object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update dataset", + "description": "Log feedback for a set of dataset events", + "summary": "Feedback for dataset events", "security": [ { "bearerAuth": [] @@ -18282,23 +18203,23 @@ } ], "requestBody": { - "description": "Fields to update", - "required": false, + "description": "An array of feedback objects", + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchDataset" + "$ref": "#/components/schemas/FeedbackDatasetEventRequest" } } } }, "responses": { "200": { - "description": "Returns the dataset object", + "description": "Returns a success status", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Dataset" + "$ref": "#/components/schemas/FeedbackResponseSchema" } } } @@ -18386,32 +18307,36 @@ } } } - }, - "delete": { - "operationId": "deleteDatasetId", + } + }, + "/v1/dataset/{dataset_id}/summarize": { + "get": { + "operationId": "getDatasetIdSummarize", "tags": [ "Datasets" ], - "description": "Delete a dataset object by its id", - "summary": "Delete dataset", + "description": "Return the dataset and project names and URLs. Set `summarize_data=true` to include the total number of records in the dataset; otherwise, only metadata is returned.", + "summary": "Summarize dataset", "security": [ { "bearerAuth": [] - }, - {} + } ], "parameters": [ { "$ref": "#/components/parameters/DatasetIdParam" + }, + { + "$ref": "#/components/parameters/SummarizeData" } ], "responses": { "200": { - "description": "Returns the deleted dataset object", + "description": "Dataset summary", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Dataset" + "$ref": "#/components/schemas/SummarizeDatasetResponse" } } } @@ -18499,78 +18424,16 @@ } } } - }, - "options": { - "operationId": "optionsDatasetId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset/{dataset_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/dataset/{dataset_id}/insert": { + "/v1/dataset/{dataset_id}/restore/preview": { "post": { - "operationId": "postDatasetIdInsert", + "operationId": "postDatasetIdRestorePreview", "tags": [ "Datasets" ], - "description": "Insert a set of events into the dataset", - "summary": "Insert dataset events", + "description": "Preview restoring a dataset to an earlier version, such as a dataset snapshot. Returns how many rows a restore would change, without modifying the dataset. Fails if more than 20,000 rows changed since the requested version. Requires read permission on the dataset.", + "summary": "Preview dataset restore", "security": [ { "bearerAuth": [] @@ -18583,23 +18446,22 @@ } ], "requestBody": { - "description": "An array of dataset events to insert", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsertDatasetEventRequest" + "$ref": "#/components/schemas/DatasetRestoreRequest" } } } }, "responses": { "200": { - "description": "Returns the inserted row ids", + "description": "Number of rows the restore would change", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InsertEventsResponse" + "$ref": "#/components/schemas/DatasetRestorePreviewResponse" } } } @@ -18687,78 +18549,16 @@ } } } - }, - "options": { - "operationId": "optionsDatasetIdInsert", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset/{dataset_id}/insert`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/dataset/{dataset_id}/fetch": { + "/v1/dataset/{dataset_id}/restore": { "post": { - "operationId": "postDatasetIdFetch", + "operationId": "postDatasetIdRestore", "tags": [ "Datasets" ], - "description": "Fetch the events in a dataset. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch dataset (POST form)", + "description": "Restore a dataset to an earlier version, such as a dataset snapshot. Rows changed since that version are reverted, and rows created since then are deleted. The restore is recorded as a new transaction, so dataset history is preserved. Fails if more than 20,000 rows changed since the requested version. Requires update permission on the dataset.", + "summary": "Restore dataset", "security": [ { "bearerAuth": [] @@ -18771,23 +18571,22 @@ } ], "requestBody": { - "description": "Filters for the fetch query", - "required": false, + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchEventsRequest" + "$ref": "#/components/schemas/DatasetRestoreRequest" } } } }, "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Number of rows the restore changed", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchDatasetEventsResponse" + "$ref": "#/components/schemas/DatasetRestoreResponse" } } } @@ -18875,44 +18674,40 @@ } } } - }, - "get": { - "operationId": "getDatasetIdFetch", + } + }, + "/v1/prompt": { + "post": { "tags": [ - "Datasets" + "Prompts" ], - "description": "Fetch the events in a dataset. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.", - "summary": "Fetch dataset (GET form)", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - }, - { - "$ref": "#/components/parameters/FetchLimitParam" - }, - { - "$ref": "#/components/parameters/MaxXactId" - }, - { - "$ref": "#/components/parameters/MaxRootSpanId" - }, - { - "$ref": "#/components/parameters/Version" + "operationId": "postPrompt", + "description": "Create a new prompt. If there is an existing prompt in the project with the same slug as the one specified in the request, a new version of the prompt will be appended and returned", + "summary": "Create prompt", + "requestBody": { + "description": "Any desired information about the new prompt object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePrompt" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the fetched rows", + "description": "Returns the new prompt object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FetchDatasetEventsResponse" + "$ref": "#/components/schemas/Prompt" } } } @@ -19001,106 +18796,37 @@ } } }, - "options": { - "operationId": "optionsDatasetIdFetch", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset/{dataset_id}/fetch`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/dataset/{dataset_id}/feedback": { - "post": { - "operationId": "postDatasetIdFeedback", + "put": { "tags": [ - "Datasets" + "Prompts" ], - "description": "Log feedback for a set of dataset events", - "summary": "Feedback for dataset events", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - } - ], + "operationId": "putPrompt", + "description": "Create or replace prompt. If there is an existing prompt in the project with the same slug as the one specified in the request, a new version of the prompt will be appended and returned", + "summary": "Create or replace prompt", "requestBody": { - "description": "An array of feedback objects", + "description": "Any desired information about the new prompt object", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackDatasetEventRequest" + "$ref": "#/components/schemas/CreatePrompt" } } } }, "responses": { "200": { - "description": "Returns a success status", + "description": "Returns the new prompt object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackResponseSchema" + "$ref": "#/components/schemas/Prompt" } } } @@ -19189,97 +18915,74 @@ } } }, - "options": { - "operationId": "optionsDatasetIdFeedback", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset/{dataset_id}/feedback`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/dataset/{dataset_id}/summarize": { "get": { - "operationId": "getDatasetIdSummarize", + "operationId": "getPrompt", "tags": [ - "Datasets" + "Prompts" ], - "description": "Summarize dataset", - "summary": "Summarize dataset", + "description": "List out all prompts. The prompts are sorted by creation date, with the most recently-created prompts coming first", + "summary": "List prompts", "security": [ { "bearerAuth": [] - } + }, + {} ], "parameters": [ { - "$ref": "#/components/parameters/DatasetIdParam" + "$ref": "#/components/parameters/AppLimitParam" }, { - "$ref": "#/components/parameters/SummarizeData" + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/PromptName" + }, + { + "$ref": "#/components/parameters/ProjectName" + }, + { + "$ref": "#/components/parameters/ProjectIdQuery" + }, + { + "$ref": "#/components/parameters/Slug" + }, + { + "$ref": "#/components/parameters/PromptVersion" + }, + { + "$ref": "#/components/parameters/PromptEnvironment" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Dataset summary", + "description": "Returns a list of prompt objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SummarizeDatasetResponse" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Prompt" + }, + "description": "A list of prompt objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -19367,98 +19070,36 @@ } } } - }, - "options": { - "operationId": "optionsDatasetIdSummarize", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/dataset/{dataset_id}/summarize`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/DatasetIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "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/prompt": { - "post": { + "/v1/prompt/{prompt_id}": { + "get": { + "operationId": "getPromptId", "tags": [ "Prompts" ], + "description": "Get a prompt object by its id", + "summary": "Get prompt", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postPrompt", - "description": "Create a new prompt. If there is an existing prompt in the project with the same slug as the one specified in the request, a new version of the prompt will be appended and returned", - "summary": "Create prompt", - "requestBody": { - "description": "Any desired information about the new prompt object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatePrompt" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/PromptIdParam" + }, + { + "$ref": "#/components/parameters/PromptVersion" + }, + { + "$ref": "#/components/parameters/PromptEnvironment" } - }, + ], "responses": { "200": { - "description": "Returns the new prompt object", + "description": "Returns the prompt object", "content": { "application/json": { "schema": { @@ -19551,33 +19192,38 @@ } } }, - "put": { + "patch": { + "operationId": "patchPromptId", "tags": [ "Prompts" ], + "description": "Partially update a prompt object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update prompt", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putPrompt", - "description": "Create or replace prompt. If there is an existing prompt in the project with the same slug as the one specified in the request, a new version of the prompt will be appended and returned", - "summary": "Create or replace prompt", + "parameters": [ + { + "$ref": "#/components/parameters/PromptIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new prompt object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreatePrompt" + "$ref": "#/components/schemas/PatchPrompt" } } } }, "responses": { "200": { - "description": "Returns the new prompt object", + "description": "Returns the prompt object", "content": { "application/json": { "schema": { @@ -19670,13 +19316,13 @@ } } }, - "get": { - "operationId": "getPrompt", + "delete": { + "operationId": "deletePromptId", "tags": [ "Prompts" ], - "description": "List out all prompts. The prompts are sorted by creation date, with the most recently-created prompts coming first", - "summary": "List prompts", + "description": "Delete a prompt object by its id", + "summary": "Delete prompt", "security": [ { "bearerAuth": [] @@ -19685,59 +19331,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/PromptName" - }, - { - "$ref": "#/components/parameters/ProjectName" - }, - { - "$ref": "#/components/parameters/ProjectIdQuery" - }, - { - "$ref": "#/components/parameters/Slug" - }, - { - "$ref": "#/components/parameters/PromptVersion" - }, - { - "$ref": "#/components/parameters/PromptEnvironment" - }, - { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/PromptIdParam" } ], "responses": { "200": { - "description": "Returns a list of prompt objects", + "description": "Returns the deleted prompt object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Prompt" - }, - "description": "A list of prompt objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/Prompt" } } } @@ -19825,97 +19428,40 @@ } } } - }, - "options": { - "operationId": "optionsPrompt", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/prompt`)", - "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/prompt/{prompt_id}": { - "get": { - "operationId": "getPromptId", + "/v1/role": { + "post": { "tags": [ - "Prompts" + "Roles" ], - "description": "Get a prompt object by its id", - "summary": "Get prompt", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/PromptIdParam" - }, - { - "$ref": "#/components/parameters/PromptVersion" - }, - { - "$ref": "#/components/parameters/PromptEnvironment" + "operationId": "postRole", + "description": "Create a new role. If there is an existing role with the same name as the one specified in the request, will return the existing role unmodified", + "summary": "Create role", + "requestBody": { + "description": "Any desired information about the new role object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRole" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the prompt object", + "description": "Returns the new role object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Prompt" + "$ref": "#/components/schemas/Role" } } } @@ -20004,42 +19550,37 @@ } } }, - "patch": { - "operationId": "patchPromptId", + "put": { "tags": [ - "Prompts" + "Roles" ], - "description": "Partially update a prompt object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update prompt", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/PromptIdParam" - } - ], + "operationId": "putRole", + "description": "Create or replace role. If there is an existing role with the same name as the one specified in the request, will replace the existing role with the provided fields", + "summary": "Create or replace role", "requestBody": { - "description": "Fields to update", - "required": false, + "description": "Any desired information about the new role object", + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchPrompt" + "$ref": "#/components/schemas/CreateRole" } } } }, "responses": { "200": { - "description": "Returns the prompt object", + "description": "Returns the new role object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Prompt" + "$ref": "#/components/schemas/Role" } } } @@ -20128,13 +19669,13 @@ } } }, - "delete": { - "operationId": "deletePromptId", + "get": { + "operationId": "getRole", "tags": [ - "Prompts" + "Roles" ], - "description": "Delete a prompt object by its id", - "summary": "Delete prompt", + "description": "List out all roles. The roles are sorted by creation date, with the most recently-created roles coming first", + "summary": "List roles", "security": [ { "bearerAuth": [] @@ -20143,16 +19684,44 @@ ], "parameters": [ { - "$ref": "#/components/parameters/PromptIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/RoleName" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns the deleted prompt object", + "description": "Returns a list of role objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Prompt" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + }, + "description": "A list of role objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -20240,98 +19809,30 @@ } } } - }, - "options": { - "operationId": "optionsPromptId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/prompt/{prompt_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/PromptIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/role": { - "post": { + "/v1/role/{role_id}": { + "get": { + "operationId": "getRoleId", "tags": [ "Roles" ], + "description": "Get a role object by its id", + "summary": "Get role", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postRole", - "description": "Create a new role. If there is an existing role with the same name as the one specified in the request, will return the existing role unmodified", - "summary": "Create role", - "requestBody": { - "description": "Any desired information about the new role object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateRole" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/RoleIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new role object", + "description": "Returns the role object", "content": { "application/json": { "schema": { @@ -20424,33 +19925,38 @@ } } }, - "put": { + "patch": { + "operationId": "patchRoleId", "tags": [ "Roles" ], + "description": "Partially update a role object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update role", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putRole", - "description": "Create or replace role. If there is an existing role with the same name as the one specified in the request, will replace the existing role with the provided fields", - "summary": "Create or replace role", + "parameters": [ + { + "$ref": "#/components/parameters/RoleIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new role object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateRole" + "$ref": "#/components/schemas/PatchRole" } } } }, "responses": { "200": { - "description": "Returns the new role object", + "description": "Returns the role object", "content": { "application/json": { "schema": { @@ -20543,13 +20049,13 @@ } } }, - "get": { - "operationId": "getRole", + "delete": { + "operationId": "deleteRoleId", "tags": [ "Roles" ], - "description": "List out all roles. The roles are sorted by creation date, with the most recently-created roles coming first", - "summary": "List roles", + "description": "Delete a role object by its id", + "summary": "Delete role", "security": [ { "bearerAuth": [] @@ -20558,44 +20064,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/RoleName" - }, - { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/RoleIdParam" } ], "responses": { "200": { - "description": "Returns a list of role objects", + "description": "Returns the deleted role object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Role" - }, - "description": "A list of role objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/Role" } } } @@ -20683,91 +20161,40 @@ } } } - }, - "options": { - "operationId": "optionsRole", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/role`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/role/{role_id}": { - "get": { - "operationId": "getRoleId", + "/v1/group": { + "post": { "tags": [ - "Roles" + "Groups" ], - "description": "Get a role object by its id", - "summary": "Get role", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/RoleIdParam" + "operationId": "postGroup", + "description": "Create a new group. If there is an existing group with the same name as the one specified in the request, will return the existing group unmodified", + "summary": "Create group", + "requestBody": { + "description": "Any desired information about the new group object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGroup" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the role object", + "description": "Returns the new group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/Group" } } } @@ -20856,42 +20283,37 @@ } } }, - "patch": { - "operationId": "patchRoleId", + "put": { "tags": [ - "Roles" + "Groups" ], - "description": "Partially update a role object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update role", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/RoleIdParam" - } - ], + "operationId": "putGroup", + "description": "Create or replace group. If there is an existing group with the same name as the one specified in the request, will replace the existing group with the provided fields", + "summary": "Create or replace group", "requestBody": { - "description": "Fields to update", - "required": false, + "description": "Any desired information about the new group object", + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchRole" + "$ref": "#/components/schemas/CreateGroup" } } } }, "responses": { "200": { - "description": "Returns the role object", + "description": "Returns the new group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/Group" } } } @@ -20980,13 +20402,13 @@ } } }, - "delete": { - "operationId": "deleteRoleId", + "get": { + "operationId": "getGroup", "tags": [ - "Roles" + "Groups" ], - "description": "Delete a role object by its id", - "summary": "Delete role", + "description": "List out all groups. The groups are sorted by creation date, with the most recently-created groups coming first", + "summary": "List groups", "security": [ { "bearerAuth": [] @@ -20995,16 +20417,44 @@ ], "parameters": [ { - "$ref": "#/components/parameters/RoleIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/GroupName" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns the deleted role object", + "description": "Returns a list of group objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + }, + "description": "A list of group objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -21092,98 +20542,30 @@ } } } - }, - "options": { - "operationId": "optionsRoleId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/role/{role_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/RoleIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/group": { - "post": { + "/v1/group/{group_id}": { + "get": { + "operationId": "getGroupId", "tags": [ "Groups" ], + "description": "Get a group object by its id", + "summary": "Get group", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postGroup", - "description": "Create a new group. If there is an existing group with the same name as the one specified in the request, will return the existing group unmodified", - "summary": "Create group", - "requestBody": { - "description": "Any desired information about the new group object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateGroup" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/GroupIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new group object", + "description": "Returns the group object", "content": { "application/json": { "schema": { @@ -21276,33 +20658,38 @@ } } }, - "put": { + "patch": { + "operationId": "patchGroupId", "tags": [ "Groups" ], + "description": "Partially update a group object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update group", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putGroup", - "description": "Create or replace group. If there is an existing group with the same name as the one specified in the request, will replace the existing group with the provided fields", - "summary": "Create or replace group", + "parameters": [ + { + "$ref": "#/components/parameters/GroupIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new group object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateGroup" + "$ref": "#/components/schemas/PatchGroup" } } } }, "responses": { "200": { - "description": "Returns the new group object", + "description": "Returns the group object", "content": { "application/json": { "schema": { @@ -21395,13 +20782,13 @@ } } }, - "get": { - "operationId": "getGroup", + "delete": { + "operationId": "deleteGroupId", "tags": [ "Groups" ], - "description": "List out all groups. The groups are sorted by creation date, with the most recently-created groups coming first", - "summary": "List groups", + "description": "Delete a group object by its id", + "summary": "Delete group", "security": [ { "bearerAuth": [] @@ -21410,44 +20797,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/GroupName" - }, - { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/GroupIdParam" } ], "responses": { "200": { - "description": "Returns a list of group objects", + "description": "Returns the deleted group object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Group" - }, - "description": "A list of group objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/Group" } } } @@ -21535,91 +20894,40 @@ } } } - }, - "options": { - "operationId": "optionsGroup", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/group`)", - "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/group/{group_id}": { - "get": { - "operationId": "getGroupId", + "/v1/project_group": { + "post": { "tags": [ - "Groups" + "ProjectGroups" ], - "description": "Get a group object by its id", - "summary": "Get group", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/GroupIdParam" + "operationId": "postProjectGroup", + "description": "Create a new project group. If there is an existing project group with the same name as the one specified in the request, will return the existing project group unmodified", + "summary": "Create project group", + "requestBody": { + "description": "Any desired information about the new project group object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectGroup" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the group object", + "description": "Returns the new project group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Group" + "$ref": "#/components/schemas/ProjectGroup" } } } @@ -21708,42 +21016,37 @@ } } }, - "patch": { - "operationId": "patchGroupId", + "put": { "tags": [ - "Groups" + "ProjectGroups" ], - "description": "Partially update a group object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update group", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/GroupIdParam" - } - ], + "operationId": "putProjectGroup", + "description": "Create or replace project group. If there is an existing project group with the same name as the one specified in the request, will replace the existing project group with the provided fields", + "summary": "Create or replace project group", "requestBody": { - "description": "Fields to update", - "required": false, + "description": "Any desired information about the new project group object", + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchGroup" + "$ref": "#/components/schemas/CreateProjectGroup" } } } }, "responses": { "200": { - "description": "Returns the group object", + "description": "Returns the new project group object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Group" + "$ref": "#/components/schemas/ProjectGroup" } } } @@ -21832,13 +21135,13 @@ } } }, - "delete": { - "operationId": "deleteGroupId", + "get": { + "operationId": "getProjectGroup", "tags": [ - "Groups" + "ProjectGroups" ], - "description": "Delete a group object by its id", - "summary": "Delete group", + "description": "List out all project groups. The project groups are sorted by creation date, with the most recently-created project groups coming first", + "summary": "List project groups", "security": [ { "bearerAuth": [] @@ -21847,16 +21150,44 @@ ], "parameters": [ { - "$ref": "#/components/parameters/GroupIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/ProjectGroupName" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns the deleted group object", + "description": "Returns a list of project group objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Group" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectGroup" + }, + "description": "A list of project group objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -21944,98 +21275,30 @@ } } } - }, - "options": { - "operationId": "optionsGroupId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/group/{group_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/GroupIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/project_group": { - "post": { + "/v1/project_group/{project_group_id}": { + "get": { + "operationId": "getProjectGroupId", "tags": [ "ProjectGroups" ], + "description": "Get a project group object by its id", + "summary": "Get project group", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postProjectGroup", - "description": "Create a new project_group. If there is an existing project_group with the same name as the one specified in the request, will return the existing project_group unmodified", - "summary": "Create project_group", - "requestBody": { - "description": "Any desired information about the new project_group object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateProjectGroup" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/ProjectGroupIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new project_group object", + "description": "Returns the project group object", "content": { "application/json": { "schema": { @@ -22128,33 +21391,38 @@ } } }, - "put": { + "patch": { + "operationId": "patchProjectGroupId", "tags": [ "ProjectGroups" ], + "description": "Partially update a project group object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update project group", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putProjectGroup", - "description": "Create or replace project_group. If there is an existing project_group with the same name as the one specified in the request, will replace the existing project_group with the provided fields", - "summary": "Create or replace project_group", + "parameters": [ + { + "$ref": "#/components/parameters/ProjectGroupIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new project_group object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProjectGroup" + "$ref": "#/components/schemas/PatchProjectGroup" } } } }, "responses": { "200": { - "description": "Returns the new project_group object", + "description": "Returns the project group object", "content": { "application/json": { "schema": { @@ -22247,13 +21515,13 @@ } } }, - "get": { - "operationId": "getProjectGroup", + "delete": { + "operationId": "deleteProjectGroupId", "tags": [ "ProjectGroups" ], - "description": "List out all project_groups. The project_groups are sorted by creation date, with the most recently-created project_groups coming first", - "summary": "List project_groups", + "description": "Delete a project group object by its id", + "summary": "Delete project group", "security": [ { "bearerAuth": [] @@ -22262,44 +21530,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/ProjectGroupName" - }, - { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/ProjectGroupIdParam" } ], "responses": { "200": { - "description": "Returns a list of project_group objects", + "description": "Returns the deleted project group object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectGroup" - }, - "description": "A list of project_group objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/ProjectGroup" } } } @@ -22387,91 +21627,40 @@ } } } - }, - "options": { - "operationId": "optionsProjectGroup", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_group`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/project_group/{project_group_id}": { - "get": { - "operationId": "getProjectGroupId", + "/v1/acl": { + "post": { "tags": [ - "ProjectGroups" + "Acls" ], - "description": "Get a project_group object by its id", - "summary": "Get project_group", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectGroupIdParam" + "operationId": "postAcl", + "description": "Create a new ACL. If there is an existing ACL with the same contents as the one specified in the request, will return the existing ACL unmodified", + "summary": "Create ACL", + "requestBody": { + "description": "Any desired information about the new ACL object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AclItem" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the project_group object", + "description": "Returns the new ACL object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectGroup" + "$ref": "#/components/schemas/Acl" } } } @@ -22560,42 +21749,37 @@ } } }, - "patch": { - "operationId": "patchProjectGroupId", + "delete": { + "operationId": "deleteAcl", "tags": [ - "ProjectGroups" + "Acls" ], - "description": "Partially update a project_group object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update project_group", + "description": "Delete a single ACL", + "summary": "Delete single ACL", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectGroupIdParam" - } - ], "requestBody": { - "description": "Fields to update", - "required": false, + "description": "Parameters which uniquely specify the ACL to delete", + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchProjectGroup" + "$ref": "#/components/schemas/AclItem" } } } }, "responses": { "200": { - "description": "Returns the project_group object", + "description": "Returns the deleted ACL object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectGroup" + "$ref": "#/components/schemas/Acl" } } } @@ -22684,13 +21868,13 @@ } } }, - "delete": { - "operationId": "deleteProjectGroupId", + "get": { + "operationId": "getAcl", "tags": [ - "ProjectGroups" + "Acls" ], - "description": "Delete a project_group object by its id", - "summary": "Delete project_group", + "description": "List out all ACLs. The ACLs are sorted by creation date, with the most recently-created ACLs coming first", + "summary": "List ACLs", "security": [ { "bearerAuth": [] @@ -22699,16 +21883,59 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectGroupIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/AclObjectType" + }, + { + "$ref": "#/components/parameters/AclObjectId" + }, + { + "$ref": "#/components/parameters/AclListUserId" + }, + { + "$ref": "#/components/parameters/AclListGroupId" + }, + { + "$ref": "#/components/parameters/AclListPermission" + }, + { + "$ref": "#/components/parameters/AclListRestrictObjectType" + }, + { + "$ref": "#/components/parameters/AclListRoleId" } ], "responses": { "200": { - "description": "Returns the deleted project_group object", + "description": "Returns a list of ACL objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectGroup" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Acl" + }, + "description": "A list of ACL objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -22796,98 +22023,30 @@ } } } - }, - "options": { - "operationId": "optionsProjectGroupId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_group/{project_group_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectGroupIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/acl": { - "post": { + "/v1/acl/{acl_id}": { + "get": { + "operationId": "getAclId", "tags": [ "Acls" ], + "description": "Get an ACL object by its id", + "summary": "Get ACL", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postAcl", - "description": "Create a new acl. If there is an existing acl with the same contents as the one specified in the request, will return the existing acl unmodified", - "summary": "Create acl", - "requestBody": { - "description": "Any desired information about the new acl object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AclItem" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/AclIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new acl object", + "description": "Returns the ACL object", "content": { "application/json": { "schema": { @@ -22981,32 +22140,26 @@ } }, "delete": { - "operationId": "deleteAcl", + "operationId": "deleteAclId", "tags": [ "Acls" ], - "description": "Delete a single acl", - "summary": "Delete single acl", + "description": "Delete an ACL object by its id", + "summary": "Delete ACL", "security": [ { "bearerAuth": [] }, {} ], - "requestBody": { - "description": "Parameters which uniquely specify the acl to delete", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AclItem" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/AclIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the deleted acl object", + "description": "Returns the deleted ACL object", "content": { "application/json": { "schema": { @@ -23098,75 +22251,40 @@ } } } - }, - "get": { - "operationId": "getAcl", + } + }, + "/v1/acl/batch_update": { + "post": { + "operationId": "aclBatchUpdate", "tags": [ "Acls" ], - "description": "List out all acls. The acls are sorted by creation date, with the most recently-created acls coming first", - "summary": "List acls", + "description": "Batch update ACLs. This operation is idempotent, so adding ACLs which already exist will have no effect, and removing ACLs which do not exist will have no effect.", + "summary": "Batch update ACLs", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/AclObjectType" - }, - { - "$ref": "#/components/parameters/AclObjectId" - }, - { - "$ref": "#/components/parameters/AclListUserId" - }, - { - "$ref": "#/components/parameters/AclListGroupId" - }, - { - "$ref": "#/components/parameters/AclListPermission" - }, - { - "$ref": "#/components/parameters/AclListRestrictObjectType" - }, - { - "$ref": "#/components/parameters/AclListRoleId" + "requestBody": { + "description": "Acls to add/remove.", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AclBatchUpdateRequest" + } + } } - ], + }, "responses": { "200": { - "description": "Returns a list of acl objects", + "description": "A success status", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Acl" - }, - "description": "A list of acl objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/AclBatchUpdateResponse" } } } @@ -23254,73 +22372,16 @@ } } } - }, - "options": { - "operationId": "optionsAcl", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/acl`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/acl/{acl_id}": { + "/v1/acl/list_org": { "get": { - "operationId": "getAclId", + "operationId": "aclListOrg", "tags": [ "Acls" ], - "description": "Get an acl object by its id", - "summary": "Get acl", + "description": "List all ACLs in the org. This query requires the caller to have `read_acls` permission at the organization level", + "summary": "List org ACLs", "security": [ { "bearerAuth": [] @@ -23329,16 +22390,52 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AclIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/AclListOrgObjectType" + }, + { + "$ref": "#/components/parameters/AclListOrgObjectId" + }, + { + "$ref": "#/components/parameters/AclListUserId" + }, + { + "$ref": "#/components/parameters/AclListGroupId" + }, + { + "$ref": "#/components/parameters/AclListPermission" + }, + { + "$ref": "#/components/parameters/AclListRestrictObjectType" + }, + { + "$ref": "#/components/parameters/AclListRoleId" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns the acl object", + "description": "A list of ACLs", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Acl" + "type": "array", + "items": { + "$ref": "#/components/schemas/Acl" + } } } } @@ -23426,14 +22523,16 @@ } } } - }, - "delete": { - "operationId": "deleteAclId", + } + }, + "/v1/user": { + "get": { + "operationId": "getUser", "tags": [ - "Acls" + "Users" ], - "description": "Delete an acl object by its id", - "summary": "Delete acl", + "description": "List out all users. The users are sorted by creation date, with the most recently-created users coming first", + "summary": "List users", "security": [ { "bearerAuth": [] @@ -23442,16 +22541,50 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AclIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/UserGivenName" + }, + { + "$ref": "#/components/parameters/UserFamilyName" + }, + { + "$ref": "#/components/parameters/UserEmail" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns the deleted acl object", + "description": "Returns a list of user objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Acl" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + }, + "description": "A list of user objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -23539,102 +22672,34 @@ } } } - }, - "options": { - "operationId": "optionsAclId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/acl/{acl_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/AclIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/acl/batch_update": { - "post": { - "operationId": "aclBatchUpdate", + "/v1/user/{user_id}": { + "get": { + "operationId": "getUserId", "tags": [ - "Acls" + "Users" ], - "description": "Batch update acls. This operation is idempotent, so adding acls which already exist will have no effect, and removing acls which do not exist will have no effect.", - "summary": "Batch update acls", + "description": "Get a user object by its id", + "summary": "Get user", "security": [ { "bearerAuth": [] }, {} ], - "requestBody": { - "description": "Acls to add/remove.", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AclBatchUpdateRequest" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/UserIdParam" } - }, + ], "responses": { "200": { - "description": "A success status", + "description": "Returns the user object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AclBatchUpdateResponse" + "$ref": "#/components/schemas/User" } } } @@ -23724,68 +22789,38 @@ } } }, - "/v1/acl/list_org": { - "get": { - "operationId": "aclListOrg", + "/v1/agent": { + "post": { "tags": [ - "Acls" + "Agents" ], - "description": "List all acls in the org. This query requires the caller to have `read_acls` permission at the organization level", - "summary": "List org acls", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/AclListOrgObjectType" - }, - { - "$ref": "#/components/parameters/AclListOrgObjectId" - }, - { - "$ref": "#/components/parameters/AclListUserId" - }, - { - "$ref": "#/components/parameters/AclListGroupId" - }, - { - "$ref": "#/components/parameters/AclListPermission" - }, - { - "$ref": "#/components/parameters/AclListRestrictObjectType" - }, - { - "$ref": "#/components/parameters/AclListRoleId" - }, - { - "$ref": "#/components/parameters/OrgName" + "operationId": "postAgent", + "description": "Create a new agent. If there is an existing agent with the same name as the one specified in the request, will return the existing agent unmodified", + "summary": "Create agent", + "requestBody": { + "description": "Any desired information about the new agent object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgent" + } + } } - ], + }, "responses": { "200": { - "description": "A list of acls", + "description": "Returns the new agent object", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Acl" - } + "$ref": "#/components/schemas/Agent" } } } @@ -23874,48 +22909,73 @@ } } }, - "options": { - "operationId": "optionsAclListOrg", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/acl/list_org`)", - "security": [], + "put": { "tags": [ - "CORS" + "Agents" + ], + "security": [ + { + "bearerAuth": [] + }, + {} ], + "operationId": "putAgent", + "description": "Create or replace agent. If there is an existing agent with the same name as the one specified in the request, will replace the existing agent with the provided fields", + "summary": "Create or replace agent", + "requestBody": { + "description": "Any desired information about the new agent object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAgent" + } + } + } + }, "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns the new agent object", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Agent" } - }, - "Access-Control-Allow-Headers": { + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { "schema": { - "type": "string" + "nullable": true } - }, - "Access-Control-Allow-Origin": { + } + } + }, + "401": { + "description": "No valid API key provided", + "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", + "403": { + "description": "The API key doesn’t have permissions to perform the request", "content": { "text/plain": { "schema": { @@ -23928,53 +22988,31 @@ } } } - } - } - } - }, - "/v1/acl/acl/batch_update": { - "options": { - "operationId": "optionsAclBatchUpdate", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/acl/acl/batch_update`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { + "Retry-After": { "schema": { "type": "string" } - }, - "Access-Control-Allow-Origin": { + } + }, + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { "schema": { - "type": "string" + "nullable": true } } - }, - "content": {} + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -23989,16 +23027,14 @@ } } } - } - }, - "/v1/user": { + }, "get": { - "operationId": "getUser", + "operationId": "getAgent", "tags": [ - "Users" + "Agents" ], - "description": "List out all users. The users are sorted by creation date, with the most recently-created users coming first", - "summary": "List users", + "description": "List out all agents. The agents are sorted by creation date, with the most recently-created agents coming first", + "summary": "List agents", "security": [ { "bearerAuth": [] @@ -24019,13 +23055,7 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/UserGivenName" - }, - { - "$ref": "#/components/parameters/UserFamilyName" - }, - { - "$ref": "#/components/parameters/UserEmail" + "$ref": "#/components/parameters/AgentName" }, { "$ref": "#/components/parameters/OrgName" @@ -24033,7 +23063,7 @@ ], "responses": { "200": { - "description": "Returns a list of user objects", + "description": "Returns a list of agent objects", "content": { "application/json": { "schema": { @@ -24042,9 +23072,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/Agent" }, - "description": "A list of user objects" + "description": "A list of agent objects" } }, "required": [ @@ -24138,73 +23168,16 @@ } } } - }, - "options": { - "operationId": "optionsUser", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/user`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, - "/v1/user/{user_id}": { + "/v1/agent/{agent_id}": { "get": { - "operationId": "getUserId", + "operationId": "getAgentId", "tags": [ - "Users" + "Agents" ], - "description": "Get a user object by its id", - "summary": "Get user", + "description": "Get an agent object by its id", + "summary": "Get agent", "security": [ { "bearerAuth": [] @@ -24213,16 +23186,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/UserIdParam" + "$ref": "#/components/parameters/AgentIdParam" } ], "responses": { "200": { - "description": "Returns the user object", + "description": "Returns the agent object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/Agent" } } } @@ -24311,97 +23284,38 @@ } } }, - "options": { - "operationId": "optionsUserId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/user/{user_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/UserIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/agent": { - "post": { + "patch": { + "operationId": "patchAgentId", "tags": [ "Agents" ], + "description": "Partially update an agent object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update agent", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postAgent", - "description": "Create a new agent. If there is an existing agent with the same name as the one specified in the request, will return the existing agent unmodified", - "summary": "Create agent", + "parameters": [ + { + "$ref": "#/components/parameters/AgentIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new agent object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateAgent" + "$ref": "#/components/schemas/PatchAgent" } } } }, "responses": { "200": { - "description": "Returns the new agent object", + "description": "Returns the agent object", "content": { "application/json": { "schema": { @@ -24494,33 +23408,27 @@ } } }, - "put": { + "delete": { + "operationId": "deleteAgentId", "tags": [ "Agents" ], + "description": "Delete an agent object by its id", + "summary": "Delete agent", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putAgent", - "description": "Create or replace agent. If there is an existing agent with the same name as the one specified in the request, will replace the existing agent with the provided fields", - "summary": "Create or replace agent", - "requestBody": { - "description": "Any desired information about the new agent object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAgent" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/AgentIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new agent object", + "description": "Returns the deleted agent object", "content": { "application/json": { "schema": { @@ -24612,60 +23520,40 @@ } } } - }, - "get": { - "operationId": "getAgent", + } + }, + "/v1/project_automation": { + "post": { "tags": [ - "Agents" + "ProjectAutomations" ], - "description": "List out all agents. The agents are sorted by creation date, with the most recently-created agents coming first", - "summary": "List agents", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/AgentName" - }, - { - "$ref": "#/components/parameters/OrgName" + "operationId": "postProjectAutomation", + "description": "Create a new project automation. If there is an existing project automation with the same name as the one specified in the request, will return the existing project automation unmodified", + "summary": "Create project automation", + "requestBody": { + "description": "Any desired information about the new project automation object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectAutomation" + } + } } - ], + }, "responses": { "200": { - "description": "Returns a list of agent objects", + "description": "Returns the new project automation object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Agent" - }, - "description": "A list of agent objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/ProjectAutomation" } } } @@ -24754,90 +23642,37 @@ } } }, - "options": { - "operationId": "optionsAgent", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/agent`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/agent/{agent_id}": { - "get": { - "operationId": "getAgentId", + "put": { "tags": [ - "Agents" + "ProjectAutomations" ], - "description": "Get an agent object by its id", - "summary": "Get agent", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AgentIdParam" + "operationId": "putProjectAutomation", + "description": "Create or replace project automation. If there is an existing project automation with the same name as the one specified in the request, will replace the existing project automation with the provided fields", + "summary": "Create or replace project automation", + "requestBody": { + "description": "Any desired information about the new project automation object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectAutomation" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the agent object", + "description": "Returns the new project automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Agent" + "$ref": "#/components/schemas/ProjectAutomation" } } } @@ -24926,13 +23761,13 @@ } } }, - "patch": { - "operationId": "patchAgentId", + "get": { + "operationId": "getProjectAutomation", "tags": [ - "Agents" + "ProjectAutomations" ], - "description": "Partially update an agent object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update agent", + "description": "List out all project automations. The project automations are sorted by creation date, with the most recently-created project automations coming first", + "summary": "List project automations", "security": [ { "bearerAuth": [] @@ -24941,27 +23776,44 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AgentIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/ProjectAutomationName" + }, + { + "$ref": "#/components/parameters/OrgName" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchAgent" - } - } - } - }, "responses": { "200": { - "description": "Returns the agent object", + "description": "Returns a list of project automation objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Agent" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectAutomation" + }, + "description": "A list of project automation objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -25049,14 +23901,16 @@ } } } - }, - "delete": { - "operationId": "deleteAgentId", + } + }, + "/v1/project_automation/{project_automation_id}": { + "get": { + "operationId": "getProjectAutomationId", "tags": [ - "Agents" + "ProjectAutomations" ], - "description": "Delete an agent object by its id", - "summary": "Delete agent", + "description": "Get a project automation object by its id", + "summary": "Get project automation", "security": [ { "bearerAuth": [] @@ -25065,16 +23919,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AgentIdParam" + "$ref": "#/components/parameters/ProjectAutomationIdParam" } ], "responses": { "200": { - "description": "Returns the deleted agent object", + "description": "Returns the project automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Agent" + "$ref": "#/components/schemas/ProjectAutomation" } } } @@ -25163,97 +24017,38 @@ } } }, - "options": { - "operationId": "optionsAgentId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/agent/{agent_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/AgentIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/project_automation": { - "post": { + "patch": { + "operationId": "patchProjectAutomationId", "tags": [ "ProjectAutomations" ], + "description": "Partially update a project automation object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update project automation", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postProjectAutomation", - "description": "Create a new project_automation. If there is an existing project_automation with the same name as the one specified in the request, will return the existing project_automation unmodified", - "summary": "Create project_automation", + "parameters": [ + { + "$ref": "#/components/parameters/ProjectAutomationIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new project_automation object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProjectAutomation" + "$ref": "#/components/schemas/PatchProjectAutomation" } } } }, "responses": { "200": { - "description": "Returns the new project_automation object", + "description": "Returns the project automation object", "content": { "application/json": { "schema": { @@ -25346,33 +24141,27 @@ } } }, - "put": { + "delete": { + "operationId": "deleteProjectAutomationId", "tags": [ "ProjectAutomations" ], + "description": "Delete a project automation object by its id", + "summary": "Delete project automation", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putProjectAutomation", - "description": "Create or replace project_automation. If there is an existing project_automation with the same name as the one specified in the request, will replace the existing project_automation with the provided fields", - "summary": "Create or replace project_automation", - "requestBody": { - "description": "Any desired information about the new project_automation object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateProjectAutomation" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/ProjectAutomationIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new project_automation object", + "description": "Returns the deleted project automation object", "content": { "application/json": { "schema": { @@ -25464,60 +24253,40 @@ } } } - }, - "get": { - "operationId": "getProjectAutomation", + } + }, + "/v1/org_automation": { + "post": { "tags": [ - "ProjectAutomations" + "OrgAutomations" ], - "description": "List out all project_automations. The project_automations are sorted by creation date, with the most recently-created project_automations coming first", - "summary": "List project_automations", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/ProjectAutomationName" - }, - { - "$ref": "#/components/parameters/OrgName" + "operationId": "postOrgAutomation", + "description": "Create a new org automation. If there is an existing org automation with the same name as the one specified in the request, will return the existing org automation unmodified", + "summary": "Create org automation", + "requestBody": { + "description": "Any desired information about the new org automation object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrgAutomation" + } + } } - ], + }, "responses": { "200": { - "description": "Returns a list of project_automation objects", + "description": "Returns the new org automation object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectAutomation" - }, - "description": "A list of project_automation objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/OrgAutomation" } } } @@ -25606,90 +24375,37 @@ } } }, - "options": { - "operationId": "optionsProjectAutomation", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_automation`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/project_automation/{project_automation_id}": { - "get": { - "operationId": "getProjectAutomationId", + "put": { "tags": [ - "ProjectAutomations" + "OrgAutomations" ], - "description": "Get a project_automation object by its id", - "summary": "Get project_automation", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectAutomationIdParam" + "operationId": "putOrgAutomation", + "description": "Create or replace org automation. If there is an existing org automation with the same name as the one specified in the request, will replace the existing org automation with the provided fields", + "summary": "Create or replace org automation", + "requestBody": { + "description": "Any desired information about the new org automation object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrgAutomation" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the project_automation object", + "description": "Returns the new org automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectAutomation" + "$ref": "#/components/schemas/OrgAutomation" } } } @@ -25778,13 +24494,13 @@ } } }, - "patch": { - "operationId": "patchProjectAutomationId", + "get": { + "operationId": "getOrgAutomation", "tags": [ - "ProjectAutomations" + "OrgAutomations" ], - "description": "Partially update a project_automation object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update project_automation", + "description": "List out all org automations. The org automations are sorted by creation date, with the most recently-created org automations coming first", + "summary": "List org automations", "security": [ { "bearerAuth": [] @@ -25793,27 +24509,44 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectAutomationIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/OrgAutomationName" + }, + { + "$ref": "#/components/parameters/OrgName" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchProjectAutomation" - } - } - } - }, "responses": { "200": { - "description": "Returns the project_automation object", + "description": "Returns a list of org automation objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectAutomation" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrgAutomation" + }, + "description": "A list of org automation objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -25901,14 +24634,16 @@ } } } - }, - "delete": { - "operationId": "deleteProjectAutomationId", + } + }, + "/v1/org_automation/{org_automation_id}": { + "get": { + "operationId": "getOrgAutomationId", "tags": [ - "ProjectAutomations" + "OrgAutomations" ], - "description": "Delete a project_automation object by its id", - "summary": "Delete project_automation", + "description": "Get an org automation object by its id", + "summary": "Get org automation", "security": [ { "bearerAuth": [] @@ -25917,16 +24652,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectAutomationIdParam" + "$ref": "#/components/parameters/OrgAutomationIdParam" } ], "responses": { "200": { - "description": "Returns the deleted project_automation object", + "description": "Returns the org automation object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectAutomation" + "$ref": "#/components/schemas/OrgAutomation" } } } @@ -26015,97 +24750,38 @@ } } }, - "options": { - "operationId": "optionsProjectAutomationId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_automation/{project_automation_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectAutomationIdParam" - } - ], - "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/org_automation": { - "post": { + "patch": { + "operationId": "patchOrgAutomationId", "tags": [ "OrgAutomations" ], + "description": "Partially update an org automation object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update org automation", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postOrgAutomation", - "description": "Create a new org_automation. If there is an existing org_automation with the same name as the one specified in the request, will return the existing org_automation unmodified", - "summary": "Create org_automation", + "parameters": [ + { + "$ref": "#/components/parameters/OrgAutomationIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new org_automation object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateOrgAutomation" + "$ref": "#/components/schemas/PatchOrgAutomation" } } } }, "responses": { "200": { - "description": "Returns the new org_automation object", + "description": "Returns the org automation object", "content": { "application/json": { "schema": { @@ -26198,33 +24874,27 @@ } } }, - "put": { + "delete": { + "operationId": "deleteOrgAutomationId", "tags": [ "OrgAutomations" ], + "description": "Delete an org automation object by its id", + "summary": "Delete org automation", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putOrgAutomation", - "description": "Create or replace org_automation. If there is an existing org_automation with the same name as the one specified in the request, will replace the existing org_automation with the provided fields", - "summary": "Create or replace org_automation", - "requestBody": { - "description": "Any desired information about the new org_automation object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrgAutomation" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/OrgAutomationIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new org_automation object", + "description": "Returns the deleted org automation object", "content": { "application/json": { "schema": { @@ -26316,60 +24986,40 @@ } } } - }, - "get": { - "operationId": "getOrgAutomation", + } + }, + "/v1/project_score": { + "post": { "tags": [ - "OrgAutomations" + "ProjectScores" ], - "description": "List out all org_automations. The org_automations are sorted by creation date, with the most recently-created org_automations coming first", - "summary": "List org_automations", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/OrgAutomationName" - }, - { - "$ref": "#/components/parameters/OrgName" + "operationId": "postProjectScore", + "description": "Create a new project score. If there is an existing project score in the project with the same name as the one specified in the request, will return the existing project score unmodified", + "summary": "Create project score", + "requestBody": { + "description": "Any desired information about the new project score object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectScore" + } + } } - ], + }, "responses": { "200": { - "description": "Returns a list of org_automation objects", + "description": "Returns the new project score object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OrgAutomation" - }, - "description": "A list of org_automation objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/ProjectScore" } } } @@ -26458,90 +25108,37 @@ } } }, - "options": { - "operationId": "optionsOrgAutomation", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/org_automation`)", - "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/org_automation/{org_automation_id}": { - "get": { - "operationId": "getOrgAutomationId", + "put": { "tags": [ - "OrgAutomations" + "ProjectScores" ], - "description": "Get an org_automation object by its id", - "summary": "Get org_automation", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/OrgAutomationIdParam" + "operationId": "putProjectScore", + "description": "Create or replace project score. If there is an existing project score in the project with the same name as the one specified in the request, will replace the existing project score with the provided fields", + "summary": "Create or replace project score", + "requestBody": { + "description": "Any desired information about the new project score object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectScore" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the org_automation object", + "description": "Returns the new project score object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrgAutomation" + "$ref": "#/components/schemas/ProjectScore" } } } @@ -26630,13 +25227,13 @@ } } }, - "patch": { - "operationId": "patchOrgAutomationId", + "get": { + "operationId": "getProjectScore", "tags": [ - "OrgAutomations" + "ProjectScores" ], - "description": "Partially update an org_automation object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update org_automation", + "description": "List out all project scores. The project scores are sorted by creation date, with the most recently-created project scores coming first", + "summary": "List project scores", "security": [ { "bearerAuth": [] @@ -26645,27 +25242,53 @@ ], "parameters": [ { - "$ref": "#/components/parameters/OrgAutomationIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/ProjectScoreName" + }, + { + "$ref": "#/components/parameters/ProjectName" + }, + { + "$ref": "#/components/parameters/ProjectIdQuery" + }, + { + "$ref": "#/components/parameters/OrgName" + }, + { + "$ref": "#/components/parameters/ProjectScoreType" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchOrgAutomation" - } - } - } - }, "responses": { "200": { - "description": "Returns the org_automation object", + "description": "Returns a list of project score objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrgAutomation" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectScore" + }, + "description": "A list of project score objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -26753,14 +25376,16 @@ } } } - }, - "delete": { - "operationId": "deleteOrgAutomationId", + } + }, + "/v1/project_score/{project_score_id}": { + "get": { + "operationId": "getProjectScoreId", "tags": [ - "OrgAutomations" + "ProjectScores" ], - "description": "Delete an org_automation object by its id", - "summary": "Delete org_automation", + "description": "Get a project score object by its id", + "summary": "Get project score", "security": [ { "bearerAuth": [] @@ -26769,16 +25394,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/OrgAutomationIdParam" + "$ref": "#/components/parameters/ProjectScoreIdParam" } ], "responses": { "200": { - "description": "Returns the deleted org_automation object", + "description": "Returns the project score object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrgAutomation" + "$ref": "#/components/schemas/ProjectScore" } } } @@ -26867,97 +25492,38 @@ } } }, - "options": { - "operationId": "optionsOrgAutomationId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/org_automation/{org_automation_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrgAutomationIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/project_score": { - "post": { + "patch": { + "operationId": "patchProjectScoreId", "tags": [ "ProjectScores" ], + "description": "Partially update a project score object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update project score", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postProjectScore", - "description": "Create a new project_score. If there is an existing project_score in the project with the same name as the one specified in the request, will return the existing project_score unmodified", - "summary": "Create project_score", + "parameters": [ + { + "$ref": "#/components/parameters/ProjectScoreIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new project_score object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProjectScore" + "$ref": "#/components/schemas/PatchProjectScore" } } } }, "responses": { "200": { - "description": "Returns the new project_score object", + "description": "Returns the project score object", "content": { "application/json": { "schema": { @@ -27050,33 +25616,27 @@ } } }, - "put": { + "delete": { + "operationId": "deleteProjectScoreId", "tags": [ "ProjectScores" ], + "description": "Delete a project score object by its id", + "summary": "Delete project score", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putProjectScore", - "description": "Create or replace project_score. If there is an existing project_score in the project with the same name as the one specified in the request, will replace the existing project_score with the provided fields", - "summary": "Create or replace project_score", - "requestBody": { - "description": "Any desired information about the new project_score object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateProjectScore" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/ProjectScoreIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new project_score object", + "description": "Returns the deleted project score object", "content": { "application/json": { "schema": { @@ -27168,69 +25728,40 @@ } } } - }, - "get": { - "operationId": "getProjectScore", + } + }, + "/v1/project_tag": { + "post": { "tags": [ - "ProjectScores" + "ProjectTags" ], - "description": "List out all project_scores. The project_scores are sorted by creation date, with the most recently-created project_scores coming first", - "summary": "List project_scores", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/ProjectScoreName" - }, - { - "$ref": "#/components/parameters/ProjectName" - }, - { - "$ref": "#/components/parameters/ProjectIdQuery" - }, - { - "$ref": "#/components/parameters/OrgName" - }, - { - "$ref": "#/components/parameters/ProjectScoreType" + "operationId": "postProjectTag", + "description": "Create a new project tag. If there is an existing project tag in the project with the same name as the one specified in the request, will return the existing project tag unmodified", + "summary": "Create project tag", + "requestBody": { + "description": "Any desired information about the new project tag object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectTag" + } + } } - ], + }, "responses": { "200": { - "description": "Returns a list of project_score objects", + "description": "Returns the new project tag object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectScore" - }, - "description": "A list of project_score objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/ProjectTag" } } } @@ -27319,90 +25850,37 @@ } } }, - "options": { - "operationId": "optionsProjectScore", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_score`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/project_score/{project_score_id}": { - "get": { - "operationId": "getProjectScoreId", + "put": { "tags": [ - "ProjectScores" + "ProjectTags" ], - "description": "Get a project_score object by its id", - "summary": "Get project_score", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectScoreIdParam" + "operationId": "putProjectTag", + "description": "Create or replace project tag. If there is an existing project tag in the project with the same name as the one specified in the request, will replace the existing project tag with the provided fields", + "summary": "Create or replace project tag", + "requestBody": { + "description": "Any desired information about the new project tag object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProjectTag" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the project_score object", + "description": "Returns the new project tag object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectScore" + "$ref": "#/components/schemas/ProjectTag" } } } @@ -27491,13 +25969,13 @@ } } }, - "patch": { - "operationId": "patchProjectScoreId", + "get": { + "operationId": "getProjectTag", "tags": [ - "ProjectScores" + "ProjectTags" ], - "description": "Partially update a project_score object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update project_score", + "description": "List out all project tags. The project tags are sorted by creation date, with the most recently-created project tags coming first", + "summary": "List project tags", "security": [ { "bearerAuth": [] @@ -27506,27 +25984,50 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectScoreIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/ProjectTagName" + }, + { + "$ref": "#/components/parameters/ProjectName" + }, + { + "$ref": "#/components/parameters/ProjectIdQuery" + }, + { + "$ref": "#/components/parameters/OrgName" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchProjectScore" - } - } - } - }, "responses": { "200": { - "description": "Returns the project_score object", + "description": "Returns a list of project tag objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectScore" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProjectTag" + }, + "description": "A list of project tag objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -27614,14 +26115,16 @@ } } } - }, - "delete": { - "operationId": "deleteProjectScoreId", + } + }, + "/v1/project_tag/{project_tag_id}": { + "get": { + "operationId": "getProjectTagId", "tags": [ - "ProjectScores" + "ProjectTags" ], - "description": "Delete a project_score object by its id", - "summary": "Delete project_score", + "description": "Get a project tag object by its id", + "summary": "Get project tag", "security": [ { "bearerAuth": [] @@ -27630,16 +26133,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectScoreIdParam" + "$ref": "#/components/parameters/ProjectTagIdParam" } ], "responses": { "200": { - "description": "Returns the deleted project_score object", + "description": "Returns the project tag object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectScore" + "$ref": "#/components/schemas/ProjectTag" } } } @@ -27728,97 +26231,38 @@ } } }, - "options": { - "operationId": "optionsProjectScoreId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_score/{project_score_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectScoreIdParam" - } - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/project_tag": { - "post": { + "patch": { + "operationId": "patchProjectTagId", "tags": [ "ProjectTags" ], + "description": "Partially update a project tag object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update project tag", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postProjectTag", - "description": "Create a new project_tag. If there is an existing project_tag in the project with the same name as the one specified in the request, will return the existing project_tag unmodified", - "summary": "Create project_tag", + "parameters": [ + { + "$ref": "#/components/parameters/ProjectTagIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new project_tag object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProjectTag" + "$ref": "#/components/schemas/PatchProjectTag" } } } }, "responses": { "200": { - "description": "Returns the new project_tag object", + "description": "Returns the project tag object", "content": { "application/json": { "schema": { @@ -27911,33 +26355,27 @@ } } }, - "put": { + "delete": { + "operationId": "deleteProjectTagId", "tags": [ "ProjectTags" ], + "description": "Delete a project tag object by its id", + "summary": "Delete project tag", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putProjectTag", - "description": "Create or replace project_tag. If there is an existing project_tag in the project with the same name as the one specified in the request, will replace the existing project_tag with the provided fields", - "summary": "Create or replace project_tag", - "requestBody": { - "description": "Any desired information about the new project_tag object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateProjectTag" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/ProjectTagIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new project_tag object", + "description": "Returns the deleted project tag object", "content": { "application/json": { "schema": { @@ -28029,66 +26467,40 @@ } } } - }, - "get": { - "operationId": "getProjectTag", + } + }, + "/v1/span_iframe": { + "post": { "tags": [ - "ProjectTags" + "SpanIframes" ], - "description": "List out all project_tags. The project_tags are sorted by creation date, with the most recently-created project_tags coming first", - "summary": "List project_tags", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/ProjectTagName" - }, - { - "$ref": "#/components/parameters/ProjectName" - }, - { - "$ref": "#/components/parameters/ProjectIdQuery" - }, - { - "$ref": "#/components/parameters/OrgName" + "operationId": "postSpanIframe", + "description": "Create a new span iframe. If there is an existing span iframe with the same name as the one specified in the request, will return the existing span iframe unmodified", + "summary": "Create span iframe", + "requestBody": { + "description": "Any desired information about the new span iframe object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSpanIFrame" + } + } } - ], + }, "responses": { "200": { - "description": "Returns a list of project_tag objects", + "description": "Returns the new span iframe object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProjectTag" - }, - "description": "A list of project_tag objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/SpanIFrame" } } } @@ -28177,90 +26589,37 @@ } } }, - "options": { - "operationId": "optionsProjectTag", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_tag`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } - } - }, - "/v1/project_tag/{project_tag_id}": { - "get": { - "operationId": "getProjectTagId", + "put": { "tags": [ - "ProjectTags" + "SpanIframes" ], - "description": "Get a project_tag object by its id", - "summary": "Get project_tag", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectTagIdParam" + "operationId": "putSpanIframe", + "description": "Create or replace span iframe. If there is an existing span iframe with the same name as the one specified in the request, will replace the existing span iframe with the provided fields", + "summary": "Create or replace span iframe", + "requestBody": { + "description": "Any desired information about the new span iframe object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSpanIFrame" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the project_tag object", + "description": "Returns the new span iframe object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectTag" + "$ref": "#/components/schemas/SpanIFrame" } } } @@ -28349,13 +26708,13 @@ } } }, - "patch": { - "operationId": "patchProjectTagId", + "get": { + "operationId": "getSpanIframe", "tags": [ - "ProjectTags" + "SpanIframes" ], - "description": "Partially update a project_tag object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update project_tag", + "description": "List out all span iframes. The span iframes are sorted by creation date, with the most recently-created span iframes coming first", + "summary": "List span iframes", "security": [ { "bearerAuth": [] @@ -28364,27 +26723,44 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectTagIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/SpanIframeName" + }, + { + "$ref": "#/components/parameters/OrgName" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchProjectTag" - } - } - } - }, "responses": { "200": { - "description": "Returns the project_tag object", + "description": "Returns a list of span iframe objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectTag" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SpanIFrame" + }, + "description": "A list of span iframe objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -28472,14 +26848,16 @@ } } } - }, - "delete": { - "operationId": "deleteProjectTagId", + } + }, + "/v1/span_iframe/{span_iframe_id}": { + "get": { + "operationId": "getSpanIframeId", "tags": [ - "ProjectTags" + "SpanIframes" ], - "description": "Delete a project_tag object by its id", - "summary": "Delete project_tag", + "description": "Get a span iframe object by its id", + "summary": "Get span iframe", "security": [ { "bearerAuth": [] @@ -28488,16 +26866,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ProjectTagIdParam" + "$ref": "#/components/parameters/SpanIframeIdParam" } ], "responses": { "200": { - "description": "Returns the deleted project_tag object", + "description": "Returns the span iframe object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProjectTag" + "$ref": "#/components/schemas/SpanIFrame" } } } @@ -28586,97 +26964,38 @@ } } }, - "options": { - "operationId": "optionsProjectTagId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project_tag/{project_tag_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/ProjectTagIdParam" - } - ], - "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/span_iframe": { - "post": { + "patch": { + "operationId": "patchSpanIframeId", "tags": [ "SpanIframes" ], + "description": "Partially update a span iframe 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 span iframe", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "postSpanIframe", - "description": "Create a new span_iframe. If there is an existing span_iframe with the same name as the one specified in the request, will return the existing span_iframe unmodified", - "summary": "Create span_iframe", + "parameters": [ + { + "$ref": "#/components/parameters/SpanIframeIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new span_iframe object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateSpanIFrame" + "$ref": "#/components/schemas/PatchSpanIFrame" } } } }, "responses": { "200": { - "description": "Returns the new span_iframe object", + "description": "Returns the span iframe object", "content": { "application/json": { "schema": { @@ -28769,33 +27088,27 @@ } } }, - "put": { + "delete": { + "operationId": "deleteSpanIframeId", "tags": [ "SpanIframes" ], + "description": "Delete a span iframe object by its id", + "summary": "Delete span iframe", "security": [ { "bearerAuth": [] }, {} ], - "operationId": "putSpanIframe", - "description": "Create or replace span_iframe. If there is an existing span_iframe with the same name as the one specified in the request, will replace the existing span_iframe with the provided fields", - "summary": "Create or replace span_iframe", - "requestBody": { - "description": "Any desired information about the new span_iframe object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateSpanIFrame" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/SpanIframeIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new span_iframe object", + "description": "Returns the deleted span iframe object", "content": { "application/json": { "schema": { @@ -28887,60 +27200,40 @@ } } } - }, - "get": { - "operationId": "getSpanIframe", + } + }, + "/v1/function": { + "post": { "tags": [ - "SpanIframes" + "Functions" ], - "description": "List out all span_iframes. The span_iframes are sorted by creation date, with the most recently-created span_iframes coming first", - "summary": "List span_iframes", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/SpanIframeName" - }, - { - "$ref": "#/components/parameters/OrgName" + "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, a new version of the function will be appended and returned", + "summary": "Create function", + "requestBody": { + "description": "Any desired information about the new function object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFunction" + } + } } - ], + }, "responses": { "200": { - "description": "Returns a list of span_iframe objects", + "description": "Returns the new function object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SpanIFrame" - }, - "description": "A list of span_iframe objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/Function" } } } @@ -29029,90 +27322,37 @@ } } }, - "options": { - "operationId": "optionsSpanIframe", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/span_iframe`)", - "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/span_iframe/{span_iframe_id}": { - "get": { - "operationId": "getSpanIframeId", + "put": { "tags": [ - "SpanIframes" + "Functions" ], - "description": "Get a span_iframe object by its id", - "summary": "Get span_iframe", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/SpanIframeIdParam" + "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, a new version of the function will be appended and returned", + "summary": "Create or replace function", + "requestBody": { + "description": "Any desired information about the new function object", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFunction" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the span_iframe object", + "description": "Returns the new function object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SpanIFrame" + "$ref": "#/components/schemas/Function" } } } @@ -29201,13 +27441,13 @@ } } }, - "patch": { - "operationId": "patchSpanIframeId", + "get": { + "operationId": "getFunction", "tags": [ - "SpanIframes" + "Functions" ], - "description": "Partially update a span_iframe 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 span_iframe", + "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": [] @@ -29216,27 +27456,59 @@ ], "parameters": [ { - "$ref": "#/components/parameters/SpanIframeIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$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" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchSpanIFrame" - } - } - } - }, "responses": { "200": { - "description": "Returns the span_iframe object", + "description": "Returns a list of function objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SpanIFrame" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Function" + }, + "description": "A list of function objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -29324,14 +27596,16 @@ } } } - }, - "delete": { - "operationId": "deleteSpanIframeId", + } + }, + "/v1/function/{function_id}": { + "get": { + "operationId": "getFunctionId", "tags": [ - "SpanIframes" + "Functions" ], - "description": "Delete a span_iframe object by its id", - "summary": "Delete span_iframe", + "description": "Get a function object by its id", + "summary": "Get function", "security": [ { "bearerAuth": [] @@ -29340,16 +27614,22 @@ ], "parameters": [ { - "$ref": "#/components/parameters/SpanIframeIdParam" + "$ref": "#/components/parameters/FunctionIdParam" + }, + { + "$ref": "#/components/parameters/PromptVersion" + }, + { + "$ref": "#/components/parameters/PromptEnvironment" } ], "responses": { "200": { - "description": "Returns the deleted span_iframe object", + "description": "Returns the function object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SpanIFrame" + "$ref": "#/components/schemas/Function" } } } @@ -29438,97 +27718,38 @@ } } }, - "options": { - "operationId": "optionsSpanIframeId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/span_iframe/{span_iframe_id}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "$ref": "#/components/parameters/SpanIframeIdParam" - } - ], - "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/function": { - "post": { + "patch": { + "operationId": "patchFunctionId", "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 content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update 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, a new version of the function will be appended and returned", - "summary": "Create function", + "parameters": [ + { + "$ref": "#/components/parameters/FunctionIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new function object", - "required": true, + "description": "Fields to update", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateFunction" + "$ref": "#/components/schemas/PatchFunction" } } } }, "responses": { "200": { - "description": "Returns the new function object", + "description": "Returns the function object", "content": { "application/json": { "schema": { @@ -29621,33 +27842,27 @@ } } }, - "put": { + "delete": { + "operationId": "deleteFunctionId", "tags": [ "Functions" ], + "description": "Delete a function object by its id", + "summary": "Delete function", "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, a new version of the function will be appended and returned", - "summary": "Create or replace function", - "requestBody": { - "description": "Any desired information about the new function object", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFunction" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/FunctionIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new function object", + "description": "Returns the deleted function object", "content": { "application/json": { "schema": { @@ -29739,14 +27954,16 @@ } } } - }, - "get": { - "operationId": "getFunction", + } + }, + "/v1/function/{function_id}/invoke": { + "post": { + "operationId": "postFunctionIdInvoke", "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", + "description": "Run the specified function with the provided input and return its result. Use `version` to select a specific function version, `parent` to attach the call to a trace, and `stream` to receive results in the Braintrust SSE format.", + "summary": "Invoke function", "security": [ { "bearerAuth": [] @@ -29755,59 +27972,65 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$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/FunctionIdParam" + } + ], + "requestBody": { + "description": "Function invocation parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvokeApi" + } + } + } + }, + "responses": { + "200": { + "description": "Function invocation response. Scorer results follow the ScoreResult schema: a single score defaults to the function name when unnamed; arrays require a unique name for every score.", + "content": { + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/view": { + "post": { + "tags": [ + "Views" + ], + "security": [ { - "$ref": "#/components/parameters/PromptEnvironment" + "bearerAuth": [] }, - { - "$ref": "#/components/parameters/OrgName" - } + {} ], + "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": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateView" + } + } + } + }, "responses": { "200": { - "description": "Returns a list of function objects", + "description": "Returns the new view object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Function" - }, - "description": "A list of function objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/View" } } } @@ -29896,96 +28119,37 @@ } } }, - "options": { - "operationId": "optionsFunction", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/function`)", - "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/function/{function_id}": { - "get": { - "operationId": "getFunctionId", + "put": { "tags": [ - "Functions" + "Views" ], - "description": "Get a function object by its id", - "summary": "Get function", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/FunctionIdParam" - }, - { - "$ref": "#/components/parameters/PromptVersion" - }, - { - "$ref": "#/components/parameters/PromptEnvironment" + "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": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateView" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the function object", + "description": "Returns the new view object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/View" } } } @@ -30074,13 +28238,13 @@ } } }, - "patch": { - "operationId": "patchFunctionId", + "get": { + "operationId": "getView", "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": "List out all views. The views are sorted by creation date, with the most recently-created views coming first", + "summary": "List views", "security": [ { "bearerAuth": [] @@ -30089,27 +28253,50 @@ ], "parameters": [ { - "$ref": "#/components/parameters/FunctionIdParam" + "$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" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchFunction" - } - } - } - }, "responses": { "200": { - "description": "Returns the function object", + "description": "Returns a list of view objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/View" + }, + "description": "A list of view objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -30197,14 +28384,16 @@ } } } - }, - "delete": { - "operationId": "deleteFunctionId", + } + }, + "/v1/view/{view_id}": { + "get": { + "operationId": "getViewId", "tags": [ - "Functions" + "Views" ], - "description": "Delete a function object by its id", - "summary": "Delete function", + "description": "Get a view object by its id", + "summary": "Get view", "security": [ { "bearerAuth": [] @@ -30213,16 +28402,22 @@ ], "parameters": [ { - "$ref": "#/components/parameters/FunctionIdParam" + "$ref": "#/components/parameters/ViewIdParam" + }, + { + "$ref": "#/components/parameters/AclObjectType" + }, + { + "$ref": "#/components/parameters/AclObjectId" } ], "responses": { "200": { - "description": "Returns the deleted function object", + "description": "Returns the view object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/View" } } } @@ -30311,77 +28506,13 @@ } } }, - "options": { - "operationId": "optionsFunctionId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/function/{function_id}`)", - "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" - } - } - }, - "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/function/{function_id}/invoke": { - "post": { - "operationId": "postFunctionIdInvoke", + "patch": { + "operationId": "patchViewId", "tags": [ - "Functions" + "Views" ], - "description": "Invoke a function.", - "summary": "Invoke 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": [] @@ -30390,123 +28521,23 @@ ], "parameters": [ { - "$ref": "#/components/parameters/FunctionIdParam" - } - ], - "requestBody": { - "description": "Function invocation parameters", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvokeApi" - } - } - } - }, - "responses": { - "200": { - "description": "Function invocation response. Scorer results follow the ScoreResult schema: a single score defaults to the function name when unnamed; arrays require a unique name for every score.", - "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" - } - } - }, - "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 - } - } - } + "$ref": "#/components/parameters/ViewIdParam" } - } - } - }, - "/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", + "description": "Fields to update", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateView" + "$ref": "#/components/schemas/PatchView" } } } }, "responses": { "200": { - "description": "Returns the new view object", + "description": "Returns the view object", "content": { "application/json": { "schema": { @@ -30599,33 +28630,38 @@ } } }, - "put": { + "delete": { + "operationId": "deleteViewId", "tags": [ "Views" ], + "description": "Delete a view object by its id", + "summary": "Delete view", "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", + "parameters": [ + { + "$ref": "#/components/parameters/ViewIdParam" + } + ], "requestBody": { - "description": "Any desired information about the new view object", + "description": "Additional parameters for the delete operation", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateView" + "$ref": "#/components/schemas/DeleteView" } } } }, "responses": { "200": { - "description": "Returns the new view object", + "description": "Returns the deleted view object", "content": { "application/json": { "schema": { @@ -30717,14 +28753,16 @@ } } } - }, + } + }, + "/v1/organization": { "get": { - "operationId": "getView", + "operationId": "getOrganization", "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": "List out all organizations. The organizations are sorted by creation date, with the most recently-created organizations coming first", + "summary": "List organizations", "security": [ { "bearerAuth": [] @@ -30745,21 +28783,12 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/ViewName" - }, - { - "$ref": "#/components/parameters/ViewType" - }, - { - "$ref": "#/components/parameters/AclObjectType" - }, - { - "$ref": "#/components/parameters/AclObjectId" + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns a list of view objects", + "description": "Returns a list of organization objects", "content": { "application/json": { "schema": { @@ -30768,9 +28797,9 @@ "objects": { "type": "array", "items": { - "$ref": "#/components/schemas/View" + "$ref": "#/components/schemas/Organization" }, - "description": "A list of view objects" + "description": "A list of organization objects" } }, "required": [ @@ -30864,73 +28893,16 @@ } } } - }, - "options": { - "operationId": "optionsView", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/view`)", - "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/view/{view_id}": { + "/v1/organization/{organization_id}": { "get": { - "operationId": "getViewId", + "operationId": "getOrganizationId", "tags": [ - "Views" + "Organizations" ], - "description": "Get a view object by its id", - "summary": "Get view", + "description": "Get an organization object by its id", + "summary": "Get organization", "security": [ { "bearerAuth": [] @@ -30939,22 +28911,16 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ViewIdParam" - }, - { - "$ref": "#/components/parameters/AclObjectType" - }, - { - "$ref": "#/components/parameters/AclObjectId" + "$ref": "#/components/parameters/OrganizationIdParam" } ], "responses": { "200": { - "description": "Returns the view object", + "description": "Returns the organization object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/View" + "$ref": "#/components/schemas/Organization" } } } @@ -31044,12 +29010,12 @@ } }, "patch": { - "operationId": "patchViewId", + "operationId": "patchOrganizationId", "tags": [ - "Views" + "Organizations" ], - "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", + "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": [] @@ -31058,27 +29024,27 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ViewIdParam" + "$ref": "#/components/parameters/OrganizationIdParam" } ], "requestBody": { "description": "Fields to update", - "required": true, + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PatchView" + "$ref": "#/components/schemas/PatchOrganization" } } } }, "responses": { "200": { - "description": "Returns the view object", + "description": "Returns the organization object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/View" + "$ref": "#/components/schemas/Organization" } } } @@ -31166,43 +29132,40 @@ } } } - }, - "delete": { - "operationId": "deleteViewId", + } + }, + "/v1/organization/members": { + "patch": { + "operationId": "patchOrganizationMembers", "tags": [ - "Views" + "Organizations" ], - "description": "Delete a view object by its id", - "summary": "Delete view", + "description": "Add or remove members, create service accounts.", + "summary": "Modify organization membership", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ViewIdParam" - } - ], "requestBody": { - "description": "Additional parameters for the delete operation", - "required": true, + "description": "Members to add/remove", + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteView" + "$ref": "#/components/schemas/PatchOrganizationMembers" } } } }, "responses": { "200": { - "description": "Returns the deleted view object", + "description": "A success status", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/View" + "$ref": "#/components/schemas/PatchOrganizationMembersOutput" } } } @@ -31290,78 +29253,16 @@ } } } - }, - "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": { - "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": { + "/v1/organization/api_keys": { "get": { - "operationId": "getOrganization", + "operationId": "getOrganizationApiKeys", "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", + "description": "List all API keys associated with users in an organization, sorted by creation date with the newest keys first. An organization-scoped API key determines the organization; otherwise, provide `org_id`. If `org_id` does not match the organization-scoped key's organization, or the caller is not an owner of the organization, no keys are returned. Responses include key metadata only; key secrets are never returned. To list service tokens, use `GET /v1/service_token`.", + "summary": "List organization API keys", "security": [ { "bearerAuth": [] @@ -31370,7 +29271,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AppLimitParam" + "$ref": "#/components/parameters/AppLimitWithDefaultParam" }, { "$ref": "#/components/parameters/StartingAfter" @@ -31382,12 +29283,21 @@ "$ref": "#/components/parameters/Ids" }, { - "$ref": "#/components/parameters/OrgName" + "$ref": "#/components/parameters/ApiKeyName" + }, + { + "$ref": "#/components/parameters/OrgId" + }, + { + "$ref": "#/components/parameters/CreatedAfter" + }, + { + "$ref": "#/components/parameters/CreatedBefore" } ], "responses": { "200": { - "description": "Returns a list of organization objects", + "description": "Returns a list of api_key objects", "content": { "application/json": { "schema": { @@ -31396,9 +29306,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": [ @@ -31492,73 +29402,16 @@ } } } - }, - "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}": { + "/v1/api_key": { "get": { - "operationId": "getOrganizationId", + "operationId": "getApiKey", "tags": [ - "Organizations" + "ApiKeys" ], - "description": "Get an organization object by its id", - "summary": "Get organization", + "description": "List out all API keys. They are sorted by creation date, with the most recently-created keys coming first.\n\nTo create new API keys, visit [**Settings > API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI.", + "summary": "List API keys", "security": [ { "bearerAuth": [] @@ -31567,16 +29420,44 @@ ], "parameters": [ { - "$ref": "#/components/parameters/OrganizationIdParam" + "$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 organization object", + "description": "Returns a list of API key objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Organization" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiKey" + }, + "description": "A list of API key objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -31664,776 +29545,6 @@ } } } - }, - "patch": { - "operationId": "patchOrganizationId", - "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", - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "parameters": [ - { - "$ref": "#/components/parameters/OrganizationIdParam" - } - ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchOrganization" - } - } - } - }, - "responses": { - "200": { - "description": "Returns the organization object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Organization" - } - } - } - }, - "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": "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", - "tags": [ - "Organizations" - ], - "description": "Add or remove members, create service accounts.", - "summary": "Modify organization membership", - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "requestBody": { - "description": "Members to add/remove", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchOrganizationMembers" - } - } - } - }, - "responses": { - "200": { - "description": "A success status", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchOrganizationMembersOutput" - } - } - } - }, - "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": "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/organization/api_keys": { - "get": { - "operationId": "getOrganizationApiKeys", - "tags": [ - "Organizations" - ], - "description": "List all API keys associated with users in an organization, sorted by creation date with the newest keys first. An organization-scoped API key determines the organization; otherwise, provide `org_id`. If `org_id` does not match the organization-scoped key's organization, or the caller is not an owner of the organization, no keys are returned. Responses include key metadata only; key secrets are never returned. To list service tokens, use `GET /v1/service_token`.", - "summary": "List organization API keys", - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitWithDefaultParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/ApiKeyName" - }, - { - "$ref": "#/components/parameters/OrgId" - }, - { - "$ref": "#/components/parameters/CreatedAfter" - }, - { - "$ref": "#/components/parameters/CreatedBefore" - } - ], - "responses": { - "200": { - "description": "Returns a list of api_key objects", - "content": { - "application/json": { - "schema": { - "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", - "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": "optionsOrganizationApiKeys", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/organization/api_keys`)", - "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": { - "get": { - "operationId": "getApiKey", - "tags": [ - "ApiKeys" - ], - "description": "List out all API keys. They are sorted by creation date, with the most recently-created keys coming first.\n\nTo create new API keys, visit [**Settings > API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI.", - "summary": "List api_keys", - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "parameters": [ - { - "$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 a list of api_key objects", - "content": { - "application/json": { - "schema": { - "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", - "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": "optionsApiKey", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/api_key`)", - "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/{api_key_id}": { @@ -32442,121 +29553,8 @@ "tags": [ "ApiKeys" ], - "description": "Get an api_key object by its id", - "summary": "Get api_key", - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "parameters": [ - { - "$ref": "#/components/parameters/ApiKeyIdParam" - } - ], - "responses": { - "200": { - "description": "Returns the api_key object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKey" - } - } - } - }, - "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": "deleteApiKeyId", - "tags": [ - "ApiKeys" - ], - "description": "Delete an api_key object by its id", - "summary": "Delete api_key", + "description": "Get an API key object by its id", + "summary": "Get API key", "security": [ { "bearerAuth": [] @@ -32570,7 +29568,7 @@ ], "responses": { "200": { - "description": "Returns the deleted api_key object", + "description": "Returns the API key object", "content": { "application/json": { "schema": { @@ -32663,272 +29661,31 @@ } } }, - "options": { - "operationId": "optionsApiKeyId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/api_key/{api_key_id}`)", - "security": [], - "tags": [ - "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": [] - }, - {} - ], - "operationId": "postServiceToken", - "description": "Create a new service token.\n\nAuthenticate with a service token. A service token whose service account is an organization owner can create tokens for any service account. A service token whose service account holds the Owner role on a project group can create tokens for a service account in the same organization when the target account has a permission grant on a project group it owns. The calling service account must also hold all of the target account's permissions in the organization; otherwise the request returns 403. User API keys cannot be used.", - "summary": "Create service_token", - "requestBody": { - "description": "Any desired information about the new service_token object", - "required": true, - "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 ID of the service account to which the token should belong. To create a service account, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI or call [`PATCH /v1/organization/members`](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership)." - }, - "expires_in_seconds": { - "type": "integer", - "nullable": true, - "minimum": 0, - "exclusiveMinimum": true, - "description": "Number of seconds from now after which the service token should expire. If omitted, the token never expires." - } - }, - "required": [ - "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": { + "delete": { + "operationId": "deleteApiKeyId", "tags": [ - "ServiceTokens" + "ApiKeys" ], + "description": "Delete an API key object by its id", + "summary": "Delete API key", "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": true, - "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 ID of the service account to which the token should belong. To create a service account, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI or call [`PATCH /v1/organization/members`](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership)." - }, - "expires_in_seconds": { - "type": "integer", - "nullable": true, - "minimum": 0, - "exclusiveMinimum": true, - "description": "Number of seconds from now after which the service token should expire. If omitted, the token never expires." - } - }, - "required": [ - "name", - "service_account_id" - ] - } - } + "parameters": [ + { + "$ref": "#/components/parameters/ApiKeyIdParam" } - }, + ], "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 deleted API key object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateServiceTokenOutput" + "$ref": "#/components/schemas/ApiKey" } } } @@ -33016,38 +29773,66 @@ } } } - }, - "delete": { - "operationId": "deleteServiceToken", + } + }, + "/v1/service_token": { + "post": { "tags": [ "ServiceTokens" ], - "description": "Delete a single service_token", - "summary": "Delete single service_token", "security": [ { "bearerAuth": [] }, {} ], + "operationId": "postServiceToken", + "description": "Create a new service token.\n\nAuthenticate with a service token. A service token whose service account is an organization owner can create tokens for any service account. A service token whose service account holds the Owner role on a project group can create tokens for a service account in the same organization when the target account has a permission grant on a project group it owns. The calling service account must also hold all of the target account's permissions in the organization; otherwise the request returns 403. User API keys cannot be used.", + "summary": "Create service token", "requestBody": { - "description": "Parameters which uniquely specify the service_token to delete", + "description": "Any desired information about the new service token object", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteServiceToken" + "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 ID of the service account to which the token should belong. To create a service account, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI or call [`PATCH /v1/organization/members`](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership)." + }, + "expires_in_seconds": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "description": "Number of seconds from now after which the service token should expire. If omitted, the token never expires." + } + }, + "required": [ + "name", + "service_account_id" + ] } } } }, "responses": { "200": { - "description": "Returns the deleted service_token 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/ServiceToken" + "$ref": "#/components/schemas/CreateServiceTokenOutput" } } } @@ -33136,59 +29921,63 @@ } } }, - "get": { - "operationId": "getServiceToken", + "put": { "tags": [ "ServiceTokens" ], - "description": "List out all service tokens. They are sorted by creation date, with the most recently-created tokens coming first.\n\nTo create a service token, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) as an organization owner or an Owner of an active project group in the organization, or call [`POST /v1/service_token`](https://www.braintrust.dev/docs/api-reference/servicetokens/create-service_token) with a service token. Results include only service tokens you can manage.", - "summary": "List service_tokens", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/AppLimitParam" - }, - { - "$ref": "#/components/parameters/StartingAfter" - }, - { - "$ref": "#/components/parameters/EndingBefore" - }, - { - "$ref": "#/components/parameters/Ids" - }, - { - "$ref": "#/components/parameters/ServiceTokenName" - }, - { - "$ref": "#/components/parameters/OrgName" + "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": true, + "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 ID of the service account to which the token should belong. To create a service account, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) in the Braintrust UI or call [`PATCH /v1/organization/members`](https://www.braintrust.dev/docs/api-reference/organizations/modify-organization-membership)." + }, + "expires_in_seconds": { + "type": "integer", + "nullable": true, + "minimum": 0, + "exclusiveMinimum": true, + "description": "Number of seconds from now after which the service token should expire. If omitted, the token never expires." + } + }, + "required": [ + "name", + "service_account_id" + ] + } + } } - ], + }, "responses": { "200": { - "description": "Returns a list of service_token objects", + "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": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceToken" - }, - "description": "A list of service_token objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/CreateServiceTokenOutput" } } } @@ -33277,86 +30066,33 @@ } } }, - "options": { - "operationId": "optionsServiceToken", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/service_token`)", - "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/service_token/{service_token_id}": { - "get": { - "operationId": "getServiceTokenId", + "delete": { + "operationId": "deleteServiceToken", "tags": [ "ServiceTokens" ], - "description": "Get a service_token object by its id", - "summary": "Get service_token", + "description": "Delete a single service token", + "summary": "Delete single service token", "security": [ { "bearerAuth": [] }, {} ], - "parameters": [ - { - "$ref": "#/components/parameters/ServiceTokenIdParam" + "requestBody": { + "description": "Parameters which uniquely specify the service token to delete", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteServiceToken" + } + } } - ], + }, "responses": { "200": { - "description": "Returns the service_token object", + "description": "Returns the deleted service token object", "content": { "application/json": { "schema": { @@ -33449,13 +30185,13 @@ } } }, - "delete": { - "operationId": "deleteServiceTokenId", + "get": { + "operationId": "getServiceToken", "tags": [ "ServiceTokens" ], - "description": "Delete a service_token object by its id", - "summary": "Delete service_token", + "description": "List out all service tokens. They are sorted by creation date, with the most recently-created tokens coming first.\n\nTo create a service token, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) as an organization owner or an Owner of an active project group in the organization, or call [`POST /v1/service_token`](https://www.braintrust.dev/docs/api-reference/servicetokens/create-service_token) with a service token. Results include only service tokens you can manage.", + "summary": "List service tokens", "security": [ { "bearerAuth": [] @@ -33464,16 +30200,44 @@ ], "parameters": [ { - "$ref": "#/components/parameters/ServiceTokenIdParam" + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/ServiceTokenName" + }, + { + "$ref": "#/components/parameters/OrgName" } ], "responses": { "200": { - "description": "Returns the deleted service_token object", + "description": "Returns a list of service token objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceToken" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceToken" + }, + "description": "A list of service token objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -33561,14 +30325,21 @@ } } } - }, - "options": { - "operationId": "optionsServiceTokenId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/service_token/{service_token_id}`)", - "security": [], + } + }, + "/v1/service_token/{service_token_id}": { + "get": { + "operationId": "getServiceTokenId", "tags": [ - "CORS" + "ServiceTokens" + ], + "description": "Get a service token object by its id", + "summary": "Get service token", + "security": [ + { + "bearerAuth": [] + }, + {} ], "parameters": [ { @@ -33577,38 +30348,84 @@ ], "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns the service token object", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ServiceToken" } - }, - "Access-Control-Allow-Headers": { + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } } }, - "content": {} + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -33623,40 +30440,32 @@ } } } - } - }, - "/v1/ai_secret": { - "post": { + }, + "delete": { + "operationId": "deleteServiceTokenId", "tags": [ - "AiSecrets" + "ServiceTokens" ], + "description": "Delete a service token object by its id", + "summary": "Delete service token", "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": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateAISecret" - } - } + "parameters": [ + { + "$ref": "#/components/parameters/ServiceTokenIdParam" } - }, + ], "responses": { "200": { - "description": "Returns the new ai_secret object", + "description": "Returns the deleted service token object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "$ref": "#/components/schemas/ServiceToken" } } } @@ -33744,8 +30553,10 @@ } } } - }, - "put": { + } + }, + "/v1/ai_secret": { + "post": { "tags": [ "AiSecrets" ], @@ -33755,11 +30566,11 @@ }, {} ], - "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": "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", + "description": "Any desired information about the new AI secret object", "required": true, "content": { "application/json": { @@ -33771,7 +30582,7 @@ }, "responses": { "200": { - "description": "Returns the new ai_secret object", + "description": "Returns the new AI secret object", "content": { "application/json": { "schema": { @@ -33864,33 +30675,33 @@ } } }, - "delete": { - "operationId": "deleteAiSecret", + "put": { "tags": [ "AiSecrets" ], - "description": "Delete a single ai_secret", - "summary": "Delete single ai_secret", "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", "requestBody": { - "description": "Parameters which uniquely specify the ai_secret to delete", + "description": "Any desired information about the new AI secret object", "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteAISecret" + "$ref": "#/components/schemas/CreateAISecret" } } } }, "responses": { "200": { - "description": "Returns the deleted ai_secret object", + "description": "Returns the new AI secret object", "content": { "application/json": { "schema": { @@ -33983,62 +30794,37 @@ } } }, - "get": { - "operationId": "getAiSecret", + "delete": { + "operationId": "deleteAiSecret", "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", + "description": "Delete a single AI secret", + "summary": "Delete single AI secret", "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" + "requestBody": { + "description": "Parameters which uniquely specify the AI secret to delete", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAISecret" + } + } } - ], + }, "responses": { "200": { - "description": "Returns a list of ai_secret objects", + "description": "Returns the deleted AI secret object", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "objects": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AISecret" - }, - "description": "A list of ai_secret objects" - } - }, - "required": [ - "objects" - ], - "additionalProperties": false + "$ref": "#/components/schemas/AISecret" } } } @@ -34127,72 +30913,13 @@ } } }, - "options": { - "operationId": "optionsAiSecret", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/ai_secret`)", - "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/ai_secret/{ai_secret_id}": { "get": { - "operationId": "getAiSecretId", + "operationId": "getAiSecret", "tags": [ "AiSecrets" ], - "description": "Get an ai_secret object by its id", - "summary": "Get ai_secret", + "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": [] @@ -34201,16 +30928,47 @@ ], "parameters": [ { - "$ref": "#/components/parameters/AiSecretIdParam" + "$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" } ], "responses": { "200": { - "description": "Returns the ai_secret object", + "description": "Returns a list of AI secret objects", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AISecret" + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AISecret" + }, + "description": "A list of AI secret objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false } } } @@ -34298,14 +31056,16 @@ } } } - }, - "patch": { - "operationId": "patchAiSecretId", + } + }, + "/v1/ai_secret/{ai_secret_id}": { + "get": { + "operationId": "getAiSecretId", "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 content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update ai_secret", + "description": "Get an AI secret object by its id", + "summary": "Get AI secret", "security": [ { "bearerAuth": [] @@ -34317,20 +31077,9 @@ "$ref": "#/components/parameters/AiSecretIdParam" } ], - "requestBody": { - "description": "Fields to update", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PatchAISecret" - } - } - } - }, "responses": { "200": { - "description": "Returns the ai_secret object", + "description": "Returns the AI secret object", "content": { "application/json": { "schema": { @@ -34423,13 +31172,13 @@ } } }, - "delete": { - "operationId": "deleteAiSecretId", + "patch": { + "operationId": "patchAiSecretId", "tags": [ "AiSecrets" ], - "description": "Delete an ai_secret object by its id", - "summary": "Delete ai_secret", + "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": [] @@ -34441,9 +31190,20 @@ "$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 ai_secret object", + "description": "Returns the AI secret object", "content": { "application/json": { "schema": { @@ -34536,13 +31296,18 @@ } } }, - "options": { - "operationId": "optionsAiSecretId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/ai_secret/{ai_secret_id}`)", - "security": [], + "delete": { + "operationId": "deleteAiSecretId", "tags": [ - "CORS" + "AiSecrets" + ], + "description": "Delete an AI secret object by its id", + "summary": "Delete AI secret", + "security": [ + { + "bearerAuth": [] + }, + {} ], "parameters": [ { @@ -34551,38 +31316,84 @@ ], "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns the deleted AI secret object", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/AISecret" } - }, - "Access-Control-Allow-Headers": { + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } } }, - "content": {} + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -34611,10 +31422,10 @@ {} ], "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", + "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", + "description": "Any desired information about the new env var object", "required": true, "content": { "application/json": { @@ -34670,7 +31481,7 @@ }, "responses": { "200": { - "description": "Returns the new env_var object", + "description": "Returns the new env var object", "content": { "application/json": { "schema": { @@ -34774,10 +31585,10 @@ {} ], "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", + "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": "Any desired information about the new env_var object", + "description": "Any desired information about the new env var object", "required": true, "content": { "application/json": { @@ -34833,7 +31644,7 @@ }, "responses": { "200": { - "description": "Returns the new env_var object", + "description": "Returns the new env var object", "content": { "application/json": { "schema": { @@ -34931,8 +31742,8 @@ "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", + "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": [] @@ -34958,7 +31769,7 @@ ], "responses": { "200": { - "description": "Returns a list of env_var objects", + "description": "Returns a list of env var objects", "content": { "application/json": { "schema": { @@ -34969,7 +31780,7 @@ "items": { "$ref": "#/components/schemas/EnvVar" }, - "description": "A list of env_var objects" + "description": "A list of env var objects" } }, "required": [ @@ -35063,63 +31874,6 @@ } } } - }, - "options": { - "operationId": "optionsEnvVar", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/env_var`)", - "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/env_var/{env_var_id}": { @@ -35128,8 +31882,8 @@ "tags": [ "EnvVars" ], - "description": "Get an env_var object by its id", - "summary": "Get env_var", + "description": "Get an env var object by its id", + "summary": "Get env var", "security": [ { "bearerAuth": [] @@ -35143,158 +31897,7 @@ ], "responses": { "200": { - "description": "Returns the env_var object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnvVar" - } - } - } - }, - "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": "patchEnvVarId", - "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 content. Currently we do not support removing fields or setting them to null.", - "summary": "Partially update env_var", - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "parameters": [ - { - "$ref": "#/components/parameters/EnvVarIdParam" - } - ], - "requestBody": { - "description": "Fields to update", - "required": true, - "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" - ] - } - } - } - }, - "responses": { - "200": { - "description": "Returns the env_var object", + "description": "Returns the env var object", "content": { "application/json": { "schema": { @@ -35387,13 +31990,13 @@ } } }, - "delete": { - "operationId": "deleteEnvVarId", + "patch": { + "operationId": "patchEnvVarId", "tags": [ "EnvVars" ], - "description": "Delete an env_var object by its id", - "summary": "Delete env_var", + "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": [] @@ -35405,9 +32008,47 @@ "$ref": "#/components/parameters/EnvVarIdParam" } ], + "requestBody": { + "description": "Fields to update", + "required": true, + "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" + ] + } + } + } + }, "responses": { "200": { - "description": "Returns the deleted env_var object", + "description": "Returns the env var object", "content": { "application/json": { "schema": { @@ -35500,13 +32141,18 @@ } } }, - "options": { - "operationId": "optionsEnvVarId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/env_var/{env_var_id}`)", - "security": [], + "delete": { + "operationId": "deleteEnvVarId", "tags": [ - "CORS" + "EnvVars" + ], + "description": "Delete an env var object by its id", + "summary": "Delete env var", + "security": [ + { + "bearerAuth": [] + }, + {} ], "parameters": [ { @@ -35515,38 +32161,84 @@ ], "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns the deleted env var object", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/EnvVar" } - }, - "Access-Control-Allow-Headers": { + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } } }, - "content": {} + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -35575,10 +32267,10 @@ {} ], "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", + "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", + "description": "Any desired information about the new MCP server object", "required": true, "content": { "application/json": { @@ -35590,7 +32282,7 @@ }, "responses": { "200": { - "description": "Returns the new mcp_server object", + "description": "Returns the new MCP server object", "content": { "application/json": { "schema": { @@ -35694,10 +32386,10 @@ {} ], "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", + "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 mcp_server object", + "description": "Any desired information about the new MCP server object", "required": true, "content": { "application/json": { @@ -35709,7 +32401,7 @@ }, "responses": { "200": { - "description": "Returns the new mcp_server object", + "description": "Returns the new MCP server object", "content": { "application/json": { "schema": { @@ -35807,8 +32499,8 @@ "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", + "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": [] @@ -35837,7 +32529,7 @@ ], "responses": { "200": { - "description": "Returns a list of mcp_server objects", + "description": "Returns a list of MCP server objects", "content": { "application/json": { "schema": { @@ -35848,7 +32540,7 @@ "items": { "$ref": "#/components/schemas/MCPServer" }, - "description": "A list of mcp_server objects" + "description": "A list of MCP server objects" } }, "required": [ @@ -35942,63 +32634,6 @@ } } } - }, - "options": { - "operationId": "optionsMcpServer", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/mcp_server`)", - "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/mcp_server/{mcp_server_id}": { @@ -36007,8 +32642,8 @@ "tags": [ "McpServers" ], - "description": "Get a mcp_server object by its id", - "summary": "Get mcp_server", + "description": "Get an MCP server object by its id", + "summary": "Get MCP server", "security": [ { "bearerAuth": [] @@ -36022,7 +32657,7 @@ ], "responses": { "200": { - "description": "Returns the mcp_server object", + "description": "Returns the MCP server object", "content": { "application/json": { "schema": { @@ -36120,8 +32755,8 @@ "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", + "description": "Partially update an 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": [] @@ -36146,120 +32781,7 @@ }, "responses": { "200": { - "description": "Returns the mcp_server object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MCPServer" - } - } - } - }, - "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": "deleteMcpServerId", - "tags": [ - "McpServers" - ], - "description": "Delete a mcp_server object by its id", - "summary": "Delete mcp_server", - "security": [ - { - "bearerAuth": [] - }, - {} - ], - "parameters": [ - { - "$ref": "#/components/parameters/McpServerIdParam" - } - ], - "responses": { - "200": { - "description": "Returns the deleted mcp_server object", + "description": "Returns the MCP server object", "content": { "application/json": { "schema": { @@ -36352,13 +32874,18 @@ } } }, - "options": { - "operationId": "optionsMcpServerId", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/mcp_server/{mcp_server_id}`)", - "security": [], + "delete": { + "operationId": "deleteMcpServerId", "tags": [ - "CORS" + "McpServers" + ], + "description": "Delete an MCP server object by its id", + "summary": "Delete MCP server", + "security": [ + { + "bearerAuth": [] + }, + {} ], "parameters": [ { @@ -36367,38 +32894,84 @@ ], "responses": { "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { + "description": "Returns the deleted MCP server object", + "content": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/MCPServer" } - }, - "Access-Control-Allow-Headers": { + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Methods": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Allow-Origin": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { "schema": { "type": "string" } }, - "Access-Control-Max-Age": { + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "headers": { + "Retry-After": { "schema": { "type": "string" } } }, - "content": {} + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", "content": { "text/plain": { "schema": { @@ -36427,10 +33000,10 @@ {} ], "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", + "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", + "description": "Any desired information about the new dataset snapshot object", "required": true, "content": { "application/json": { @@ -36442,7 +33015,7 @@ }, "responses": { "200": { - "description": "Returns the new dataset_snapshot object", + "description": "Returns the new dataset snapshot object", "content": { "application/json": { "schema": { @@ -36546,10 +33119,10 @@ {} ], "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", + "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", + "description": "Any desired information about the new dataset snapshot object", "required": true, "content": { "application/json": { @@ -36561,7 +33134,7 @@ }, "responses": { "200": { - "description": "Returns the new dataset_snapshot object", + "description": "Returns the new dataset snapshot object", "content": { "application/json": { "schema": { @@ -36659,8 +33232,8 @@ "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", + "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": [] @@ -36689,7 +33262,7 @@ ], "responses": { "200": { - "description": "Returns a list of dataset_snapshot objects", + "description": "Returns a list of dataset snapshot objects", "content": { "application/json": { "schema": { @@ -36700,7 +33273,7 @@ "items": { "$ref": "#/components/schemas/DatasetSnapshot" }, - "description": "A list of dataset_snapshot objects" + "description": "A list of dataset snapshot objects" } }, "required": [ @@ -36794,63 +33367,6 @@ } } } - }, - "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}": { @@ -36859,8 +33375,8 @@ "tags": [ "DatasetSnapshots" ], - "description": "Get a dataset_snapshot object by its id", - "summary": "Get dataset_snapshot", + "description": "Get a dataset snapshot object by its id", + "summary": "Get dataset snapshot", "security": [ { "bearerAuth": [] @@ -36874,7 +33390,7 @@ ], "responses": { "200": { - "description": "Returns the dataset_snapshot object", + "description": "Returns the dataset snapshot object", "content": { "application/json": { "schema": { @@ -36972,8 +33488,8 @@ "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", + "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": [] @@ -36998,7 +33514,7 @@ }, "responses": { "200": { - "description": "Returns the dataset_snapshot object", + "description": "Returns the dataset snapshot object", "content": { "application/json": { "schema": { @@ -37096,8 +33612,8 @@ "tags": [ "DatasetSnapshots" ], - "description": "Delete a dataset_snapshot object by its id", - "summary": "Delete dataset_snapshot", + "description": "Delete a dataset snapshot object by its id", + "summary": "Delete dataset snapshot", "security": [ { "bearerAuth": [] @@ -37111,7 +33627,7 @@ ], "responses": { "200": { - "description": "Returns the deleted dataset_snapshot object", + "description": "Returns the deleted dataset snapshot object", "content": { "application/json": { "schema": { @@ -37203,68 +33719,6 @@ } } } - }, - "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 - } - } - } - } - } } }, "/v1/project/{project_id}/simulated_user": { @@ -37570,63 +34024,6 @@ } } } - }, - "options": { - "operationId": "optionsSimulatedUsers", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project/{project_id}/simulated_user`)", - "security": [], - "tags": [ - "CORS" - ], - "responses": { - "200": { - "description": "Response for CORS method", - "headers": { - "Access-Control-Allow-Credentials": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "schema": { - "type": "string" - } - }, - "Access-Control-Max-Age": { - "schema": { - "type": "string" - } - } - }, - "content": {} - }, - "400": { - "description": "The request was unacceptable, often due to missing a required parameter", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "nullable": true - } - } - } - } - } } }, "/v1/project/{project_id}/simulated_user/{id}": { @@ -38023,63 +34420,6 @@ } } } - }, - "options": { - "operationId": "optionsSimulatedUser", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/project/{project_id}/simulated_user/{id}`)", - "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 - } - } - } - } - } } }, "/environment": { @@ -38774,63 +35114,6 @@ } } } - }, - "options": { - "operationId": "optionsIndex", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1`)", - "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/insert": { @@ -38951,63 +35234,6 @@ } } } - }, - "options": { - "operationId": "optionsCrossObjectInsert", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/insert`)", - "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/proxy/chat/completions": { @@ -39047,63 +35273,6 @@ } } } - }, - "options": { - "operationId": "optionsProxyproxychatCompletions", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/proxy/chat/completions`)", - "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/proxy/completions": { @@ -39143,63 +35312,6 @@ } } } - }, - "options": { - "operationId": "optionsProxyproxycompletions", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/proxy/completions`)", - "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/proxy/auto": { @@ -39239,63 +35351,6 @@ } } } - }, - "options": { - "operationId": "optionsProxyproxyauto", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/proxy/auto`)", - "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/proxy/embeddings": { @@ -39335,63 +35390,6 @@ } } } - }, - "options": { - "operationId": "optionsProxyproxyembeddings", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/proxy/embeddings`)", - "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/proxy/credentials": { @@ -39480,63 +35478,6 @@ } } } - }, - "options": { - "operationId": "optionsProxyproxycredentials", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/proxy/credentials`)", - "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/proxy/{path+}": { @@ -39590,77 +35531,6 @@ } } } - }, - "options": { - "operationId": "optionsProxyproxy{path+}", - "description": "Enable CORS", - "summary": "Enable CORS (`/v1/proxy/{path+}`)", - "security": [], - "tags": [ - "CORS" - ], - "parameters": [ - { - "name": "path+", - "in": "path", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "description": "The path to proxy" - } - ], - "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/eval": { diff --git a/openapi/spec.yaml b/openapi/spec.yaml index 581f34a..00c8498 100644 --- a/openapi/spec.yaml +++ b/openapi/spec.yaml @@ -3357,6 +3357,46 @@ components: - project_url - dataset_url description: Summary of a dataset + DatasetRestorePreviewResponse: + type: object + properties: + rows_to_restore: + type: integer + description: Number of rows that would be restored to their value at the + requested version + rows_to_delete: + type: integer + description: Number of rows created after the requested version that would be + deleted + required: + - rows_to_restore + - rows_to_delete + DatasetRestoreRequest: + type: object + properties: + version: + type: string + description: The dataset version to restore to, such as the `xact_id` of a + dataset snapshot + required: + - version + DatasetRestoreResponse: + type: object + properties: + xact_id: + type: string + nullable: true + description: Transaction id of the restore, or null if the restore made no changes + rows_restored: + type: integer + description: Number of rows restored to their value at the requested version + rows_deleted: + type: integer + description: Number of rows created after the requested version that were deleted + required: + - xact_id + - rows_restored + - rows_deleted ChatCompletionContentPartText: type: object properties: @@ -3770,8 +3810,6 @@ components: additionalProperties: nullable: true title: object - x-stainless-skip: - - go - type: string title: string strict: @@ -3915,8 +3953,6 @@ components: additionalProperties: nullable: true title: OpenAIModelParams - x-stainless-skip: - - go - type: object properties: use_cache: @@ -3946,8 +3982,6 @@ components: additionalProperties: nullable: true title: AnthropicModelParams - x-stainless-skip: - - go - type: object properties: use_cache: @@ -3967,8 +4001,6 @@ components: additionalProperties: nullable: true title: GoogleModelParams - x-stainless-skip: - - go - type: object properties: use_cache: @@ -3984,8 +4016,6 @@ components: additionalProperties: nullable: true title: WindowAIModelParams - x-stainless-skip: - - go - type: object properties: use_cache: @@ -3997,8 +4027,6 @@ components: additionalProperties: nullable: true title: JsCompletionParams - x-stainless-skip: - - go PromptOptionsNullish: type: object nullable: true @@ -7040,8 +7068,6 @@ components: type: number description: For weighted-type project scores, the weights of each score title: weighted - x-stainless-skip: - - go - type: array items: type: string @@ -9061,6 +9087,8 @@ components: InvokeApi: type: object properties: + request_source: + type: string input: nullable: true description: Argument to the function, which can be any JSON serializable value @@ -11916,43 +11944,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProject - description: Enable CORS - summary: Enable CORS (`/v1/project`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project/{project_id}: get: operationId: getProjectId @@ -12171,45 +12162,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectId - description: Enable CORS - summary: Enable CORS (`/v1/project/{project_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ProjectIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project_logs/{project_id}/insert: post: operationId: postProjectLogsIdInsert @@ -12287,45 +12239,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectLogsIdInsert - description: Enable CORS - summary: Enable CORS (`/v1/project_logs/{project_id}/insert`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ProjectIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project_logs/{project_id}/fetch: post: operationId: postProjectLogsIdFetch @@ -12482,45 +12395,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectLogsIdFetch - description: Enable CORS - summary: Enable CORS (`/v1/project_logs/{project_id}/fetch`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ProjectIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project_logs/{project_id}/feedback: post: operationId: postProjectLogsIdFeedback @@ -12598,45 +12472,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectLogsIdFeedback - description: Enable CORS - summary: Enable CORS (`/v1/project_logs/{project_id}/feedback`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ProjectIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/experiment: post: tags: @@ -12800,43 +12635,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsExperiment - description: Enable CORS - summary: Enable CORS (`/v1/experiment`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/experiment/{experiment_id}: get: operationId: getExperimentId @@ -13055,45 +12853,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsExperimentId - description: Enable CORS - summary: Enable CORS (`/v1/experiment/{experiment_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ExperimentIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/experiment/{experiment_id}/insert: post: operationId: postExperimentIdInsert @@ -13171,45 +12930,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsExperimentIdInsert - description: Enable CORS - summary: Enable CORS (`/v1/experiment/{experiment_id}/insert`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ExperimentIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/experiment/{experiment_id}/fetch: post: operationId: postExperimentIdFetch @@ -13366,69 +13086,30 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsExperimentIdFetch - description: Enable CORS - summary: Enable CORS (`/v1/experiment/{experiment_id}/fetch`) - security: [] + /v1/experiment/{experiment_id}/feedback: + post: + operationId: postExperimentIdFeedback tags: - - CORS + - Experiments + description: Log feedback for a set of experiment events + summary: Feedback for experiment events + security: + - bearerAuth: [] + - {} parameters: - $ref: "#/components/parameters/ExperimentIdParam" + requestBody: + description: An array of feedback objects + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/FeedbackExperimentEventRequest" responses: "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true - /v1/experiment/{experiment_id}/feedback: - post: - operationId: postExperimentIdFeedback - tags: - - Experiments - description: Log feedback for a set of experiment events - summary: Feedback for experiment events - security: - - bearerAuth: [] - - {} - parameters: - - $ref: "#/components/parameters/ExperimentIdParam" - requestBody: - description: An array of feedback objects - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/FeedbackExperimentEventRequest" - responses: - "200": - description: Returns a success status - content: - application/json: + description: Returns a success status + content: + application/json: schema: $ref: "#/components/schemas/FeedbackResponseSchema" "400": @@ -13482,51 +13163,17 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsExperimentIdFeedback - description: Enable CORS - summary: Enable CORS (`/v1/experiment/{experiment_id}/feedback`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ExperimentIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/experiment/{experiment_id}/summarize: get: operationId: getExperimentIdSummarize tags: - Experiments - description: Summarize experiment + description: Return the experiment and project names and URLs. Set + `summarize_scores=true` to include aggregate scores and metrics, with + differences, improvements, and regressions relative to a comparison + experiment. Use `comparison_experiment_id` to select the comparison; + otherwise, the experiment's base experiment or the most recent + experiment in the project is used. summary: Summarize experiment security: - bearerAuth: [] @@ -13592,45 +13239,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsExperimentIdSummarize - description: Enable CORS - summary: Enable CORS (`/v1/experiment/{experiment_id}/summarize`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ExperimentIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/dataset: post: tags: @@ -13794,43 +13402,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsDataset - description: Enable CORS - summary: Enable CORS (`/v1/dataset`) - 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/{dataset_id}: get: operationId: getDatasetId @@ -14049,45 +13620,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsDatasetId - description: Enable CORS - summary: Enable CORS (`/v1/dataset/{dataset_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/DatasetIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/dataset/{dataset_id}/insert: post: operationId: postDatasetIdInsert @@ -14165,45 +13697,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsDatasetIdInsert - description: Enable CORS - summary: Enable CORS (`/v1/dataset/{dataset_id}/insert`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/DatasetIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/dataset/{dataset_id}/fetch: post: operationId: postDatasetIdFetch @@ -14358,45 +13851,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsDatasetIdFetch - description: Enable CORS - summary: Enable CORS (`/v1/dataset/{dataset_id}/fetch`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/DatasetIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/dataset/{dataset_id}/feedback: post: operationId: postDatasetIdFeedback @@ -14474,38 +13928,71 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsDatasetIdFeedback - description: Enable CORS - summary: Enable CORS (`/v1/dataset/{dataset_id}/feedback`) - security: [] + /v1/dataset/{dataset_id}/summarize: + get: + operationId: getDatasetIdSummarize tags: - - CORS + - Datasets + description: Return the dataset and project names and URLs. Set + `summarize_data=true` to include the total number of records in the + dataset; otherwise, only metadata is returned. + summary: Summarize dataset + security: + - bearerAuth: [] parameters: - $ref: "#/components/parameters/DatasetIdParam" + - $ref: "#/components/parameters/SummarizeData" responses: "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: + description: Dataset summary + content: + application/json: + schema: + $ref: "#/components/schemas/SummarizeDatasetResponse" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: schema: type: string - Access-Control-Allow-Headers: + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: schema: type: string - Access-Control-Allow-Methods: + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: schema: type: string - Access-Control-Allow-Origin: + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: schema: type: string - Access-Control-Max-Age: + content: + text/plain: schema: type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) content: text/plain: schema: @@ -14513,25 +14000,34 @@ paths: application/json: schema: nullable: true - /v1/dataset/{dataset_id}/summarize: - get: - operationId: getDatasetIdSummarize + /v1/dataset/{dataset_id}/restore/preview: + post: + operationId: postDatasetIdRestorePreview tags: - Datasets - description: Summarize dataset - summary: Summarize dataset + description: Preview restoring a dataset to an earlier version, such as a + dataset snapshot. Returns how many rows a restore would change, without + modifying the dataset. Fails if more than 20,000 rows changed since the + requested version. Requires read permission on the dataset. + summary: Preview dataset restore security: - bearerAuth: [] + - {} parameters: - $ref: "#/components/parameters/DatasetIdParam" - - $ref: "#/components/parameters/SummarizeData" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/DatasetRestoreRequest" responses: "200": - description: Dataset summary + description: Number of rows the restore would change content: application/json: schema: - $ref: "#/components/schemas/SummarizeDatasetResponse" + $ref: "#/components/schemas/DatasetRestorePreviewResponse" "400": description: The request was unacceptable, often due to missing a required parameter @@ -14583,38 +14079,79 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsDatasetIdSummarize - description: Enable CORS - summary: Enable CORS (`/v1/dataset/{dataset_id}/summarize`) - security: [] + /v1/dataset/{dataset_id}/restore: + post: + operationId: postDatasetIdRestore tags: - - CORS + - Datasets + description: Restore a dataset to an earlier version, such as a dataset + snapshot. Rows changed since that version are reverted, and rows created + since then are deleted. The restore is recorded as a new transaction, so + dataset history is preserved. Fails if more than 20,000 rows changed + since the requested version. Requires update permission on the dataset. + summary: Restore dataset + security: + - bearerAuth: [] + - {} parameters: - $ref: "#/components/parameters/DatasetIdParam" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/DatasetRestoreRequest" responses: "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: + description: Number of rows the restore changed + content: + application/json: + schema: + $ref: "#/components/schemas/DatasetRestoreResponse" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: schema: type: string - Access-Control-Allow-Headers: + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: schema: type: string - Access-Control-Allow-Methods: + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: schema: type: string - Access-Control-Allow-Origin: + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: schema: type: string - Access-Control-Max-Age: + content: + text/plain: schema: type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) content: text/plain: schema: @@ -14864,43 +14401,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsPrompt - description: Enable CORS - summary: Enable CORS (`/v1/prompt`) - 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/prompt/{prompt_id}: get: operationId: getPromptId @@ -15121,45 +14621,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsPromptId - description: Enable CORS - summary: Enable CORS (`/v1/prompt/{prompt_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/PromptIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/role: post: tags: @@ -15386,47 +14847,10 @@ paths: schema: type: string application/json: - schema: - nullable: true - "500": - description: Something went wrong on Braintrust's end. (These are rare.) - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true - options: - operationId: optionsRole - description: Enable CORS - summary: Enable CORS (`/v1/role`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) content: text/plain: schema: @@ -15652,45 +15076,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsRoleId - description: Enable CORS - summary: Enable CORS (`/v1/role/{role_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/RoleIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/group: post: tags: @@ -15928,43 +15313,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsGroup - description: Enable CORS - summary: Enable CORS (`/v1/group`) - 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/group/{group_id}: get: operationId: getGroupId @@ -16183,45 +15531,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsGroupId - description: Enable CORS - summary: Enable CORS (`/v1/group/{group_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/GroupIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project_group: post: tags: @@ -16230,12 +15539,12 @@ paths: - bearerAuth: [] - {} operationId: postProjectGroup - description: Create a new project_group. If there is an existing project_group + description: Create a new project group. If there is an existing project group with the same name as the one specified in the request, will return the - existing project_group unmodified - summary: Create project_group + existing project group unmodified + summary: Create project group requestBody: - description: Any desired information about the new project_group object + description: Any desired information about the new project group object required: true content: application/json: @@ -16243,7 +15552,7 @@ paths: $ref: "#/components/schemas/CreateProjectGroup" responses: "200": - description: Returns the new project_group object + description: Returns the new project group object content: application/json: schema: @@ -16306,12 +15615,12 @@ paths: - bearerAuth: [] - {} operationId: putProjectGroup - description: Create or replace project_group. If there is an existing - project_group with the same name as the one specified in the request, - will replace the existing project_group with the provided fields - summary: Create or replace project_group + description: Create or replace project group. If there is an existing project + group with the same name as the one specified in the request, will + replace the existing project group with the provided fields + summary: Create or replace project group requestBody: - description: Any desired information about the new project_group object + description: Any desired information about the new project group object required: true content: application/json: @@ -16319,7 +15628,7 @@ paths: $ref: "#/components/schemas/CreateProjectGroup" responses: "200": - description: Returns the new project_group object + description: Returns the new project group object content: application/json: schema: @@ -16379,10 +15688,10 @@ paths: operationId: getProjectGroup tags: - ProjectGroups - description: List out all project_groups. The project_groups are sorted by - creation date, with the most recently-created project_groups coming + description: List out all project groups. The project groups are sorted by + creation date, with the most recently-created project groups coming first - summary: List project_groups + summary: List project groups security: - bearerAuth: [] - {} @@ -16395,7 +15704,7 @@ paths: - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of project_group objects + description: Returns a list of project group objects content: application/json: schema: @@ -16405,7 +15714,7 @@ paths: type: array items: $ref: "#/components/schemas/ProjectGroup" - description: A list of project_group objects + description: A list of project group objects required: - objects additionalProperties: false @@ -16460,50 +15769,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectGroup - description: Enable CORS - summary: Enable CORS (`/v1/project_group`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project_group/{project_group_id}: get: operationId: getProjectGroupId tags: - ProjectGroups - description: Get a project_group object by its id - summary: Get project_group + description: Get a project group object by its id + summary: Get project group security: - bearerAuth: [] - {} @@ -16511,7 +15783,7 @@ paths: - $ref: "#/components/parameters/ProjectGroupIdParam" responses: "200": - description: Returns the project_group object + description: Returns the project group object content: application/json: schema: @@ -16571,11 +15843,11 @@ paths: operationId: patchProjectGroupId tags: - ProjectGroups - description: Partially update a project_group object. Specify the fields to + description: Partially update a project group object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. - summary: Partially update project_group + summary: Partially update project group security: - bearerAuth: [] - {} @@ -16590,7 +15862,7 @@ paths: $ref: "#/components/schemas/PatchProjectGroup" responses: "200": - description: Returns the project_group object + description: Returns the project group object content: application/json: schema: @@ -16650,8 +15922,8 @@ paths: operationId: deleteProjectGroupId tags: - ProjectGroups - description: Delete a project_group object by its id - summary: Delete project_group + description: Delete a project group object by its id + summary: Delete project group security: - bearerAuth: [] - {} @@ -16659,7 +15931,7 @@ paths: - $ref: "#/components/parameters/ProjectGroupIdParam" responses: "200": - description: Returns the deleted project_group object + description: Returns the deleted project group object content: application/json: schema: @@ -16715,45 +15987,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectGroupId - description: Enable CORS - summary: Enable CORS (`/v1/project_group/{project_group_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ProjectGroupIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/acl: post: tags: @@ -16762,12 +15995,12 @@ paths: - bearerAuth: [] - {} operationId: postAcl - description: Create a new acl. If there is an existing acl with the same + description: Create a new ACL. If there is an existing ACL with the same contents as the one specified in the request, will return the existing - acl unmodified - summary: Create acl + ACL unmodified + summary: Create ACL requestBody: - description: Any desired information about the new acl object + description: Any desired information about the new ACL object required: true content: application/json: @@ -16775,7 +16008,7 @@ paths: $ref: "#/components/schemas/AclItem" responses: "200": - description: Returns the new acl object + description: Returns the new ACL object content: application/json: schema: @@ -16835,13 +16068,13 @@ paths: operationId: deleteAcl tags: - Acls - description: Delete a single acl - summary: Delete single acl + description: Delete a single ACL + summary: Delete single ACL security: - bearerAuth: [] - {} requestBody: - description: Parameters which uniquely specify the acl to delete + description: Parameters which uniquely specify the ACL to delete required: true content: application/json: @@ -16849,7 +16082,7 @@ paths: $ref: "#/components/schemas/AclItem" responses: "200": - description: Returns the deleted acl object + description: Returns the deleted ACL object content: application/json: schema: @@ -16909,9 +16142,9 @@ paths: operationId: getAcl tags: - Acls - description: List out all acls. The acls are sorted by creation date, with the - most recently-created acls coming first - summary: List acls + description: List out all ACLs. The ACLs are sorted by creation date, with the + most recently-created ACLs coming first + summary: List ACLs security: - bearerAuth: [] - {} @@ -16929,7 +16162,7 @@ paths: - $ref: "#/components/parameters/AclListRoleId" responses: "200": - description: Returns a list of acl objects + description: Returns a list of ACL objects content: application/json: schema: @@ -16939,7 +16172,7 @@ paths: type: array items: $ref: "#/components/schemas/Acl" - description: A list of acl objects + description: A list of ACL objects required: - objects additionalProperties: false @@ -16994,50 +16227,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsAcl - description: Enable CORS - summary: Enable CORS (`/v1/acl`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/acl/{acl_id}: get: operationId: getAclId tags: - Acls - description: Get an acl object by its id - summary: Get acl + description: Get an ACL object by its id + summary: Get ACL security: - bearerAuth: [] - {} @@ -17045,7 +16241,7 @@ paths: - $ref: "#/components/parameters/AclIdParam" responses: "200": - description: Returns the acl object + description: Returns the ACL object content: application/json: schema: @@ -17105,8 +16301,8 @@ paths: operationId: deleteAclId tags: - Acls - description: Delete an acl object by its id - summary: Delete acl + description: Delete an ACL object by its id + summary: Delete ACL security: - bearerAuth: [] - {} @@ -17114,7 +16310,7 @@ paths: - $ref: "#/components/parameters/AclIdParam" responses: "200": - description: Returns the deleted acl object + description: Returns the deleted ACL object content: application/json: schema: @@ -17170,54 +16366,15 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsAclId - description: Enable CORS - summary: Enable CORS (`/v1/acl/{acl_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/AclIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/acl/batch_update: post: operationId: aclBatchUpdate tags: - Acls - description: Batch update acls. This operation is idempotent, so adding acls - which already exist will have no effect, and removing acls which do not + description: Batch update ACLs. This operation is idempotent, so adding ACLs + which already exist will have no effect, and removing ACLs which do not exist will have no effect. - summary: Batch update acls + summary: Batch update ACLs security: - bearerAuth: [] - {} @@ -17291,9 +16448,9 @@ paths: operationId: aclListOrg tags: - Acls - description: List all acls in the org. This query requires the caller to have + description: List all ACLs in the org. This query requires the caller to have `read_acls` permission at the organization level - summary: List org acls + summary: List org ACLs security: - bearerAuth: [] - {} @@ -17312,91 +16469,13 @@ paths: - $ref: "#/components/parameters/OrgName" responses: "200": - description: A list of acls - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/Acl" - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true - "401": - description: No valid API key provided - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true - "403": - description: The API key doesn’t have permissions to perform the request - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true - "429": - description: Too many requests hit the API too quickly. We recommend an - exponential backoff of your requests - headers: - Retry-After: - schema: - type: string - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true - "500": - description: Something went wrong on Braintrust's end. (These are rare.) + description: A list of ACLs content: - text/plain: - schema: - type: string application/json: schema: - nullable: true - options: - operationId: optionsAclListOrg - description: Enable CORS - summary: Enable CORS (`/v1/acl/list_org`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} + type: array + items: + $ref: "#/components/schemas/Acl" "400": description: The request was unacceptable, often due to missing a required parameter @@ -17407,37 +16486,40 @@ paths: application/json: schema: nullable: true - /v1/acl/acl/batch_update: - options: - operationId: optionsAclBatchUpdate - description: Enable CORS - summary: Enable CORS (`/v1/acl/acl/batch_update`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: + "401": + description: No valid API key provided + content: + text/plain: schema: type: string - Access-Control-Allow-Headers: + application/json: schema: - type: string - Access-Control-Allow-Methods: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: schema: type: string - Access-Control-Allow-Origin: + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: schema: type: string - Access-Control-Max-Age: + content: + text/plain: schema: type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) content: text/plain: schema: @@ -17532,43 +16614,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsUser - description: Enable CORS - summary: Enable CORS (`/v1/user`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/user/{user_id}: get: operationId: getUserId @@ -17639,45 +16684,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsUserId - description: Enable CORS - summary: Enable CORS (`/v1/user/{user_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/UserIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/agent: post: tags: @@ -17915,43 +16921,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsAgent - description: Enable CORS - summary: Enable CORS (`/v1/agent`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/agent/{agent_id}: get: operationId: getAgentId @@ -18170,45 +17139,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsAgentId - description: Enable CORS - summary: Enable CORS (`/v1/agent/{agent_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/AgentIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project_automation: post: tags: @@ -18217,12 +17147,12 @@ paths: - bearerAuth: [] - {} operationId: postProjectAutomation - description: Create a new project_automation. If there is an existing - project_automation with the same name as the one specified in the - request, will return the existing project_automation unmodified - summary: Create project_automation + description: Create a new project automation. If there is an existing project + automation with the same name as the one specified in the request, will + return the existing project automation unmodified + summary: Create project automation requestBody: - description: Any desired information about the new project_automation object + description: Any desired information about the new project automation object required: true content: application/json: @@ -18230,7 +17160,7 @@ paths: $ref: "#/components/schemas/CreateProjectAutomation" responses: "200": - description: Returns the new project_automation object + description: Returns the new project automation object content: application/json: schema: @@ -18293,13 +17223,13 @@ paths: - bearerAuth: [] - {} operationId: putProjectAutomation - description: Create or replace project_automation. If there is an existing - project_automation with the same name as the one specified in the - request, will replace the existing project_automation with the provided + description: Create or replace project automation. If there is an existing + project automation with the same name as the one specified in the + request, will replace the existing project automation with the provided fields - summary: Create or replace project_automation + summary: Create or replace project automation requestBody: - description: Any desired information about the new project_automation object + description: Any desired information about the new project automation object required: true content: application/json: @@ -18307,7 +17237,7 @@ paths: $ref: "#/components/schemas/CreateProjectAutomation" responses: "200": - description: Returns the new project_automation object + description: Returns the new project automation object content: application/json: schema: @@ -18367,10 +17297,10 @@ paths: operationId: getProjectAutomation tags: - ProjectAutomations - description: List out all project_automations. The project_automations are - sorted by creation date, with the most recently-created - project_automations coming first - summary: List project_automations + description: List out all project automations. The project automations are + sorted by creation date, with the most recently-created project + automations coming first + summary: List project automations security: - bearerAuth: [] - {} @@ -18383,7 +17313,7 @@ paths: - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of project_automation objects + description: Returns a list of project automation objects content: application/json: schema: @@ -18393,7 +17323,7 @@ paths: type: array items: $ref: "#/components/schemas/ProjectAutomation" - description: A list of project_automation objects + description: A list of project automation objects required: - objects additionalProperties: false @@ -18448,50 +17378,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectAutomation - description: Enable CORS - summary: Enable CORS (`/v1/project_automation`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project_automation/{project_automation_id}: get: operationId: getProjectAutomationId tags: - ProjectAutomations - description: Get a project_automation object by its id - summary: Get project_automation + description: Get a project automation object by its id + summary: Get project automation security: - bearerAuth: [] - {} @@ -18499,7 +17392,7 @@ paths: - $ref: "#/components/parameters/ProjectAutomationIdParam" responses: "200": - description: Returns the project_automation object + description: Returns the project automation object content: application/json: schema: @@ -18559,11 +17452,11 @@ paths: operationId: patchProjectAutomationId tags: - ProjectAutomations - description: Partially update a project_automation object. Specify the fields to + description: Partially update a project automation object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. - summary: Partially update project_automation + summary: Partially update project automation security: - bearerAuth: [] - {} @@ -18578,7 +17471,7 @@ paths: $ref: "#/components/schemas/PatchProjectAutomation" responses: "200": - description: Returns the project_automation object + description: Returns the project automation object content: application/json: schema: @@ -18638,8 +17531,8 @@ paths: operationId: deleteProjectAutomationId tags: - ProjectAutomations - description: Delete a project_automation object by its id - summary: Delete project_automation + description: Delete a project automation object by its id + summary: Delete project automation security: - bearerAuth: [] - {} @@ -18647,7 +17540,7 @@ paths: - $ref: "#/components/parameters/ProjectAutomationIdParam" responses: "200": - description: Returns the deleted project_automation object + description: Returns the deleted project automation object content: application/json: schema: @@ -18703,45 +17596,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectAutomationId - description: Enable CORS - summary: Enable CORS (`/v1/project_automation/{project_automation_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ProjectAutomationIdParam" - 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/org_automation: post: tags: @@ -18750,12 +17604,12 @@ paths: - bearerAuth: [] - {} operationId: postOrgAutomation - description: Create a new org_automation. If there is an existing org_automation + description: Create a new org automation. If there is an existing org automation with the same name as the one specified in the request, will return the - existing org_automation unmodified - summary: Create org_automation + existing org automation unmodified + summary: Create org automation requestBody: - description: Any desired information about the new org_automation object + description: Any desired information about the new org automation object required: true content: application/json: @@ -18763,7 +17617,7 @@ paths: $ref: "#/components/schemas/CreateOrgAutomation" responses: "200": - description: Returns the new org_automation object + description: Returns the new org automation object content: application/json: schema: @@ -18826,12 +17680,12 @@ paths: - bearerAuth: [] - {} operationId: putOrgAutomation - description: Create or replace org_automation. If there is an existing - org_automation with the same name as the one specified in the request, - will replace the existing org_automation with the provided fields - summary: Create or replace org_automation + description: Create or replace org automation. If there is an existing org + automation with the same name as the one specified in the request, will + replace the existing org automation with the provided fields + summary: Create or replace org automation requestBody: - description: Any desired information about the new org_automation object + description: Any desired information about the new org automation object required: true content: application/json: @@ -18839,7 +17693,7 @@ paths: $ref: "#/components/schemas/CreateOrgAutomation" responses: "200": - description: Returns the new org_automation object + description: Returns the new org automation object content: application/json: schema: @@ -18899,10 +17753,10 @@ paths: operationId: getOrgAutomation tags: - OrgAutomations - description: List out all org_automations. The org_automations are sorted by - creation date, with the most recently-created org_automations coming + description: List out all org automations. The org automations are sorted by + creation date, with the most recently-created org automations coming first - summary: List org_automations + summary: List org automations security: - bearerAuth: [] - {} @@ -18915,7 +17769,7 @@ paths: - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of org_automation objects + description: Returns a list of org automation objects content: application/json: schema: @@ -18925,7 +17779,7 @@ paths: type: array items: $ref: "#/components/schemas/OrgAutomation" - description: A list of org_automation objects + description: A list of org automation objects required: - objects additionalProperties: false @@ -18980,50 +17834,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsOrgAutomation - description: Enable CORS - summary: Enable CORS (`/v1/org_automation`) - 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/org_automation/{org_automation_id}: get: operationId: getOrgAutomationId tags: - OrgAutomations - description: Get an org_automation object by its id - summary: Get org_automation + description: Get an org automation object by its id + summary: Get org automation security: - bearerAuth: [] - {} @@ -19031,7 +17848,7 @@ paths: - $ref: "#/components/parameters/OrgAutomationIdParam" responses: "200": - description: Returns the org_automation object + description: Returns the org automation object content: application/json: schema: @@ -19091,11 +17908,11 @@ paths: operationId: patchOrgAutomationId tags: - OrgAutomations - description: Partially update an org_automation object. Specify the fields to + description: Partially update an org automation object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. - summary: Partially update org_automation + summary: Partially update org automation security: - bearerAuth: [] - {} @@ -19110,7 +17927,7 @@ paths: $ref: "#/components/schemas/PatchOrgAutomation" responses: "200": - description: Returns the org_automation object + description: Returns the org automation object content: application/json: schema: @@ -19170,8 +17987,8 @@ paths: operationId: deleteOrgAutomationId tags: - OrgAutomations - description: Delete an org_automation object by its id - summary: Delete org_automation + description: Delete an org automation object by its id + summary: Delete org automation security: - bearerAuth: [] - {} @@ -19179,7 +17996,7 @@ paths: - $ref: "#/components/parameters/OrgAutomationIdParam" responses: "200": - description: Returns the deleted org_automation object + description: Returns the deleted org automation object content: application/json: schema: @@ -19204,69 +18021,30 @@ paths: 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: optionsOrgAutomationId - description: Enable CORS - summary: Enable CORS (`/v1/org_automation/{org_automation_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/OrgAutomationIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: + description: The API key doesn’t have permissions to perform the request + content: + text/plain: schema: type: string - Access-Control-Allow-Headers: + application/json: schema: - type: string - Access-Control-Allow-Methods: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + headers: + Retry-After: schema: type: string - Access-Control-Allow-Origin: + 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 + "500": + description: Something went wrong on Braintrust's end. (These are rare.) content: text/plain: schema: @@ -19282,12 +18060,12 @@ paths: - bearerAuth: [] - {} operationId: postProjectScore - description: Create a new project_score. If there is an existing project_score + description: Create a new project score. If there is an existing project score in the project with the same name as the one specified in the request, - will return the existing project_score unmodified - summary: Create project_score + will return the existing project score unmodified + summary: Create project score requestBody: - description: Any desired information about the new project_score object + description: Any desired information about the new project score object required: true content: application/json: @@ -19295,7 +18073,7 @@ paths: $ref: "#/components/schemas/CreateProjectScore" responses: "200": - description: Returns the new project_score object + description: Returns the new project score object content: application/json: schema: @@ -19358,13 +18136,13 @@ paths: - bearerAuth: [] - {} operationId: putProjectScore - description: Create or replace project_score. If there is an existing - project_score in the project with the same name as the one specified in - the request, will replace the existing project_score with the provided + description: Create or replace project score. If there is an existing project + score in the project with the same name as the one specified in the + request, will replace the existing project score with the provided fields - summary: Create or replace project_score + summary: Create or replace project score requestBody: - description: Any desired information about the new project_score object + description: Any desired information about the new project score object required: true content: application/json: @@ -19372,7 +18150,7 @@ paths: $ref: "#/components/schemas/CreateProjectScore" responses: "200": - description: Returns the new project_score object + description: Returns the new project score object content: application/json: schema: @@ -19432,10 +18210,10 @@ paths: operationId: getProjectScore tags: - ProjectScores - description: List out all project_scores. The project_scores are sorted by - creation date, with the most recently-created project_scores coming + description: List out all project scores. The project scores are sorted by + creation date, with the most recently-created project scores coming first - summary: List project_scores + summary: List project scores security: - bearerAuth: [] - {} @@ -19451,7 +18229,7 @@ paths: - $ref: "#/components/parameters/ProjectScoreType" responses: "200": - description: Returns a list of project_score objects + description: Returns a list of project score objects content: application/json: schema: @@ -19461,7 +18239,7 @@ paths: type: array items: $ref: "#/components/schemas/ProjectScore" - description: A list of project_score objects + description: A list of project score objects required: - objects additionalProperties: false @@ -19516,50 +18294,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectScore - description: Enable CORS - summary: Enable CORS (`/v1/project_score`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project_score/{project_score_id}: get: operationId: getProjectScoreId tags: - ProjectScores - description: Get a project_score object by its id - summary: Get project_score + description: Get a project score object by its id + summary: Get project score security: - bearerAuth: [] - {} @@ -19567,7 +18308,7 @@ paths: - $ref: "#/components/parameters/ProjectScoreIdParam" responses: "200": - description: Returns the project_score object + description: Returns the project score object content: application/json: schema: @@ -19627,11 +18368,11 @@ paths: operationId: patchProjectScoreId tags: - ProjectScores - description: Partially update a project_score object. Specify the fields to + description: Partially update a project score object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. - summary: Partially update project_score + summary: Partially update project score security: - bearerAuth: [] - {} @@ -19646,7 +18387,7 @@ paths: $ref: "#/components/schemas/PatchProjectScore" responses: "200": - description: Returns the project_score object + description: Returns the project score object content: application/json: schema: @@ -19706,8 +18447,8 @@ paths: operationId: deleteProjectScoreId tags: - ProjectScores - description: Delete a project_score object by its id - summary: Delete project_score + description: Delete a project score object by its id + summary: Delete project score security: - bearerAuth: [] - {} @@ -19715,7 +18456,7 @@ paths: - $ref: "#/components/parameters/ProjectScoreIdParam" responses: "200": - description: Returns the deleted project_score object + description: Returns the deleted project score object content: application/json: schema: @@ -19771,45 +18512,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectScoreId - description: Enable CORS - summary: Enable CORS (`/v1/project_score/{project_score_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ProjectScoreIdParam" - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project_tag: post: tags: @@ -19818,12 +18520,12 @@ paths: - bearerAuth: [] - {} operationId: postProjectTag - description: Create a new project_tag. If there is an existing project_tag in + description: Create a new project tag. If there is an existing project tag in the project with the same name as the one specified in the request, will - return the existing project_tag unmodified - summary: Create project_tag + return the existing project tag unmodified + summary: Create project tag requestBody: - description: Any desired information about the new project_tag object + description: Any desired information about the new project tag object required: true content: application/json: @@ -19831,7 +18533,7 @@ paths: $ref: "#/components/schemas/CreateProjectTag" responses: "200": - description: Returns the new project_tag object + description: Returns the new project tag object content: application/json: schema: @@ -19894,12 +18596,12 @@ paths: - bearerAuth: [] - {} operationId: putProjectTag - description: Create or replace project_tag. If there is an existing project_tag + description: Create or replace project tag. If there is an existing project tag in the project with the same name as the one specified in the request, - will replace the existing project_tag with the provided fields - summary: Create or replace project_tag + will replace the existing project tag with the provided fields + summary: Create or replace project tag requestBody: - description: Any desired information about the new project_tag object + description: Any desired information about the new project tag object required: true content: application/json: @@ -19907,7 +18609,7 @@ paths: $ref: "#/components/schemas/CreateProjectTag" responses: "200": - description: Returns the new project_tag object + description: Returns the new project tag object content: application/json: schema: @@ -19967,9 +18669,9 @@ paths: operationId: getProjectTag tags: - ProjectTags - description: List out all project_tags. The project_tags are sorted by creation - date, with the most recently-created project_tags coming first - summary: List project_tags + description: List out all project tags. The project tags are sorted by creation + date, with the most recently-created project tags coming first + summary: List project tags security: - bearerAuth: [] - {} @@ -19984,7 +18686,7 @@ paths: - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of project_tag objects + description: Returns a list of project tag objects content: application/json: schema: @@ -19994,7 +18696,7 @@ paths: type: array items: $ref: "#/components/schemas/ProjectTag" - description: A list of project_tag objects + description: A list of project tag objects required: - objects additionalProperties: false @@ -20049,50 +18751,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectTag - description: Enable CORS - summary: Enable CORS (`/v1/project_tag`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method - headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: - schema: - type: string - Access-Control-Allow-Origin: - schema: - type: string - Access-Control-Max-Age: - schema: - type: string - content: {} - "400": - description: The request was unacceptable, often due to missing a required - parameter - content: - text/plain: - schema: - type: string - application/json: - schema: - nullable: true /v1/project_tag/{project_tag_id}: get: operationId: getProjectTagId tags: - ProjectTags - description: Get a project_tag object by its id - summary: Get project_tag + description: Get a project tag object by its id + summary: Get project tag security: - bearerAuth: [] - {} @@ -20100,7 +18765,7 @@ paths: - $ref: "#/components/parameters/ProjectTagIdParam" responses: "200": - description: Returns the project_tag object + description: Returns the project tag object content: application/json: schema: @@ -20160,11 +18825,11 @@ paths: operationId: patchProjectTagId tags: - ProjectTags - description: Partially update a project_tag object. Specify the fields to update + description: Partially update a project tag object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null. - summary: Partially update project_tag + summary: Partially update project tag security: - bearerAuth: [] - {} @@ -20179,7 +18844,7 @@ paths: $ref: "#/components/schemas/PatchProjectTag" responses: "200": - description: Returns the project_tag object + description: Returns the project tag object content: application/json: schema: @@ -20239,8 +18904,8 @@ paths: operationId: deleteProjectTagId tags: - ProjectTags - description: Delete a project_tag object by its id - summary: Delete project_tag + description: Delete a project tag object by its id + summary: Delete project tag security: - bearerAuth: [] - {} @@ -20248,7 +18913,7 @@ paths: - $ref: "#/components/parameters/ProjectTagIdParam" responses: "200": - description: Returns the deleted project_tag object + description: Returns the deleted project tag object content: application/json: schema: @@ -20304,45 +18969,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProjectTagId - description: Enable CORS - summary: Enable CORS (`/v1/project_tag/{project_tag_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/ProjectTagIdParam" - 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/span_iframe: post: tags: @@ -20351,12 +18977,12 @@ paths: - bearerAuth: [] - {} operationId: postSpanIframe - description: Create a new span_iframe. If there is an existing span_iframe with + description: Create a new span iframe. If there is an existing span iframe with the same name as the one specified in the request, will return the - existing span_iframe unmodified - summary: Create span_iframe + existing span iframe unmodified + summary: Create span iframe requestBody: - description: Any desired information about the new span_iframe object + description: Any desired information about the new span iframe object required: true content: application/json: @@ -20364,7 +18990,7 @@ paths: $ref: "#/components/schemas/CreateSpanIFrame" responses: "200": - description: Returns the new span_iframe object + description: Returns the new span iframe object content: application/json: schema: @@ -20427,12 +19053,12 @@ paths: - bearerAuth: [] - {} operationId: putSpanIframe - description: Create or replace span_iframe. If there is an existing span_iframe + description: Create or replace span iframe. If there is an existing span iframe with the same name as the one specified in the request, will replace the - existing span_iframe with the provided fields - summary: Create or replace span_iframe + existing span iframe with the provided fields + summary: Create or replace span iframe requestBody: - description: Any desired information about the new span_iframe object + description: Any desired information about the new span iframe object required: true content: application/json: @@ -20440,7 +19066,7 @@ paths: $ref: "#/components/schemas/CreateSpanIFrame" responses: "200": - description: Returns the new span_iframe object + description: Returns the new span iframe object content: application/json: schema: @@ -20500,9 +19126,9 @@ paths: operationId: getSpanIframe tags: - SpanIframes - description: List out all span_iframes. The span_iframes are sorted by creation - date, with the most recently-created span_iframes coming first - summary: List span_iframes + description: List out all span iframes. The span iframes are sorted by creation + date, with the most recently-created span iframes coming first + summary: List span iframes security: - bearerAuth: [] - {} @@ -20515,7 +19141,7 @@ paths: - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of span_iframe objects + description: Returns a list of span iframe objects content: application/json: schema: @@ -20525,7 +19151,7 @@ paths: type: array items: $ref: "#/components/schemas/SpanIFrame" - description: A list of span_iframe objects + description: A list of span iframe objects required: - objects additionalProperties: false @@ -20580,50 +19206,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsSpanIframe - description: Enable CORS - summary: Enable CORS (`/v1/span_iframe`) - 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/span_iframe/{span_iframe_id}: get: operationId: getSpanIframeId tags: - SpanIframes - description: Get a span_iframe object by its id - summary: Get span_iframe + description: Get a span iframe object by its id + summary: Get span iframe security: - bearerAuth: [] - {} @@ -20631,7 +19220,7 @@ paths: - $ref: "#/components/parameters/SpanIframeIdParam" responses: "200": - description: Returns the span_iframe object + description: Returns the span iframe object content: application/json: schema: @@ -20691,11 +19280,11 @@ paths: operationId: patchSpanIframeId tags: - SpanIframes - description: Partially update a span_iframe object. Specify the fields to update + description: Partially update a span iframe 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 span_iframe + summary: Partially update span iframe security: - bearerAuth: [] - {} @@ -20710,7 +19299,7 @@ paths: $ref: "#/components/schemas/PatchSpanIFrame" responses: "200": - description: Returns the span_iframe object + description: Returns the span iframe object content: application/json: schema: @@ -20770,8 +19359,8 @@ paths: operationId: deleteSpanIframeId tags: - SpanIframes - description: Delete a span_iframe object by its id - summary: Delete span_iframe + description: Delete a span iframe object by its id + summary: Delete span iframe security: - bearerAuth: [] - {} @@ -20779,7 +19368,7 @@ paths: - $ref: "#/components/parameters/SpanIframeIdParam" responses: "200": - description: Returns the deleted span_iframe object + description: Returns the deleted span iframe object content: application/json: schema: @@ -20835,45 +19424,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsSpanIframeId - description: Enable CORS - summary: Enable CORS (`/v1/span_iframe/{span_iframe_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/SpanIframeIdParam" - 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/function: post: tags: @@ -21116,43 +19666,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsFunction - description: Enable CORS - summary: Enable CORS (`/v1/function`) - 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/function/{function_id}: get: operationId: getFunctionId @@ -21373,51 +19886,15 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsFunctionId - description: Enable CORS - summary: Enable CORS (`/v1/function/{function_id}`) - 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 - 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/function/{function_id}/invoke: post: operationId: postFunctionIdInvoke tags: - Functions - description: Invoke a function. + description: Run the specified function with the provided input and return its + result. Use `version` to select a specific function version, `parent` to + attach the call to a trace, and `stream` to receive results in the + Braintrust SSE format. summary: Invoke function security: - bearerAuth: [] @@ -21439,45 +19916,6 @@ paths: 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 - 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: @@ -21717,43 +20155,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsView - description: Enable CORS - summary: Enable CORS (`/v1/view`) - 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/view/{view_id}: get: operationId: getViewId @@ -21981,45 +20382,6 @@ paths: 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: - 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: get: operationId: getOrganization @@ -22104,43 +20466,6 @@ 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 @@ -22290,45 +20615,6 @@ 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 @@ -22404,43 +20690,6 @@ 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/organization/api_keys: get: operationId: getOrganizationApiKeys @@ -22533,43 +20782,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsOrganizationApiKeys - description: Enable CORS - summary: Enable CORS (`/v1/organization/api_keys`) - 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: get: operationId: getApiKey @@ -22583,7 +20795,7 @@ paths: To create new API keys, visit [**Settings > API keys**](https://www.braintrust.dev/app/~/configuration/org/api-keys) in the Braintrust UI. - summary: List api_keys + summary: List API keys security: - bearerAuth: [] - {} @@ -22596,7 +20808,7 @@ paths: - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of api_key objects + description: Returns a list of API key objects content: application/json: schema: @@ -22606,7 +20818,7 @@ paths: type: array items: $ref: "#/components/schemas/ApiKey" - description: A list of api_key objects + description: A list of API key objects required: - objects additionalProperties: false @@ -22661,50 +20873,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsApiKey - description: Enable CORS - summary: Enable CORS (`/v1/api_key`) - 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/{api_key_id}: get: operationId: getApiKeyId tags: - ApiKeys - description: Get an api_key object by its id - summary: Get api_key + description: Get an API key object by its id + summary: Get API key security: - bearerAuth: [] - {} @@ -22712,7 +20887,7 @@ paths: - $ref: "#/components/parameters/ApiKeyIdParam" responses: "200": - description: Returns the api_key object + description: Returns the API key object content: application/json: schema: @@ -22772,8 +20947,8 @@ paths: operationId: deleteApiKeyId tags: - ApiKeys - description: Delete an api_key object by its id - summary: Delete api_key + description: Delete an API key object by its id + summary: Delete API key security: - bearerAuth: [] - {} @@ -22781,7 +20956,7 @@ paths: - $ref: "#/components/parameters/ApiKeyIdParam" responses: "200": - description: Returns the deleted api_key object + description: Returns the deleted API key object content: application/json: schema: @@ -22837,45 +21012,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsApiKeyId - description: Enable CORS - summary: Enable CORS (`/v1/api_key/{api_key_id}`) - security: [] - tags: - - 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: @@ -22896,9 +21032,9 @@ paths: owns. The calling service account must also hold all of the target account's permissions in the organization; otherwise the request returns 403. User API keys cannot be used. - summary: Create service_token + summary: Create service token requestBody: - description: Any desired information about the new service_token object + description: Any desired information about the new service token object required: true content: application/json: @@ -22998,12 +21134,12 @@ paths: - 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 + 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 + description: Any desired information about the new service token object required: true content: application/json: @@ -23100,13 +21236,13 @@ paths: operationId: deleteServiceToken tags: - ServiceTokens - description: Delete a single service_token - summary: Delete single service_token + description: Delete a single service token + summary: Delete single service token security: - bearerAuth: [] - {} requestBody: - description: Parameters which uniquely specify the service_token to delete + description: Parameters which uniquely specify the service token to delete required: true content: application/json: @@ -23114,7 +21250,7 @@ paths: $ref: "#/components/schemas/DeleteServiceToken" responses: "200": - description: Returns the deleted service_token object + description: Returns the deleted service token object content: application/json: schema: @@ -23178,7 +21314,7 @@ paths: List out all service tokens. They are sorted by creation date, with the most recently-created tokens coming first. To create a service token, visit [**Settings > Service tokens**](https://www.braintrust.dev/app/~/configuration/org/service-tokens) as an organization owner or an Owner of an active project group in the organization, or call [`POST /v1/service_token`](https://www.braintrust.dev/docs/api-reference/servicetokens/create-service_token) with a service token. Results include only service tokens you can manage. - summary: List service_tokens + summary: List service tokens security: - bearerAuth: [] - {} @@ -23191,7 +21327,7 @@ paths: - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of service_token objects + description: Returns a list of service token objects content: application/json: schema: @@ -23201,7 +21337,7 @@ paths: type: array items: $ref: "#/components/schemas/ServiceToken" - description: A list of service_token objects + description: A list of service token objects required: - objects additionalProperties: false @@ -23256,50 +21392,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsServiceToken - description: Enable CORS - summary: Enable CORS (`/v1/service_token`) - 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/service_token/{service_token_id}: get: operationId: getServiceTokenId tags: - ServiceTokens - description: Get a service_token object by its id - summary: Get service_token + description: Get a service token object by its id + summary: Get service token security: - bearerAuth: [] - {} @@ -23307,7 +21406,7 @@ paths: - $ref: "#/components/parameters/ServiceTokenIdParam" responses: "200": - description: Returns the service_token object + description: Returns the service token object content: application/json: schema: @@ -23367,8 +21466,8 @@ paths: operationId: deleteServiceTokenId tags: - ServiceTokens - description: Delete a service_token object by its id - summary: Delete service_token + description: Delete a service token object by its id + summary: Delete service token security: - bearerAuth: [] - {} @@ -23376,7 +21475,7 @@ paths: - $ref: "#/components/parameters/ServiceTokenIdParam" responses: "200": - description: Returns the deleted service_token object + description: Returns the deleted service token object content: application/json: schema: @@ -23409,61 +21508,22 @@ 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: - 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: 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 + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: + Retry-After: schema: type: string - Access-Control-Allow-Origin: + 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 + "500": + description: Something went wrong on Braintrust's end. (These are rare.) content: text/plain: schema: @@ -23479,12 +21539,12 @@ paths: - bearerAuth: [] - {} operationId: postAiSecret - description: Create a new ai_secret. If there is an existing ai_secret with the + 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 + AI secret unmodified + summary: Create AI secret requestBody: - description: Any desired information about the new ai_secret object + description: Any desired information about the new AI secret object required: true content: application/json: @@ -23492,7 +21552,7 @@ paths: $ref: "#/components/schemas/CreateAISecret" responses: "200": - description: Returns the new ai_secret object + description: Returns the new AI secret object content: application/json: schema: @@ -23555,12 +21615,12 @@ paths: - bearerAuth: [] - {} operationId: putAiSecret - description: Create or replace ai_secret. If there is an existing ai_secret with + 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 + existing AI secret with the provided fields + summary: Create or replace AI secret requestBody: - description: Any desired information about the new ai_secret object + description: Any desired information about the new AI secret object required: true content: application/json: @@ -23568,7 +21628,7 @@ paths: $ref: "#/components/schemas/CreateAISecret" responses: "200": - description: Returns the new ai_secret object + description: Returns the new AI secret object content: application/json: schema: @@ -23628,13 +21688,13 @@ paths: operationId: deleteAiSecret tags: - AiSecrets - description: Delete a single ai_secret - summary: Delete single ai_secret + description: Delete a single AI secret + summary: Delete single AI secret security: - bearerAuth: [] - {} requestBody: - description: Parameters which uniquely specify the ai_secret to delete + description: Parameters which uniquely specify the AI secret to delete required: true content: application/json: @@ -23642,7 +21702,7 @@ paths: $ref: "#/components/schemas/DeleteAISecret" responses: "200": - description: Returns the deleted ai_secret object + description: Returns the deleted AI secret object content: application/json: schema: @@ -23702,9 +21762,9 @@ paths: operationId: getAiSecret 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 + 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: [] - {} @@ -23718,7 +21778,7 @@ paths: - $ref: "#/components/parameters/AISecretType" responses: "200": - description: Returns a list of ai_secret objects + description: Returns a list of AI secret objects content: application/json: schema: @@ -23728,7 +21788,7 @@ paths: type: array items: $ref: "#/components/schemas/AISecret" - description: A list of ai_secret objects + description: A list of AI secret objects required: - objects additionalProperties: false @@ -23783,50 +21843,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsAiSecret - description: Enable CORS - summary: Enable CORS (`/v1/ai_secret`) - 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/ai_secret/{ai_secret_id}: get: operationId: getAiSecretId tags: - AiSecrets - description: Get an ai_secret object by its id - summary: Get ai_secret + description: Get an AI secret object by its id + summary: Get AI secret security: - bearerAuth: [] - {} @@ -23834,7 +21857,7 @@ paths: - $ref: "#/components/parameters/AiSecretIdParam" responses: "200": - description: Returns the ai_secret object + description: Returns the AI secret object content: application/json: schema: @@ -23894,11 +21917,11 @@ paths: operationId: patchAiSecretId tags: - AiSecrets - description: Partially update an ai_secret object. Specify the fields to update + 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 + summary: Partially update AI secret security: - bearerAuth: [] - {} @@ -23913,7 +21936,7 @@ paths: $ref: "#/components/schemas/PatchAISecret" responses: "200": - description: Returns the ai_secret object + description: Returns the AI secret object content: application/json: schema: @@ -23973,8 +21996,8 @@ paths: operationId: deleteAiSecretId tags: - AiSecrets - description: Delete an ai_secret object by its id - summary: Delete ai_secret + description: Delete an AI secret object by its id + summary: Delete AI secret security: - bearerAuth: [] - {} @@ -23982,7 +22005,7 @@ paths: - $ref: "#/components/parameters/AiSecretIdParam" responses: "200": - description: Returns the deleted ai_secret object + description: Returns the deleted AI secret object content: application/json: schema: @@ -24038,45 +22061,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsAiSecretId - description: Enable CORS - summary: Enable CORS (`/v1/ai_secret/{ai_secret_id}`) - security: [] - tags: - - 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: @@ -24085,12 +22069,12 @@ paths: - 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 + 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 + description: Any desired information about the new env var object required: true content: application/json: @@ -24134,7 +22118,7 @@ paths: - name responses: "200": - description: Returns the new env_var object + description: Returns the new env var object content: application/json: schema: @@ -24197,12 +22181,12 @@ paths: - bearerAuth: [] - {} operationId: putEnvVar - description: Create or replace env_var. If there is an existing env_var with the + 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 + env var with the provided fields + summary: Create or replace env var requestBody: - description: Any desired information about the new env_var object + description: Any desired information about the new env var object required: true content: application/json: @@ -24246,7 +22230,7 @@ paths: - name responses: "200": - description: Returns the new env_var object + description: Returns the new env var object content: application/json: schema: @@ -24306,9 +22290,9 @@ paths: operationId: getEnvVar 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 + 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: [] - {} @@ -24320,7 +22304,7 @@ paths: - $ref: "#/components/parameters/EnvVarObjectId" responses: "200": - description: Returns a list of env_var objects + description: Returns a list of env var objects content: application/json: schema: @@ -24330,7 +22314,7 @@ paths: type: array items: $ref: "#/components/schemas/EnvVar" - description: A list of env_var objects + description: A list of env var objects required: - objects additionalProperties: false @@ -24385,50 +22369,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsEnvVar - description: Enable CORS - summary: Enable CORS (`/v1/env_var`) - 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/env_var/{env_var_id}: get: operationId: getEnvVarId tags: - EnvVars - description: Get an env_var object by its id - summary: Get env_var + description: Get an env var object by its id + summary: Get env var security: - bearerAuth: [] - {} @@ -24436,7 +22383,7 @@ paths: - $ref: "#/components/parameters/EnvVarIdParam" responses: "200": - description: Returns the env_var object + description: Returns the env var object content: application/json: schema: @@ -24496,11 +22443,11 @@ paths: operationId: patchEnvVarId tags: - EnvVars - description: Partially update an env_var object. Specify the fields to update in + 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 + summary: Partially update env var security: - bearerAuth: [] - {} @@ -24537,7 +22484,7 @@ paths: - name responses: "200": - description: Returns the env_var object + description: Returns the env var object content: application/json: schema: @@ -24597,8 +22544,8 @@ paths: operationId: deleteEnvVarId tags: - EnvVars - description: Delete an env_var object by its id - summary: Delete env_var + description: Delete an env var object by its id + summary: Delete env var security: - bearerAuth: [] - {} @@ -24606,7 +22553,7 @@ paths: - $ref: "#/components/parameters/EnvVarIdParam" responses: "200": - description: Returns the deleted env_var object + description: Returns the deleted env var object content: application/json: schema: @@ -24662,45 +22609,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsEnvVarId - description: Enable CORS - summary: Enable CORS (`/v1/env_var/{env_var_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/EnvVarIdParam" - 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/mcp_server: post: tags: @@ -24709,12 +22617,12 @@ paths: - bearerAuth: [] - {} operationId: postMcpServer - description: Create a new mcp_server. If there is an existing mcp_server with + 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 + existing MCP server unmodified + summary: Create MCP server requestBody: - description: Any desired information about the new mcp_server object + description: Any desired information about the new MCP server object required: true content: application/json: @@ -24722,7 +22630,7 @@ paths: $ref: "#/components/schemas/CreateMCPServer" responses: "200": - description: Returns the new mcp_server object + description: Returns the new MCP server object content: application/json: schema: @@ -24785,12 +22693,12 @@ paths: - bearerAuth: [] - {} operationId: putMcpServer - description: Create or replace mcp_server. If there is an existing mcp_server + 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 + existing MCP server with the provided fields + summary: Create or replace MCP server requestBody: - description: Any desired information about the new mcp_server object + description: Any desired information about the new MCP server object required: true content: application/json: @@ -24798,7 +22706,7 @@ paths: $ref: "#/components/schemas/CreateMCPServer" responses: "200": - description: Returns the new mcp_server object + description: Returns the new MCP server object content: application/json: schema: @@ -24858,9 +22766,9 @@ paths: operationId: getMcpServer 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 + 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: [] - {} @@ -24873,7 +22781,7 @@ paths: - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of mcp_server objects + description: Returns a list of MCP server objects content: application/json: schema: @@ -24883,7 +22791,7 @@ paths: type: array items: $ref: "#/components/schemas/MCPServer" - description: A list of mcp_server objects + description: A list of MCP server objects required: - objects additionalProperties: false @@ -24938,50 +22846,13 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsMcpServer - description: Enable CORS - summary: Enable CORS (`/v1/mcp_server`) - 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/mcp_server/{mcp_server_id}: get: operationId: getMcpServerId tags: - McpServers - description: Get a mcp_server object by its id - summary: Get mcp_server + description: Get an MCP server object by its id + summary: Get MCP server security: - bearerAuth: [] - {} @@ -24989,7 +22860,7 @@ paths: - $ref: "#/components/parameters/McpServerIdParam" responses: "200": - description: Returns the mcp_server object + description: Returns the MCP server object content: application/json: schema: @@ -25049,11 +22920,11 @@ paths: operationId: patchMcpServerId tags: - McpServers - description: Partially update a mcp_server object. Specify the fields to update + description: Partially update an 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 + summary: Partially update MCP server security: - bearerAuth: [] - {} @@ -25068,7 +22939,7 @@ paths: $ref: "#/components/schemas/PatchMCPServer" responses: "200": - description: Returns the mcp_server object + description: Returns the MCP server object content: application/json: schema: @@ -25128,8 +22999,8 @@ paths: operationId: deleteMcpServerId tags: - McpServers - description: Delete a mcp_server object by its id - summary: Delete mcp_server + description: Delete an MCP server object by its id + summary: Delete MCP server security: - bearerAuth: [] - {} @@ -25137,7 +23008,7 @@ paths: - $ref: "#/components/parameters/McpServerIdParam" responses: "200": - description: Returns the deleted mcp_server object + description: Returns the deleted MCP server object content: application/json: schema: @@ -25193,45 +23064,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsMcpServerId - description: Enable CORS - summary: Enable CORS (`/v1/mcp_server/{mcp_server_id}`) - security: [] - tags: - - CORS - parameters: - - $ref: "#/components/parameters/McpServerIdParam" - 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: post: tags: @@ -25240,12 +23072,12 @@ paths: - 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 + 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 + description: Any desired information about the new dataset snapshot object required: true content: application/json: @@ -25253,7 +23085,7 @@ paths: $ref: "#/components/schemas/CreateDatasetSnapshot" responses: "200": - description: Returns the new dataset_snapshot object + description: Returns the new dataset snapshot object content: application/json: schema: @@ -25316,12 +23148,12 @@ paths: - 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 + 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 + description: Any desired information about the new dataset snapshot object required: true content: application/json: @@ -25329,7 +23161,7 @@ paths: $ref: "#/components/schemas/CreateDatasetSnapshot" responses: "200": - description: Returns the new dataset_snapshot object + description: Returns the new dataset snapshot object content: application/json: schema: @@ -25389,10 +23221,10 @@ paths: 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 + 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 + summary: List dataset snapshots security: - bearerAuth: [] - {} @@ -25405,7 +23237,7 @@ paths: - $ref: "#/components/parameters/OrgName" responses: "200": - description: Returns a list of dataset_snapshot objects + description: Returns a list of dataset snapshot objects content: application/json: schema: @@ -25415,7 +23247,7 @@ paths: type: array items: $ref: "#/components/schemas/DatasetSnapshot" - description: A list of dataset_snapshot objects + description: A list of dataset snapshot objects required: - objects additionalProperties: false @@ -25470,50 +23302,13 @@ paths: 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 + description: Get a dataset snapshot object by its id + summary: Get dataset snapshot security: - bearerAuth: [] - {} @@ -25521,7 +23316,7 @@ paths: - $ref: "#/components/parameters/DatasetSnapshotIdParam" responses: "200": - description: Returns the dataset_snapshot object + description: Returns the dataset snapshot object content: application/json: schema: @@ -25581,11 +23376,11 @@ paths: operationId: patchDatasetSnapshotId tags: - DatasetSnapshots - description: Partially update a dataset_snapshot object. Specify the fields to + 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 + summary: Partially update dataset snapshot security: - bearerAuth: [] - {} @@ -25600,7 +23395,7 @@ paths: $ref: "#/components/schemas/PatchDatasetSnapshot" responses: "200": - description: Returns the dataset_snapshot object + description: Returns the dataset snapshot object content: application/json: schema: @@ -25660,8 +23455,8 @@ paths: operationId: deleteDatasetSnapshotId tags: - DatasetSnapshots - description: Delete a dataset_snapshot object by its id - summary: Delete dataset_snapshot + description: Delete a dataset snapshot object by its id + summary: Delete dataset snapshot security: - bearerAuth: [] - {} @@ -25669,7 +23464,7 @@ paths: - $ref: "#/components/parameters/DatasetSnapshotIdParam" responses: "200": - description: Returns the deleted dataset_snapshot object + description: Returns the deleted dataset snapshot object content: application/json: schema: @@ -25725,45 +23520,6 @@ paths: 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 /v1/project/{project_id}/simulated_user: get: operationId: listSimulatedUsers @@ -25930,59 +23686,22 @@ 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: - 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: optionsSimulatedUsers - description: Enable CORS - summary: Enable CORS (`/v1/project/{project_id}/simulated_user`) - security: [] - tags: - - CORS - responses: - "200": - description: Response for CORS method + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests headers: - Access-Control-Allow-Credentials: - schema: - type: string - Access-Control-Allow-Headers: - schema: - type: string - Access-Control-Allow-Methods: + Retry-After: schema: type: string - Access-Control-Allow-Origin: + 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 + "500": + description: Something went wrong on Braintrust's end. (These are rare.) content: text/plain: schema: @@ -26243,43 +23962,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsSimulatedUser - description: Enable CORS - summary: Enable CORS (`/v1/project/{project_id}/simulated_user/{id}`) - 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 /environment: get: operationId: listEnvironments @@ -26712,43 +24394,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsIndex - description: Enable CORS - summary: Enable CORS (`/v1`) - 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/insert: post: operationId: postCrossObjectInsert @@ -26823,43 +24468,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsCrossObjectInsert - description: Enable CORS - summary: Enable CORS (`/v1/insert`) - 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/proxy/chat/completions: post: operationId: proxychatCompletions @@ -26887,43 +24495,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProxyproxychatCompletions - description: Enable CORS - summary: Enable CORS (`/v1/proxy/chat/completions`) - 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/proxy/completions: post: operationId: proxycompletions @@ -26951,43 +24522,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProxyproxycompletions - description: Enable CORS - summary: Enable CORS (`/v1/proxy/completions`) - 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/proxy/auto: post: operationId: proxyauto @@ -27014,43 +24548,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProxyproxyauto - description: Enable CORS - summary: Enable CORS (`/v1/proxy/auto`) - 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/proxy/embeddings: post: operationId: proxyembeddings @@ -27078,43 +24575,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProxyproxyembeddings - description: Enable CORS - summary: Enable CORS (`/v1/proxy/embeddings`) - 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/proxy/credentials: post: operationId: proxycredentials @@ -27181,43 +24641,6 @@ paths: text/plain: schema: type: string - options: - operationId: optionsProxyproxycredentials - description: Enable CORS - summary: Enable CORS (`/v1/proxy/credentials`) - 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/proxy/{path+}: post: operationId: proxy{path+} @@ -27252,52 +24675,6 @@ paths: application/json: schema: nullable: true - options: - operationId: optionsProxyproxy{path+} - description: Enable CORS - summary: Enable CORS (`/v1/proxy/{path+}`) - security: [] - tags: - - CORS - parameters: - - name: path+ - in: path - required: true - schema: - type: array - items: - type: string - description: The path to proxy - 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/eval: post: operationId: evalLaunch