Skip to main content
POST
/
postgresgateway
/
update
Python SDK
import os
from cognite.client.data_classes.postgres_gateway import UserUpdate, SessionCredentials
from cognite.client.data_classes import ClientCredentials
session = client.iam.sessions.create(
    ClientCredentials(os.environ["IDP_CLIENT_ID"], os.environ["IDP_CLIENT_SECRET"]),
    session_type="CLIENT_CREDENTIALS"
)
update = UserUpdate('myUser').credentials.set(SessionCredentials(nonce=session.nonce))
res = client.postgres_gateway.users.update(update)
{
  "items": [
    {
      "username": "<string>",
      "createdTime": 1730204346000,
      "lastUpdatedTime": 1730204346000,
      "sessionId": 4503599627370496
    }
  ],
  "nextCursor": "<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.

Body

application/json

Users to update

items
Items · object[]
required
Required array length: 1 element

Response

Returns users with updates

items
Items · object[]
required
Maximum array length: 100
nextCursor
string

Cursor for pagination

Last modified on April 23, 2026