Skip to main content
POST
/
postgresgateway
/
tables
/
{username}
Python SDK
from cognite.client.data_classes.data_modeling import ViewId
from cognite.client.data_classes.postgres_gateway import ViewTableWrite
table = ViewTableWrite(tablename="myCustom", options=ViewId(space="mySpace", external_id="myExternalId", version="v1"))
res = client.postgres_gateway.tables.create("myUserName",table)
{
  "items": [
    {
      "columns": {},
      "createdTime": 1730204346000,
      "type": "raw_rows",
      "tablename": "<string>",
      "options": {
        "space": "<string>",
        "externalId": "<string>",
        "version": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Path Parameters

username
string
required

The name of the username (a.k.a. database) to be managed from the API Username to authenticate the user on the DB.

Body

application/json

List of tables to create

items
(Create Raw Table · object | Create Fdm table · object)[]
required
Required array length: 1 - 10 elements

Response

List of created tables

items
Table Created Response · object[]
required
Last modified on April 23, 2026