Postgres
The Postgres API provides access to a Postgres database via REST API or direct SQL.
Generate Database Credential GA
POST
Generate OAuth credentials for a Postgres database.
API scopes: postgres
Request body
- claimsarray of object
The returned token will be scoped to UC tables with the specified permissions.
Show child attributesHide child attributes
- permission_setstring
- resourcesarray of object
Show child attributesHide child attributes
- table_namestringRequired
The full Unity Catalog table name.
- endpointstring
The endpoint resource name for which this credential will be generated. Format: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}
- ttlstringRequired
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_timestringRequired
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.
Get Operation GA
GET
Retrieves the status of a long-running operation.
API scopes: postgres
Parameters
- namestringpath
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
nameshould be a resource name ending withoperations/{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. Iftrue, the operation is completed, and eithererrororresponseis available.
- errorobjectRequired
The error result of the operation in case of failure or cancellation.
Show child attributesHide child attributes
- error_codestring
- messagestring
- stack_tracestring
- detailsarray of object
- responseobjectRequired
The normal, successful response of the operation.
Undelete Project Beta
POST
Undeletes a soft-deleted project.
API scopes: postgres
Parameters
- namestringpath
The full resource path of the project to undelete. Format: projects/{project_id}
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
nameshould be a resource name ending withoperations/{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. Iftrue, the operation is completed, and eithererrororresponseis available.
- errorobjectRequired
The error result of the operation in case of failure or cancellation.
Show child attributesHide child attributes
- error_codestring
- messagestring
- stack_tracestring
- detailsarray of object
- responseobjectRequired
The normal, successful response of the operation.