# Data Sinks

## List Data Sinks

`List<DataSink> dataSinks().list(DataSinkListParamsparams = DataSinkListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`

**get** `/api/v1/data-sinks`

List data sinks for a given project.

### Parameters

- `DataSinkListParams params`

  - `Optional<String> organizationId`

  - `Optional<String> projectId`

### Example

```java
package com.llamacloud_prod.api.example;

import com.llamacloud_prod.api.client.LlamaCloudClient;
import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;
import com.llamacloud_prod.api.models.datasinks.DataSink;
import com.llamacloud_prod.api.models.datasinks.DataSinkListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        List<DataSink> dataSinks = client.dataSinks().list();
    }
}
```

#### Response

```json
[
  {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "component": {
      "foo": "bar"
    },
    "name": "name",
    "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "sink_type": "PINECONE",
    "created_at": "2019-12-27T18:11:19.117Z",
    "updated_at": "2019-12-27T18:11:19.117Z"
  }
]
```

## Create Data Sink

`DataSink dataSinks().create(DataSinkCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())`

**post** `/api/v1/data-sinks`

Create a new data sink.

### Parameters

- `DataSinkCreateParams params`

  - `Optional<String> organizationId`

  - `Optional<String> projectId`

  - `DataSinkCreate dataSinkCreate`

    Schema for creating a data sink.

### Returns

