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

# Apache CouchDB

export const title_2 = "Apache CouchDB";

export const title_1 = "Apache CouchDB";

export const title_0 = "Apache CouchDB";

## Setup Guide

Follow these steps to connect Apache CouchDB to your Connect AI account:

<Steps>
  <Step>
    Open the **Sources** page of the Connect AI navigation menu.
  </Step>

  <Step>
    Click **+ Add Connection** in the upper-right corner.
  </Step>

  <Step>
    Type *Apache CouchDB* into the search field, then click the data source name.
  </Step>

  <Step>
    On the **Basic Settings** tab of the new connection, enter a connection name or keep the default name.
  </Step>

  <Step>
    Enter the **URL** used to connect to Apache CouchDB (for example, *[http://localhost:5984](http://localhost:5984)*).
  </Step>

  <Step>
    Select an **Auth Scheme** and follow the relevant instructions below.
  </Step>
</Steps>

## Authentication Methods

<Tabs>
  <Tab title="Basic">
    **Basic** authenticates with a CouchDB user name and password.

    <Steps>
      <Step>
        Enter the following information:

        * **User**—the authenticating user's user ID.
        * **Password**—the authenticating user's password.
      </Step>

      <Step>
        At the top of the Connect AI **Add {title_0} Connection** page, click **Save & Test**.

        * If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
        * If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
        * Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.
      </Step>
    </Steps>
  </Tab>

  <Tab title="JWT">
    **JWT** authenticates by signing a JSON Web Token that CouchDB validates against its configured keys.

    <Steps>
      <Step>
        Enter the following information:

        * **JWT Subject**—the user subject for which the application is requesting delegated access.
        * **JWT Algorithm**—the encryption algorithm used for signing the JWT. Supported values are **RS256**, **RS384**, **RS512**, **ES256**, **ES384**, **ES512**, **HS256**, **HS384**, and **HS512**. The default value is **RS256**.
        * **JWT Key Type**—the type of the encryption key used for signing the JWT. Supported values are **PEMKEY\_BLOB** and **SYMMETRIC**. The default value is **PEMKEY\_BLOB**.
        * **JWT Key**—the encryption key for signing the JWT.
        * **JWT Expiration**—(optional) the amount of time until the JWT expires, in seconds.
        * **JWT Headers**—(optional) a collection of extra HTTP headers to include in the JWT header.
        * **JWT Claims**—(optional) a collection of extra claims to include in the JWT payload.
        * **Credentials Location**—(optional) the filepath of the settings file containing the JWT. If a settings file does not exist in this location, the provider creates a new settings file when it retrieves a JWT.
      </Step>

      <Step>
        At the top of the Connect AI **Add {title_1} Connection** page, click **Save & Test**.

        * If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
        * If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
        * Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.
      </Step>
    </Steps>
  </Tab>

  <Tab title="None">
    **None** is when no authentication is required. Use this option when querying public CouchDB databases.

    <Steps>
      <Step>
        Enter the **Public Databases**, which is a comma-separated list of public databases to list as tables.
      </Step>

      <Step>
        At the top of the Connect AI **Add {title_2} Connection** page, click **Save & Test**.

        * If the connection test succeeds, a **Connection successfully saved** message appears, indicating that your connection has been created. The **Status** on the **Edit Connection** page also changes to **Authenticated**. View the data model of your successful connection in the right pane of the **Edit Connection** page, in the **Data Model** tab.
        * If the connection test fails, ensure that you entered your login information correctly with no stray spaces or other characters. Connect AI displays error messages under the required fields with missing data. Some data sources require that you sign in directly to the source website. If you did not, an error message appears under the **Sign in** button. Correct the errors and try again.
        * Unsuccessful connections are saved as drafts and have a **Status** of **Not Authenticated**. You can return to the connection and authenticate it later.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## More Information

For more information about interactions between Connect AI and Apache CouchDB, see [this information page](https://cdn.cdata.com/help/JCM/cloud/default.htm#default).
