# Create Database Table

Launch stage: Public Preview

`POST /api/2.0/database/tables`

Create a Database Table. Useful for registering pre-existing PG tables in UC.
 See CreateSyncedDatabaseTable for creating synced tables in PG from a source table in UC.

API scopes: postgres

## Request body

- `table` (object, optional)
  - `name` (string, optional)
    Full three-part (catalog, schema, table) name of the table.
  - `database_instance_name` (string, optional)
    Name of the target database instance. This is required when creating database tables in standard catalogs.
     This is optional when creating database tables in registered catalogs. If this field is specified
     when creating database tables in registered catalogs, the database instance name MUST
     match that of the registered catalog (or the request will be rejected).
  - `logical_database_name` (string, optional)
    Target Postgres database object (logical database) name for this table.
    
     When creating a table in a standard catalog, this field is required.
     In this scenario, specifying this field will allow targeting an arbitrary postgres database.
    
     Registration of database tables via /database/tables is currently only supported in standard catalogs.

## Returns

- `name` (string, optional)
  Full three-part (catalog, schema, table) name of the table.
- `database_instance_name` (string, optional)
  Name of the target database instance. This is required when creating database tables in standard catalogs.
   This is optional when creating database tables in registered catalogs. If this field is specified
   when creating database tables in registered catalogs, the database instance name MUST
   match that of the registered catalog (or the request will be rejected).
- `logical_database_name` (string, optional)
  Target Postgres database object (logical database) name for this table.
  
   When creating a table in a standard catalog, this field is required.
   In this scenario, specifying this field will allow targeting an arbitrary postgres database.
  
   Registration of database tables via /database/tables is currently only supported in standard catalogs.

## Response

```json
{
  "name": "string",
  "database_instance_name": "string",
  "logical_database_name": "string"
}
```

