Skip to main content

Postgres

View as Markdown

Get an Operation GA​

GET /api/2.0/postgres/{name=projects/*/operations/*}

12 more paths

GET /api/2.0/postgres/{name=projects/*/branches/*/operations/*}

GET /api/2.0/postgres/{name=projects/*/branches/*/snapshot-schedule/operations/*}

GET /api/2.0/postgres/{name=projects/*/snapshots/*/operations/*}

GET /api/2.0/postgres/{name=projects/*/branches/*/endpoints/*/operations/*}

GET /api/2.0/postgres/{name=projects/*/branches/*/roles/*/operations/*}

GET /api/2.0/postgres/{name=projects/*/branches/*/databases/*/operations/*}

GET /api/2.0/postgres/{name=projects/*/branches/*/databases/*/data-api/operations/*}

GET /api/2.0/postgres/{name=projects/*/branches/*/databases/*/cdf-configs/*/operations/*}

GET /api/2.0/postgres/{name=projects/*/preview/replication-groups/*/operations/*}

GET /api/2.0/postgres/{name=catalogs/*/operations/*}

GET /api/2.0/postgres/{name=synced_tables/*/operations/*}

GET /api/2.0/postgres/{name=migrations/*/operations/*}

Retrieves the status of a long-running operation. Methods that create, update or delete Postgres resources, such as projects, branches and endpoints, return an operation. Pass the full operation name that such a call returned. While the operation runs, done is false. When it finishes, done is true and either response holds the result of the method or error explains why the operation failed or was cancelled.

API scopes: postgres

Parameters​

namestringRequiredpath

The name of the operation resource.

Response​

namestring

The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.

metadataobject

Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata.

doneboolean

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

errorobject

The error result of the operation in case of failure or cancellation.

Show child attributesHide child attributes
error_codestring

Error codes returned by Databricks APIs to indicate specific failure conditions.

Values:

Show 81 possible values
  • UNKNOWN
  • INTERNAL_ERROR
  • TEMPORARILY_UNAVAILABLE
  • IO_ERROR
  • BAD_REQUEST
  • SERVICE_UNDER_MAINTENANCE
  • WORKSPACE_TEMPORARILY_UNAVAILABLE
  • DEADLINE_EXCEEDED
  • CANCELLED
  • RESOURCE_EXHAUSTED
  • ABORTED
  • NOT_FOUND
  • ALREADY_EXISTS
  • UNAUTHENTICATED
  • UNAVAILABLE
  • INVALID_PARAMETER_VALUE
  • ENDPOINT_NOT_FOUND
  • MALFORMED_REQUEST
  • INVALID_STATE
  • PERMISSION_DENIED
  • FEATURE_DISABLED
  • CUSTOMER_UNAUTHORIZED
  • REQUEST_LIMIT_EXCEEDED
  • RESOURCE_CONFLICT
  • UNPARSEABLE_HTTP_ERROR
  • NOT_IMPLEMENTED
  • DATA_LOSS
  • INVALID_STATE_TRANSITION
  • COULD_NOT_ACQUIRE_LOCK
  • RESOURCE_ALREADY_EXISTS
  • RESOURCE_DOES_NOT_EXIST
  • QUOTA_EXCEEDED
  • MAX_BLOCK_SIZE_EXCEEDED
  • MAX_READ_SIZE_EXCEEDED
  • PARTIAL_DELETE
  • MAX_LIST_SIZE_EXCEEDED
  • DRY_RUN_FAILED
  • RESOURCE_LIMIT_EXCEEDED
  • DIRECTORY_NOT_EMPTY
  • DIRECTORY_PROTECTED
  • MAX_NOTEBOOK_SIZE_EXCEEDED
  • MAX_CHILD_NODE_SIZE_EXCEEDED
  • SEARCH_QUERY_TOO_LONG
  • SEARCH_QUERY_TOO_SHORT
  • MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST
  • PERMISSION_NOT_PROPAGATED
  • DEPLOYMENT_TIMEOUT
  • GIT_CONFLICT
  • GIT_UNKNOWN_REF
  • GIT_SENSITIVE_TOKEN_DETECTED
  • GIT_URL_NOT_ON_ALLOW_LIST
  • GIT_REMOTE_ERROR
  • PROJECTS_OPERATION_TIMEOUT
  • IPYNB_FILE_IN_REPO
  • INSECURE_PARTNER_RESPONSE
  • MALFORMED_PARTNER_RESPONSE
  • METASTORE_DOES_NOT_EXIST
  • DAC_DOES_NOT_EXIST
  • CATALOG_DOES_NOT_EXIST
  • SCHEMA_DOES_NOT_EXIST
  • TABLE_DOES_NOT_EXIST
  • SHARE_DOES_NOT_EXIST
  • RECIPIENT_DOES_NOT_EXIST
  • STORAGE_CREDENTIAL_DOES_NOT_EXIST
  • EXTERNAL_LOCATION_DOES_NOT_EXIST
  • PRINCIPAL_DOES_NOT_EXIST
  • PROVIDER_DOES_NOT_EXIST
  • METASTORE_ALREADY_EXISTS
  • DAC_ALREADY_EXISTS
  • CATALOG_ALREADY_EXISTS
  • SCHEMA_ALREADY_EXISTS
  • TABLE_ALREADY_EXISTS
  • SHARE_ALREADY_EXISTS
  • RECIPIENT_ALREADY_EXISTS
  • STORAGE_CREDENTIAL_ALREADY_EXISTS
  • EXTERNAL_LOCATION_ALREADY_EXISTS
  • PROVIDER_ALREADY_EXISTS
  • CATALOG_NOT_EMPTY
  • SCHEMA_NOT_EMPTY
  • METASTORE_NOT_EMPTY
  • PROVIDER_SHARE_NOT_ACCESSIBLE
messagestring
stack_tracestring
detailsarray of object
responseobject

The normal, successful response of the operation.

Generate OAuth credentials for a Postgres database GA​

POST /api/2.0/postgres/credentials

Generates a short-lived OAuth token for connecting to a Postgres endpoint. Use the token as the password and the caller's Databricks identity as the user name. The identity must have a corresponding Postgres role. When the request sets no expiration, the token expires after one hour. For connection steps, see https://docs.databricks.com/aws/en/oltp/projects/authentication.

API scopes: postgres

Request body​

claimsarray of object

The returned token will be scoped to UC tables with the specified permissions. A token that carries claims cannot connect through the built-in connection pooler, so it needs a direct connection to the endpoint.

Show child attributesHide child attributes
permission_setstring

The level of access that the credential grants on the listed resources. READ_ONLY covers SELECT on each table, along with USE SCHEMA on its schema and USE CATALOG on its catalog.

Values:

  • READ_ONLY
resourcesarray of object

The Unity Catalog tables that the permission set applies to.

Show child attributesHide child attributes
table_namestring

The full three-level Unity Catalog name of the table, in the form catalog.schema.table.

Example: main.sales.orders

endpointstringRequired

The endpoint resource name for which this credential will be generated. Format: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} The endpoint must exist in the caller's workspace.

Example: projects/my-project/branches/main/endpoints/my-endpoint

ttlstring

The requested time-to-live for the generated credential token. Must be at least 300 seconds (5 minutes) and at most 3600 seconds (1 hour).

expire_timestring

Timestamp in UTC of when this credential should expire. Must be at least 300 seconds (5 minutes) and at most 1 hour from the current time.

Response​

tokenstring

The OAuth token that can be used as a password when connecting to a database.

expire_timestring

Timestamp in UTC of when this credential expires.