- `class DataSink:`

  Schema for a data sink.

  - `String id`

    Unique identifier

  - `Component component`

    Component that implements the data sink

    - `class UnionMember0:`

    - `class CloudPineconeVectorStore:`

      Cloud Pinecone Vector Store.

      This class is used to store the configuration for a Pinecone vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      api_key (str): API key for authenticating with Pinecone
      index_name (str): name of the Pinecone index
      namespace (optional[str]): namespace to use in the Pinecone index
      insert_kwargs (optional[dict]): additional kwargs to pass during insertion

      - `String apiKey`

        The API key for authenticating with Pinecone

      - `String indexName`

      - `Optional<String> className`

      - `Optional<InsertKwargs> insertKwargs`

      - `Optional<String> namespace`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

    - `class CloudPostgresVectorStore:`

      - `String database`

      - `long embedDim`

      - `String host`

      - `String password`

      - `long port`

      - `String schemaName`

      - `String tableName`

      - `String user`

      - `Optional<String> className`

      - `Optional<PgVectorHnswSettings> hnswSettings`

        HNSW settings for PGVector.

        - `Optional<DistanceMethod> distanceMethod`

          The distance method to use.

          - `L2("l2")`

          - `IP("ip")`

          - `COSINE("cosine")`

          - `L1("l1")`

          - `HAMMING("hamming")`

          - `JACCARD("jaccard")`

        - `Optional<Long> efConstruction`

          The number of edges to use during the construction phase.

        - `Optional<Long> efSearch`

          The number of edges to use during the search phase.

        - `Optional<Long> m`

          The number of bi-directional links created for each new element.

        - `Optional<VectorType> vectorType`

          The type of vector to use.

          - `VECTOR("vector")`

          - `HALF_VEC("half_vec")`

          - `BIT("bit")`

          - `SPARSE_VEC("sparse_vec")`

      - `Optional<Boolean> hybridSearch`

      - `Optional<Boolean> performSetup`

      - `Optional<Boolean> supportsNestedMetadataFilters`

    - `class CloudQdrantVectorStore:`

      Cloud Qdrant Vector Store.

      This class is used to store the configuration for a Qdrant vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      collection_name (str): name of the Qdrant collection
      url (str): url of the Qdrant instance
      api_key (str): API key for authenticating with Qdrant
      max_retries (int): maximum number of retries in case of a failure. Defaults to 3
      client_kwargs (dict): additional kwargs to pass to the Qdrant client

      - `String apiKey`

      - `String collectionName`

      - `String url`

      - `Optional<String> className`

      - `Optional<ClientKwargs> clientKwargs`

      - `Optional<Long> maxRetries`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

    - `class CloudAzureAiSearchVectorStore:`

      Cloud Azure AI Search Vector Store.

      - `String searchServiceApiKey`

      - `String searchServiceEndpoint`

      - `Optional<String> className`

      - `Optional<String> clientId`

      - `Optional<String> clientSecret`

      - `Optional<Long> embeddingDimension`

      - `Optional<FilterableMetadataFieldKeys> filterableMetadataFieldKeys`

      - `Optional<String> indexName`

      - `Optional<String> searchServiceApiVersion`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

      - `Optional<String> tenantId`

    - `class CloudMongoDBAtlasVectorSearch:`

      Cloud MongoDB Atlas Vector Store.

      This class is used to store the configuration for a MongoDB Atlas vector store,
      so that it can be created and used in LlamaCloud.

      Args:
      mongodb_uri (str): URI for connecting to MongoDB Atlas
      db_name (str): name of the MongoDB database
      collection_name (str): name of the MongoDB collection
      vector_index_name (str): name of the MongoDB Atlas vector index
      fulltext_index_name (str): name of the MongoDB Atlas full-text index

      - `String collectionName`

      - `String dbName`

      - `String mongoDBUri`

      - `Optional<String> className`

      - `Optional<Long> embeddingDimension`

      - `Optional<String> fulltextIndexName`

      - `Optional<Boolean> supportsNestedMetadataFilters`

      - `Optional<String> vectorIndexName`

    - `class CloudMilvusVectorStore:`

      Cloud Milvus Vector Store.

      - `String uri`

      - `Optional<String> token`

      - `Optional<String> className`

      - `Optional<String> collectionName`

      - `Optional<Long> embeddingDimension`

      - `Optional<Boolean> supportsNestedMetadataFilters`

    - `class CloudAstraDbVectorStore:`

      Cloud AstraDB Vector Store.

      This class is used to store the configuration for an AstraDB vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      token (str): The Astra DB Application Token to use.
      api_endpoint (str): The Astra DB JSON API endpoint for your database.
      collection_name (str): Collection name to use. If not existing, it will be created.
      embedding_dimension (int): Length of the embedding vectors in use.
      keyspace (optional[str]): The keyspace to use. If not provided, 'default_keyspace'

      - `String token`

        The Astra DB Application Token to use

      - `String apiEndpoint`

        The Astra DB JSON API endpoint for your database

      - `String collectionName`

        Collection name to use. If not existing, it will be created

      - `long embeddingDimension`

        Length of the embedding vectors in use

      - `Optional<String> className`

      - `Optional<String> keyspace`

        The keyspace to use. If not provided, 'default_keyspace'

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

  - `String name`

    The name of the data sink.

  - `String projectId`

  - `SinkType sinkType`

    - `PINECONE("PINECONE")`

    - `POSTGRES("POSTGRES")`

    - `QDRANT("QDRANT")`

    - `AZUREAI_SEARCH("AZUREAI_SEARCH")`

    - `MONGODB_ATLAS("MONGODB_ATLAS")`

    - `MILVUS("MILVUS")`

    - `ASTRA_DB("ASTRA_DB")`

  - `Optional<LocalDateTime> createdAt`

    Creation datetime

  - `Optional<LocalDateTime> updatedAt`

    Update datetime

### Example

```java
package com.llamacloud_prod.api.example;

import com.llamacloud_prod.api.client.LlamaCloudClient;
import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;
import com.llamacloud_prod.api.core.JsonValue;
import com.llamacloud_prod.api.models.datasinks.DataSink;
import com.llamacloud_prod.api.models.datasinks.DataSinkCreateParams;
import com.llamacloud_prod.api.models.pipelines.DataSinkCreate;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        DataSinkCreate params = DataSinkCreate.builder()
            .component(DataSinkCreate.Component.UnionMember0.builder()
                .putAdditionalProperty("foo", JsonValue.from("bar"))
                .build())
            .name("name")
            .sinkType(DataSinkCreate.SinkType.PINECONE)
            .build();
        DataSink dataSink = client.dataSinks().create(params);
    }
}
```

#### Response

