> ## 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.

# Datasource Jobs

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/4/fusion-server/concepts/jobs/datasource-jobs

[mintlify link]: https://doc.lucidworks.com/docs/4/fusion-server/concepts/jobs/datasource-jobs

[old doc.lw link]: https://doc.lucidworks.com/fusion/5.9/186

A datasource is a configuration that manages the import and indexing of data into the collection.

Datasources are created using the [Index Workbench](/docs/4/fusion-server/concepts/indexing/datasources/index-workbench), or at **Indexing** > **Datasources**, or using the [Connector Datasources API](/docs/4/fusion-server/reference/api/connector-apis/connector-datasources-api).

A datasource is also a job that can run on demand or on a schedule.

<LwTemplate />

## Learn more

<Accordion title="Fusion 4 instructions to assign connector jobs to specific nodes">
  This page applies to Fusion version 4, starting with APIs added in Fusion 4.2.4

  ### Get connector job’s current node assignment

  Find assigned node for a connectors data source job.

  Method: GET

  `/api/apollo/connectors-classic/datasources/${yourDatasourceID}/node_assignment`

  Example:

  ```bash theme={"dark"}
  proxyUrl=https://FUSION_HOST:8764
  yourDatasourceID=sharepoint563263
  curl -X GET -u USERNAME:PASSWORD "${proxyUrl}/api/apollo/connectors-classic/datasources/${yourDatasourceID}/node_assignment"
  ```

  Powershell:

  ```bash theme={"dark"}
  $proxyUrl="https://FUSION_HOST:8764"
  $yourDatasourceID="yourdsid"
  $username = "admin"
  $password = "password"
  $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))

  Invoke-RestMethod -Method Get -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} "${proxyUrl}/api/apollo/connectors-classic/datasources/${yourDatasourceID}/node_assignment"
  ```

  ### Assign connector job to a specific node

  You can stick a connectors job to a specific connectors-classic node.

  <Note>Use IP address and not the host name.</Note>

  Method: PUT

  ```bash wrap theme={"dark"}
  /api/apollo/connectors-classic/datasources/${yourDatasourceID}/node_assignment/http%3A%2F%2F${ipOfConnectorsClassicNode}%3A${portOfConnectorsClassic}%2Fconnectors%2Fv1%2Fconnectors-classic
  ```

  Example:

  Bash:

  ```bash wrap theme={"dark"}
  proxyUrl=https://FUSION_HOST:8764
  yourDatasourceID=sharepoint563263
  ipOfConnectorsClassicNode=192.168.1.78
  portOfConnectorsClassic=8984
  curl -X PUT -u USERNAME:PASSWORD "${proxyUrl}/api/apollo/connectors-classic/datasources/${yourDatasourceID}/node_assignment/http%3A%2F%2F${ipOfConnectorsClassicNode}%3A${portOfConnectorsClassic}%2Fconnectors%2Fv1%2Fconnectors-classic"
  ```

  Powershell:

  ```bash wrap theme={"dark"}
  $proxyUrl="https://FUSION_HOST:8764"
  $yourDatasourceID="yourdsid"
  $username = "admin"
  $password = "password"
  $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))
  $ipOfConnectorsClassicNode="192.168.1.78"
  $portOfConnectorsClassic="8984"

  Invoke-RestMethod -Method Put -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} "${proxyUrl}/api/apollo/connectors-classic/datasources/${yourDatasourceID}/node_assignment/http%3A%2F%2F${ipOfConnectorsClassicNode}%3A${portOfConnectorsClassic}%2Fconnectors%2Fv1%2Fconnectors-classic"
  ```

  ### Clear connectors job assignment

  Clear the job assignment from a connectors data source job.

  Method: DELETE

  `/api/apollo/connectors-classic/datasources/${yourDatasourceID}/node_assignment`

  Bash:

  ```bash wrap theme={"dark"}
  proxyUrl=https://FUSION_HOST:8764
  yourDatasourceID=sharepoint563263
  curl -X DELETE -u USERNAME:PASSWORD '${proxyUrl}/api/apollo/connectors-classic/datasources/${yourDatasourceID}/node_assignment'
  ```

  Powershell:

  ```bash wrap theme={"dark"}
  $proxyUrl="https://FUSION_HOST:8764"
  $yourDatasourceID="yourdsid"
  $username = "admin"
  $password = "password"
  $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $username,$password)))

  Invoke-RestMethod -Method Delete -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} "${proxyUrl}/api/apollo/connectors-classic/datasources/${yourDatasourceID}/node_assignment"
  ```
</Accordion>
