Postgres Gateway Tables

View and create foreign tables for a given user

List tables

Required capabilities: postgresGateway:READ

List all tables in a given project. If more than limit tables exist, a cursor for pagination will be returned with the response.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
path Parameters
username
required
string (Username)

The name of the username (a.k.a. database) to be managed from the API

query Parameters
limit
integer [ 1 .. 100 ]
Default: 100

Limits the number of results to be returned. The maximum results returned by the server is 100 even if you specify a higher limit.

cursor
string

Cursor for paging through results. In general, if a response contains a nextCursor property, it means that there may be more results, and you should pass that value as the cursor parameter in the next request.

Note that the cursor may or may not be encrypted, but either way, it is not intended to be decoded. Its internal structure is not a part of the public API, and may change without notice. You should treat it as an opaque string and not attempt to craft your own cursors.

Example: cursor=4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo
includeBuiltIns
boolean
Default: false

Determines if API should return built-in tables or not

Responses
200

List of tables paginated

400

The response for a bad request.

422

Validation Error

get/postgresgateway/tables/{username}
Request samples
custom_table_list = client.postgres_gateway.tables.list("myUserName", limit=5)

for table in client.postgres_gateway.tables:
    table # do something with the custom table

for table_list in client.postgres_gateway.tables(chunk_size=25):
    table_list # do something with the custom tables
Response samples
application/json
{
  • "items": [
    ],
  • "nextCursor": "string"
}

Create tables

Required capabilities: postgresGateway:WRITE

Create up to 10 tables.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
path Parameters
username
required
string (Username)

The name of the username (a.k.a. database) to be managed from the API

Request Body schema: application/json
required

List of tables to create

required
Array of objects (Items) [ 1 .. 10 ] items
Responses
200

List of created tables

400

Response of a failed request

422

Validation Error

post/postgresgateway/tables/{username}
Request samples
application/json
{
  • "items": [
    ]
}
Response samples
application/json
{
  • "items": [
    ]
}

Retrieve tables

Required capabilities: postgresGateway:READ

Retrieve a list of postgres tables for a user by their table names, optionally ignoring unknown table names

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
path Parameters
username
required
string (Username)

The name of the username (a.k.a. database) to be managed from the API

Request Body schema: application/json
required
required
Array of objects (Items) [ 1 .. 10 ] items
ignoreUnknownIds
boolean (IgnoreUnknown)

Ignore table names not found

Responses
200

List postgres tables by table names

400

Response of a failed request

422

Validation Error

post/postgresgateway/tables/{username}/byids
Request samples
application/json
{
  • "items": [
    ],
  • "ignoreUnknownIds": true
}
Response samples
application/json
{
  • "items": [
    ]
}

Delete tables

Required capabilities: [object Object]

Delete up to 10 tables

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
path Parameters
username
required
string (Username)

The name of the username (a.k.a. database) to be managed from the API

Request Body schema: application/json
required

Tables to delete

required
Array of objects (Items) [ 1 .. 10 ] items
ignoreUnknownIds
boolean (IgnoreUnknown)

Ignore table names not found

Responses
200

Empty response

400

The response for a bad request.

422

Validation Error

post/postgresgateway/tables/{username}/delete
Request samples
application/json
{
  • "items": [
    ],
  • "ignoreUnknownIds": true
}
Response samples
application/json
{ }