```json
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "component": {
    "foo": "bar"
  },
  "name": "name",
  "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "sink_type": "PINECONE",
  "created_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Get Data Sink

`DataSink dataSinks().get(DataSinkGetParamsparams = DataSinkGetParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`

**get** `/api/v1/data-sinks/{data_sink_id}`

Get a data sink by ID.

### Parameters

- `DataSinkGetParams params`

  - `Optional<String> dataSinkId`

### Returns

- `class DataSink:`

  Schema for a data sink.

  - `String id`

    Unique identifier

  - `Component component`

    Component that implements the data sink

    - `class UnionMember0:`

    - `class CloudPineconeVectorStore:`

      Cloud Pinecone Vector Store.

      This class is used to store the configuration for a Pinecone vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      api_key (str): API key for authenticating with Pinecone
      index_name (str): name of the Pinecone index
      namespace (optional[str]): namespace to use in the Pinecone index
      insert_kwargs (optional[dict]): additional kwargs to pass during insertion

      - `String apiKey`

        The API key for authenticating with Pinecone

      - `String indexName`

      - `Optional<String> className`

      - `Optional<InsertKwargs> insertKwargs`

      - `Optional<String> namespace`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

    - `class CloudPostgresVectorStore:`

      - `String database`

      - `long embedDim`

      - `String host`

      - `String password`

      - `long port`

      - `String schemaName`

      - `String tableName`

      - `String user`

      - `Optional<String> className`

      - `Optional<PgVectorHnswSettings> hnswSettings`

        HNSW settings for PGVector.

        - `Optional<DistanceMethod> distanceMethod`

          The distance method to use.

          - `L2("l2")`

          - `IP("ip")`

          - `COSINE("cosine")`

          - `L1("l1")`

          - `HAMMING("hamming")`

          - `JACCARD("jaccard")`

        - `Optional<Long> efConstruction`

          The number of edges to use during the construction phase.

        - `Optional<Long> efSearch`

          The number of edges to use during the search phase.

        - `Optional<Long> m`

          The number of bi-directional links created for each new element.

        - `Optional<VectorType> vectorType`

          The type of vector to use.

          - `VECTOR("vector")`

          - `HALF_VEC("half_vec")`

          - `BIT("bit")`

          - `SPARSE_VEC("sparse_vec")`

      - `Optional<Boolean> hybridSearch`

      - `Optional<Boolean> performSetup`

      - `Optional<Boolean> supportsNestedMetadataFilters`

    - `class CloudQdrantVectorStore:`

      Cloud Qdrant Vector Store.

      This class is used to store the configuration for a Qdrant vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      collection_name (str): name of the Qdrant collection
      url (str): url of the Qdrant instance
      api_key (str): API key for authenticating with Qdrant
      max_retries (int): maximum number of retries in case of a failure. Defaults to 3
      client_kwargs (dict): additional kwargs to pass to the Qdrant client

      - `String apiKey`

      - `String collectionName`

      - `String url`

      - `Optional<String> className`

      - `Optional<ClientKwargs> clientKwargs`

      - `Optional<Long> maxRetries`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

    - `class CloudAzureAiSearchVectorStore:`

      Cloud Azure AI Search Vector Store.

      - `String searchServiceApiKey`

      - `String searchServiceEndpoint`

      - `Optional<String> className`

      - `Optional<String> clientId`

      - `Optional<String> clientSecret`

      - `Optional<Long> embeddingDimension`

      - `Optional<FilterableMetadataFieldKeys> filterableMetadataFieldKeys`

      - `Optional<String> indexName`

      - `Optional<String> searchServiceApiVersion`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

      - `Optional<String> tenantId`

    - `class CloudMongoDBAtlasVectorSearch:`

      Cloud MongoDB Atlas Vector Store.

      This class is used to store the configuration for a MongoDB Atlas vector store,
      so that it can be created and used in LlamaCloud.

      Args:
      mongodb_uri (str): URI for connecting to MongoDB Atlas
      db_name (str): name of the MongoDB database
      collection_name (str): name of the MongoDB collection
      vector_index_name (str): name of the MongoDB Atlas vector index
      fulltext_index_name (str): name of the MongoDB Atlas full-text index

      - `String collectionName`

      - `String dbName`

      - `String mongoDBUri`

      - `Optional<String> className`

      - `Optional<Long> embeddingDimension`

      - `Optional<String> fulltextIndexName`

      - `Optional<Boolean> supportsNestedMetadataFilters`

      - `Optional<String> vectorIndexName`

    - `class CloudMilvusVectorStore:`

      Cloud Milvus Vector Store.

      - `String uri`

      - `Optional<String> token`

      - `Optional<String> className`

      - `Optional<String> collectionName`

      - `Optional<Long> embeddingDimension`

      - `Optional<Boolean> supportsNestedMetadataFilters`

    - `class CloudAstraDbVectorStore:`

      Cloud AstraDB Vector Store.

      This class is used to store the configuration for an AstraDB vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      token (str): The Astra DB Application Token to use.
      api_endpoint (str): The Astra DB JSON API endpoint for your database.
      collection_name (str): Collection name to use. If not existing, it will be created.
      embedding_dimension (int): Length of the embedding vectors in use.
      keyspace (optional[str]): The keyspace to use. If not provided, 'default_keyspace'

      - `String token`

        The Astra DB Application Token to use

      - `String apiEndpoint`

        The Astra DB JSON API endpoint for your database

      - `String collectionName`

        Collection name to use. If not existing, it will be created

      - `long embeddingDimension`

        Length of the embedding vectors in use

      - `Optional<String> className`

      - `Optional<String> keyspace`

        The keyspace to use. If not provided, 'default_keyspace'

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

  - `String name`

    The name of the data sink.

  - `String projectId`

  - `SinkType sinkType`

    - `PINECONE("PINECONE")`

    - `POSTGRES("POSTGRES")`

    - `QDRANT("QDRANT")`

    - `AZUREAI_SEARCH("AZUREAI_SEARCH")`

    - `MONGODB_ATLAS("MONGODB_ATLAS")`

    - `MILVUS("MILVUS")`

    - `ASTRA_DB("ASTRA_DB")`

  - `Optional<LocalDateTime> createdAt`

    Creation datetime

  - `Optional<LocalDateTime> updatedAt`

    Update datetime

### Example

```java
package com.llamacloud_prod.api.example;

import com.llamacloud_prod.api.client.LlamaCloudClient;
import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;
import com.llamacloud_prod.api.models.datasinks.DataSink;
import com.llamacloud_prod.api.models.datasinks.DataSinkGetParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        DataSink dataSink = client.dataSinks().get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
    }
}
```

#### Response

```json
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "component": {
    "foo": "bar"
  },
  "name": "name",
  "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "sink_type": "PINECONE",
  "created_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Update Data Sink

