v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1375137252.2 KB
instances

Execute SQL statements.

post/v1/projects/{project}/instances/{instance}/executeSql

Path parameters

projectstring required

Required. Project ID of the project that contains the instance.

instancestring required

Required. Database instance ID. This does not include the project ID.

Request body

sqlStatementstring

Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.

partialResultMode'PARTIAL_RESULT_MODE_UNSPECIFIED' | 'FAIL_PARTIAL_RESULT' | 'ALLOW_PARTIAL_RESULT'

Optional. Controls how the API should respond when the SQL execution result is incomplete due to the size limit or another error. The default mode is to throw an error.

userstring

Optional. The name of an existing database user to connect to the database. When auto_iam_authn is set to true, this field is ignored and the API caller's IAM user is used.

autoIamAuthnboolean

Optional. When set to true, the API caller identity associated with the request is used for database authentication. The API caller must be an IAM user in the database.

databasestring

Optional. Name of the database on which the statement will be executed.

rowLimitstring int64

Optional. The maximum number of rows returned per SQL statement.

applicationstring

Optional. Specifies the name of the application that is making the request. This field is used for telemetry. Only alphanumeric characters, dashes, and underscores are allowed. The maximum length is 32 characters.

Response

Successful response