> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deasylabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update

> Update an existing data connector configuration.

## Request Body

| Field             | Type          | Description                                      |
|-------------------|---------------|--------------------------------------------------|
| `connector_name`  | `str`         | The profile name of the data connector to update.|
| `connector_body`  | `VDBConfigs`  | Updated configuration object for the VDB.        |

## Response

- **200**: VDB connector updated successfully  
    - Returns: `{ "profile_id": str }`
- **500**: Internal Server Error (e.g., failed to store secret)

## Example

```json
{
  "connector_name": "my-pinecone-db",
  "connector_body": {
    "vector_db_type": "pinecone",
    "api_key": "updated-api-key",
    "environment": "us-west-1-aws",
    "index_name": "my-index"
  }
}
```



## OpenAPI

````yaml /deasy-openapi-stainless.yml post /data_connector/update
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: /rest/unstructured
security: []
paths:
  /data_connector/update:
    post:
      tags:
        - Data Connectors
      summary: Update
      description: >-
        Update an existing data connector configuration.


        ## Request Body


        | Field             | Type          |
        Description                                      |

        |-------------------|---------------|--------------------------------------------------|

        | `connector_name`  | `str`         | The profile name of the data
        connector to update.|

        | `connector_body`  | `VDBConfigs`  | Updated configuration object for
        the VDB.        |


        ## Response


        - **200**: VDB connector updated successfully  
            - Returns: `{ "profile_id": str }`
        - **500**: Internal Server Error (e.g., failed to store secret)


        ## Example


        ```json

        {
          "connector_name": "my-pinecone-db",
          "connector_body": {
            "vector_db_type": "pinecone",
            "api_key": "updated-api-key",
            "environment": "us-west-1-aws",
            "index_name": "my-index"
          }
        }

        ```
      operationId: update_data_source_route_data_connector_update_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateVDBConnectorRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorResponse'
        '403':
          description: Missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '500':
          description: >-
            Internal Server Error. An unexpected error occurred while processing
            the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
      security:
        - BasicAuth: []
        - BearerAuth: []
          UserIdAuth: []
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from unstructured import UnstructuredClient

            client = UnstructuredClient(
                username=os.environ.get("UNSTRUCTURED_USERNAME"),  # This is the default and can be omitted
                password=os.environ.get("UNSTRUCTURED_PASSWORD"),  # This is the default and can be omitted
            )
            connector_response = client.data_source.update(
                connector_body={
                    "client_id": "client_id",
                    "client_secret": "client_secret",
                    "name": "name",
                    "tenant_id": "tenant_id",
                    "type": "OnedriveDataSourceManager",
                },
                connector_name="connector_name",
            )
            print(connector_response.profile_id)
        - lang: JavaScript
          source: |-
            import UnstructuredClient from 'unstructured-sdk';

            const client = new UnstructuredClient({
              authMethod: 'My Auth Method',
              username: process.env['UNSTRUCTURED_USERNAME'], // This is the default and can be omitted
              password: process.env['UNSTRUCTURED_PASSWORD'], // This is the default and can be omitted
            });

            const connectorResponse = await client.dataSource.update({
              connector_body: {
                client_id: 'client_id',
                client_secret: 'client_secret',
                name: 'name',
                tenant_id: 'tenant_id',
                type: 'OnedriveDataSourceManager',
              },
              connector_name: 'connector_name',
            });

            console.log(connectorResponse.profile_id);