`DataSink dataSinks().update(DataSinkUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())`

**put** `/api/v1/data-sinks/{data_sink_id}`

Update a data sink by ID.

### Parameters

- `DataSinkUpdateParams params`

  - `Optional<String> dataSinkId`

  - `SinkType sinkType`

    - `PINECONE("PINECONE")`

    - `POSTGRES("POSTGRES")`

    - `QDRANT("QDRANT")`

    - `AZUREAI_SEARCH("AZUREAI_SEARCH")`

    - `MONGODB_ATLAS("MONGODB_ATLAS")`

    - `MILVUS("MILVUS")`

    - `ASTRA_DB("ASTRA_DB")`

  - `Optional<Component> component`

    Component that implements the data sink

    - `class UnionMember0:`

    - `class CloudPineconeVectorStore:`

      Cloud Pinecone Vector Store.

      This class is used to store the configuration for a Pinecone vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      api_key (str): API key for authenticating with Pinecone
      index_name (str): name of the Pinecone index
      namespace (optional[str]): namespace to use in the Pinecone index
      insert_kwargs (optional[dict]): additional kwargs to pass during insertion

      - `String apiKey`

        The API key for authenticating with Pinecone

      - `String indexName`

      - `Optional<String> className`

      - `Optional<InsertKwargs> insertKwargs`

      - `Optional<String> namespace`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

    - `class CloudPostgresVectorStore:`

      - `String database`

      - `long embedDim`

      - `String host`

      - `String password`

      - `long port`

      - `String schemaName`

      - `String tableName`

      - `String user`

      - `Optional<String> className`

      - `Optional<PgVectorHnswSettings> hnswSettings`

        HNSW settings for PGVector.

        - `Optional<DistanceMethod> distanceMethod`

          The distance method to use.

          - `L2("l2")`

          - `IP("ip")`

          - `COSINE("cosine")`

          - `L1("l1")`

          - `HAMMING("hamming")`

          - `JACCARD("jaccard")`

        - `Optional<Long> efConstruction`

          The number of edges to use during the construction phase.

        - `Optional<Long> efSearch`

          The number of edges to use during the search phase.

        - `Optional<Long> m`

          The number of bi-directional links created for each new element.

        - `Optional<VectorType> vectorType`

          The type of vector to use.

          - `VECTOR("vector")`

          - `HALF_VEC("half_vec")`

          - `BIT("bit")`

          - `SPARSE_VEC("sparse_vec")`

      - `Optional<Boolean> hybridSearch`

      - `Optional<Boolean> performSetup`

      - `Optional<Boolean> supportsNestedMetadataFilters`

    - `class CloudQdrantVectorStore:`

      Cloud Qdrant Vector Store.

      This class is used to store the configuration for a Qdrant vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      collection_name (str): name of the Qdrant collection
      url (str): url of the Qdrant instance
      api_key (str): API key for authenticating with Qdrant
      max_retries (int): maximum number of retries in case of a failure. Defaults to 3
      client_kwargs (dict): additional kwargs to pass to the Qdrant client

      - `String apiKey`

      - `String collectionName`

      - `String url`

      - `Optional<String> className`

      - `Optional<ClientKwargs> clientKwargs`

      - `Optional<Long> maxRetries`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

    - `class CloudAzureAiSearchVectorStore:`

      Cloud Azure AI Search Vector Store.

      - `String searchServiceApiKey`

      - `String searchServiceEndpoint`

      - `Optional<String> className`

      - `Optional<String> clientId`

      - `Optional<String> clientSecret`

      - `Optional<Long> embeddingDimension`

      - `Optional<FilterableMetadataFieldKeys> filterableMetadataFieldKeys`

      - `Optional<String> indexName`

      - `Optional<String> searchServiceApiVersion`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

      - `Optional<String> tenantId`

    - `class CloudMongoDBAtlasVectorSearch:`

      Cloud MongoDB Atlas Vector Store.

      This class is used to store the configuration for a MongoDB Atlas vector store,
      so that it can be created and used in LlamaCloud.

      Args:
      mongodb_uri (str): URI for connecting to MongoDB Atlas
      db_name (str): name of the MongoDB database
      collection_name (str): name of the MongoDB collection
      vector_index_name (str): name of the MongoDB Atlas vector index
      fulltext_index_name (str): name of the MongoDB Atlas full-text index

      - `String collectionName`

      - `String dbName`

      - `String mongoDBUri`

      - `Optional<String> className`

      - `Optional<Long> embeddingDimension`

      - `Optional<String> fulltextIndexName`

      - `Optional<Boolean> supportsNestedMetadataFilters`

      - `Optional<String> vectorIndexName`

    - `class CloudMilvusVectorStore:`

      Cloud Milvus Vector Store.

      - `String uri`

      - `Optional<String> token`

      - `Optional<String> className`

      - `Optional<String> collectionName`

      - `Optional<Long> embeddingDimension`

      - `Optional<Boolean> supportsNestedMetadataFilters`

    - `class CloudAstraDbVectorStore:`

      Cloud AstraDB Vector Store.

      This class is used to store the configuration for an AstraDB vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      token (str): The Astra DB Application Token to use.
      api_endpoint (str): The Astra DB JSON API endpoint for your database.
      collection_name (str): Collection name to use. If not existing, it will be created.
      embedding_dimension (int): Length of the embedding vectors in use.
      keyspace (optional[str]): The keyspace to use. If not provided, 'default_keyspace'

      - `String token`

        The Astra DB Application Token to use

      - `String apiEndpoint`

        The Astra DB JSON API endpoint for your database

      - `String collectionName`

        Collection name to use. If not existing, it will be created

      - `long embeddingDimension`

        Length of the embedding vectors in use

      - `Optional<String> className`

      - `Optional<String> keyspace`

        The keyspace to use. If not provided, 'default_keyspace'

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

  - `Optional<String> name`

    The name of the data sink.

