A postgres gateway user (also a typical postgres user) owns the foreign tables (built in or custom).
The created postgres user only has access to use foreign tables and cannot directly create tables users. To create foreign tables use the Postgres Gateway Tables APIs
Required capabilities:
postgresGateway:READ
List all users in a given project. If more than limit users exist, a cursor for pagination will be returned with the response.
List of users paginated
The response for a bad request.
Validation Error
{- "items": [
- {
- "username": "string",
- "createdTime": 1730204346000,
- "lastUpdatedTime": 1730204346000,
- "sessionId": 1
}
], - "nextCursor": "string"
}Required capabilities:
postgresGateway:WRITE
Create postgres users.
List of postgres users to create
required | Array of objects (Items) = 1 items |
List of created users
Response of a failed request
Validation Error
{- "items": [
- {
- "credentials": {
- "nonce": "string"
}
}
]
}{- "items": [
- {
- "host": "fdw.<CLUSTER>.cogniteapp.com",
- "username": "string",
- "password": "string",
- "createdTime": 1730204346000,
- "lastUpdatedTime": 1730204346000,
- "sessionId": 1
}
]
}List all postgres users for a given project. If more than limit users exist, a cursor for pagination will be returned with the response.
List of users paginated
The response for a bad request.
Validation Error
{- "limit": 1,
- "cursor": "string"
}{- "items": [
- {
- "username": "string",
- "createdTime": 1730204346000,
- "lastUpdatedTime": 1730204346000,
- "sessionId": 1
}
], - "nextCursor": "string"
}Required capabilities:
postgresGateway:READ
Retrieve a list of postgres users by their usernames, optionally ignoring unknown usernames
List of users retrieved by their usernames
Response of a failed request
Validation Error
{- "items": [
- {
- "username": "string"
}
], - "ignoreUnknownIds": true
}{- "items": [
- {
- "username": "string",
- "createdTime": 1730204346000,
- "lastUpdatedTime": 1730204346000,
- "sessionId": 1
}
]
}Required capabilities:
[object Object]
Update postgres users
Users to update
required | Array of objects (Items) = 1 items |
Returns users with updates
The response for a bad request.
Validation Error
{- "items": [
- {
- "username": "string",
- "update": {
- "credentials": {
- "set": {
- "nonce": "string"
}
}
}
}
]
}{- "items": [
- {
- "username": "string",
- "createdTime": 1730204346000,
- "lastUpdatedTime": 1730204346000,
- "sessionId": 1
}
], - "nextCursor": "string"
}Required capabilities:
[object Object]
Delete postgres users
Empty response.
The response for a bad request.
Validation Error
{- "items": [
- {
- "username": "string"
}
], - "ignoreUnknownIds": true
}{ }