using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string queryTaskId = "YOUR_QUERY_TASK_ID"; // Replace with your query task ID
string token = "YOUR_API_TOKEN"; // Replace with your API token
string url = $"https://api.roe-ai.com/v1/database/query/{queryTaskId}/result/";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
HttpResponseMessage response = await client.GetAsync(url);
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
}{
"worksheet_query_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"results": [
{
"query": "<string>",
"summary": {
"read_rows": 123,
"read_bytes": 123,
"written_rows": 123,
"written_bytes": 123,
"total_rows_to_read": 123,
"result_rows": 123,
"result_bytes": 123,
"elapsed_ns": 123,
"query_id": "<string>"
},
"row_count": 123,
"column_names": [
"<string>"
],
"column_types": [
"<string>"
],
"result_rows": [
[
"<string>"
]
],
"start_timestamp": 123,
"end_timestamp": 123,
"query_id": "<string>"
}
],
"error": "<string>"
}Get the results of a query.
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string queryTaskId = "YOUR_QUERY_TASK_ID"; // Replace with your query task ID
string token = "YOUR_API_TOKEN"; // Replace with your API token
string url = $"https://api.roe-ai.com/v1/database/query/{queryTaskId}/result/";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
HttpResponseMessage response = await client.GetAsync(url);
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
}{
"worksheet_query_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"results": [
{
"query": "<string>",
"summary": {
"read_rows": 123,
"read_bytes": 123,
"written_rows": 123,
"written_bytes": 123,
"total_rows_to_read": 123,
"result_rows": 123,
"result_bytes": 123,
"elapsed_ns": 123,
"query_id": "<string>"
},
"row_count": 123,
"column_names": [
"<string>"
],
"column_types": [
"<string>"
],
"result_rows": [
[
"<string>"
]
],
"start_timestamp": 123,
"end_timestamp": 123,
"query_id": "<string>"
}
],
"error": "<string>"
}The query task UUID.
The status of the query task.
The results of the query.
Show child attributes
The query that was run.
The summary of the query results.
Show child attributes
The number of rows returned by the query.
A list of strings representing the column names
A list of strings representing the column types
A matrix of the data returned in the form of a Sequence of rows, with each row element being a sequence of column values.
The timestamp when the query started running.
The timestamp when the query finished running.
The query UUID.
An error message if the query failed.