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

# Create or delete a datasource.



## OpenAPI

````yaml /api-specs/cloud/dmm.yaml delete /model-monitor/v2/api/datasource
openapi: 3.0.3
info:
  title: Domino Model Monitor API
  description: The API for programmatic access to Domino Model Monitor.
  version: 1.0.1
servers: []
security: []
tags:
  - name: DatasetJob
    description: All Dataset Job related operations.
  - name: DataSource
    description: All data source related operations.
  - name: Model
    description: All Model related operations.
  - name: ModelTag
    description: Operations related to the management of model tags.
  - name: ModelDrift
    description: All Model drift related operations.
  - name: ModelQuality
    description: All Model quality related operations.
  - name: Workbench
    description: All Workbench related operations.
  - name: DefaultSettings
    description: Operations related to drift and model quality defaults setting in DMM.
  - name: UserSettings
    description: Operations related to configuring user related settings for DMM.
  - name: Notification
    description: >-
      Operations related to configuring notification channel config and alert
      recipients for the model.
  - name: Other
    description: Other miscellaneous operations.
  - name: Scheduler
    description: All scheduler related operations
paths:
  /model-monitor/v2/api/datasource:
    summary: Create or delete a datasource.
    delete:
      tags:
        - DataSource
      summary: Create or delete a datasource.
      operationId: deleteDataSource
      parameters:
        - in: query
          name: datasource_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The data source object that was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dataSourceResponse'
        '400':
          description: Bad request input data.
        '403':
          description: Forbidden. The endpoint enforces permissions.
        '405':
          description: Method not allowed.
        '500':
          description: Internal server error, check server logs.
      security:
        - DominoApiKeyAuth: []
        - DmmApiKeyAuth: []
        - cookieAuth: []
