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

# Create a catalog

> Register a catalog so the workspace can find tables in its source system.

`POST /api/v1/catalogs`

Register a catalog so the workspace can find tables in its source system.

## Access

[Request a workspace OAuth token](https://docs.e6data.com/api-reference/workspace-oauth-2-0/post-oauth2-token.md#request) for the workspace that owns the resource. If your workspace uses OAuth scopes for API access, request `query_engine.catalog:create`. If your admin confirms that workspace permissions are active for management API calls, omit the `scope` field for this call.

## Request

Body: choose the catalog type, matching connection block, workspace credential and schemas. This AWS Glue example assumes the credential can read the source.

Content type: `application/json`.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "name": "analytics",
  "catalogName": "analytics",
  "catalogType": "GLUE",
  "glue": {
    "region": "us-east-1"
  },
  "storageCredentialsRef": "<existing-credential-name>",
  "schemas": [
    "sales"
  ]
}
```

### Body fields

| Field | Type | Input | Details |
| - | - | - | - |
| `aws` | object | Optional | AWS cross-account credentials for accessing resources in another AWS account. Mutually exclusive with `storageCredentialsRef`. |
| `aws.assumedRole` | boolean | Optional | - |
| `aws.assumedRoleName` | string | Optional | ARN of the IAM role to assume |
| `aws.externalId` | string | Optional | - |
| `aws.region` | string | Optional | - |
| `azure` | object | Optional | Azure federated identity credentials. Mutually exclusive with `storageCredentialsRef`. |
| `azure.accountName` | string | Optional | Azure storage account name |
| `azure.clientId` | string | Required when `azure` is supplied | - |
| `azure.tenantId` | string | Required when `azure` is supplied | Azure tenant ID for this connection. |
| `catalogName` | string | Optional | Deprecated: use `name` instead. Kept as a fallback so existing API clients that still populate this field continue to work. Minimum length: 1. Maximum length: 253. |
| `catalogType` | string | Required | Catalog provider. Use the provider enabled for your workspace and fill in its connection fields. |
| `columns` | object | Optional | Column filtering per table. Maps schema name to table name to list of column names. Use \["\*"] to include all columns in a table. |
| `fabric` | object | Optional | Microsoft Fabric Lakehouse connection configuration. |
| `fabric.onelakeAccountName` | string | Required when `fabric` is supplied | - |
| `fabric.onelakeClientEndpoint` | string | Required when `fabric` is supplied | - |
| `fabric.onelakeClientId` | string | Required when `fabric` is supplied | - |
| `fabric.onelakeClientSecret` | string | Required when `fabric` is supplied | - |
| `fabric.workspaceId` | string | Required when `fabric` is supplied | - |
| `gcp` | object | Optional | GCP workload identity credentials. Mutually exclusive with `storageCredentialsRef`. |
| `gcp.keyRef` | string | Optional | - |
| `gcp.projectId` | string | Required when `gcp` is supplied | - |
| `gcp.serviceAccountEmail` | string | Required when `gcp` is supplied | - |
| `glue` | object | Optional | AWS Glue catalog connection configuration. |
| `glue.catalogId` | string | Optional | Defaults to AWS account ID |
| `glue.region` | string | Required when `glue` is supplied | Minimum length: 1. |
| `governanceType` | string | Optional | GovernanceType specifies the governance type for this catalog. Valid values: NONE (no governance), RANGER, OPA, UNITY, DATALAKE\_FORMATION. If empty, selected automatically from the catalog type. Allowed values: `NONE`, `RANGER`, `OPA`, `UNITY`, `DATALAKE_FORMATION`. |
| `hive` | object | Optional | Hive metastore connection configuration. |
| `hive.catalog` | string | Optional | - |
| `hive.host` | string | Required when `hive` is supplied | Minimum length: 1. |
| `hive.port` | integer | Required when `hive` is supplied | Minimum: 1. Maximum: 65535. |
| `icebergRest` | object | Optional | Generic Iceberg REST Catalog connection configuration (Lakekeeper, Tabular, Nessie REST, Gravitino, ...). |
| `icebergRest.additionalHeaders` | object | Optional | - |
| `icebergRest.authType` | string | Optional | Allowed values: `NONE`, `BEARER`, `OAUTH2_CLIENT_CREDS`. |
| `icebergRest.bearerToken` | string | Optional | - |
| `icebergRest.catalogName` | string | Optional | - |
| `icebergRest.oauth2ClientId` | string | Optional | - |
| `icebergRest.oauth2ClientSecret` | string | Optional | - |
| `icebergRest.oauth2Scope` | string | Optional | - |
| `icebergRest.oauth2TokenEndpoint` | string | Optional | - |
| `icebergRest.prefix` | string | Optional | - |
| `icebergRest.uri` | string | Required when `icebergRest` is supplied | - |
| `icebergRest.vendedCredentialsEnabled` | boolean | Optional | - |
| `icebergRest.warehouse` | string | Required when `icebergRest` is supplied | - |
| `isDefault` | boolean | Optional | Set as the default catalog for queries. |
| `name` | string | Optional | - |
| `polaris` | object | Optional | Apache Polaris catalog connection configuration. |
| `polaris.catalogName` | string | Required when `polaris` is supplied | - |
| `polaris.clientId` | string | Required when `polaris` is supplied | - |
| `polaris.clientSecret` | string | Required when `polaris` is supplied | - |
| `polaris.host` | string | Required when `polaris` is supplied | - |
| `s3Tables` | object | Optional | AWS S3 Tables connection configuration. |
| `s3Tables.region` | string | Required when `s3Tables` is supplied | - |
| `s3Tables.tableBucketArn` | string | Required when `s3Tables` is supplied | - |
| `schemas` | array | Optional | Schema/database filtering. List of schemas to include. Use \["\*"] to include all schemas. |
| `snowflakeHorizon` | object | Optional | Connection settings for a Snowflake Horizon catalog. |
| `snowflakeHorizon.account` | string | Optional | Account is the Snowflake account identifier (e.g. MYORG-ACCOUNT1). Required unless URL is set. |
| `snowflakeHorizon.clientSecret` | string | Optional | Snowflake personal access token or signed key-pair token for this connection. |
| `snowflakeHorizon.database` | string | Optional | Snowflake database containing the tables you want to query. |
| `snowflakeHorizon.role` | string | Optional | Snowflake role to use for this connection. |
| `snowflakeHorizon.url` | string | Optional | URL overrides the derived Snowflake base URL for PrivateLink / custom hostnames. Used verbatim as the base (scheme + host) when set. |
| `storageCredentialsRef` | string | Optional | Name of the existing storage credential for this connection. Choose this or the inline cloud credential fields. |
| `tables` | object | Optional | Table filtering per schema. Maps schema name to list of table names to include. Use \["\*"] to include all tables in a schema. |
| `unity` | object | Optional | Databricks Unity Catalog connection configuration. |
| `unity.catalogName` | string | Required when `unity` is supplied | - |
| `unity.clientId` | string | Optional | - |
| `unity.clientSecret` | string | Optional | - |
| `unity.host` | string | Required when `unity` is supplied | - |

### Example request

Save the JSON request above as `request.json`.
Set `WORKSPACE_URL` to the same HTTPS workspace origin and `ACCESS_TOKEN` to the access token from that workspace.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --proto '=https' --silent --show-error --fail-with-body \
  --request POST \
  --header @- \
  --header 'Content-Type: application/json' \
  --data-binary @request.json \
  "$WORKSPACE_URL/api/v1/catalogs" <<< "Authorization: Bearer $ACCESS_TOKEN"
```

## Response

HTTP `201`. Content type: `application/json`.

Example response (selected fields and sample values):

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "message": "<message from your workspace>",
  "name": "analytics"
}
```

The `message` field contains text from your workspace. The example uses a placeholder for that text.

A role that can register the catalog may still need access to the stored data. Check status and try a read from a known table.

## Troubleshooting

For `401`, check the workspace URL and token expiry. For `403`, ask your admin to check the machine client’s access to this operation and resource. In a scope-based workspace, also check the scope on the token. [Troubleshoot the token or request](https://docs.e6data.com/api-reference/list-clusters-with-oauth.md#troubleshoot-a-request).

## Related guides

[Workspace management guide](https://docs.e6data.com/platform/automate/clusters-catalogs-schedules-policies.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.