### Returns

- `class DataSink:`

  Schema for a data sink.

  - `String id`

    Unique identifier

  - `Component component`

    Component that implements the data sink

    - `class UnionMember0:`

    - `class CloudPineconeVectorStore:`

      Cloud Pinecone Vector Store.

      This class is used to store the configuration for a Pinecone vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      api_key (str): API key for authenticating with Pinecone
      index_name (str): name of the Pinecone index
      namespace (optional[str]): namespace to use in the Pinecone index
      insert_kwargs (optional[dict]): additional kwargs to pass during insertion

      - `String apiKey`

        The API key for authenticating with Pinecone

      - `String indexName`

      - `Optional<String> className`

      - `Optional<InsertKwargs> insertKwargs`

      - `Optional<String> namespace`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

    - `class CloudPostgresVectorStore:`

      - `String database`

      - `long embedDim`

      - `String host`

      - `String password`

      - `long port`

      - `String schemaName`

      - `String tableName`

      - `String user`

      - `Optional<String> className`

      - `Optional<PgVectorHnswSettings> hnswSettings`

        HNSW settings for PGVector.

        - `Optional<DistanceMethod> distanceMethod`

          The distance method to use.

          - `L2("l2")`

          - `IP("ip")`

          - `COSINE("cosine")`

          - `L1("l1")`

          - `HAMMING("hamming")`

          - `JACCARD("jaccard")`

        - `Optional<Long> efConstruction`

          The number of edges to use during the construction phase.

        - `Optional<Long> efSearch`

          The number of edges to use during the search phase.

        - `Optional<Long> m`

          The number of bi-directional links created for each new element.

        - `Optional<VectorType> vectorType`

          The type of vector to use.

          - `VECTOR("vector")`

          - `HALF_VEC("half_vec")`

          - `BIT("bit")`

          - `SPARSE_VEC("sparse_vec")`

      - `Optional<Boolean> hybridSearch`

      - `Optional<Boolean> performSetup`

      - `Optional<Boolean> supportsNestedMetadataFilters`

    - `class CloudQdrantVectorStore:`

      Cloud Qdrant Vector Store.

      This class is used to store the configuration for a Qdrant vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      collection_name (str): name of the Qdrant collection
      url (str): url of the Qdrant instance
      api_key (str): API key for authenticating with Qdrant
      max_retries (int): maximum number of retries in case of a failure. Defaults to 3
      client_kwargs (dict): additional kwargs to pass to the Qdrant client

      - `String apiKey`

      - `String collectionName`

      - `String url`

      - `Optional<String> className`

      - `Optional<ClientKwargs> clientKwargs`

      - `Optional<Long> maxRetries`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

    - `class CloudAzureAiSearchVectorStore:`

      Cloud Azure AI Search Vector Store.

      - `String searchServiceApiKey`

      - `String searchServiceEndpoint`

      - `Optional<String> className`

      - `Optional<String> clientId`

      - `Optional<String> clientSecret`

      - `Optional<Long> embeddingDimension`

      - `Optional<FilterableMetadataFieldKeys> filterableMetadataFieldKeys`

      - `Optional<String> indexName`

      - `Optional<String> searchServiceApiVersion`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

      - `Optional<String> tenantId`

    - `class CloudMongoDBAtlasVectorSearch:`

      Cloud MongoDB Atlas Vector Store.

      This class is used to store the configuration for a MongoDB Atlas vector store,
      so that it can be created and used in LlamaCloud.

      Args:
      mongodb_uri (str): URI for connecting to MongoDB Atlas
      db_name (str): name of the MongoDB database
      collection_name (str): name of the MongoDB collection
      vector_index_name (str): name of the MongoDB Atlas vector index
      fulltext_index_name (str): name of the MongoDB Atlas full-text index

      - `String collectionName`

      - `String dbName`

      - `String mongoDBUri`

      - `Optional<String> className`

      - `Optional<Long> embeddingDimension`

      - `Optional<String> fulltextIndexName`

      - `Optional<Boolean> supportsNestedMetadataFilters`

      - `Optional<String> vectorIndexName`

    - `class CloudMilvusVectorStore:`

      Cloud Milvus Vector Store.

      - `String uri`

      - `Optional<String> token`

      - `Optional<String> className`

      - `Optional<String> collectionName`

      - `Optional<Long> embeddingDimension`

      - `Optional<Boolean> supportsNestedMetadataFilters`

    - `class CloudAstraDbVectorStore:`

      Cloud AstraDB Vector Store.

      This class is used to store the configuration for an AstraDB vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      token (str): The Astra DB Application Token to use.
      api_endpoint (str): The Astra DB JSON API endpoint for your database.
      collection_name (str): Collection name to use. If not existing, it will be created.
      embedding_dimension (int): Length of the embedding vectors in use.
      keyspace (optional[str]): The keyspace to use. If not provided, 'default_keyspace'

      - `String token`

        The Astra DB Application Token to use

      - `String apiEndpoint`

        The Astra DB JSON API endpoint for your database

      - `String collectionName`

        Collection name to use. If not existing, it will be created

      - `long embeddingDimension`

        Length of the embedding vectors in use

      - `Optional<String> className`

      - `Optional<String> keyspace`

        The keyspace to use. If not provided, 'default_keyspace'

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

  - `String name`

    The name of the data sink.

  - `String projectId`

  - `SinkType sinkType`

    - `PINECONE("PINECONE")`

    - `POSTGRES("POSTGRES")`

    - `QDRANT("QDRANT")`

    - `AZUREAI_SEARCH("AZUREAI_SEARCH")`

    - `MONGODB_ATLAS("MONGODB_ATLAS")`

    - `MILVUS("MILVUS")`

    - `ASTRA_DB("ASTRA_DB")`

  - `Optional<LocalDateTime> createdAt`

    Creation datetime

  - `Optional<LocalDateTime> updatedAt`

    Update datetime

