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

# Create a datasource

> Create a new datasource.  The request body contains the datasource configuration properties, which depend on the connector type.

* Use `/connectors/plugins` to get the list of installed connector types.

* Use `/connectors/schema/{type}` to get the configuration properties for the connector type you want to use.



## OpenAPI

````yaml /api-reference/5.9/fusion-api-connectors.json post /connectors/datasources
openapi: 3.0.1
info:
  title: Fusion Connectors Service API
  description: A Lucidworks Fusion microservice for Connectors management.
  contact:
    name: Lucidworks
    url: www.lucidworks.com
    email: support@lucidworks.com
  license:
    name: License of API
    url: https://lucidworks.com/legal/developer-license-agreement/
  version: '5.9'
servers:
  - url: https://{FUSION HOST}/api
    description: Fusion
    variables:
      FUSION HOST:
        default: FUSION_HOST
        description: Your environment host.
  - url: https://{FUSION HOST}/api/apps/{APP_NAME}
    description: Fusion app
    variables:
      FUSION HOST:
        default: FUSION_HOST
        description: Your environment host.
      APP_NAME:
        default: APP_NAME
        description: The name of your Fusion application.
security: []
tags:
  - name: Connector Plugins API
    description: >-
      The Connector Plugins API allows you to list, install, update and
      uninstall connector plugins.
  - name: Connector Plugins Repository API
    description: >-
      The Connector Plugins Repository API gives you access to connector plugins
      from the plugin repository.
  - name: Connector Schema API
    description: >-
      The Connector Schema API provides you with the available configuration
      properties for any connector plugin type.
  - name: Datasource Configuration API
    description: >-
      The Datasource Configuration API allows you to manage datasource
      configurations for both Classic and V2 (SDK) connectors. These are the
      configurations that define settings for crawling a specific repository,
      database, API, or other content source.
  - name: Datasource Configuration V2 API
    description: >-
      The Datasource Configuration V2 API allows you to manage V2 (SDK)
      datasource configurations. These are the configurations that define
      settings for crawling a specific repository, database, API or other
      content source.
  - name: Datasource Jobs API
    description: >-
      The Datasource Jobs API allows you to to list, start or stop, and check
      the status of datasource crawl jobs.
  - name: Connectors Configuration Suggestion API
    description: >-
      The Configuration Suggestion API allows to get suggestion on which
      connector plugin can be used for crawling provided content source.
  - name: Connectors Security Filter API
    description: >-
      The Connectors Security Filters API provides security filter queries
      generated for a specific collection, user and connector type. These filter
      queries are used by the query pipeline to filter out documents returned to
      specific users and group of users depending on their permissions.
externalDocs:
  description: Lucidworks Documentation.
  url: https://doc.lucidworks.com/
paths:
  /connectors/datasources:
    post:
      tags:
        - Datasource Configuration API
      summary: Create a datasource
      description: >-
        Create a new datasource.  The request body contains the datasource
        configuration properties, which depend on the connector type.


        * Use `/connectors/plugins` to get the list of installed connector
        types.


        * Use `/connectors/schema/{type}` to get the configuration properties
        for the connector type you want to use.
      operationId: addDataSource
      parameters:
        - name: validateOnly
          description: >-
            Indicates if the configuration should be created (persisted) or just
            validated.
          in: query
          required: false
          schema:
            type: boolean
            default: false
          example: false
        - name: context
          description: >-
            The context of resource. It usually is the app inside which the
            resource is created.
          in: query
          required: false
          schema:
            type: string
          example: app:my-sample-app
      requestBody:
        content:
          application/json:
            example:
              id: test-data-source
              parserId: api-test-app
              connector: lucid.fileupload
              type: fileupload
              pipeline: api-test-app
              properties:
                fileId: pokedex.json.zip
                description: My test datasource
            schema:
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              example:
                id: test-data-source
                created: '2024-08-02T21:00:42.165Z'
                modified: '2024-08-02T21:00:42.165Z'
                connector: lucid.fileupload
                type: fileupload
                pipeline: api-test-app
                parserId: api-test-app
                properties:
                  description: My test datasource
                  fileId: pokedex.json.zip
                  mediaType: application/octet-stream
              schema:
                type: object

````