@Generated public class GenieAPI extends Object
| Constructor and Description |
|---|
GenieAPI(ApiClient apiClient)
Regular-use constructor
|
GenieAPI(GenieService mock)
Constructor for mocks
|
public GenieAPI(ApiClient apiClient)
public GenieAPI(GenieService mock)
public GenieMessage waitGetMessageGenieCompleted(String conversationId, String messageId, String spaceId) throws TimeoutException
TimeoutExceptionpublic GenieMessage waitGetMessageGenieCompleted(String conversationId, String messageId, String spaceId, Duration timeout, Consumer<GenieMessage> callback) throws TimeoutException
TimeoutExceptionpublic Wait<GenieMessage,GenieMessage> createMessage(String spaceId, String conversationId, String content)
public Wait<GenieMessage,GenieMessage> createMessage(GenieCreateConversationMessageRequest request)
Create new message in a [conversation](:method:genie/startconversation). The AI response uses all previously created messages in the conversation to respond.
public GenieGetMessageQueryResultResponse executeMessageAttachmentQuery(String spaceId, String conversationId, String messageId, String attachmentId)
public GenieGetMessageQueryResultResponse executeMessageAttachmentQuery(GenieExecuteMessageAttachmentQueryRequest request)
Execute the SQL for a message query attachment. Use this API when the query attachment has expired and needs to be re-executed.
public GenieGetMessageQueryResultResponse executeMessageQuery(String spaceId, String conversationId, String messageId)
public GenieGetMessageQueryResultResponse executeMessageQuery(GenieExecuteMessageQueryRequest request)
Execute the SQL query in the message.
public GenieGenerateDownloadFullQueryResultResponse generateDownloadFullQueryResult(String spaceId, String conversationId, String messageId, String attachmentId)
public GenieGenerateDownloadFullQueryResultResponse generateDownloadFullQueryResult(GenieGenerateDownloadFullQueryResultRequest request)
Initiate full SQL query result download and obtain a `download_id` to track the download progress. This call initiates a new SQL execution to generate the query result. The result is stored in an external link can be retrieved using the [Get Download Full Query Result](:method:genie/getdownloadfullqueryresult) API. Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition. See [Execute Statement](:method:statementexecution/executestatement) for more details.
public GenieGetDownloadFullQueryResultResponse getDownloadFullQueryResult(String spaceId, String conversationId, String messageId, String attachmentId, String downloadId)
public GenieGetDownloadFullQueryResultResponse getDownloadFullQueryResult(GenieGetDownloadFullQueryResultRequest request)
After [Generating a Full Query Result Download](:method:genie/getdownloadfullqueryresult) and successfully receiving a `download_id`, use this API to Poll download progress and retrieve the SQL query result external link(s) upon completion. Warning: Databricks strongly recommends that you protect the URLs that are returned by the `EXTERNAL_LINKS` disposition. When you use the `EXTERNAL_LINKS` disposition, a short-lived, presigned URL is generated, which can be used to download the results directly from Amazon S3. As a short-lived access credential is embedded in this presigned URL, you should protect the URL. Because presigned URLs are already generated with embedded temporary access credentials, you must not set an Authorization header in the download requests. See [Execute Statement](:method:statementexecution/executestatement) for more details.
public GenieMessage getMessage(String spaceId, String conversationId, String messageId)
public GenieMessage getMessage(GenieGetConversationMessageRequest request)
Get message from conversation.
public GenieGetMessageQueryResultResponse getMessageAttachmentQueryResult(String spaceId, String conversationId, String messageId, String attachmentId)
public GenieGetMessageQueryResultResponse getMessageAttachmentQueryResult(GenieGetMessageAttachmentQueryResultRequest request)
Get the result of SQL query if the message has a query attachment. This is only available if a message has a query attachment and the message status is `EXECUTING_QUERY` OR `COMPLETED`.
public GenieGetMessageQueryResultResponse getMessageQueryResult(String spaceId, String conversationId, String messageId)
public GenieGetMessageQueryResultResponse getMessageQueryResult(GenieGetMessageQueryResultRequest request)
Get the result of SQL query if the message has a query attachment. This is only available if a message has a query attachment and the message status is `EXECUTING_QUERY`.
public GenieGetMessageQueryResultResponse getMessageQueryResultByAttachment(String spaceId, String conversationId, String messageId, String attachmentId)
public GenieGetMessageQueryResultResponse getMessageQueryResultByAttachment(GenieGetQueryResultByAttachmentRequest request)
Get the result of SQL query if the message has a query attachment. This is only available if a message has a query attachment and the message status is `EXECUTING_QUERY` OR `COMPLETED`.
public GenieSpace getSpace(String spaceId)
public GenieSpace getSpace(GenieGetSpaceRequest request)
Get details of a Genie Space.
public Wait<GenieMessage,GenieStartConversationResponse> startConversation(String spaceId, String content)
public Wait<GenieMessage,GenieStartConversationResponse> startConversation(GenieStartConversationMessageRequest request)
Start a new conversation.
public GenieService impl()
Copyright © 2025. All rights reserved.