### Example

```java
package com.llamacloud_prod.api.example;

import com.llamacloud_prod.api.client.LlamaCloudClient;
import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;
import com.llamacloud_prod.api.models.datasinks.DataSink;
import com.llamacloud_prod.api.models.datasinks.DataSinkUpdateParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        DataSinkUpdateParams params = DataSinkUpdateParams.builder()
            .dataSinkId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
            .sinkType(DataSinkUpdateParams.SinkType.PINECONE)
            .build();
        DataSink dataSink = client.dataSinks().update(params);
    }
}
```

#### Response

```json
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "component": {
    "foo": "bar"
  },
  "name": "name",
  "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "sink_type": "PINECONE",
  "created_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Delete Data Sink

`dataSinks().delete(DataSinkDeleteParamsparams = DataSinkDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())`

**delete** `/api/v1/data-sinks/{data_sink_id}`

Delete a data sink by ID.

### Parameters

- `DataSinkDeleteParams params`

  - `Optional<String> dataSinkId`

### Example

```java
package com.llamacloud_prod.api.example;

import com.llamacloud_prod.api.client.LlamaCloudClient;
import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;
import com.llamacloud_prod.api.models.datasinks.DataSinkDeleteParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        client.dataSinks().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
    }
}
```

## Domain Types

### Data Sink

- `class DataSink:`

  Schema for a data sink.

  - `String id`

    Unique identifier

  - `Component component`

    Component that implements the data sink

    - `class UnionMember0:`

    - `class CloudPineconeVectorStore:`

      Cloud Pinecone Vector Store.

      This class is used to store the configuration for a Pinecone vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      api_key (str): API key for authenticating with Pinecone
      index_name (str): name of the Pinecone index
      namespace (optional[str]): namespace to use in the Pinecone index
      insert_kwargs (optional[dict]): additional kwargs to pass during insertion

      - `String apiKey`

        The API key for authenticating with Pinecone

      - `String indexName`

      - `Optional<String> className`

      - `Optional<InsertKwargs> insertKwargs`

      - `Optional<String> namespace`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

    - `class CloudPostgresVectorStore:`

      - `String database`

      - `long embedDim`

      - `String host`

      - `String password`

      - `long port`

      - `String schemaName`

      - `String tableName`

      - `String user`

      - `Optional<String> className`

      - `Optional<PgVectorHnswSettings> hnswSettings`

        HNSW settings for PGVector.

        - `Optional<DistanceMethod> distanceMethod`

          The distance method to use.

          - `L2("l2")`

          - `IP("ip")`

          - `COSINE("cosine")`

          - `L1("l1")`

          - `HAMMING("hamming")`

          - `JACCARD("jaccard")`

        - `Optional<Long> efConstruction`

          The number of edges to use during the construction phase.

        - `Optional<Long> efSearch`

          The number of edges to use during the search phase.

        - `Optional<Long> m`

          The number of bi-directional links created for each new element.

        - `Optional<VectorType> vectorType`

          The type of vector to use.

          - `VECTOR("vector")`

          - `HALF_VEC("half_vec")`

          - `BIT("bit")`

          - `SPARSE_VEC("sparse_vec")`

      - `Optional<Boolean> hybridSearch`

      - `Optional<Boolean> performSetup`

      - `Optional<Boolean> supportsNestedMetadataFilters`

    - `class CloudQdrantVectorStore:`

      Cloud Qdrant Vector Store.

      This class is used to store the configuration for a Qdrant vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      collection_name (str): name of the Qdrant collection
      url (str): url of the Qdrant instance
      api_key (str): API key for authenticating with Qdrant
      max_retries (int): maximum number of retries in case of a failure. Defaults to 3
      client_kwargs (dict): additional kwargs to pass to the Qdrant client

      - `String apiKey`

      - `String collectionName`

      - `String url`

      - `Optional<String> className`

      - `Optional<ClientKwargs> clientKwargs`

      - `Optional<Long> maxRetries`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

    - `class CloudAzureAiSearchVectorStore:`

      Cloud Azure AI Search Vector Store.

      - `String searchServiceApiKey`

      - `String searchServiceEndpoint`

      - `Optional<String> className`

      - `Optional<String> clientId`

      - `Optional<String> clientSecret`

      - `Optional<Long> embeddingDimension`

      - `Optional<FilterableMetadataFieldKeys> filterableMetadataFieldKeys`

      - `Optional<String> indexName`

      - `Optional<String> searchServiceApiVersion`

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

      - `Optional<String> tenantId`

    - `class CloudMongoDBAtlasVectorSearch:`

      Cloud MongoDB Atlas Vector Store.

      This class is used to store the configuration for a MongoDB Atlas vector store,
      so that it can be created and used in LlamaCloud.

      Args:
      mongodb_uri (str): URI for connecting to MongoDB Atlas
      db_name (str): name of the MongoDB database
      collection_name (str): name of the MongoDB collection
      vector_index_name (str): name of the MongoDB Atlas vector index
      fulltext_index_name (str): name of the MongoDB Atlas full-text index

      - `String collectionName`

      - `String dbName`

      - `String mongoDBUri`

      - `Optional<String> className`

      - `Optional<Long> embeddingDimension`

      - `Optional<String> fulltextIndexName`

      - `Optional<Boolean> supportsNestedMetadataFilters`

      - `Optional<String> vectorIndexName`

    - `class CloudMilvusVectorStore:`

      Cloud Milvus Vector Store.

      - `String uri`

      - `Optional<String> token`

      - `Optional<String> className`

      - `Optional<String> collectionName`

      - `Optional<Long> embeddingDimension`

      - `Optional<Boolean> supportsNestedMetadataFilters`

    - `class CloudAstraDbVectorStore:`

      Cloud AstraDB Vector Store.

      This class is used to store the configuration for an AstraDB vector store, so that it can be
      created and used in LlamaCloud.

      Args:
      token (str): The Astra DB Application Token to use.
      api_endpoint (str): The Astra DB JSON API endpoint for your database.
      collection_name (str): Collection name to use. If not existing, it will be created.
      embedding_dimension (int): Length of the embedding vectors in use.
      keyspace (optional[str]): The keyspace to use. If not provided, 'default_keyspace'

      - `String token`

        The Astra DB Application Token to use

      - `String apiEndpoint`

        The Astra DB JSON API endpoint for your database

      - `String collectionName`

        Collection name to use. If not existing, it will be created

      - `long embeddingDimension`

        Length of the embedding vectors in use

      - `Optional<String> className`

      - `Optional<String> keyspace`

        The keyspace to use. If not provided, 'default_keyspace'

      - `Optional<SupportsNestedMetadataFilters> supportsNestedMetadataFilters`

        - `TRUE(true)`

  - `String name`

    The name of the data sink.

  - `String projectId`

  - `SinkType sinkType`

    - `PINECONE("PINECONE")`

    - `POSTGRES("POSTGRES")`

    - `QDRANT("QDRANT")`

    - `AZUREAI_SEARCH("AZUREAI_SEARCH")`

    - `MONGODB_ATLAS("MONGODB_ATLAS")`

    - `MILVUS("MILVUS")`

    - `ASTRA_DB("ASTRA_DB")`

  - `Optional<LocalDateTime> createdAt`

    Creation datetime

  - `Optional<LocalDateTime> updatedAt`

    Update datetime
