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

# Fetch tables for an unsaved connector

> Lists available tables in a specific database and schema using an unsaved connector configuration. Results are cached when a connector UUID is provided.

`POST /connectors/tables`

## Authorization

* `Authorization` (header): API key passed as a Bearer token in the Authorization header.

## Body (application/json)

* `allDatabases` (boolean)
* `connector` (object, required)
  * `dataPlaneName` (string)
  * `defaultDatabase` (string | null)
  * `draftPipelineUUID` (string<uuid> | null): On create only: the draft pipeline this connector is for.
  * `environmentUUID` (string<uuid> | null)
  * `label` (string)
  * `privateLinkUUID` (string<uuid> | null)
  * `sharedConfig` (object | null)
  * `snapshotPrivateLinkUUID` (string<uuid> | null)
  * `sshTunnelUUID` (string<uuid> | null)
  * `type` (string)
  * `uuid` (string)
* `databaseName` (string, required)
* `forceRefresh` (boolean)
* `schemaName` (string)

## Example request

```bash
curl --request POST \
  --url https://api.artie.com/connectors/tables \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "allDatabases": true,
  "connector": {
    "dataPlaneName": "<string>",
    "defaultDatabase": "<string>",
    "draftPipelineUUID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "environmentUUID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "label": "<string>",
    "privateLinkUUID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "sharedConfig": {},
    "snapshotPrivateLinkUUID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "sshTunnelUUID": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "type": "<string>",
    "uuid": "<string>"
  },
  "databaseName": "<string>",
  "forceRefresh": true,
  "schemaName": "<string>"
}'
```

## Responses

### 200 OK

* `items` (object[], required)
  * `approxDateAdded` (string<date-time> | null, required)
  * `columns` (object[])
    * `metadata` (object, required)
      * `comment` (string)
      * `dataType` (string, required)
      * `defaultValue` (string)
      * `isPrimaryKey` (boolean)
      * `notNull` (boolean, required)
    * `name` (string, required)
  * `createdAt` (string<date-time> | null, required)
  * `isView` (boolean, required)
  * `metadata` (object[])
    * `isDate` (boolean, required)
    * `key` (string, required)
    * `value` (string | number | boolean | object | (string | number | boolean | object | null)[] | null, required)
      * `Option 1` (string)
      * `Option 2` (number)
      * `Option 3` (boolean)
      * `Option 4` (object)
      * `Option 5` ((string | number | boolean | object | null)[])
        * `Option 1` (string)
        * `Option 2` (number)
        * `Option 3` (boolean)
        * `Option 4` (object)
        * `Option 5` (null)
      * `Option 6` (null)
  * `modifiedAt` (string<date-time> | null, required)
  * `name` (string, required)
  * `schema` (string, required)
  * `unreadable` (boolean, required)

```json
{
  "items": [
    {
      "approxDateAdded": "2023-11-07T05:31:56Z",
      "columns": [
        {
          "metadata": {
            "comment": "<string>",
            "dataType": "<string>",
            "defaultValue": "<string>",
            "isPrimaryKey": true,
            "notNull": true
          },
          "name": "<string>"
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "isView": true,
      "metadata": [
        {
          "isDate": true,
          "key": "<string>",
          "value": "<string>"
        }
      ],
      "modifiedAt": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "schema": "<string>",
      "unreadable": true
    }
  ]
}
```

### 400 Bad Request

### 500 Internal Server Error