Skip to content
Snippets Groups Projects
openapi.json 875 KiB
Newer Older
{
  "openapi": "3.1.0",
  "info": {
    "title": "Llama Platform",
    "version": "0.1.0"
  },
  "paths": {
    "/api/v1/api-keys": {
      "post": {
        "tags": ["API Keys"],
        "summary": "Generate Key",
        "description": "Generate a new API Key.",
        "operationId": "generate_key_api_v1_api_keys_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/APIKeyCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIKey"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": ["API Keys"],
        "summary": "List Keys",
        "description": "List API Keys for a user.",
        "operationId": "list_keys_api_v1_api_keys_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "HTTPBearer": []
          }
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            }
          },
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/APIKey"
                  },
                  "title": "Response List Keys Api V1 Api Keys Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/api-keys/{api_key_id}": {
      "delete": {
        "tags": ["API Keys"],
        "summary": "Delete Api Key",
        "description": "Delete an API Key by ID.",
        "operationId": "delete_api_key_api_v1_api_keys__api_key_id__delete",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "HTTPBearer": []
          }
        "parameters": [
          {
            "name": "api_key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Api Key Id"
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": ["API Keys"],
        "summary": "Update Existing Api Key",
        "description": "Update name of an existing API Key.",
        "operationId": "update_existing_api_key_api_v1_api_keys__api_key_id__put",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "HTTPBearer": []
          }
        "parameters": [
          {
            "name": "api_key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Api Key Id"
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/APIKeyUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIKey"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
      }
    },
    "/api/v1/validate-integrations/validate-embedding-connection": {
      "post": {
        "tags": ["Validation"],
        "summary": "Validate Embedding Connection",
        "description": "Validate an embedding connection.\n\nArgs:\n    embedding_config: The embedding configuration to validate.\n    pipeline_id: If provided, the embedding connection will be validated for the pipeline.\n    user: The user to validate the embedding connection for.\n    db: The database session.\n\nReturns:\n    A BaseConnectionValidation object indicating the result of the validation.",
        "operationId": "validate_embedding_connection_api_v1_validate_integrations_validate_embedding_connection_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "pipeline_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Pipeline Id"
            }
          },
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/AzureOpenAIEmbeddingConfig"
                  },
                  {
                    "$ref": "#/components/schemas/CohereEmbeddingConfig"
                  },
                  {
                    "$ref": "#/components/schemas/GeminiEmbeddingConfig"
                  },
                  {
                    "$ref": "#/components/schemas/HuggingFaceInferenceAPIEmbeddingConfig"
                  },
                  {
                    "$ref": "#/components/schemas/OpenAIEmbeddingConfig"
                  },
                  {
                    "$ref": "#/components/schemas/VertexAIEmbeddingConfig"
                  },
                  {
                    "$ref": "#/components/schemas/BedrockEmbeddingConfig"
                  }
                ],
                "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                    "AZURE_EMBEDDING": "#/components/schemas/AzureOpenAIEmbeddingConfig",
                    "COHERE_EMBEDDING": "#/components/schemas/CohereEmbeddingConfig",
                    "GEMINI_EMBEDDING": "#/components/schemas/GeminiEmbeddingConfig",
                    "HUGGINGFACE_API_EMBEDDING": "#/components/schemas/HuggingFaceInferenceAPIEmbeddingConfig",
                    "OPENAI_EMBEDDING": "#/components/schemas/OpenAIEmbeddingConfig",
                    "VERTEXAI_EMBEDDING": "#/components/schemas/VertexAIEmbeddingConfig",
                    "BEDROCK_EMBEDDING": "#/components/schemas/BedrockEmbeddingConfig"
                  }
                },
                "title": "Embedding Config"
              }
            }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BaseConnectionValidation"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
      }
    },
    "/api/v1/validate-integrations/validate-data-source-connection": {
      "post": {
        "tags": ["Validation"],
        "summary": "Validate Data Source Connection",
        "description": "Validate a data source connection.",
        "operationId": "validate_data_source_connection_api_v1_validate_integrations_validate_data_source_connection_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "existing_data_source_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Existing Data Source Id"
            }
          },
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSourceCreate"
              }
            }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BaseConnectionValidation"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
      }
    },
    "/api/v1/validate-integrations/validate-data-sink-connection": {
      "post": {
        "tags": ["Validation"],
        "summary": "Validate Data Sink Connection",
        "description": "Validate a data sink connection.",
        "operationId": "validate_data_sink_connection_api_v1_validate_integrations_validate_data_sink_connection_post",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSinkCreate"
              }
            }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BaseConnectionValidation"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
    "/api/v1/data-sinks": {
      "get": {
        "tags": ["Data Sinks"],
        "summary": "List Data Sinks",
        "description": "List data sinks for a given project.",
        "operationId": "list_data_sinks_api_v1_data_sinks_get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
          {
            "name": "organization_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Organization Id"
            }
          },
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataSink"
                  },
                  "title": "Response List Data Sinks Api V1 Data Sinks Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["Data Sinks"],
        "summary": "Create Data Sink",
        "description": "Create a new data sink.",
        "operationId": "create_data_sink_api_v1_data_sinks_post",
          {
            "HTTPBearer": []
          },
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            "name": "organization_id",
            "in": "query",
Alex Yang's avatar
Alex Yang committed
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
Alex Yang's avatar
Alex Yang committed
              "title": "Organization Id"
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSinkCreate"
              }
            }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSink"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": ["Data Sinks"],
        "summary": "Upsert Data Sink",
        "description": "Upserts a data sink.\nUpdates if a data sink with the same name and project_id already exists. Otherwise, creates a new data sink.",
        "operationId": "upsert_data_sink_api_v1_data_sinks_put",
          {
            "HTTPBearer": []
          },
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Project Id"
            "name": "organization_id",
            "in": "query",
Alex Yang's avatar
Alex Yang committed
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "uuid"
                },
                {
                  "type": "null"
                }
              ],
Alex Yang's avatar
Alex Yang committed
              "title": "Organization Id"
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSinkCreate"
              }
            }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSink"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
      }
    },
    "/api/v1/data-sinks/{data_sink_id}": {
      "get": {
        "tags": ["Data Sinks"],
        "summary": "Get Data Sink",
        "description": "Get a data sink by ID.",
        "operationId": "get_data_sink_api_v1_data_sinks__data_sink_id__get",
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "HTTPBearer": []
          }
        ],
            "name": "data_sink_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Data Sink Id"
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSink"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": ["Data Sinks"],
        "summary": "Update Data Sink",
        "description": "Update a data sink by ID.",
        "operationId": "update_data_sink_api_v1_data_sinks__data_sink_id__put",
          {
            "HTTPBearer": []
          },
            "name": "data_sink_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Data Sink Id"
            "name": "session",
            "in": "cookie",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session"
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSinkUpdate"
              }
            }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataSink"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": ["Data Sinks"],
        "summary": "Delete Data Sink",
        "description": "Delete a data sink by ID.",
        "operationId": "delete_data_sink_api_v1_data_sinks__data_sink_id__delete",
          {
            "HTTPBearer": []
          },
            "name": "data_sink_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Data Sink Id"