- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Position
- CompletionItem
- CompletionItemKind
- EditRange
Full name: projects.locations.instances.suggestSql
instances.suggestSql suggests auto completion text for a GoogleSQL query.
HTTP request
GET https://{endpoint}/v1alpha/{instance}:suggestSql
Where {endpoint} is one of the supported service endpoints.
Path parameters
| Parameters | |
|---|---|
instance |
Required. The instance that the query is running in. Format: projects/{project}/locations/{location}/instances/{instance} |
Query parameters
| Parameters | |
|---|---|
text |
Required. The text to suggest auto completion for. Limited to text size of 10k characters. |
position |
Required. The position of the cursor in the text. |
Request body
The request body must be empty.
Response body
The response for the instances.suggestSql RPC. provides auto completion text for GoogleSQL query.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"completionItems": [
{
object ( |
| Fields | |
|---|---|
completionItems[] |
The suggested auto completion text. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/chroniclehttps://www.googleapis.com/auth/chronicle.readonly
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the instance resource:
chronicle.queries.suggestSql
For more information, see the IAM documentation.
Position
Represents a position in a document.
| JSON representation |
|---|
{ "line": integer, "column": integer } |
| Fields | |
|---|---|
line |
Required. The line number, 0-based. |
column |
Required. The column number, 0-based. |
CompletionItem
Completion Item
| JSON representation |
|---|
{ "kind": enum ( |
| Fields | |
|---|---|
kind |
The kind of this completion item. |
label |
The label of this completion item. By default also the text that is inserted when selecting this completion. |
insertText |
The text to be inserted when selecting this completion. |
textEditRange |
The range that should be replaced when inserting this completion. |
CompletionItemKind
Completion Item Kind
| Enums | |
|---|---|
COMPLETION_ITEM_KIND_UNSPECIFIED |
default |
COMPLETION_ITEM_TEXT |
Text |
COMPLETION_ITEM_METHOD |
Method |
COMPLETION_ITEM_FUNCTION |
Function |
COMPLETION_ITEM_CONSTRUCTOR |
Constructor |
COMPLETION_ITEM_FIELD |
Field |
COMPLETION_ITEM_VARIABLE |
Variable |
COMPLETION_ITEM_CLASS |
Class |
COMPLETION_ITEM_INTERFACE |
Interface |
COMPLETION_ITEM_MODULE |
Module |
COMPLETION_ITEM_PROPERTY |
Property |
COMPLETION_ITEM_UNIT |
Unit |
COMPLETION_ITEM_VALUE |
Value |
COMPLETION_ITEM_ENUM |
Enum |
COMPLETION_ITEM_KEYWORD |
Keyword |
COMPLETION_ITEM_SNIPPET |
Snippet |
COMPLETION_ITEM_COLOR |
Color |
COMPLETION_ITEM_FILE |
File |
COMPLETION_ITEM_REFERENCE |
Reference |
COMPLETION_ITEM_TYPE |
Type |
EditRange
Edit Range to apply a completion to.
| JSON representation |
|---|
{ "startLineNumber": integer, "startColumn": integer, "endLineNumber": integer, "endColumn": integer } |
| Fields | |
|---|---|
startLineNumber |
Line number on which the range starts (starts at 0). |
startColumn |
Column on which the range starts in line |
endLineNumber |
Line number on which the range ends. |
endColumn |
Column on which the range ends in line |