components:
  schemas:
    UpdateVDBConnectorRequest:
      properties:
        connector_name:
          type: string
          title: Connector Name
        connector_body:
          oneOf:
            - $ref: '#/components/schemas/OnedriveConnectorConfig'
            - $ref: '#/components/schemas/PSQLConnectorConfig'
            - $ref: '#/components/schemas/QdrantConnectorConfig'
            - $ref: '#/components/schemas/S3ConnectorConfig'
            - $ref: '#/components/schemas/SharepointConnectorConfig'
          title: Connector Body
          discriminator:
            propertyName: type
            mapping:
              OnedriveDataSourceManager:
                $ref: '#/components/schemas/OnedriveConnectorConfig'
              PSQLVectorDBManager:
                $ref: '#/components/schemas/PSQLConnectorConfig'
              QdrantVectorDBManager:
                $ref: '#/components/schemas/QdrantConnectorConfig'
              S3DataSourceManager:
                $ref: '#/components/schemas/S3ConnectorConfig'
              SharepointDataSourceManager:
                $ref: '#/components/schemas/SharepointConnectorConfig'
      type: object
      required:
        - connector_name
        - connector_body
      title: UpdateVDBConnectorRequest
    ConnectorResponse:
      properties:
        profile_id:
          type: string
          title: Profile Id
      type: object
      required:
        - profile_id
      title: ConnectorResponse
    HTTPError:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: HTTPError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OnedriveConnectorConfig:
      properties:
        type:
          type: string
          enum:
            - OnedriveDataSourceManager
          const: OnedriveDataSourceManager
          title: Type
          default: OnedriveDataSourceManager
        name:
          type: string
          title: Name
        client_id:
          type: string
          title: Client Id
        client_secret:
          type: string
          title: Client Secret
        tenant_id:
          type: string
          title: Tenant Id
        onedrive_site_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Onedrive Site Name
        onedrive_site_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Onedrive Site Names
        drives:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Drives
      type: object
      required:
        - name
        - client_id
        - client_secret
        - tenant_id
      title: OnedriveConnectorConfig
    PSQLConnectorConfig:
      properties:
        type:
          type: string
          enum:
            - PSQLVectorDBManager
          const: PSQLVectorDBManager
          title: Type
          default: PSQLVectorDBManager
        database_name:
          type: string
          title: Database Name
        collection_name:
          type: string
          title: Collection Name
        url:
          type: string
          title: Url
        password:
          type: string
          title: Password
        db_user:
          type: string
          title: Db User
        port:
          type: string
          title: Port
        name:
          type: string
          title: Name
        index_info:
          anyOf:
            - $ref: '#/components/schemas/PSQLIndexInfo'
            - type: 'null'
        filename_key:
          type: string
          title: Filename Key
          default: filename
        text_key:
          type: string
          title: Text Key
          default: text
      type: object
      required:
        - database_name
        - collection_name
        - url
        - password
        - db_user
        - port
        - name
      title: PSQLConnectorConfig
    QdrantConnectorConfig:
      properties:
        type:
          type: string
          enum:
            - QdrantVectorDBManager
          const: QdrantVectorDBManager
          title: Type
          default: QdrantVectorDBManager
        name:
          type: string
          title: Name
        filename_key:
          type: string
          title: Filename Key
          default: filename
        text_key:
          type: string
          title: Text Key
          default: text
        api_key:
          type: string
          title: Api Key
        collection_name:
          type: string
          title: Collection Name
        url:
          type: string
          title: Url
        index_info:
          anyOf:
            - $ref: '#/components/schemas/QdrantIndexInfo'
            - type: 'null'
      type: object
      required:
        - name
        - api_key
        - collection_name
        - url
      title: QdrantConnectorConfig
    S3ConnectorConfig:
      properties:
        type:
          type: string
          enum:
            - S3DataSourceManager
          const: S3DataSourceManager
          title: Type
          default: S3DataSourceManager
        bucket_name:
          type: string
          title: Bucket Name
        aws_access_key_id:
          type: string
          title: Aws Access Key Id
        aws_secret_access_key:
          type: string
          title: Aws Secret Access Key
        name:
          type: string
          title: Name
        region:
          anyOf:
            - type: string
            - type: 'null'
          title: Region
          default: us-east-1
      type: object
      required:
        - bucket_name
        - aws_access_key_id
        - aws_secret_access_key
        - name
      title: S3ConnectorConfig
    SharepointConnectorConfig:
      properties:
        type:
          type: string
          enum:
            - SharepointDataSourceManager
          const: SharepointDataSourceManager
          title: Type
          default: SharepointDataSourceManager
        name:
          type: string
          title: Name
        client_id:
          type: string
          title: Client Id
        client_secret:
          type: string
          title: Client Secret
        tenant_id:
          type: string
          title: Tenant Id
        sharepoint_site_name:
          type: string
          title: Sharepoint Site Name
        drives:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Drives
      type: object
      required:
        - name
        - client_id
        - client_secret
        - tenant_id
        - sharepoint_site_name
      title: SharepointConnectorConfig
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PSQLIndexInfo:
      properties:
        found_indexes:
          items:
            type: string
          type: array
          title: Found Indexes
        total_indexes_found:
          type: integer
          title: Total Indexes Found
      type: object
      required:
        - found_indexes
        - total_indexes_found
      title: PSQLIndexInfo
    QdrantIndexInfo:
      properties:
        total_indexes_found:
          type: integer
          title: Total Indexes Found
      type: object
      required:
        - total_indexes_found
      title: QdrantIndexInfo
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    BearerAuth:
      type: http
      scheme: bearer
    UserIdAuth:
      type: apiKey
      in: header
      name: X-User-ID

````