components:
  schemas:
    dataSourceResponse:
      oneOf:
        - $ref: '#/components/schemas/s3Response'
        - $ref: '#/components/schemas/genericS3Response'
        - $ref: '#/components/schemas/azureBlobResponse'
        - $ref: '#/components/schemas/azureDataLakeGen2Response'
        - $ref: '#/components/schemas/googleCloudStorageResponse'
        - $ref: '#/components/schemas/azureDataLakeGen1Response'
        - $ref: '#/components/schemas/hdfsResponse'
        - $ref: '#/components/schemas/nfsResponse'
        - $ref: '#/components/schemas/snowflakeResponse'
      discriminator:
        propertyName: type
        mapping:
          s3:
            $ref: '#/components/schemas/s3Response'
          generic_s3:
            $ref: '#/components/schemas/genericS3Response'
          azure_blob:
            $ref: '#/components/schemas/azureBlobResponse'
          azure_data_lake_gen_2:
            $ref: '#/components/schemas/azureDataLakeGen2Response'
          google_cloud_storage:
            $ref: '#/components/schemas/googleCloudStorageResponse'
          azure_data_lake_gen_1:
            $ref: '#/components/schemas/azureDataLakeGen1Response'
          hdfs:
            $ref: '#/components/schemas/hdfsResponse'
          nfs:
            $ref: '#/components/schemas/nfsResponse'
          snowflake:
            $ref: '#/components/schemas/snowflakeResponse'
    s3Response:
      title: S3 Response
      description: S3 response object.
      allOf:
        - $ref: '#/components/schemas/dataSourceResponseCommon'
        - type: object
          required:
            - config
          properties:
            config:
              type: object
              description: S3 Configuration options.
              required:
                - bucket
                - region
                - instance_role
              properties:
                bucket:
                  description: Name of the S3 bucket.
                  type: string
                region:
                  description: Region for the S3 bucket.
                  type: string
                instance_role:
                  description: Whether to use the attached instance Role to fetch secrets.
                  type: boolean
    genericS3Response:
      title: Generic S3 Response
      description: Generic S3 response object.
      allOf:
        - $ref: '#/components/schemas/dataSourceResponseCommon'
        - type: object
          required:
            - config
          properties:
            config:
              type: object
              description: Generic S3 Configuration options.
              required:
                - bucket
                - endpoint
              properties:
                bucket:
                  description: Generic S3 bucket name.
                  type: string
                endpoint:
                  description: Generic S3 endpoint.
                  type: string
    azureBlobResponse:
      title: Azure Blob Response
      description: Azure Blob response object.
      allOf:
        - $ref: '#/components/schemas/dataSourceResponseCommon'
        - type: object
          required:
            - config
          properties:
            config:
              type: object
              description: Azure Blob Configuration options.
              required:
                - account
                - container
              properties:
                account:
                  description: Name of the Storage Account.
                  type: string
                container:
                  description: Name of the Container.
                  type: string
    azureDataLakeGen2Response:
      title: Azure Data Lake Gen 2 Response
      description: Azure Data Lake Gen 2 response object.
      allOf:
        - $ref: '#/components/schemas/dataSourceResponseCommon'
        - type: object
          required:
            - config
          properties:
            config:
              $ref: '#/components/schemas/adls2ConfigResponse'
    googleCloudStorageResponse:
      title: Google Cloud Storage Response
      description: Google Cloud Storage response object.
      allOf:
        - $ref: '#/components/schemas/dataSourceResponseCommon'
        - type: object
          required:
            - config
          properties:
            config:
              type: object
              description: Google Cloud Storage Configuration options.
              required:
                - bucket
              properties:
                bucket:
                  description: Name of the Bucket.
                  type: string
    azureDataLakeGen1Response:
      title: Azure Data Lake Gen 1 Response
      description: Azure Data Lake Gen 1 response object.
      allOf:
        - $ref: '#/components/schemas/dataSourceResponseCommon'
        - type: object
          required:
            - config
          properties:
            config:
              $ref: '#/components/schemas/adls1ConfigResponse'
    hdfsResponse:
      title: HDFS Data source Response
      description: HDFS Data source response object.
      allOf:
        - $ref: '#/components/schemas/dataSourceResponseCommon'
        - type: object
          required:
            - config
          properties:
            config:
              type: object
              required:
                - host
              properties:
                host:
                  type: string
                  description: Host for the HDFS cluster
                port:
                  type: integer
                  description: Port for the HDFS cluster
                  nullable: true
    nfsResponse:
      title: NFS Data source Response
      description: NFS Data source response object.
      allOf:
        - $ref: '#/components/schemas/dataSourceResponseCommon'
        - type: object
          required:
            - config
          properties:
            config:
              type: object
              required:
                - path
              properties:
                path:
                  type: string
                  description: Path to access the NFS
    snowflakeResponse:
      title: Snowflake Response
      description: Snowflake response object.
      allOf:
        - $ref: '#/components/schemas/dataSourceResponseCommon'
        - type: object
          required:
            - config
          properties:
            config:
              type: object
              description: Snowflake Configuration options.
              required:
                - url
                - database
                - schema
                - warehouse
                - role
              properties:
                url:
                  description: Snowflake url
                  type: string
                database:
                  description: Snowflake database to use
                  type: string
                schema:
                  description: Snowflake schema
                  type: string
                warehouse:
                  description: Snowflake warehouse
                  type: string
                role:
                  description: Snowflake role
                  type: string
    dataSourceResponseCommon:
      title: Data Source
      description: Datasource response object.
      type: object
      required:
        - id
        - name
        - type
        - user_id
        - created_at
        - updated_at
      properties:
        id:
          description: ID of the data source object.
          type: string
        name:
          description: Name of the data source.
          type: string
        type:
          description: Type of data source.
          type: string
        user_id:
          description: ID of the user who created the data source.
          type: string
        username:
          type: string
          description: User who has created the data source.
        created_at:
          description: Created time of the data source.
          type: number
        updated_at:
          description: Last updated time of the data source.
          type: number
    adls2ConfigResponse:
      oneOf:
        - $ref: '#/components/schemas/adls2SharedKeyConfigResponse'
        - $ref: '#/components/schemas/adls2OAuth2ConfigResponse'
      discriminator:
        propertyName: auth
        mapping:
          shared_key:
            $ref: '#/components/schemas/adls2SharedKeyConfigResponse'
          client_credentials:
            $ref: '#/components/schemas/adls2OAuth2ConfigResponse'
          username_password:
            $ref: '#/components/schemas/adls2OAuth2ConfigResponse'
          refresh_token:
            $ref: '#/components/schemas/adls2OAuth2ConfigResponse'
          managed_identity:
            $ref: '#/components/schemas/adls2OAuth2ConfigResponse'
    adls1ConfigResponse:
      oneOf:
        - $ref: '#/components/schemas/adls1ClientCredentialsConfigResponse'
        - $ref: '#/components/schemas/adls1ManagedIdentityConfigResponse'
      discriminator:
        propertyName: auth
        mapping:
          client_credentials:
            $ref: '#/components/schemas/adls1ClientCredentialsConfigResponse'
          managed_identity:
            $ref: '#/components/schemas/adls1ManagedIdentityConfigResponse'
    adls2SharedKeyConfigResponse:
      title: Azure Data Lake Gen 2 Shared Key Config Response
      description: Azure Data Lake Gen 2 Shared Key Config Response Object.
      allOf:
        - $ref: '#/components/schemas/adls2CommonConfigResponse'
        - type: object
    adls2OAuth2ConfigResponse:
      title: Azure Data Lake Gen 2 OAuth2 Config Response
      description: Azure Data Lake Gen 2 OAuth2 Config Response Object.
      allOf:
        - $ref: '#/components/schemas/adls2CommonConfigResponse'
        - type: object
          properties:
            o_auth2_config:
              type: object
              description: OAuth 2 config object.
    adls1ClientCredentialsConfigResponse:
      title: Azure Data Lake Gen 1 Client Credentials Config Response
      description: Azure Data Lake Gen 1 Client Credentials Config Response Object.
      allOf:
        - $ref: '#/components/schemas/adls1CommonConfigResponse'
        - type: object
          properties:
            token_endpoint:
              type: string
              description: Endpoint to be used for authentication.
              nullable: true
            application_id:
              type: string
              description: Application ID to be used for authentication.
              nullable: true
            secret_key:
              type: string
              description: Secret Key to be used for authentication.
              nullable: true
    adls1ManagedIdentityConfigResponse:
      title: Azure Data Lake Gen 1 Managed Identity Config Response
      description: Azure Data Lake Gen 1 Managed Identity Config Response Object.
      allOf:
        - $ref: '#/components/schemas/adls1CommonConfigResponse'
        - type: object
          properties:
            port:
              type: integer
              description: Port to be used for authentication.
              nullable: true
    adls2CommonConfigResponse:
      title: Azure Data Lake Gen 2 Common Config Response
      description: Azure Data Lake Gen 2 Common Config Response Object.
      type: object
      required:
        - container
        - account
        - auth
      properties:
        container:
          type: string
          description: Azure Storage container.
        account:
          type: string
          description: Azure Storage Account.
        auth:
          type: string
          description: Azure Storage Auth Type.
    adls1CommonConfigResponse:
      title: Azure Data Lake Gen 1 Common Config Response
      description: Azure Data Lake Gen 1 Common Config Response Object.
      type: object
      required:
        - container
        - auth
      properties:
        container:
          type: string
          description: Azure Storage container.
        auth:
          type: string
          description: Azure Storage Auth Type.
  securitySchemes:
    DominoApiKeyAuth:
      type: apiKey
      in: header
      name: X-Domino-Api-Key
    DmmApiKeyAuth:
      type: apiKey
      in: header
      name: X-DMM-API-KEY
    cookieAuth:
      type: apiKey
      in: cookie
      name: PLAY_SESSION

````