From 63fe99250f65672f48e94e0392e511c34fe9c4c3 Mon Sep 17 00:00:00 2001 From: Sentio Bot Date: Thu, 28 Nov 2024 13:26:34 +0000 Subject: [PATCH] chore: update --- doc/index.html | 3537 ++++++++++++++++- openapi.json | 458 +++ src/DataApi.md | 592 +++ src/apis/DataApi.ts | 537 +++ ...ServiceAnalyticServiceRerunSQLQueryBody.ts | 58 + ...alyticServiceAnalyticServiceSaveSQLBody.ts | 75 + src/models/AnalyticServiceExecutionInfo.ts | 104 + src/models/AnalyticServiceExecutionStatus.ts | 20 + .../AnalyticServiceQuerySQLResultResponse.ts | 37 + .../AnalyticServiceRerunSQLQueryRequest.ts | 72 + .../AnalyticServiceRerunSQLQueryResponse.ts | 44 + src/models/AnalyticServiceSaveSQLRequest.ts | 89 + src/models/AnalyticServiceSaveSQLResponse.ts | 51 + src/models/AnalyticServiceSource.ts | 21 + src/models/ObjectSerializer.ts | 30 + src/models/all.ts | 10 + src/types/ObjectParamAPI.ts | 258 ++ src/types/ObservableAPI.ts | 232 ++ src/types/PromiseAPI.ts | 154 + 19 files changed, 6194 insertions(+), 185 deletions(-) create mode 100755 src/models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.ts create mode 100755 src/models/AnalyticServiceAnalyticServiceSaveSQLBody.ts create mode 100755 src/models/AnalyticServiceExecutionInfo.ts create mode 100755 src/models/AnalyticServiceExecutionStatus.ts create mode 100755 src/models/AnalyticServiceQuerySQLResultResponse.ts create mode 100755 src/models/AnalyticServiceRerunSQLQueryRequest.ts create mode 100755 src/models/AnalyticServiceRerunSQLQueryResponse.ts create mode 100755 src/models/AnalyticServiceSaveSQLRequest.ts create mode 100755 src/models/AnalyticServiceSaveSQLResponse.ts create mode 100755 src/models/AnalyticServiceSource.ts diff --git a/doc/index.html b/doc/index.html index f7df21e..3372b73 100755 --- a/doc/index.html +++ b/doc/index.html @@ -1196,6 +1196,98 @@ "sql" : "SELECT uniq(distinct_id) FROM `Transfer`" } } +}; + defs["analytic_service.AnalyticService.RerunSQLQueryBody"] = { + "type" : "object", + "properties" : { + "projectId" : { + "title" : "use project id if project_owner and project_slug are not provided", + "type" : "string" + }, + "version" : { + "title" : "version of the datasource, default to the active version if not provided", + "type" : "integer", + "format" : "int32" + }, + "queryId" : { + "type" : "string" + }, + "sqlQuery" : { + "$ref" : "#/components/schemas/analytic_service.SQLQuery" + } + } +}; + defs["analytic_service.AnalyticService.SaveSQLBody"] = { + "type" : "object", + "properties" : { + "projectId" : { + "title" : "use project id if project_owner and project_slug are not provided", + "type" : "string" + }, + "version" : { + "title" : "version of the datasource, default to the active version if not provided", + "type" : "integer", + "format" : "int32" + }, + "sqlQuery" : { + "$ref" : "#/components/schemas/analytic_service.SQLQuery" + }, + "source" : { + "$ref" : "#/components/schemas/analytic_service.Source" + }, + "runImmediately" : { + "title" : "run the query immediately or not", + "type" : "boolean" + }, + "queryId" : { + "title" : "the query id to save the query", + "type" : "string" + } + } +}; + defs["analytic_service.ExecutionInfo"] = { + "type" : "object", + "properties" : { + "queryId" : { + "type" : "string" + }, + "executionId" : { + "type" : "string" + }, + "status" : { + "$ref" : "#/components/schemas/analytic_service.ExecutionStatus" + }, + "scheduledAt" : { + "type" : "string", + "format" : "date-time" + }, + "startedAt" : { + "type" : "string", + "format" : "date-time" + }, + "finishedAt" : { + "type" : "string", + "format" : "date-time" + }, + "result" : { + "$ref" : "#/components/schemas/common.TabularData" + }, + "error" : { + "type" : "string" + }, + "computeStats" : { + "$ref" : "#/components/schemas/common.ComputeStats" + }, + "processorVersion" : { + "type" : "integer", + "format" : "int32" + } + } +}; + defs["analytic_service.ExecutionStatus"] = { + "type" : "string", + "default" : "PENDING", + "enum" : [ "PENDING", "RUNNING", "FINISHED", "KILLED" ] }; defs["analytic_service.LogQueryRequest.Filter"] = { "type" : "object", @@ -1243,6 +1335,54 @@ "format" : "int64" } } +}; + defs["analytic_service.QuerySQLResultResponse"] = { + "type" : "object", + "properties" : { + "executionInfo" : { + "$ref" : "#/components/schemas/analytic_service.ExecutionInfo" + } + } +}; + defs["analytic_service.RerunSQLQueryRequest"] = { + "type" : "object", + "properties" : { + "projectOwner" : { + "title" : "username or organization name", + "type" : "string" + }, + "projectSlug" : { + "title" : "project slug", + "type" : "string" + }, + "projectId" : { + "title" : "use project id if project_owner and project_slug are not provided", + "type" : "string" + }, + "version" : { + "title" : "version of the datasource, default to the active version if not provided", + "type" : "integer", + "format" : "int32" + }, + "queryId" : { + "type" : "string" + }, + "sqlQuery" : { + "$ref" : "#/components/schemas/analytic_service.SQLQuery" + } + } +}; + defs["analytic_service.RerunSQLQueryResponse"] = { + "type" : "object", + "properties" : { + "queueLength" : { + "type" : "integer", + "format" : "int32" + }, + "executionInfo" : { + "$ref" : "#/components/schemas/analytic_service.ExecutionInfo" + } + } }; defs["analytic_service.SQLQuery"] = { "type" : "object", @@ -1264,6 +1404,57 @@ "type" : "string" } } +}; + defs["analytic_service.SaveSQLRequest"] = { + "type" : "object", + "properties" : { + "projectOwner" : { + "title" : "username or organization name", + "type" : "string" + }, + "projectSlug" : { + "title" : "project slug", + "type" : "string" + }, + "projectId" : { + "title" : "use project id if project_owner and project_slug are not provided", + "type" : "string" + }, + "version" : { + "title" : "version of the datasource, default to the active version if not provided", + "type" : "integer", + "format" : "int32" + }, + "sqlQuery" : { + "$ref" : "#/components/schemas/analytic_service.SQLQuery" + }, + "source" : { + "$ref" : "#/components/schemas/analytic_service.Source" + }, + "runImmediately" : { + "title" : "run the query immediately or not", + "type" : "boolean" + }, + "queryId" : { + "title" : "the query id to save the query", + "type" : "string" + } + } +}; + defs["analytic_service.SaveSQLResponse"] = { + "type" : "object", + "properties" : { + "queueLength" : { + "type" : "integer", + "format" : "int32" + }, + "executionInfo" : { + "$ref" : "#/components/schemas/analytic_service.ExecutionInfo" + }, + "queryId" : { + "type" : "string" + } + } }; defs["analytic_service.SearchService.QueryLogBody"] = { "type" : "object", @@ -1309,6 +1500,11 @@ "format" : "int32" } } +}; + defs["analytic_service.Source"] = { + "type" : "string", + "default" : "SQL_EDITOR", + "enum" : [ "SQL_EDITOR", "DASHBOARD", "ASYNC_TRIGGER", "CURL", "ENDPOINT" ] }; defs["analytic_service.SyncExecuteSQLResponse"] = { "type" : "object", @@ -5474,12 +5670,30 @@
  • queryRange
  • +
  • + querySQLResult +
  • +
  • + querySQLResult2 +
  • +
  • + rerunSQLQuery +
  • +
  • + rerunSQLQuery2 +
  • retention
  • retention2
  • +
  • + saveSQL +
  • +
  • + saveSQL2 +
  • getCallTraceByBundle @@ -12502,49 +12716,47 @@


    -
    -
    +
    +
    -

    retention

    -

    Retention query

    +

    querySQLResult

    +

    Query SQL Result

    -

    Query for retention.

    +

    Query the result of a SQL query by execution_id.


    -
    /api/v1/insights/{owner}/{slug}/retention
    +
    /api/v1/analytics/{owner}/{slug}/sql/query_result

    Usage and SDK Samples

    -
    -
    curl -X POST \
    +                          
    +
    curl -X GET \
     -H "api-key: [[apiKey]]" \
      -H "Accept: application/json" \
    - -H "Content-Type: application/json" \
    - "https://app.sentio.xyz/api/v1/insights/{owner}/{slug}/retention" \
    - -d ''
    + "https://app.sentio.xyz/api/v1/analytics/{owner}/{slug}/sql/query_result?projectId=projectId_example&version=56&executionId=executionId_example"
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -12565,15 +12777,17 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataApi apiInstance = new DataApi(); - String owner = owner_example; // String | - String slug = slug_example; // String | - InsightsServiceInsightsServiceRetentionBody body = ; // InsightsServiceInsightsServiceRetentionBody | + String owner = owner_example; // String | username or organization name + String slug = slug_example; // String | project slug + String projectId = projectId_example; // String | use project id if project_owner and project_slug are not provided + Integer version = 56; // Integer | version of the datasource, default to the active version if not provided + String executionId = executionId_example; // String | try { - insights_service.RetentionResponse result = apiInstance.retention(owner, slug, body); + analytic_service.QuerySQLResultResponse result = apiInstance.querySQLResult(owner, slug, projectId, version, executionId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataApi#retention"); + System.err.println("Exception when calling DataApi#querySQLResult"); e.printStackTrace(); } } @@ -12581,50 +12795,54 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final String owner = new String(); // String | 
    -final String slug = new String(); // String | 
    -final InsightsServiceInsightsServiceRetentionBody body = new InsightsServiceInsightsServiceRetentionBody(); // InsightsServiceInsightsServiceRetentionBody | 
    +final String owner = new String(); // String | username or organization name
    +final String slug = new String(); // String | project slug
    +final String projectId = new String(); // String | use project id if project_owner and project_slug are not provided
    +final Integer version = new Integer(); // Integer | version of the datasource, default to the active version if not provided
    +final String executionId = new String(); // String | 
     
     try {
    -    final result = await api_instance.retention(owner, slug, body);
    +    final result = await api_instance.querySQLResult(owner, slug, projectId, version, executionId);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->retention: $e\n');
    +    print('Exception when calling DefaultApi->querySQLResult: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataApi;
     
     public class DataApiExample {
         public static void main(String[] args) {
             DataApi apiInstance = new DataApi();
    -        String owner = owner_example; // String | 
    -        String slug = slug_example; // String | 
    -        InsightsServiceInsightsServiceRetentionBody body = ; // InsightsServiceInsightsServiceRetentionBody | 
    +        String owner = owner_example; // String | username or organization name
    +        String slug = slug_example; // String | project slug
    +        String projectId = projectId_example; // String | use project id if project_owner and project_slug are not provided
    +        Integer version = 56; // Integer | version of the datasource, default to the active version if not provided
    +        String executionId = executionId_example; // String | 
     
             try {
    -            insights_service.RetentionResponse result = apiInstance.retention(owner, slug, body);
    +            analytic_service.QuerySQLResultResponse result = apiInstance.querySQLResult(owner, slug, projectId, version, executionId);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataApi#retention");
    +            System.err.println("Exception when calling DataApi#querySQLResult");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure API key authorization: (authentication scheme: ApiKeyAuth)
    @@ -12635,15 +12853,19 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataApi *apiInstance = [[DataApi alloc] init]; -String *owner = owner_example; // (default to null) -String *slug = slug_example; // (default to null) -InsightsServiceInsightsServiceRetentionBody *body = ; // +String *owner = owner_example; // username or organization name (default to null) +String *slug = slug_example; // project slug (default to null) +String *projectId = projectId_example; // use project id if project_owner and project_slug are not provided (optional) (default to null) +Integer *version = 56; // version of the datasource, default to the active version if not provided (optional) (default to null) +String *executionId = executionId_example; // (optional) (default to null) -// Retention query -[apiInstance retentionWith:owner +// Query SQL Result +[apiInstance querySQLResultWith:owner slug:slug - body:body - completionHandler: ^(insights_service.RetentionResponse output, NSError* error) { + projectId:projectId + version:version + executionId:executionId + completionHandler: ^(analytic_service.QuerySQLResultResponse output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -12654,7 +12876,7 @@

    Usage and SDK Samples

    -
    +
    var SentioApi = require('sentio_api');
     var defaultClient = SentioApi.ApiClient.instance;
     
    @@ -12666,9 +12888,13 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new SentioApi.DataApi() -var owner = owner_example; // {String} -var slug = slug_example; // {String} -var body = ; // {InsightsServiceInsightsServiceRetentionBody} +var owner = owner_example; // {String} username or organization name +var slug = slug_example; // {String} project slug +var opts = { + 'projectId': projectId_example, // {String} use project id if project_owner and project_slug are not provided + 'version': 56, // {Integer} version of the datasource, default to the active version if not provided + 'executionId': executionId_example // {String} +}; var callback = function(error, data, response) { if (error) { @@ -12677,14 +12903,14 @@

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.retention(owner, slug, body, callback); +api.querySQLResult(owner, slug, opts, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -12693,7 +12919,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class retentionExample + public class querySQLResultExample { public void main() { @@ -12704,16 +12930,18 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataApi(); - var owner = owner_example; // String | (default to null) - var slug = slug_example; // String | (default to null) - var body = new InsightsServiceInsightsServiceRetentionBody(); // InsightsServiceInsightsServiceRetentionBody | + var owner = owner_example; // String | username or organization name (default to null) + var slug = slug_example; // String | project slug (default to null) + var projectId = projectId_example; // String | use project id if project_owner and project_slug are not provided (optional) (default to null) + var version = 56; // Integer | version of the datasource, default to the active version if not provided (optional) (default to null) + var executionId = executionId_example; // String | (optional) (default to null) try { - // Retention query - insights_service.RetentionResponse result = apiInstance.retention(owner, slug, body); + // Query SQL Result + analytic_service.QuerySQLResultResponse result = apiInstance.querySQLResult(owner, slug, projectId, version, executionId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling DataApi.retention: " + e.Message ); + Debug.Print("Exception when calling DataApi.querySQLResult: " + e.Message ); } } } @@ -12721,7 +12949,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -12732,20 +12960,22 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataApi(); -$owner = owner_example; // String | -$slug = slug_example; // String | -$body = ; // InsightsServiceInsightsServiceRetentionBody | +$owner = owner_example; // String | username or organization name +$slug = slug_example; // String | project slug +$projectId = projectId_example; // String | use project id if project_owner and project_slug are not provided +$version = 56; // Integer | version of the datasource, default to the active version if not provided +$executionId = executionId_example; // String | try { - $result = $api_instance->retention($owner, $slug, $body); + $result = $api_instance->querySQLResult($owner, $slug, $projectId, $version, $executionId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DataApi->retention: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataApi->querySQLResult: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataApi;
    @@ -12757,20 +12987,2018 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataApi->new(); -my $owner = owner_example; # String | -my $slug = slug_example; # String | -my $body = WWW::OPenAPIClient::Object::InsightsServiceInsightsServiceRetentionBody->new(); # InsightsServiceInsightsServiceRetentionBody | +my $owner = owner_example; # String | username or organization name +my $slug = slug_example; # String | project slug +my $projectId = projectId_example; # String | use project id if project_owner and project_slug are not provided +my $version = 56; # Integer | version of the datasource, default to the active version if not provided +my $executionId = executionId_example; # String | eval { - my $result = $api_instance->retention(owner => $owner, slug => $slug, body => $body); + my $result = $api_instance->querySQLResult(owner => $owner, slug => $slug, projectId => $projectId, version => $version, executionId => $executionId); print Dumper($result); }; if ($@) { - warn "Exception when calling DataApi->retention: $@\n"; + warn "Exception when calling DataApi->querySQLResult: $@\n"; }
    -
    +
    +
    from __future__ import print_statement
    +import time
    +import openapi_client
    +from openapi_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure API key authorization: ApiKeyAuth
    +openapi_client.configuration.api_key['api-key'] = 'YOUR_API_KEY'
    +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +# openapi_client.configuration.api_key_prefix['api-key'] = 'Bearer'
    +
    +# Create an instance of the API class
    +api_instance = openapi_client.DataApi()
    +owner = owner_example # String | username or organization name (default to null)
    +slug = slug_example # String | project slug (default to null)
    +projectId = projectId_example # String | use project id if project_owner and project_slug are not provided (optional) (default to null)
    +version = 56 # Integer | version of the datasource, default to the active version if not provided (optional) (default to null)
    +executionId = executionId_example # String |  (optional) (default to null)
    +
    +try:
    +    # Query SQL Result
    +    api_response = api_instance.query_sql_result(owner, slug, projectId=projectId, version=version, executionId=executionId)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DataApi->querySQLResult: %s\n" % e)
    +
    + +
    +
    extern crate DataApi;
    +
    +pub fn main() {
    +    let owner = owner_example; // String
    +    let slug = slug_example; // String
    +    let projectId = projectId_example; // String
    +    let version = 56; // Integer
    +    let executionId = executionId_example; // String
    +
    +    let mut context = DataApi::Context::default();
    +    let result = client.querySQLResult(owner, slug, projectId, version, executionId, &context).wait();
    +
    +    println!("{:?}", result);
    +}
    +
    +
    +
    + +

    Scopes

    + + +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    owner* + + +
    +
    +
    + + String + + +
    +username or organization name +
    +
    +
    + Required +
    +
    +
    +
    slug* + + +
    +
    +
    + + String + + +
    +project slug +
    +
    +
    + Required +
    +
    +
    +
    + + + + +
    Query parameters
    + + + + + + + + + + + + + + + + + +
    NameDescription
    projectId + + +
    +
    +
    + + String + + +
    +use project id if project_owner and project_slug are not provided +
    +
    +
    +
    +
    version + + +
    +
    +
    + + Integer + + + (int32) + + +
    +version of the datasource, default to the active version if not provided +
    +
    +
    +
    +
    executionId + + +
    +
    +
    + + String + + +
    +
    +
    +
    + +

    Responses

    +

    +

    + + + + + + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    querySQLResult2

    +

    Query SQL Result

    +
    +
    +
    +

    +

    Query the result of a SQL query by execution_id.

    +

    +
    +
    /api/v1/analytics/sql/query_result
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET \
    +-H "api-key: [[apiKey]]" \
    + -H "Accept: application/json" \
    + "https://app.sentio.xyz/api/v1/analytics/sql/query_result?projectOwner=projectOwner_example&projectSlug=projectSlug_example&projectId=projectId_example&version=56&executionId=executionId_example"
    +
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.DataApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +
    +        // Configure API key authorization: ApiKeyAuth
    +        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    +        ApiKeyAuth.setApiKey("YOUR API KEY");
    +        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +        //ApiKeyAuth.setApiKeyPrefix("Token");
    +
    +        // Create an instance of the API class
    +        DataApi apiInstance = new DataApi();
    +        String projectOwner = projectOwner_example; // String | username or organization name
    +        String projectSlug = projectSlug_example; // String | project slug
    +        String projectId = projectId_example; // String | use project id if project_owner and project_slug are not provided
    +        Integer version = 56; // Integer | version of the datasource, default to the active version if not provided
    +        String executionId = executionId_example; // String | 
    +
    +        try {
    +            analytic_service.QuerySQLResultResponse result = apiInstance.querySQLResult2(projectOwner, projectSlug, projectId, version, executionId);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#querySQLResult2");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    + +
    +
    import 'package:openapi/api.dart';
    +
    +final api_instance = DefaultApi();
    +
    +final String projectOwner = new String(); // String | username or organization name
    +final String projectSlug = new String(); // String | project slug
    +final String projectId = new String(); // String | use project id if project_owner and project_slug are not provided
    +final Integer version = new Integer(); // Integer | version of the datasource, default to the active version if not provided
    +final String executionId = new String(); // String | 
    +
    +try {
    +    final result = await api_instance.querySQLResult2(projectOwner, projectSlug, projectId, version, executionId);
    +    print(result);
    +} catch (e) {
    +    print('Exception when calling DefaultApi->querySQLResult2: $e\n');
    +}
    +
    +
    +
    + +
    +
    import org.openapitools.client.api.DataApi;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        DataApi apiInstance = new DataApi();
    +        String projectOwner = projectOwner_example; // String | username or organization name
    +        String projectSlug = projectSlug_example; // String | project slug
    +        String projectId = projectId_example; // String | use project id if project_owner and project_slug are not provided
    +        Integer version = 56; // Integer | version of the datasource, default to the active version if not provided
    +        String executionId = executionId_example; // String | 
    +
    +        try {
    +            analytic_service.QuerySQLResultResponse result = apiInstance.querySQLResult2(projectOwner, projectSlug, projectId, version, executionId);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#querySQLResult2");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
    +
    +// Configure API key authorization: (authentication scheme: ApiKeyAuth)
    +[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-key"];
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-key"];
    +
    +
    +// Create an instance of the API class
    +DataApi *apiInstance = [[DataApi alloc] init];
    +String *projectOwner = projectOwner_example; // username or organization name (optional) (default to null)
    +String *projectSlug = projectSlug_example; // project slug (optional) (default to null)
    +String *projectId = projectId_example; // use project id if project_owner and project_slug are not provided (optional) (default to null)
    +Integer *version = 56; // version of the datasource, default to the active version if not provided (optional) (default to null)
    +String *executionId = executionId_example; //  (optional) (default to null)
    +
    +// Query SQL Result
    +[apiInstance querySQLResult2With:projectOwner
    +    projectSlug:projectSlug
    +    projectId:projectId
    +    version:version
    +    executionId:executionId
    +              completionHandler: ^(analytic_service.QuerySQLResultResponse output, NSError* error) {
    +    if (output) {
    +        NSLog(@"%@", output);
    +    }
    +    if (error) {
    +        NSLog(@"Error: %@", error);
    +    }
    +}];
    +
    +
    + +
    +
    var SentioApi = require('sentio_api');
    +var defaultClient = SentioApi.ApiClient.instance;
    +
    +// Configure API key authorization: ApiKeyAuth
    +var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
    +ApiKeyAuth.apiKey = "YOUR API KEY";
    +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +//ApiKeyAuth.apiKeyPrefix['api-key'] = "Token";
    +
    +// Create an instance of the API class
    +var api = new SentioApi.DataApi()
    +var opts = {
    +  'projectOwner': projectOwner_example, // {String} username or organization name
    +  'projectSlug': projectSlug_example, // {String} project slug
    +  'projectId': projectId_example, // {String} use project id if project_owner and project_slug are not provided
    +  'version': 56, // {Integer} version of the datasource, default to the active version if not provided
    +  'executionId': executionId_example // {String} 
    +};
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.querySQLResult2(opts, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using Org.OpenAPITools.Api;
    +using Org.OpenAPITools.Client;
    +using Org.OpenAPITools.Model;
    +
    +namespace Example
    +{
    +    public class querySQLResult2Example
    +    {
    +        public void main()
    +        {
    +            // Configure API key authorization: ApiKeyAuth
    +            Configuration.Default.ApiKey.Add("api-key", "YOUR_API_KEY");
    +            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +            // Configuration.Default.ApiKeyPrefix.Add("api-key", "Bearer");
    +
    +            // Create an instance of the API class
    +            var apiInstance = new DataApi();
    +            var projectOwner = projectOwner_example;  // String | username or organization name (optional)  (default to null)
    +            var projectSlug = projectSlug_example;  // String | project slug (optional)  (default to null)
    +            var projectId = projectId_example;  // String | use project id if project_owner and project_slug are not provided (optional)  (default to null)
    +            var version = 56;  // Integer | version of the datasource, default to the active version if not provided (optional)  (default to null)
    +            var executionId = executionId_example;  // String |  (optional)  (default to null)
    +
    +            try {
    +                // Query SQL Result
    +                analytic_service.QuerySQLResultResponse result = apiInstance.querySQLResult2(projectOwner, projectSlug, projectId, version, executionId);
    +                Debug.WriteLine(result);
    +            } catch (Exception e) {
    +                Debug.Print("Exception when calling DataApi.querySQLResult2: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +// Configure API key authorization: ApiKeyAuth
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
    +
    +// Create an instance of the API class
    +$api_instance = new OpenAPITools\Client\Api\DataApi();
    +$projectOwner = projectOwner_example; // String | username or organization name
    +$projectSlug = projectSlug_example; // String | project slug
    +$projectId = projectId_example; // String | use project id if project_owner and project_slug are not provided
    +$version = 56; // Integer | version of the datasource, default to the active version if not provided
    +$executionId = executionId_example; // String | 
    +
    +try {
    +    $result = $api_instance->querySQLResult2($projectOwner, $projectSlug, $projectId, $version, $executionId);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DataApi->querySQLResult2: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::OPenAPIClient::Configuration;
    +use WWW::OPenAPIClient::DataApi;
    +
    +# Configure API key authorization: ApiKeyAuth
    +$WWW::OPenAPIClient::Configuration::api_key->{'api-key'} = 'YOUR_API_KEY';
    +# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'api-key'} = "Bearer";
    +
    +# Create an instance of the API class
    +my $api_instance = WWW::OPenAPIClient::DataApi->new();
    +my $projectOwner = projectOwner_example; # String | username or organization name
    +my $projectSlug = projectSlug_example; # String | project slug
    +my $projectId = projectId_example; # String | use project id if project_owner and project_slug are not provided
    +my $version = 56; # Integer | version of the datasource, default to the active version if not provided
    +my $executionId = executionId_example; # String | 
    +
    +eval {
    +    my $result = $api_instance->querySQLResult2(projectOwner => $projectOwner, projectSlug => $projectSlug, projectId => $projectId, version => $version, executionId => $executionId);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DataApi->querySQLResult2: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import openapi_client
    +from openapi_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure API key authorization: ApiKeyAuth
    +openapi_client.configuration.api_key['api-key'] = 'YOUR_API_KEY'
    +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +# openapi_client.configuration.api_key_prefix['api-key'] = 'Bearer'
    +
    +# Create an instance of the API class
    +api_instance = openapi_client.DataApi()
    +projectOwner = projectOwner_example # String | username or organization name (optional) (default to null)
    +projectSlug = projectSlug_example # String | project slug (optional) (default to null)
    +projectId = projectId_example # String | use project id if project_owner and project_slug are not provided (optional) (default to null)
    +version = 56 # Integer | version of the datasource, default to the active version if not provided (optional) (default to null)
    +executionId = executionId_example # String |  (optional) (default to null)
    +
    +try:
    +    # Query SQL Result
    +    api_response = api_instance.query_sql_result2(projectOwner=projectOwner, projectSlug=projectSlug, projectId=projectId, version=version, executionId=executionId)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DataApi->querySQLResult2: %s\n" % e)
    +
    + +
    +
    extern crate DataApi;
    +
    +pub fn main() {
    +    let projectOwner = projectOwner_example; // String
    +    let projectSlug = projectSlug_example; // String
    +    let projectId = projectId_example; // String
    +    let version = 56; // Integer
    +    let executionId = executionId_example; // String
    +
    +    let mut context = DataApi::Context::default();
    +    let result = client.querySQLResult2(projectOwner, projectSlug, projectId, version, executionId, &context).wait();
    +
    +    println!("{:?}", result);
    +}
    +
    +
    +
    + +

    Scopes

    + + +
    + +

    Parameters

    + + + + + +
    Query parameters
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDescription
    projectOwner + + +
    +
    +
    + + String + + +
    +username or organization name +
    +
    +
    +
    +
    projectSlug + + +
    +
    +
    + + String + + +
    +project slug +
    +
    +
    +
    +
    projectId + + +
    +
    +
    + + String + + +
    +use project id if project_owner and project_slug are not provided +
    +
    +
    +
    +
    version + + +
    +
    +
    + + Integer + + + (int32) + + +
    +version of the datasource, default to the active version if not provided +
    +
    +
    +
    +
    executionId + + +
    +
    +
    + + String + + +
    +
    +
    +
    + +

    Responses

    +

    +

    + + + + + + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    rerunSQLQuery

    +

    Rerun SQL

    +
    +
    +
    +

    +

    Rerun your SQL query by query_id, you can also update the query and run it. + +It will return execution_id, use it to query the result.

    +

    +
    +
    /api/v1/analytics/{owner}/{slug}/sql/rerun_query
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST \
    +-H "api-key: [[apiKey]]" \
    + -H "Accept: application/json" \
    + -H "Content-Type: application/json" \
    + "https://app.sentio.xyz/api/v1/analytics/{owner}/{slug}/sql/rerun_query" \
    + -d ''
    +
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.DataApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +
    +        // Configure API key authorization: ApiKeyAuth
    +        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    +        ApiKeyAuth.setApiKey("YOUR API KEY");
    +        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +        //ApiKeyAuth.setApiKeyPrefix("Token");
    +
    +        // Create an instance of the API class
    +        DataApi apiInstance = new DataApi();
    +        String owner = owner_example; // String | username or organization name
    +        String slug = slug_example; // String | project slug
    +        AnalyticServiceAnalyticServiceRerunSQLQueryBody body = ; // AnalyticServiceAnalyticServiceRerunSQLQueryBody | 
    +
    +        try {
    +            analytic_service.RerunSQLQueryResponse result = apiInstance.rerunSQLQuery(owner, slug, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#rerunSQLQuery");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    + +
    +
    import 'package:openapi/api.dart';
    +
    +final api_instance = DefaultApi();
    +
    +final String owner = new String(); // String | username or organization name
    +final String slug = new String(); // String | project slug
    +final AnalyticServiceAnalyticServiceRerunSQLQueryBody body = new AnalyticServiceAnalyticServiceRerunSQLQueryBody(); // AnalyticServiceAnalyticServiceRerunSQLQueryBody | 
    +
    +try {
    +    final result = await api_instance.rerunSQLQuery(owner, slug, body);
    +    print(result);
    +} catch (e) {
    +    print('Exception when calling DefaultApi->rerunSQLQuery: $e\n');
    +}
    +
    +
    +
    + +
    +
    import org.openapitools.client.api.DataApi;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        DataApi apiInstance = new DataApi();
    +        String owner = owner_example; // String | username or organization name
    +        String slug = slug_example; // String | project slug
    +        AnalyticServiceAnalyticServiceRerunSQLQueryBody body = ; // AnalyticServiceAnalyticServiceRerunSQLQueryBody | 
    +
    +        try {
    +            analytic_service.RerunSQLQueryResponse result = apiInstance.rerunSQLQuery(owner, slug, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#rerunSQLQuery");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
    +
    +// Configure API key authorization: (authentication scheme: ApiKeyAuth)
    +[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-key"];
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-key"];
    +
    +
    +// Create an instance of the API class
    +DataApi *apiInstance = [[DataApi alloc] init];
    +String *owner = owner_example; // username or organization name (default to null)
    +String *slug = slug_example; // project slug (default to null)
    +AnalyticServiceAnalyticServiceRerunSQLQueryBody *body = ; // 
    +
    +// Rerun SQL
    +[apiInstance rerunSQLQueryWith:owner
    +    slug:slug
    +    body:body
    +              completionHandler: ^(analytic_service.RerunSQLQueryResponse output, NSError* error) {
    +    if (output) {
    +        NSLog(@"%@", output);
    +    }
    +    if (error) {
    +        NSLog(@"Error: %@", error);
    +    }
    +}];
    +
    +
    + +
    +
    var SentioApi = require('sentio_api');
    +var defaultClient = SentioApi.ApiClient.instance;
    +
    +// Configure API key authorization: ApiKeyAuth
    +var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
    +ApiKeyAuth.apiKey = "YOUR API KEY";
    +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +//ApiKeyAuth.apiKeyPrefix['api-key'] = "Token";
    +
    +// Create an instance of the API class
    +var api = new SentioApi.DataApi()
    +var owner = owner_example; // {String} username or organization name
    +var slug = slug_example; // {String} project slug
    +var body = ; // {AnalyticServiceAnalyticServiceRerunSQLQueryBody} 
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.rerunSQLQuery(owner, slug, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using Org.OpenAPITools.Api;
    +using Org.OpenAPITools.Client;
    +using Org.OpenAPITools.Model;
    +
    +namespace Example
    +{
    +    public class rerunSQLQueryExample
    +    {
    +        public void main()
    +        {
    +            // Configure API key authorization: ApiKeyAuth
    +            Configuration.Default.ApiKey.Add("api-key", "YOUR_API_KEY");
    +            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +            // Configuration.Default.ApiKeyPrefix.Add("api-key", "Bearer");
    +
    +            // Create an instance of the API class
    +            var apiInstance = new DataApi();
    +            var owner = owner_example;  // String | username or organization name (default to null)
    +            var slug = slug_example;  // String | project slug (default to null)
    +            var body = new AnalyticServiceAnalyticServiceRerunSQLQueryBody(); // AnalyticServiceAnalyticServiceRerunSQLQueryBody | 
    +
    +            try {
    +                // Rerun SQL
    +                analytic_service.RerunSQLQueryResponse result = apiInstance.rerunSQLQuery(owner, slug, body);
    +                Debug.WriteLine(result);
    +            } catch (Exception e) {
    +                Debug.Print("Exception when calling DataApi.rerunSQLQuery: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +// Configure API key authorization: ApiKeyAuth
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
    +
    +// Create an instance of the API class
    +$api_instance = new OpenAPITools\Client\Api\DataApi();
    +$owner = owner_example; // String | username or organization name
    +$slug = slug_example; // String | project slug
    +$body = ; // AnalyticServiceAnalyticServiceRerunSQLQueryBody | 
    +
    +try {
    +    $result = $api_instance->rerunSQLQuery($owner, $slug, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DataApi->rerunSQLQuery: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::OPenAPIClient::Configuration;
    +use WWW::OPenAPIClient::DataApi;
    +
    +# Configure API key authorization: ApiKeyAuth
    +$WWW::OPenAPIClient::Configuration::api_key->{'api-key'} = 'YOUR_API_KEY';
    +# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'api-key'} = "Bearer";
    +
    +# Create an instance of the API class
    +my $api_instance = WWW::OPenAPIClient::DataApi->new();
    +my $owner = owner_example; # String | username or organization name
    +my $slug = slug_example; # String | project slug
    +my $body = WWW::OPenAPIClient::Object::AnalyticServiceAnalyticServiceRerunSQLQueryBody->new(); # AnalyticServiceAnalyticServiceRerunSQLQueryBody | 
    +
    +eval {
    +    my $result = $api_instance->rerunSQLQuery(owner => $owner, slug => $slug, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DataApi->rerunSQLQuery: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import openapi_client
    +from openapi_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure API key authorization: ApiKeyAuth
    +openapi_client.configuration.api_key['api-key'] = 'YOUR_API_KEY'
    +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +# openapi_client.configuration.api_key_prefix['api-key'] = 'Bearer'
    +
    +# Create an instance of the API class
    +api_instance = openapi_client.DataApi()
    +owner = owner_example # String | username or organization name (default to null)
    +slug = slug_example # String | project slug (default to null)
    +body =  # AnalyticServiceAnalyticServiceRerunSQLQueryBody | 
    +
    +try:
    +    # Rerun SQL
    +    api_response = api_instance.rerun_sql_query(owner, slug, body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DataApi->rerunSQLQuery: %s\n" % e)
    +
    + +
    +
    extern crate DataApi;
    +
    +pub fn main() {
    +    let owner = owner_example; // String
    +    let slug = slug_example; // String
    +    let body = ; // AnalyticServiceAnalyticServiceRerunSQLQueryBody
    +
    +    let mut context = DataApi::Context::default();
    +    let result = client.rerunSQLQuery(owner, slug, body, &context).wait();
    +
    +    println!("{:?}", result);
    +}
    +
    +
    +
    + +

    Scopes

    + + +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    owner* + + +
    +
    +
    + + String + + +
    +username or organization name +
    +
    +
    + Required +
    +
    +
    +
    slug* + + +
    +
    +
    + + String + + +
    +project slug +
    +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * +

    + +
    +
    + + + +

    Responses

    +

    +

    + + + + + + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    rerunSQLQuery2

    +

    Rerun SQL

    +
    +
    +
    +

    +

    Rerun your SQL query by query_id, you can also update the query and run it. + +It will return execution_id, use it to query the result.

    +

    +
    +
    /api/v1/analytics/sql/rerun_query
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST \
    +-H "api-key: [[apiKey]]" \
    + -H "Accept: application/json" \
    + -H "Content-Type: application/json" \
    + "https://app.sentio.xyz/api/v1/analytics/sql/rerun_query" \
    + -d ''
    +
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.DataApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +
    +        // Configure API key authorization: ApiKeyAuth
    +        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    +        ApiKeyAuth.setApiKey("YOUR API KEY");
    +        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +        //ApiKeyAuth.setApiKeyPrefix("Token");
    +
    +        // Create an instance of the API class
    +        DataApi apiInstance = new DataApi();
    +        AnalyticServiceRerunSQLQueryRequest body = ; // AnalyticServiceRerunSQLQueryRequest | 
    +
    +        try {
    +            analytic_service.RerunSQLQueryResponse result = apiInstance.rerunSQLQuery2(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#rerunSQLQuery2");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    + +
    +
    import 'package:openapi/api.dart';
    +
    +final api_instance = DefaultApi();
    +
    +final AnalyticServiceRerunSQLQueryRequest body = new AnalyticServiceRerunSQLQueryRequest(); // AnalyticServiceRerunSQLQueryRequest | 
    +
    +try {
    +    final result = await api_instance.rerunSQLQuery2(body);
    +    print(result);
    +} catch (e) {
    +    print('Exception when calling DefaultApi->rerunSQLQuery2: $e\n');
    +}
    +
    +
    +
    + +
    +
    import org.openapitools.client.api.DataApi;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        DataApi apiInstance = new DataApi();
    +        AnalyticServiceRerunSQLQueryRequest body = ; // AnalyticServiceRerunSQLQueryRequest | 
    +
    +        try {
    +            analytic_service.RerunSQLQueryResponse result = apiInstance.rerunSQLQuery2(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#rerunSQLQuery2");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
    +
    +// Configure API key authorization: (authentication scheme: ApiKeyAuth)
    +[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-key"];
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-key"];
    +
    +
    +// Create an instance of the API class
    +DataApi *apiInstance = [[DataApi alloc] init];
    +AnalyticServiceRerunSQLQueryRequest *body = ; // 
    +
    +// Rerun SQL
    +[apiInstance rerunSQLQuery2With:body
    +              completionHandler: ^(analytic_service.RerunSQLQueryResponse output, NSError* error) {
    +    if (output) {
    +        NSLog(@"%@", output);
    +    }
    +    if (error) {
    +        NSLog(@"Error: %@", error);
    +    }
    +}];
    +
    +
    + +
    +
    var SentioApi = require('sentio_api');
    +var defaultClient = SentioApi.ApiClient.instance;
    +
    +// Configure API key authorization: ApiKeyAuth
    +var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
    +ApiKeyAuth.apiKey = "YOUR API KEY";
    +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +//ApiKeyAuth.apiKeyPrefix['api-key'] = "Token";
    +
    +// Create an instance of the API class
    +var api = new SentioApi.DataApi()
    +var body = ; // {AnalyticServiceRerunSQLQueryRequest} 
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.rerunSQLQuery2(body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using Org.OpenAPITools.Api;
    +using Org.OpenAPITools.Client;
    +using Org.OpenAPITools.Model;
    +
    +namespace Example
    +{
    +    public class rerunSQLQuery2Example
    +    {
    +        public void main()
    +        {
    +            // Configure API key authorization: ApiKeyAuth
    +            Configuration.Default.ApiKey.Add("api-key", "YOUR_API_KEY");
    +            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +            // Configuration.Default.ApiKeyPrefix.Add("api-key", "Bearer");
    +
    +            // Create an instance of the API class
    +            var apiInstance = new DataApi();
    +            var body = new AnalyticServiceRerunSQLQueryRequest(); // AnalyticServiceRerunSQLQueryRequest | 
    +
    +            try {
    +                // Rerun SQL
    +                analytic_service.RerunSQLQueryResponse result = apiInstance.rerunSQLQuery2(body);
    +                Debug.WriteLine(result);
    +            } catch (Exception e) {
    +                Debug.Print("Exception when calling DataApi.rerunSQLQuery2: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +// Configure API key authorization: ApiKeyAuth
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
    +
    +// Create an instance of the API class
    +$api_instance = new OpenAPITools\Client\Api\DataApi();
    +$body = ; // AnalyticServiceRerunSQLQueryRequest | 
    +
    +try {
    +    $result = $api_instance->rerunSQLQuery2($body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DataApi->rerunSQLQuery2: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::OPenAPIClient::Configuration;
    +use WWW::OPenAPIClient::DataApi;
    +
    +# Configure API key authorization: ApiKeyAuth
    +$WWW::OPenAPIClient::Configuration::api_key->{'api-key'} = 'YOUR_API_KEY';
    +# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'api-key'} = "Bearer";
    +
    +# Create an instance of the API class
    +my $api_instance = WWW::OPenAPIClient::DataApi->new();
    +my $body = WWW::OPenAPIClient::Object::AnalyticServiceRerunSQLQueryRequest->new(); # AnalyticServiceRerunSQLQueryRequest | 
    +
    +eval {
    +    my $result = $api_instance->rerunSQLQuery2(body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DataApi->rerunSQLQuery2: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import openapi_client
    +from openapi_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure API key authorization: ApiKeyAuth
    +openapi_client.configuration.api_key['api-key'] = 'YOUR_API_KEY'
    +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +# openapi_client.configuration.api_key_prefix['api-key'] = 'Bearer'
    +
    +# Create an instance of the API class
    +api_instance = openapi_client.DataApi()
    +body =  # AnalyticServiceRerunSQLQueryRequest | 
    +
    +try:
    +    # Rerun SQL
    +    api_response = api_instance.rerun_sql_query2(body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DataApi->rerunSQLQuery2: %s\n" % e)
    +
    + +
    +
    extern crate DataApi;
    +
    +pub fn main() {
    +    let body = ; // AnalyticServiceRerunSQLQueryRequest
    +
    +    let mut context = DataApi::Context::default();
    +    let result = client.rerunSQLQuery2(body, &context).wait();
    +
    +    println!("{:?}", result);
    +}
    +
    +
    +
    + +

    Scopes

    + + +
    + +

    Parameters

    + + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * +

    + +
    +
    + + + +

    Responses

    +

    +

    + + + + + + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    retention

    +

    Retention query

    +
    +
    +
    +

    +

    Query for retention.

    +

    +
    +
    /api/v1/insights/{owner}/{slug}/retention
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST \
    +-H "api-key: [[apiKey]]" \
    + -H "Accept: application/json" \
    + -H "Content-Type: application/json" \
    + "https://app.sentio.xyz/api/v1/insights/{owner}/{slug}/retention" \
    + -d ''
    +
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.DataApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +
    +        // Configure API key authorization: ApiKeyAuth
    +        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    +        ApiKeyAuth.setApiKey("YOUR API KEY");
    +        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +        //ApiKeyAuth.setApiKeyPrefix("Token");
    +
    +        // Create an instance of the API class
    +        DataApi apiInstance = new DataApi();
    +        String owner = owner_example; // String | 
    +        String slug = slug_example; // String | 
    +        InsightsServiceInsightsServiceRetentionBody body = ; // InsightsServiceInsightsServiceRetentionBody | 
    +
    +        try {
    +            insights_service.RetentionResponse result = apiInstance.retention(owner, slug, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#retention");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    + +
    +
    import 'package:openapi/api.dart';
    +
    +final api_instance = DefaultApi();
    +
    +final String owner = new String(); // String | 
    +final String slug = new String(); // String | 
    +final InsightsServiceInsightsServiceRetentionBody body = new InsightsServiceInsightsServiceRetentionBody(); // InsightsServiceInsightsServiceRetentionBody | 
    +
    +try {
    +    final result = await api_instance.retention(owner, slug, body);
    +    print(result);
    +} catch (e) {
    +    print('Exception when calling DefaultApi->retention: $e\n');
    +}
    +
    +
    +
    + +
    +
    import org.openapitools.client.api.DataApi;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        DataApi apiInstance = new DataApi();
    +        String owner = owner_example; // String | 
    +        String slug = slug_example; // String | 
    +        InsightsServiceInsightsServiceRetentionBody body = ; // InsightsServiceInsightsServiceRetentionBody | 
    +
    +        try {
    +            insights_service.RetentionResponse result = apiInstance.retention(owner, slug, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#retention");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
    +
    +// Configure API key authorization: (authentication scheme: ApiKeyAuth)
    +[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-key"];
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-key"];
    +
    +
    +// Create an instance of the API class
    +DataApi *apiInstance = [[DataApi alloc] init];
    +String *owner = owner_example; //  (default to null)
    +String *slug = slug_example; //  (default to null)
    +InsightsServiceInsightsServiceRetentionBody *body = ; // 
    +
    +// Retention query
    +[apiInstance retentionWith:owner
    +    slug:slug
    +    body:body
    +              completionHandler: ^(insights_service.RetentionResponse output, NSError* error) {
    +    if (output) {
    +        NSLog(@"%@", output);
    +    }
    +    if (error) {
    +        NSLog(@"Error: %@", error);
    +    }
    +}];
    +
    +
    + +
    +
    var SentioApi = require('sentio_api');
    +var defaultClient = SentioApi.ApiClient.instance;
    +
    +// Configure API key authorization: ApiKeyAuth
    +var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
    +ApiKeyAuth.apiKey = "YOUR API KEY";
    +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +//ApiKeyAuth.apiKeyPrefix['api-key'] = "Token";
    +
    +// Create an instance of the API class
    +var api = new SentioApi.DataApi()
    +var owner = owner_example; // {String} 
    +var slug = slug_example; // {String} 
    +var body = ; // {InsightsServiceInsightsServiceRetentionBody} 
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.retention(owner, slug, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using Org.OpenAPITools.Api;
    +using Org.OpenAPITools.Client;
    +using Org.OpenAPITools.Model;
    +
    +namespace Example
    +{
    +    public class retentionExample
    +    {
    +        public void main()
    +        {
    +            // Configure API key authorization: ApiKeyAuth
    +            Configuration.Default.ApiKey.Add("api-key", "YOUR_API_KEY");
    +            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +            // Configuration.Default.ApiKeyPrefix.Add("api-key", "Bearer");
    +
    +            // Create an instance of the API class
    +            var apiInstance = new DataApi();
    +            var owner = owner_example;  // String |  (default to null)
    +            var slug = slug_example;  // String |  (default to null)
    +            var body = new InsightsServiceInsightsServiceRetentionBody(); // InsightsServiceInsightsServiceRetentionBody | 
    +
    +            try {
    +                // Retention query
    +                insights_service.RetentionResponse result = apiInstance.retention(owner, slug, body);
    +                Debug.WriteLine(result);
    +            } catch (Exception e) {
    +                Debug.Print("Exception when calling DataApi.retention: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +// Configure API key authorization: ApiKeyAuth
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
    +
    +// Create an instance of the API class
    +$api_instance = new OpenAPITools\Client\Api\DataApi();
    +$owner = owner_example; // String | 
    +$slug = slug_example; // String | 
    +$body = ; // InsightsServiceInsightsServiceRetentionBody | 
    +
    +try {
    +    $result = $api_instance->retention($owner, $slug, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DataApi->retention: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::OPenAPIClient::Configuration;
    +use WWW::OPenAPIClient::DataApi;
    +
    +# Configure API key authorization: ApiKeyAuth
    +$WWW::OPenAPIClient::Configuration::api_key->{'api-key'} = 'YOUR_API_KEY';
    +# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'api-key'} = "Bearer";
    +
    +# Create an instance of the API class
    +my $api_instance = WWW::OPenAPIClient::DataApi->new();
    +my $owner = owner_example; # String | 
    +my $slug = slug_example; # String | 
    +my $body = WWW::OPenAPIClient::Object::InsightsServiceInsightsServiceRetentionBody->new(); # InsightsServiceInsightsServiceRetentionBody | 
    +
    +eval {
    +    my $result = $api_instance->retention(owner => $owner, slug => $slug, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DataApi->retention: $@\n";
    +}
    +
    + +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -12789,23 +15017,953 @@ 

    Usage and SDK Samples

    body = # InsightsServiceInsightsServiceRetentionBody | try: - # Retention query - api_response = api_instance.retention(owner, slug, body) + # Retention query + api_response = api_instance.retention(owner, slug, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataApi->retention: %s\n" % e)
    +
    + +
    +
    extern crate DataApi;
    +
    +pub fn main() {
    +    let owner = owner_example; // String
    +    let slug = slug_example; // String
    +    let body = ; // InsightsServiceInsightsServiceRetentionBody
    +
    +    let mut context = DataApi::Context::default();
    +    let result = client.retention(owner, slug, body, &context).wait();
    +
    +    println!("{:?}", result);
    +}
    +
    +
    +
    + +

    Scopes

    + + +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    owner* + + +
    +
    +
    + + String + + +
    +
    + Required +
    +
    +
    +
    slug* + + +
    +
    +
    + + String + + +
    +
    + Required +
    +
    +
    +
    + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * +

    + +
    +
    + + + +

    Responses

    +

    +

    + + + + + + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    retention2

    +

    Retention query

    +
    +
    +
    +

    +

    Query for retention.

    +

    +
    +
    /api/v1/insights/retention
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST \
    +-H "api-key: [[apiKey]]" \
    + -H "Accept: application/json" \
    + -H "Content-Type: application/json" \
    + "https://app.sentio.xyz/api/v1/insights/retention" \
    + -d ''
    +
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.DataApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +
    +        // Configure API key authorization: ApiKeyAuth
    +        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    +        ApiKeyAuth.setApiKey("YOUR API KEY");
    +        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +        //ApiKeyAuth.setApiKeyPrefix("Token");
    +
    +        // Create an instance of the API class
    +        DataApi apiInstance = new DataApi();
    +        InsightsServiceRetentionRequest body = ; // InsightsServiceRetentionRequest | 
    +
    +        try {
    +            insights_service.RetentionResponse result = apiInstance.retention2(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#retention2");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    + +
    +
    import 'package:openapi/api.dart';
    +
    +final api_instance = DefaultApi();
    +
    +final InsightsServiceRetentionRequest body = new InsightsServiceRetentionRequest(); // InsightsServiceRetentionRequest | 
    +
    +try {
    +    final result = await api_instance.retention2(body);
    +    print(result);
    +} catch (e) {
    +    print('Exception when calling DefaultApi->retention2: $e\n');
    +}
    +
    +
    +
    + +
    +
    import org.openapitools.client.api.DataApi;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        DataApi apiInstance = new DataApi();
    +        InsightsServiceRetentionRequest body = ; // InsightsServiceRetentionRequest | 
    +
    +        try {
    +            insights_service.RetentionResponse result = apiInstance.retention2(body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#retention2");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
    +
    +// Configure API key authorization: (authentication scheme: ApiKeyAuth)
    +[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-key"];
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-key"];
    +
    +
    +// Create an instance of the API class
    +DataApi *apiInstance = [[DataApi alloc] init];
    +InsightsServiceRetentionRequest *body = ; // 
    +
    +// Retention query
    +[apiInstance retention2With:body
    +              completionHandler: ^(insights_service.RetentionResponse output, NSError* error) {
    +    if (output) {
    +        NSLog(@"%@", output);
    +    }
    +    if (error) {
    +        NSLog(@"Error: %@", error);
    +    }
    +}];
    +
    +
    + +
    +
    var SentioApi = require('sentio_api');
    +var defaultClient = SentioApi.ApiClient.instance;
    +
    +// Configure API key authorization: ApiKeyAuth
    +var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
    +ApiKeyAuth.apiKey = "YOUR API KEY";
    +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +//ApiKeyAuth.apiKeyPrefix['api-key'] = "Token";
    +
    +// Create an instance of the API class
    +var api = new SentioApi.DataApi()
    +var body = ; // {InsightsServiceRetentionRequest} 
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.retention2(body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using Org.OpenAPITools.Api;
    +using Org.OpenAPITools.Client;
    +using Org.OpenAPITools.Model;
    +
    +namespace Example
    +{
    +    public class retention2Example
    +    {
    +        public void main()
    +        {
    +            // Configure API key authorization: ApiKeyAuth
    +            Configuration.Default.ApiKey.Add("api-key", "YOUR_API_KEY");
    +            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +            // Configuration.Default.ApiKeyPrefix.Add("api-key", "Bearer");
    +
    +            // Create an instance of the API class
    +            var apiInstance = new DataApi();
    +            var body = new InsightsServiceRetentionRequest(); // InsightsServiceRetentionRequest | 
    +
    +            try {
    +                // Retention query
    +                insights_service.RetentionResponse result = apiInstance.retention2(body);
    +                Debug.WriteLine(result);
    +            } catch (Exception e) {
    +                Debug.Print("Exception when calling DataApi.retention2: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +// Configure API key authorization: ApiKeyAuth
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
    +
    +// Create an instance of the API class
    +$api_instance = new OpenAPITools\Client\Api\DataApi();
    +$body = ; // InsightsServiceRetentionRequest | 
    +
    +try {
    +    $result = $api_instance->retention2($body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DataApi->retention2: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::OPenAPIClient::Configuration;
    +use WWW::OPenAPIClient::DataApi;
    +
    +# Configure API key authorization: ApiKeyAuth
    +$WWW::OPenAPIClient::Configuration::api_key->{'api-key'} = 'YOUR_API_KEY';
    +# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'api-key'} = "Bearer";
    +
    +# Create an instance of the API class
    +my $api_instance = WWW::OPenAPIClient::DataApi->new();
    +my $body = WWW::OPenAPIClient::Object::InsightsServiceRetentionRequest->new(); # InsightsServiceRetentionRequest | 
    +
    +eval {
    +    my $result = $api_instance->retention2(body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DataApi->retention2: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import openapi_client
    +from openapi_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure API key authorization: ApiKeyAuth
    +openapi_client.configuration.api_key['api-key'] = 'YOUR_API_KEY'
    +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +# openapi_client.configuration.api_key_prefix['api-key'] = 'Bearer'
    +
    +# Create an instance of the API class
    +api_instance = openapi_client.DataApi()
    +body =  # InsightsServiceRetentionRequest | 
    +
    +try:
    +    # Retention query
    +    api_response = api_instance.retention2(body)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DataApi->retention2: %s\n" % e)
    +
    + +
    +
    extern crate DataApi;
    +
    +pub fn main() {
    +    let body = ; // InsightsServiceRetentionRequest
    +
    +    let mut context = DataApi::Context::default();
    +    let result = client.retention2(body, &context).wait();
    +
    +    println!("{:?}", result);
    +}
    +
    +
    +
    + +

    Scopes

    + + +
    + +

    Parameters

    + + + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    body * +

    + +
    +
    + + + +

    Responses

    +

    +

    + + + + + + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    saveSQL

    +

    Save SQL

    +
    +
    +
    +

    +

    Save your SQL query, and you can run it immediately or later. + +It will return query_id, you can use it to rerun the query. +if you enable the "run_immediately" field, it will run the query immediately, and return execution_id, use it to query the result.

    +

    +
    +
    /api/v1/analytics/{owner}/{slug}/sql/save_query
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST \
    +-H "api-key: [[apiKey]]" \
    + -H "Accept: application/json" \
    + -H "Content-Type: application/json" \
    + "https://app.sentio.xyz/api/v1/analytics/{owner}/{slug}/sql/save_query" \
    + -d ''
    +
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.DataApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +
    +        // Configure API key authorization: ApiKeyAuth
    +        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    +        ApiKeyAuth.setApiKey("YOUR API KEY");
    +        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +        //ApiKeyAuth.setApiKeyPrefix("Token");
    +
    +        // Create an instance of the API class
    +        DataApi apiInstance = new DataApi();
    +        String owner = owner_example; // String | username or organization name
    +        String slug = slug_example; // String | project slug
    +        AnalyticServiceAnalyticServiceSaveSQLBody body = ; // AnalyticServiceAnalyticServiceSaveSQLBody | 
    +
    +        try {
    +            analytic_service.SaveSQLResponse result = apiInstance.saveSQL(owner, slug, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#saveSQL");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    + +
    +
    import 'package:openapi/api.dart';
    +
    +final api_instance = DefaultApi();
    +
    +final String owner = new String(); // String | username or organization name
    +final String slug = new String(); // String | project slug
    +final AnalyticServiceAnalyticServiceSaveSQLBody body = new AnalyticServiceAnalyticServiceSaveSQLBody(); // AnalyticServiceAnalyticServiceSaveSQLBody | 
    +
    +try {
    +    final result = await api_instance.saveSQL(owner, slug, body);
    +    print(result);
    +} catch (e) {
    +    print('Exception when calling DefaultApi->saveSQL: $e\n');
    +}
    +
    +
    +
    + +
    +
    import org.openapitools.client.api.DataApi;
    +
    +public class DataApiExample {
    +    public static void main(String[] args) {
    +        DataApi apiInstance = new DataApi();
    +        String owner = owner_example; // String | username or organization name
    +        String slug = slug_example; // String | project slug
    +        AnalyticServiceAnalyticServiceSaveSQLBody body = ; // AnalyticServiceAnalyticServiceSaveSQLBody | 
    +
    +        try {
    +            analytic_service.SaveSQLResponse result = apiInstance.saveSQL(owner, slug, body);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataApi#saveSQL");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
    +
    +// Configure API key authorization: (authentication scheme: ApiKeyAuth)
    +[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-key"];
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-key"];
    +
    +
    +// Create an instance of the API class
    +DataApi *apiInstance = [[DataApi alloc] init];
    +String *owner = owner_example; // username or organization name (default to null)
    +String *slug = slug_example; // project slug (default to null)
    +AnalyticServiceAnalyticServiceSaveSQLBody *body = ; // 
    +
    +// Save SQL
    +[apiInstance saveSQLWith:owner
    +    slug:slug
    +    body:body
    +              completionHandler: ^(analytic_service.SaveSQLResponse output, NSError* error) {
    +    if (output) {
    +        NSLog(@"%@", output);
    +    }
    +    if (error) {
    +        NSLog(@"Error: %@", error);
    +    }
    +}];
    +
    +
    + +
    +
    var SentioApi = require('sentio_api');
    +var defaultClient = SentioApi.ApiClient.instance;
    +
    +// Configure API key authorization: ApiKeyAuth
    +var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
    +ApiKeyAuth.apiKey = "YOUR API KEY";
    +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    +//ApiKeyAuth.apiKeyPrefix['api-key'] = "Token";
    +
    +// Create an instance of the API class
    +var api = new SentioApi.DataApi()
    +var owner = owner_example; // {String} username or organization name
    +var slug = slug_example; // {String} project slug
    +var body = ; // {AnalyticServiceAnalyticServiceSaveSQLBody} 
    +
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.saveSQL(owner, slug, body, callback);
    +
    +
    + + +
    +
    using System;
    +using System.Diagnostics;
    +using Org.OpenAPITools.Api;
    +using Org.OpenAPITools.Client;
    +using Org.OpenAPITools.Model;
    +
    +namespace Example
    +{
    +    public class saveSQLExample
    +    {
    +        public void main()
    +        {
    +            // Configure API key authorization: ApiKeyAuth
    +            Configuration.Default.ApiKey.Add("api-key", "YOUR_API_KEY");
    +            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +            // Configuration.Default.ApiKeyPrefix.Add("api-key", "Bearer");
    +
    +            // Create an instance of the API class
    +            var apiInstance = new DataApi();
    +            var owner = owner_example;  // String | username or organization name (default to null)
    +            var slug = slug_example;  // String | project slug (default to null)
    +            var body = new AnalyticServiceAnalyticServiceSaveSQLBody(); // AnalyticServiceAnalyticServiceSaveSQLBody | 
    +
    +            try {
    +                // Save SQL
    +                analytic_service.SaveSQLResponse result = apiInstance.saveSQL(owner, slug, body);
    +                Debug.WriteLine(result);
    +            } catch (Exception e) {
    +                Debug.Print("Exception when calling DataApi.saveSQL: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    + +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
    +
    +// Configure API key authorization: ApiKeyAuth
    +OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
    +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
    +
    +// Create an instance of the API class
    +$api_instance = new OpenAPITools\Client\Api\DataApi();
    +$owner = owner_example; // String | username or organization name
    +$slug = slug_example; // String | project slug
    +$body = ; // AnalyticServiceAnalyticServiceSaveSQLBody | 
    +
    +try {
    +    $result = $api_instance->saveSQL($owner, $slug, $body);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DataApi->saveSQL: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::OPenAPIClient::Configuration;
    +use WWW::OPenAPIClient::DataApi;
    +
    +# Configure API key authorization: ApiKeyAuth
    +$WWW::OPenAPIClient::Configuration::api_key->{'api-key'} = 'YOUR_API_KEY';
    +# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'api-key'} = "Bearer";
    +
    +# Create an instance of the API class
    +my $api_instance = WWW::OPenAPIClient::DataApi->new();
    +my $owner = owner_example; # String | username or organization name
    +my $slug = slug_example; # String | project slug
    +my $body = WWW::OPenAPIClient::Object::AnalyticServiceAnalyticServiceSaveSQLBody->new(); # AnalyticServiceAnalyticServiceSaveSQLBody | 
    +
    +eval {
    +    my $result = $api_instance->saveSQL(owner => $owner, slug => $slug, body => $body);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DataApi->saveSQL: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import openapi_client
    +from openapi_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure API key authorization: ApiKeyAuth
    +openapi_client.configuration.api_key['api-key'] = 'YOUR_API_KEY'
    +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    +# openapi_client.configuration.api_key_prefix['api-key'] = 'Bearer'
    +
    +# Create an instance of the API class
    +api_instance = openapi_client.DataApi()
    +owner = owner_example # String | username or organization name (default to null)
    +slug = slug_example # String | project slug (default to null)
    +body =  # AnalyticServiceAnalyticServiceSaveSQLBody | 
    +
    +try:
    +    # Save SQL
    +    api_response = api_instance.save_sql(owner, slug, body)
         pprint(api_response)
     except ApiException as e:
    -    print("Exception when calling DataApi->retention: %s\n" % e)
    + print("Exception when calling DataApi->saveSQL: %s\n" % e)
    -
    +
    extern crate DataApi;
     
     pub fn main() {
         let owner = owner_example; // String
         let slug = slug_example; // String
    -    let body = ; // InsightsServiceInsightsServiceRetentionBody
    +    let body = ; // AnalyticServiceAnalyticServiceSaveSQLBody
     
         let mut context = DataApi::Context::default();
    -    let result = client.retention(owner, slug, body, &context).wait();
    +    let result = client.saveSQL(owner, slug, body, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -12830,13 +15988,16 @@ 

    Parameters

    -
    +
    String +
    +username or organization name +
    Required @@ -12850,13 +16011,16 @@

    Parameters

    -
    +
    String +
    +project slug +
    Required @@ -12884,7 +16048,7 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/insights_service.InsightsService.RetentionBody" + "$ref" : "#/components/schemas/analytic_service.AnalyticService.SaveSQLBody" } } }, @@ -12907,12 +16071,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_retention_body'); + var result = $('#d2e199_saveSQL_body'); result.empty(); result.append(view.render()); }); -
    +
    @@ -12921,23 +16085,23 @@

    Parameters

    Responses

    -

    -

    +

    +

    -

    -
    -
    +
    +
    -

    retention2

    -

    Retention query

    +

    saveSQL2

    +

    Save SQL

    -

    Query for retention.

    +

    Save your SQL query, and you can run it immediately or later. + +It will return query_id, you can use it to rerun the query. +if you enable the "run_immediately" field, it will run the query immediately, and return execution_id, use it to query the result.


    -
    /api/v1/insights/retention
    +
    /api/v1/analytics/sql/save_query

    Usage and SDK Samples

    -
    +
    curl -X POST \
     -H "api-key: [[apiKey]]" \
      -H "Accept: application/json" \
      -H "Content-Type: application/json" \
    - "https://app.sentio.xyz/api/v1/insights/retention" \
    + "https://app.sentio.xyz/api/v1/analytics/sql/save_query" \
      -d ''
     
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -13063,13 +16230,13 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataApi apiInstance = new DataApi(); - InsightsServiceRetentionRequest body = ; // InsightsServiceRetentionRequest | + AnalyticServiceSaveSQLRequest body = ; // AnalyticServiceSaveSQLRequest | try { - insights_service.RetentionResponse result = apiInstance.retention2(body); + analytic_service.SaveSQLResponse result = apiInstance.saveSQL2(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DataApi#retention2"); + System.err.println("Exception when calling DataApi#saveSQL2"); e.printStackTrace(); } } @@ -13077,46 +16244,46 @@

    Usage and SDK Samples

    -
    +
    import 'package:openapi/api.dart';
     
     final api_instance = DefaultApi();
     
    -final InsightsServiceRetentionRequest body = new InsightsServiceRetentionRequest(); // InsightsServiceRetentionRequest | 
    +final AnalyticServiceSaveSQLRequest body = new AnalyticServiceSaveSQLRequest(); // AnalyticServiceSaveSQLRequest | 
     
     try {
    -    final result = await api_instance.retention2(body);
    +    final result = await api_instance.saveSQL2(body);
         print(result);
     } catch (e) {
    -    print('Exception when calling DefaultApi->retention2: $e\n');
    +    print('Exception when calling DefaultApi->saveSQL2: $e\n');
     }
     
     
    -
    +
    import org.openapitools.client.api.DataApi;
     
     public class DataApiExample {
         public static void main(String[] args) {
             DataApi apiInstance = new DataApi();
    -        InsightsServiceRetentionRequest body = ; // InsightsServiceRetentionRequest | 
    +        AnalyticServiceSaveSQLRequest body = ; // AnalyticServiceSaveSQLRequest | 
     
             try {
    -            insights_service.RetentionResponse result = apiInstance.retention2(body);
    +            analytic_service.SaveSQLResponse result = apiInstance.saveSQL2(body);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling DataApi#retention2");
    +            System.err.println("Exception when calling DataApi#saveSQL2");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure API key authorization: (authentication scheme: ApiKeyAuth)
    @@ -13127,11 +16294,11 @@ 

    Usage and SDK Samples

    // Create an instance of the API class DataApi *apiInstance = [[DataApi alloc] init]; -InsightsServiceRetentionRequest *body = ; // +AnalyticServiceSaveSQLRequest *body = ; // -// Retention query -[apiInstance retention2With:body - completionHandler: ^(insights_service.RetentionResponse output, NSError* error) { +// Save SQL +[apiInstance saveSQL2With:body + completionHandler: ^(analytic_service.SaveSQLResponse output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -13142,7 +16309,7 @@

    Usage and SDK Samples

    -
    +
    var SentioApi = require('sentio_api');
     var defaultClient = SentioApi.ApiClient.instance;
     
    @@ -13154,7 +16321,7 @@ 

    Usage and SDK Samples

    // Create an instance of the API class var api = new SentioApi.DataApi() -var body = ; // {InsightsServiceRetentionRequest} +var body = ; // {AnalyticServiceSaveSQLRequest} var callback = function(error, data, response) { if (error) { @@ -13163,14 +16330,14 @@

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.retention2(body, callback); +api.saveSQL2(body, callback);
    - -
    +
    using System;
     using System.Diagnostics;
     using Org.OpenAPITools.Api;
    @@ -13179,7 +16346,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class retention2Example + public class saveSQL2Example { public void main() { @@ -13190,14 +16357,14 @@

    Usage and SDK Samples

    // Create an instance of the API class var apiInstance = new DataApi(); - var body = new InsightsServiceRetentionRequest(); // InsightsServiceRetentionRequest | + var body = new AnalyticServiceSaveSQLRequest(); // AnalyticServiceSaveSQLRequest | try { - // Retention query - insights_service.RetentionResponse result = apiInstance.retention2(body); + // Save SQL + analytic_service.SaveSQLResponse result = apiInstance.saveSQL2(body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling DataApi.retention2: " + e.Message ); + Debug.Print("Exception when calling DataApi.saveSQL2: " + e.Message ); } } } @@ -13205,7 +16372,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -13216,18 +16383,18 @@ 

    Usage and SDK Samples

    // Create an instance of the API class $api_instance = new OpenAPITools\Client\Api\DataApi(); -$body = ; // InsightsServiceRetentionRequest | +$body = ; // AnalyticServiceSaveSQLRequest | try { - $result = $api_instance->retention2($body); + $result = $api_instance->saveSQL2($body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling DataApi->retention2: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling DataApi->saveSQL2: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use WWW::OPenAPIClient::Configuration;
     use WWW::OPenAPIClient::DataApi;
    @@ -13239,18 +16406,18 @@ 

    Usage and SDK Samples

    # Create an instance of the API class my $api_instance = WWW::OPenAPIClient::DataApi->new(); -my $body = WWW::OPenAPIClient::Object::InsightsServiceRetentionRequest->new(); # InsightsServiceRetentionRequest | +my $body = WWW::OPenAPIClient::Object::AnalyticServiceSaveSQLRequest->new(); # AnalyticServiceSaveSQLRequest | eval { - my $result = $api_instance->retention2(body => $body); + my $result = $api_instance->saveSQL2(body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling DataApi->retention2: $@\n"; + warn "Exception when calling DataApi->saveSQL2: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import openapi_client
    @@ -13264,24 +16431,24 @@ 

    Usage and SDK Samples

    # Create an instance of the API class api_instance = openapi_client.DataApi() -body = # InsightsServiceRetentionRequest | +body = # AnalyticServiceSaveSQLRequest | try: - # Retention query - api_response = api_instance.retention2(body) + # Save SQL + api_response = api_instance.save_sql2(body) pprint(api_response) except ApiException as e: - print("Exception when calling DataApi->retention2: %s\n" % e)
    + print("Exception when calling DataApi->saveSQL2: %s\n" % e)
    -
    +
    extern crate DataApi;
     
     pub fn main() {
    -    let body = ; // InsightsServiceRetentionRequest
    +    let body = ; // AnalyticServiceSaveSQLRequest
     
         let mut context = DataApi::Context::default();
    -    let result = client.retention2(body, &context).wait();
    +    let result = client.saveSQL2(body, &context).wait();
     
         println!("{:?}", result);
     }
    @@ -13313,7 +16480,7 @@ 

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/insights_service.RetentionRequest" + "$ref" : "#/components/schemas/analytic_service.SaveSQLRequest" } } }, @@ -13336,12 +16503,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_retention2_body'); + var result = $('#d2e199_saveSQL2_body'); result.empty(); result.append(view.render()); }); -
    +
    @@ -13350,23 +16517,23 @@

    Parameters

    Responses

    -

    -

    +

    +

    -
    diff --git a/openapi.json b/openapi.json index 67beb5b..9079572 100644 --- a/openapi.json +++ b/openapi.json @@ -162,6 +162,117 @@ ] } }, + "/api/v1/analytics/sql/query_result": { + "get": { + "summary": "Query SQL Result", + "description": "Query the result of a SQL query by execution_id.", + "operationId": "QuerySQLResult2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/analytic_service.QuerySQLResultResponse" + } + } + }, + "parameters": [ + { + "name": "projectOwner", + "description": "username or organization name", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "projectSlug", + "description": "project slug", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "projectId", + "description": "use project id if project_owner and project_slug are not provided", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "version", + "description": "version of the datasource, default to the active version if not provided", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "executionId", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Data" + ] + } + }, + "/api/v1/analytics/sql/rerun_query": { + "post": { + "summary": "Rerun SQL", + "description": "Rerun your SQL query by query_id, you can also update the query and run it.\n\nIt will return execution_id, use it to query the result.", + "operationId": "RerunSQLQuery2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/analytic_service.RerunSQLQueryResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/analytic_service.RerunSQLQueryRequest" + } + } + ], + "tags": [ + "Data" + ] + } + }, + "/api/v1/analytics/sql/save_query": { + "post": { + "summary": "Save SQL", + "description": "Save your SQL query, and you can run it immediately or later.\n\nIt will return query_id, you can use it to rerun the query.\nif you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result.", + "operationId": "SaveSQL2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/analytic_service.SaveSQLResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/analytic_service.SaveSQLRequest" + } + } + ], + "tags": [ + "Data" + ] + } + }, "/api/v1/analytics/{owner}/{slug}/sql/execute": { "post": { "summary": "Execute SQL", @@ -208,6 +319,145 @@ } } }, + "/api/v1/analytics/{owner}/{slug}/sql/query_result": { + "get": { + "summary": "Query SQL Result", + "description": "Query the result of a SQL query by execution_id.", + "operationId": "QuerySQLResult", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/analytic_service.QuerySQLResultResponse" + } + } + }, + "parameters": [ + { + "name": "owner", + "description": "username or organization name", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "slug", + "description": "project slug", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "projectId", + "description": "use project id if project_owner and project_slug are not provided", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "version", + "description": "version of the datasource, default to the active version if not provided", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "executionId", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Data" + ] + } + }, + "/api/v1/analytics/{owner}/{slug}/sql/rerun_query": { + "post": { + "summary": "Rerun SQL", + "description": "Rerun your SQL query by query_id, you can also update the query and run it.\n\nIt will return execution_id, use it to query the result.", + "operationId": "RerunSQLQuery", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/analytic_service.RerunSQLQueryResponse" + } + } + }, + "parameters": [ + { + "name": "owner", + "description": "username or organization name", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "slug", + "description": "project slug", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/analytic_service.AnalyticService.RerunSQLQueryBody" + } + } + ], + "tags": [ + "Data" + ] + } + }, + "/api/v1/analytics/{owner}/{slug}/sql/save_query": { + "post": { + "summary": "Save SQL", + "description": "Save your SQL query, and you can run it immediately or later.\n\nIt will return query_id, you can use it to rerun the query.\nif you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result.", + "operationId": "SaveSQL", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/analytic_service.SaveSQLResponse" + } + } + }, + "parameters": [ + { + "name": "owner", + "description": "username or organization name", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "slug", + "description": "project slug", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/analytic_service.AnalyticService.SaveSQLBody" + } + } + ], + "tags": [ + "Data" + ] + } + }, "/api/v1/dashboards": { "get": { "summary": "List all dashboards in a project", @@ -2720,6 +2970,103 @@ } } }, + "analytic_service.AnalyticService.RerunSQLQueryBody": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "title": "use project id if project_owner and project_slug are not provided" + }, + "version": { + "type": "integer", + "format": "int32", + "title": "version of the datasource, default to the active version if not provided" + }, + "queryId": { + "type": "string" + }, + "sqlQuery": { + "$ref": "#/definitions/analytic_service.SQLQuery" + } + } + }, + "analytic_service.AnalyticService.SaveSQLBody": { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "title": "use project id if project_owner and project_slug are not provided" + }, + "version": { + "type": "integer", + "format": "int32", + "title": "version of the datasource, default to the active version if not provided" + }, + "sqlQuery": { + "$ref": "#/definitions/analytic_service.SQLQuery" + }, + "source": { + "$ref": "#/definitions/analytic_service.Source" + }, + "runImmediately": { + "type": "boolean", + "title": "run the query immediately or not" + }, + "queryId": { + "type": "string", + "title": "the query id to save the query" + } + } + }, + "analytic_service.ExecutionInfo": { + "type": "object", + "properties": { + "queryId": { + "type": "string" + }, + "executionId": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/analytic_service.ExecutionStatus" + }, + "scheduledAt": { + "type": "string", + "format": "date-time" + }, + "startedAt": { + "type": "string", + "format": "date-time" + }, + "finishedAt": { + "type": "string", + "format": "date-time" + }, + "result": { + "$ref": "#/definitions/common.TabularData" + }, + "error": { + "type": "string" + }, + "computeStats": { + "$ref": "#/definitions/common.ComputeStats" + }, + "processorVersion": { + "type": "integer", + "format": "int32" + } + } + }, + "analytic_service.ExecutionStatus": { + "type": "string", + "enum": [ + "PENDING", + "RUNNING", + "FINISHED", + "KILLED" + ], + "default": "PENDING" + }, "analytic_service.LogQueryRequest.Filter": { "type": "object", "properties": { @@ -2769,6 +3116,54 @@ } } }, + "analytic_service.QuerySQLResultResponse": { + "type": "object", + "properties": { + "executionInfo": { + "$ref": "#/definitions/analytic_service.ExecutionInfo" + } + } + }, + "analytic_service.RerunSQLQueryRequest": { + "type": "object", + "properties": { + "projectOwner": { + "type": "string", + "title": "username or organization name" + }, + "projectSlug": { + "type": "string", + "title": "project slug" + }, + "projectId": { + "type": "string", + "title": "use project id if project_owner and project_slug are not provided" + }, + "version": { + "type": "integer", + "format": "int32", + "title": "version of the datasource, default to the active version if not provided" + }, + "queryId": { + "type": "string" + }, + "sqlQuery": { + "$ref": "#/definitions/analytic_service.SQLQuery" + } + } + }, + "analytic_service.RerunSQLQueryResponse": { + "type": "object", + "properties": { + "queueLength": { + "type": "integer", + "format": "int32" + }, + "executionInfo": { + "$ref": "#/definitions/analytic_service.ExecutionInfo" + } + } + }, "analytic_service.SQLQuery": { "type": "object", "properties": { @@ -2791,6 +3186,58 @@ } } }, + "analytic_service.SaveSQLRequest": { + "type": "object", + "properties": { + "projectOwner": { + "type": "string", + "title": "username or organization name" + }, + "projectSlug": { + "type": "string", + "title": "project slug" + }, + "projectId": { + "type": "string", + "title": "use project id if project_owner and project_slug are not provided" + }, + "version": { + "type": "integer", + "format": "int32", + "title": "version of the datasource, default to the active version if not provided" + }, + "sqlQuery": { + "$ref": "#/definitions/analytic_service.SQLQuery" + }, + "source": { + "$ref": "#/definitions/analytic_service.Source" + }, + "runImmediately": { + "type": "boolean", + "title": "run the query immediately or not" + }, + "queryId": { + "type": "string", + "title": "the query id to save the query" + } + } + }, + "analytic_service.SaveSQLResponse": { + "type": "object", + "properties": { + "queueLength": { + "type": "integer", + "format": "int32" + }, + "executionInfo": { + "$ref": "#/definitions/analytic_service.ExecutionInfo", + "title": "the execution info of the query, return nil if run_immediately is false" + }, + "queryId": { + "type": "string" + } + } + }, "analytic_service.SearchService.QueryLogBody": { "type": "object", "properties": { @@ -2839,6 +3286,17 @@ } } }, + "analytic_service.Source": { + "type": "string", + "enum": [ + "SQL_EDITOR", + "DASHBOARD", + "ASYNC_TRIGGER", + "CURL", + "ENDPOINT" + ], + "default": "SQL_EDITOR" + }, "analytic_service.SyncExecuteSQLResponse": { "type": "object", "properties": { diff --git a/src/DataApi.md b/src/DataApi.md index a5ff9ab..378bd4c 100755 --- a/src/DataApi.md +++ b/src/DataApi.md @@ -13,8 +13,14 @@ Method | HTTP request | Description [**queryLog**](DataApi.md#queryLog) | **POST** /api/v1/eventlogs/{owner}/{slug} | Query event logs [**queryLog2**](DataApi.md#queryLog2) | **GET** /api/v1/eventlogs/{owner}/{slug}/query | Query event logs [**queryRange**](DataApi.md#queryRange) | **POST** /api/v1/metrics/{owner}/{slug}/query_range | Metric range queries +[**querySQLResult**](DataApi.md#querySQLResult) | **GET** /api/v1/analytics/{owner}/{slug}/sql/query_result | Query SQL Result +[**querySQLResult2**](DataApi.md#querySQLResult2) | **GET** /api/v1/analytics/sql/query_result | Query SQL Result +[**rerunSQLQuery**](DataApi.md#rerunSQLQuery) | **POST** /api/v1/analytics/{owner}/{slug}/sql/rerun_query | Rerun SQL +[**rerunSQLQuery2**](DataApi.md#rerunSQLQuery2) | **POST** /api/v1/analytics/sql/rerun_query | Rerun SQL [**retention**](DataApi.md#retention) | **POST** /api/v1/insights/{owner}/{slug}/retention | Retention query [**retention2**](DataApi.md#retention2) | **POST** /api/v1/insights/retention | Retention query +[**saveSQL**](DataApi.md#saveSQL) | **POST** /api/v1/analytics/{owner}/{slug}/sql/save_query | Save SQL +[**saveSQL2**](DataApi.md#saveSQL2) | **POST** /api/v1/analytics/sql/save_query | Save SQL # **executeSQL** @@ -1104,6 +1110,362 @@ Name | Type | Description | Notes - **Accept**: application/json +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **querySQLResult** +> AnalyticServiceQuerySQLResultResponse querySQLResult() + +Query the result of a SQL query by execution_id. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiQuerySQLResultRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiQuerySQLResultRequest = { + // username or organization name + owner: "owner_example", + // project slug + slug: "slug_example", + // use project id if project_owner and project_slug are not provided (optional) + projectId: "projectId_example", + // version of the datasource, default to the active version if not provided (optional) + version: 1, + + executionId: "executionId_example", +}; + +const data = await apiInstance.querySQLResult(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | [**string**] | username or organization name | defaults to undefined + **slug** | [**string**] | project slug | defaults to undefined + **projectId** | [**string**] | use project id if project_owner and project_slug are not provided | (optional) defaults to undefined + **version** | [**number**] | version of the datasource, default to the active version if not provided | (optional) defaults to undefined + **executionId** | [**string**] | | (optional) defaults to undefined + + +### Return type + +**AnalyticServiceQuerySQLResultResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **querySQLResult2** +> AnalyticServiceQuerySQLResultResponse querySQLResult2() + +Query the result of a SQL query by execution_id. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiQuerySQLResult2Request } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiQuerySQLResult2Request = { + // username or organization name (optional) + projectOwner: "projectOwner_example", + // project slug (optional) + projectSlug: "projectSlug_example", + // use project id if project_owner and project_slug are not provided (optional) + projectId: "projectId_example", + // version of the datasource, default to the active version if not provided (optional) + version: 1, + + executionId: "executionId_example", +}; + +const data = await apiInstance.querySQLResult2(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **projectOwner** | [**string**] | username or organization name | (optional) defaults to undefined + **projectSlug** | [**string**] | project slug | (optional) defaults to undefined + **projectId** | [**string**] | use project id if project_owner and project_slug are not provided | (optional) defaults to undefined + **version** | [**number**] | version of the datasource, default to the active version if not provided | (optional) defaults to undefined + **executionId** | [**string**] | | (optional) defaults to undefined + + +### Return type + +**AnalyticServiceQuerySQLResultResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **rerunSQLQuery** +> AnalyticServiceRerunSQLQueryResponse rerunSQLQuery(body) + +Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiRerunSQLQueryRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiRerunSQLQueryRequest = { + // username or organization name + owner: "owner_example", + // project slug + slug: "slug_example", + + body: { + projectId: "projectId_example", + version: 1, + queryId: "queryId_example", + sqlQuery: { + sql: "sql_example", + size: 1, + parameters: { + fields: { + "key": { + nullValue: "NULL_VALUE", + intValue: 1, + floatValue: 3.14, + bytesValue: 'YQ==', + boolValue: true, + stringValue: "stringValue_example", + timestampValue: new Date('1970-01-01T00:00:00.00Z'), + bigintValue: { + negative: true, + data: 'YQ==', + }, + bigdecimalValue: { + value: { + negative: true, + data: 'YQ==', + }, + exp: 1, + }, + listValue: { + values: [ + , + ], + }, + structValue: , + tokenValue: { + token: { + symbol: "symbol_example", + address: { + address: "address_example", + chain: "chain_example", + }, + }, + amount: { + value: { + negative: true, + data: 'YQ==', + }, + exp: 1, + }, + specifiedAt: new Date('1970-01-01T00:00:00.00Z'), + }, + }, + }, + }, + name: "name_example", + }, + }, +}; + +const data = await apiInstance.rerunSQLQuery(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AnalyticServiceAnalyticServiceRerunSQLQueryBody**| | + **owner** | [**string**] | username or organization name | defaults to undefined + **slug** | [**string**] | project slug | defaults to undefined + + +### Return type + +**AnalyticServiceRerunSQLQueryResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **rerunSQLQuery2** +> AnalyticServiceRerunSQLQueryResponse rerunSQLQuery2(body) + +Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiRerunSQLQuery2Request } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiRerunSQLQuery2Request = { + + body: { + projectOwner: "projectOwner_example", + projectSlug: "projectSlug_example", + projectId: "projectId_example", + version: 1, + queryId: "queryId_example", + sqlQuery: { + sql: "sql_example", + size: 1, + parameters: { + fields: { + "key": { + nullValue: "NULL_VALUE", + intValue: 1, + floatValue: 3.14, + bytesValue: 'YQ==', + boolValue: true, + stringValue: "stringValue_example", + timestampValue: new Date('1970-01-01T00:00:00.00Z'), + bigintValue: { + negative: true, + data: 'YQ==', + }, + bigdecimalValue: { + value: { + negative: true, + data: 'YQ==', + }, + exp: 1, + }, + listValue: { + values: [ + , + ], + }, + structValue: , + tokenValue: { + token: { + symbol: "symbol_example", + address: { + address: "address_example", + chain: "chain_example", + }, + }, + amount: { + value: { + negative: true, + data: 'YQ==', + }, + exp: 1, + }, + specifiedAt: new Date('1970-01-01T00:00:00.00Z'), + }, + }, + }, + }, + name: "name_example", + }, + }, +}; + +const data = await apiInstance.rerunSQLQuery2(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AnalyticServiceRerunSQLQueryRequest**| | + + +### Return type + +**AnalyticServiceRerunSQLQueryResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| @@ -1409,4 +1771,234 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) +# **saveSQL** +> AnalyticServiceSaveSQLResponse saveSQL(body) + +Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiSaveSQLRequest } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiSaveSQLRequest = { + // username or organization name + owner: "owner_example", + // project slug + slug: "slug_example", + + body: { + projectId: "projectId_example", + version: 1, + sqlQuery: { + sql: "sql_example", + size: 1, + parameters: { + fields: { + "key": { + nullValue: "NULL_VALUE", + intValue: 1, + floatValue: 3.14, + bytesValue: 'YQ==', + boolValue: true, + stringValue: "stringValue_example", + timestampValue: new Date('1970-01-01T00:00:00.00Z'), + bigintValue: { + negative: true, + data: 'YQ==', + }, + bigdecimalValue: { + value: { + negative: true, + data: 'YQ==', + }, + exp: 1, + }, + listValue: { + values: [ + , + ], + }, + structValue: , + tokenValue: { + token: { + symbol: "symbol_example", + address: { + address: "address_example", + chain: "chain_example", + }, + }, + amount: { + value: { + negative: true, + data: 'YQ==', + }, + exp: 1, + }, + specifiedAt: new Date('1970-01-01T00:00:00.00Z'), + }, + }, + }, + }, + name: "name_example", + }, + source: "SQL_EDITOR", + runImmediately: true, + queryId: "queryId_example", + }, +}; + +const data = await apiInstance.saveSQL(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AnalyticServiceAnalyticServiceSaveSQLBody**| | + **owner** | [**string**] | username or organization name | defaults to undefined + **slug** | [**string**] | project slug | defaults to undefined + + +### Return type + +**AnalyticServiceSaveSQLResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + +# **saveSQL2** +> AnalyticServiceSaveSQLResponse saveSQL2(body) + +Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + +### Example + + +```typescript +import { createConfiguration, DataApi } from ''; +import type { DataApiSaveSQL2Request } from ''; + +const configuration = createConfiguration(); +const apiInstance = new DataApi(configuration); + +const request: DataApiSaveSQL2Request = { + + body: { + projectOwner: "projectOwner_example", + projectSlug: "projectSlug_example", + projectId: "projectId_example", + version: 1, + sqlQuery: { + sql: "sql_example", + size: 1, + parameters: { + fields: { + "key": { + nullValue: "NULL_VALUE", + intValue: 1, + floatValue: 3.14, + bytesValue: 'YQ==', + boolValue: true, + stringValue: "stringValue_example", + timestampValue: new Date('1970-01-01T00:00:00.00Z'), + bigintValue: { + negative: true, + data: 'YQ==', + }, + bigdecimalValue: { + value: { + negative: true, + data: 'YQ==', + }, + exp: 1, + }, + listValue: { + values: [ + , + ], + }, + structValue: , + tokenValue: { + token: { + symbol: "symbol_example", + address: { + address: "address_example", + chain: "chain_example", + }, + }, + amount: { + value: { + negative: true, + data: 'YQ==', + }, + exp: 1, + }, + specifiedAt: new Date('1970-01-01T00:00:00.00Z'), + }, + }, + }, + }, + name: "name_example", + }, + source: "SQL_EDITOR", + runImmediately: true, + queryId: "queryId_example", + }, +}; + +const data = await apiInstance.saveSQL2(request); +console.log('API called successfully. Returned data:', data); +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **AnalyticServiceSaveSQLRequest**| | + + +### Return type + +**AnalyticServiceSaveSQLResponse** + +### Authorization + +[ApiKeyAuth](README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | + +[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md) + diff --git a/src/apis/DataApi.ts b/src/apis/DataApi.ts index 9d4391f..4376235 100755 --- a/src/apis/DataApi.ts +++ b/src/apis/DataApi.ts @@ -9,7 +9,14 @@ import {SecurityAuthentication} from '../auth/auth.js'; import { AnalyticServiceAnalyticServiceExecuteSQLBody } from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +import { AnalyticServiceAnalyticServiceRerunSQLQueryBody } from '../models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.js'; +import { AnalyticServiceAnalyticServiceSaveSQLBody } from '../models/AnalyticServiceAnalyticServiceSaveSQLBody.js'; import { AnalyticServiceLogQueryResponse } from '../models/AnalyticServiceLogQueryResponse.js'; +import { AnalyticServiceQuerySQLResultResponse } from '../models/AnalyticServiceQuerySQLResultResponse.js'; +import { AnalyticServiceRerunSQLQueryRequest } from '../models/AnalyticServiceRerunSQLQueryRequest.js'; +import { AnalyticServiceRerunSQLQueryResponse } from '../models/AnalyticServiceRerunSQLQueryResponse.js'; +import { AnalyticServiceSaveSQLRequest } from '../models/AnalyticServiceSaveSQLRequest.js'; +import { AnalyticServiceSaveSQLResponse } from '../models/AnalyticServiceSaveSQLResponse.js'; import { AnalyticServiceSearchServiceQueryLogBody } from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; import { AnalyticServiceSyncExecuteSQLResponse } from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; import { InsightsServiceInsightsServiceQueryBody } from '../models/InsightsServiceInsightsServiceQueryBody.js'; @@ -721,6 +728,250 @@ export class DataApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param owner username or organization name + * @param slug project slug + * @param projectId use project id if project_owner and project_slug are not provided + * @param version version of the datasource, default to the active version if not provided + * @param executionId + */ + public async querySQLResult(owner: string, slug: string, projectId?: string, version?: number, executionId?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "querySQLResult", "owner"); + } + + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "querySQLResult", "slug"); + } + + + + + + // Path Params + const localVarPath = '/api/v1/analytics/{owner}/{slug}/sql/query_result' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); + } + + // Query Params + if (version !== undefined) { + requestContext.setQueryParam("version", ObjectSerializer.serialize(version, "number", "int32")); + } + + // Query Params + if (executionId !== undefined) { + requestContext.setQueryParam("executionId", ObjectSerializer.serialize(executionId, "string", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param projectOwner username or organization name + * @param projectSlug project slug + * @param projectId use project id if project_owner and project_slug are not provided + * @param version version of the datasource, default to the active version if not provided + * @param executionId + */ + public async querySQLResult2(projectOwner?: string, projectSlug?: string, projectId?: string, version?: number, executionId?: string, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + + + + + + // Path Params + const localVarPath = '/api/v1/analytics/sql/query_result'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + // Query Params + if (projectOwner !== undefined) { + requestContext.setQueryParam("projectOwner", ObjectSerializer.serialize(projectOwner, "string", "")); + } + + // Query Params + if (projectSlug !== undefined) { + requestContext.setQueryParam("projectSlug", ObjectSerializer.serialize(projectSlug, "string", "")); + } + + // Query Params + if (projectId !== undefined) { + requestContext.setQueryParam("projectId", ObjectSerializer.serialize(projectId, "string", "")); + } + + // Query Params + if (version !== undefined) { + requestContext.setQueryParam("version", ObjectSerializer.serialize(version, "number", "int32")); + } + + // Query Params + if (executionId !== undefined) { + requestContext.setQueryParam("executionId", ObjectSerializer.serialize(executionId, "string", "")); + } + + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public async rerunSQLQuery(owner: string, slug: string, body: AnalyticServiceAnalyticServiceRerunSQLQueryBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "rerunSQLQuery", "owner"); + } + + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "rerunSQLQuery", "slug"); + } + + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "rerunSQLQuery", "body"); + } + + + // Path Params + const localVarPath = '/api/v1/analytics/{owner}/{slug}/sql/rerun_query' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "AnalyticServiceAnalyticServiceRerunSQLQueryBody", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param body + */ + public async rerunSQLQuery2(body: AnalyticServiceRerunSQLQueryRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "rerunSQLQuery2", "body"); + } + + + // Path Params + const localVarPath = '/api/v1/analytics/sql/rerun_query'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "AnalyticServiceRerunSQLQueryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + /** * Query for retention. * Retention query @@ -833,6 +1084,118 @@ export class DataApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public async saveSQL(owner: string, slug: string, body: AnalyticServiceAnalyticServiceSaveSQLBody, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError("DataApi", "saveSQL", "owner"); + } + + + // verify required parameter 'slug' is not null or undefined + if (slug === null || slug === undefined) { + throw new RequiredError("DataApi", "saveSQL", "slug"); + } + + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "saveSQL", "body"); + } + + + // Path Params + const localVarPath = '/api/v1/analytics/{owner}/{slug}/sql/save_query' + .replace('{' + 'owner' + '}', encodeURIComponent(String(owner))) + .replace('{' + 'slug' + '}', encodeURIComponent(String(slug))); + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "AnalyticServiceAnalyticServiceSaveSQLBody", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param body + */ + public async saveSQL2(body: AnalyticServiceSaveSQLRequest, _options?: Configuration): Promise { + let _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("DataApi", "saveSQL2", "body"); + } + + + // Path Params + const localVarPath = '/api/v1/analytics/sql/save_query'; + + // Make Request Context + const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8") + + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json" + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "AnalyticServiceSaveSQLRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + let authMethod: SecurityAuthentication | undefined; + // Apply auth methods + authMethod = _config.authMethods["ApiKeyAuth"] + if (authMethod?.applySecurityAuthentication) { + await authMethod?.applySecurityAuthentication(requestContext); + } + + const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default + if (defaultAuth?.applySecurityAuthentication) { + await defaultAuth?.applySecurityAuthentication(requestContext); + } + + return requestContext; + } + } export class DataApiResponseProcessor { @@ -1098,6 +1461,122 @@ export class DataApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to querySQLResult + * @throws ApiException if the response code was not in [200, 299] + */ + public async querySQLResultWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnalyticServiceQuerySQLResultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceQuerySQLResultResponse", "" + ) as AnalyticServiceQuerySQLResultResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnalyticServiceQuerySQLResultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceQuerySQLResultResponse", "" + ) as AnalyticServiceQuerySQLResultResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to querySQLResult2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async querySQLResult2WithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnalyticServiceQuerySQLResultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceQuerySQLResultResponse", "" + ) as AnalyticServiceQuerySQLResultResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnalyticServiceQuerySQLResultResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceQuerySQLResultResponse", "" + ) as AnalyticServiceQuerySQLResultResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to rerunSQLQuery + * @throws ApiException if the response code was not in [200, 299] + */ + public async rerunSQLQueryWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnalyticServiceRerunSQLQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceRerunSQLQueryResponse", "" + ) as AnalyticServiceRerunSQLQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnalyticServiceRerunSQLQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceRerunSQLQueryResponse", "" + ) as AnalyticServiceRerunSQLQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to rerunSQLQuery2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async rerunSQLQuery2WithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnalyticServiceRerunSQLQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceRerunSQLQueryResponse", "" + ) as AnalyticServiceRerunSQLQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnalyticServiceRerunSQLQueryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceRerunSQLQueryResponse", "" + ) as AnalyticServiceRerunSQLQueryResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -1156,4 +1635,62 @@ export class DataApiResponseProcessor { throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to saveSQL + * @throws ApiException if the response code was not in [200, 299] + */ + public async saveSQLWithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnalyticServiceSaveSQLResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceSaveSQLResponse", "" + ) as AnalyticServiceSaveSQLResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnalyticServiceSaveSQLResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceSaveSQLResponse", "" + ) as AnalyticServiceSaveSQLResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to saveSQL2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async saveSQL2WithHttpInfo(response: ResponseContext): Promise> { + const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]); + if (isCodeInRange("200", response.httpStatusCode)) { + const body: AnalyticServiceSaveSQLResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceSaveSQLResponse", "" + ) as AnalyticServiceSaveSQLResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: AnalyticServiceSaveSQLResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AnalyticServiceSaveSQLResponse", "" + ) as AnalyticServiceSaveSQLResponse; + return new HttpInfo(response.httpStatusCode, response.headers, response.body, body); + } + + throw new ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers); + } + } diff --git a/src/models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.ts b/src/models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.ts new file mode 100755 index 0000000..2da428b --- /dev/null +++ b/src/models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.ts @@ -0,0 +1,58 @@ +/** + * Sentio API + * Sentio Open API for query data + * + * OpenAPI spec version: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceAnalyticServiceRerunSQLQueryBody { + 'projectId'?: string; + 'version'?: number; + 'queryId'?: string; + 'sqlQuery'?: AnalyticServiceSQLQuery; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + }, + { + "name": "queryId", + "baseName": "queryId", + "type": "string", + "format": "" + }, + { + "name": "sqlQuery", + "baseName": "sqlQuery", + "type": "AnalyticServiceSQLQuery", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceAnalyticServiceRerunSQLQueryBody.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/src/models/AnalyticServiceAnalyticServiceSaveSQLBody.ts b/src/models/AnalyticServiceAnalyticServiceSaveSQLBody.ts new file mode 100755 index 0000000..ed6fc8c --- /dev/null +++ b/src/models/AnalyticServiceAnalyticServiceSaveSQLBody.ts @@ -0,0 +1,75 @@ +/** + * Sentio API + * Sentio Open API for query data + * + * OpenAPI spec version: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSource } from '../models/AnalyticServiceSource.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceAnalyticServiceSaveSQLBody { + 'projectId'?: string; + 'version'?: number; + 'sqlQuery'?: AnalyticServiceSQLQuery; + 'source'?: AnalyticServiceSource; + 'runImmediately'?: boolean; + 'queryId'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + }, + { + "name": "sqlQuery", + "baseName": "sqlQuery", + "type": "AnalyticServiceSQLQuery", + "format": "" + }, + { + "name": "source", + "baseName": "source", + "type": "AnalyticServiceSource", + "format": "" + }, + { + "name": "runImmediately", + "baseName": "runImmediately", + "type": "boolean", + "format": "" + }, + { + "name": "queryId", + "baseName": "queryId", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceAnalyticServiceSaveSQLBody.attributeTypeMap; + } + + public constructor() { + } +} + + diff --git a/src/models/AnalyticServiceExecutionInfo.ts b/src/models/AnalyticServiceExecutionInfo.ts new file mode 100755 index 0000000..0091348 --- /dev/null +++ b/src/models/AnalyticServiceExecutionInfo.ts @@ -0,0 +1,104 @@ +/** + * Sentio API + * Sentio Open API for query data + * + * OpenAPI spec version: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnalyticServiceExecutionStatus } from '../models/AnalyticServiceExecutionStatus.js'; +import { CommonComputeStats } from '../models/CommonComputeStats.js'; +import { CommonTabularData } from '../models/CommonTabularData.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceExecutionInfo { + 'queryId'?: string; + 'executionId'?: string; + 'status'?: AnalyticServiceExecutionStatus; + 'scheduledAt'?: Date; + 'startedAt'?: Date; + 'finishedAt'?: Date; + 'result'?: CommonTabularData; + 'error'?: string; + 'computeStats'?: CommonComputeStats; + 'processorVersion'?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "queryId", + "baseName": "queryId", + "type": "string", + "format": "" + }, + { + "name": "executionId", + "baseName": "executionId", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "AnalyticServiceExecutionStatus", + "format": "" + }, + { + "name": "scheduledAt", + "baseName": "scheduledAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "startedAt", + "baseName": "startedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "finishedAt", + "baseName": "finishedAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "result", + "baseName": "result", + "type": "CommonTabularData", + "format": "" + }, + { + "name": "error", + "baseName": "error", + "type": "string", + "format": "" + }, + { + "name": "computeStats", + "baseName": "computeStats", + "type": "CommonComputeStats", + "format": "" + }, + { + "name": "processorVersion", + "baseName": "processorVersion", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceExecutionInfo.attributeTypeMap; + } + + public constructor() { + } +} + + diff --git a/src/models/AnalyticServiceExecutionStatus.ts b/src/models/AnalyticServiceExecutionStatus.ts new file mode 100755 index 0000000..befb07a --- /dev/null +++ b/src/models/AnalyticServiceExecutionStatus.ts @@ -0,0 +1,20 @@ +/** + * Sentio API + * Sentio Open API for query data + * + * OpenAPI spec version: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http.js'; + +export enum AnalyticServiceExecutionStatus { + Pending = 'PENDING', + Running = 'RUNNING', + Finished = 'FINISHED', + Killed = 'KILLED' +} diff --git a/src/models/AnalyticServiceQuerySQLResultResponse.ts b/src/models/AnalyticServiceQuerySQLResultResponse.ts new file mode 100755 index 0000000..ed387e3 --- /dev/null +++ b/src/models/AnalyticServiceQuerySQLResultResponse.ts @@ -0,0 +1,37 @@ +/** + * Sentio API + * Sentio Open API for query data + * + * OpenAPI spec version: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnalyticServiceExecutionInfo } from '../models/AnalyticServiceExecutionInfo.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceQuerySQLResultResponse { + 'executionInfo'?: AnalyticServiceExecutionInfo; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "executionInfo", + "baseName": "executionInfo", + "type": "AnalyticServiceExecutionInfo", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceQuerySQLResultResponse.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/src/models/AnalyticServiceRerunSQLQueryRequest.ts b/src/models/AnalyticServiceRerunSQLQueryRequest.ts new file mode 100755 index 0000000..98db61c --- /dev/null +++ b/src/models/AnalyticServiceRerunSQLQueryRequest.ts @@ -0,0 +1,72 @@ +/** + * Sentio API + * Sentio Open API for query data + * + * OpenAPI spec version: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceRerunSQLQueryRequest { + 'projectOwner'?: string; + 'projectSlug'?: string; + 'projectId'?: string; + 'version'?: number; + 'queryId'?: string; + 'sqlQuery'?: AnalyticServiceSQLQuery; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projectOwner", + "baseName": "projectOwner", + "type": "string", + "format": "" + }, + { + "name": "projectSlug", + "baseName": "projectSlug", + "type": "string", + "format": "" + }, + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + }, + { + "name": "queryId", + "baseName": "queryId", + "type": "string", + "format": "" + }, + { + "name": "sqlQuery", + "baseName": "sqlQuery", + "type": "AnalyticServiceSQLQuery", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceRerunSQLQueryRequest.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/src/models/AnalyticServiceRerunSQLQueryResponse.ts b/src/models/AnalyticServiceRerunSQLQueryResponse.ts new file mode 100755 index 0000000..66c09b7 --- /dev/null +++ b/src/models/AnalyticServiceRerunSQLQueryResponse.ts @@ -0,0 +1,44 @@ +/** + * Sentio API + * Sentio Open API for query data + * + * OpenAPI spec version: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnalyticServiceExecutionInfo } from '../models/AnalyticServiceExecutionInfo.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceRerunSQLQueryResponse { + 'queueLength'?: number; + 'executionInfo'?: AnalyticServiceExecutionInfo; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "queueLength", + "baseName": "queueLength", + "type": "number", + "format": "int32" + }, + { + "name": "executionInfo", + "baseName": "executionInfo", + "type": "AnalyticServiceExecutionInfo", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceRerunSQLQueryResponse.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/src/models/AnalyticServiceSaveSQLRequest.ts b/src/models/AnalyticServiceSaveSQLRequest.ts new file mode 100755 index 0000000..0cd880a --- /dev/null +++ b/src/models/AnalyticServiceSaveSQLRequest.ts @@ -0,0 +1,89 @@ +/** + * Sentio API + * Sentio Open API for query data + * + * OpenAPI spec version: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSource } from '../models/AnalyticServiceSource.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceSaveSQLRequest { + 'projectOwner'?: string; + 'projectSlug'?: string; + 'projectId'?: string; + 'version'?: number; + 'sqlQuery'?: AnalyticServiceSQLQuery; + 'source'?: AnalyticServiceSource; + 'runImmediately'?: boolean; + 'queryId'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "projectOwner", + "baseName": "projectOwner", + "type": "string", + "format": "" + }, + { + "name": "projectSlug", + "baseName": "projectSlug", + "type": "string", + "format": "" + }, + { + "name": "projectId", + "baseName": "projectId", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "number", + "format": "int32" + }, + { + "name": "sqlQuery", + "baseName": "sqlQuery", + "type": "AnalyticServiceSQLQuery", + "format": "" + }, + { + "name": "source", + "baseName": "source", + "type": "AnalyticServiceSource", + "format": "" + }, + { + "name": "runImmediately", + "baseName": "runImmediately", + "type": "boolean", + "format": "" + }, + { + "name": "queryId", + "baseName": "queryId", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceSaveSQLRequest.attributeTypeMap; + } + + public constructor() { + } +} + + diff --git a/src/models/AnalyticServiceSaveSQLResponse.ts b/src/models/AnalyticServiceSaveSQLResponse.ts new file mode 100755 index 0000000..6a03329 --- /dev/null +++ b/src/models/AnalyticServiceSaveSQLResponse.ts @@ -0,0 +1,51 @@ +/** + * Sentio API + * Sentio Open API for query data + * + * OpenAPI spec version: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AnalyticServiceExecutionInfo } from '../models/AnalyticServiceExecutionInfo.js'; +import { HttpFile } from '../http/http.js'; + +export class AnalyticServiceSaveSQLResponse { + 'queueLength'?: number; + 'executionInfo'?: AnalyticServiceExecutionInfo; + 'queryId'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "queueLength", + "baseName": "queueLength", + "type": "number", + "format": "int32" + }, + { + "name": "executionInfo", + "baseName": "executionInfo", + "type": "AnalyticServiceExecutionInfo", + "format": "" + }, + { + "name": "queryId", + "baseName": "queryId", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AnalyticServiceSaveSQLResponse.attributeTypeMap; + } + + public constructor() { + } +} diff --git a/src/models/AnalyticServiceSource.ts b/src/models/AnalyticServiceSource.ts new file mode 100755 index 0000000..615b4f6 --- /dev/null +++ b/src/models/AnalyticServiceSource.ts @@ -0,0 +1,21 @@ +/** + * Sentio API + * Sentio Open API for query data + * + * OpenAPI spec version: version not set + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpFile } from '../http/http.js'; + +export enum AnalyticServiceSource { + SqlEditor = 'SQL_EDITOR', + Dashboard = 'DASHBOARD', + AsyncTrigger = 'ASYNC_TRIGGER', + Curl = 'CURL', + Endpoint = 'ENDPOINT' +} diff --git a/src/models/ObjectSerializer.ts b/src/models/ObjectSerializer.ts index c8d668b..d2f4a4b 100755 --- a/src/models/ObjectSerializer.ts +++ b/src/models/ObjectSerializer.ts @@ -13,11 +13,21 @@ export * from '../models/AlertServiceMute.js'; export * from '../models/AlertServiceSample.js'; export * from '../models/AlertServiceSaveAlertRuleRequest.js'; export * from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +export * from '../models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.js'; +export * from '../models/AnalyticServiceAnalyticServiceSaveSQLBody.js'; +export * from '../models/AnalyticServiceExecutionInfo.js'; +export * from '../models/AnalyticServiceExecutionStatus.js'; export * from '../models/AnalyticServiceLogQueryRequestFilter.js'; export * from '../models/AnalyticServiceLogQueryRequestSort.js'; export * from '../models/AnalyticServiceLogQueryResponse.js'; +export * from '../models/AnalyticServiceQuerySQLResultResponse.js'; +export * from '../models/AnalyticServiceRerunSQLQueryRequest.js'; +export * from '../models/AnalyticServiceRerunSQLQueryResponse.js'; export * from '../models/AnalyticServiceSQLQuery.js'; +export * from '../models/AnalyticServiceSaveSQLRequest.js'; +export * from '../models/AnalyticServiceSaveSQLResponse.js'; export * from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +export * from '../models/AnalyticServiceSource.js'; export * from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; export * from '../models/CommonAggregate.js'; export * from '../models/CommonAggregateAggregateOps.js'; @@ -263,11 +273,21 @@ import { AlertServiceMute } from '../models/AlertServiceMute.js'; import { AlertServiceSample } from '../models/AlertServiceSample.js'; import { AlertServiceSaveAlertRuleRequest } from '../models/AlertServiceSaveAlertRuleRequest.js'; import { AnalyticServiceAnalyticServiceExecuteSQLBody } from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +import { AnalyticServiceAnalyticServiceRerunSQLQueryBody } from '../models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.js'; +import { AnalyticServiceAnalyticServiceSaveSQLBody } from '../models/AnalyticServiceAnalyticServiceSaveSQLBody.js'; +import { AnalyticServiceExecutionInfo } from '../models/AnalyticServiceExecutionInfo.js'; +import { AnalyticServiceExecutionStatus } from '../models/AnalyticServiceExecutionStatus.js'; import { AnalyticServiceLogQueryRequestFilter } from '../models/AnalyticServiceLogQueryRequestFilter.js'; import { AnalyticServiceLogQueryRequestSort } from '../models/AnalyticServiceLogQueryRequestSort.js'; import { AnalyticServiceLogQueryResponse } from '../models/AnalyticServiceLogQueryResponse.js'; +import { AnalyticServiceQuerySQLResultResponse } from '../models/AnalyticServiceQuerySQLResultResponse.js'; +import { AnalyticServiceRerunSQLQueryRequest } from '../models/AnalyticServiceRerunSQLQueryRequest.js'; +import { AnalyticServiceRerunSQLQueryResponse } from '../models/AnalyticServiceRerunSQLQueryResponse.js'; import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSaveSQLRequest } from '../models/AnalyticServiceSaveSQLRequest.js'; +import { AnalyticServiceSaveSQLResponse } from '../models/AnalyticServiceSaveSQLResponse.js'; import { AnalyticServiceSearchServiceQueryLogBody } from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +import { AnalyticServiceSource } from '../models/AnalyticServiceSource.js'; import { AnalyticServiceSyncExecuteSQLResponse } from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; import { CommonAggregate } from '../models/CommonAggregate.js'; import { CommonAggregateAggregateOps } from '../models/CommonAggregateAggregateOps.js'; @@ -513,6 +533,8 @@ let primitives = [ let enumsMap: Set = new Set([ "AlertServiceAlertRuleState", "AlertServiceAlertType", + "AnalyticServiceExecutionStatus", + "AnalyticServiceSource", "CommonAggregateAggregateOps", "CommonChannelType", "CommonCohortsFilterAggregationAggregatePropertiesAggregationType", @@ -566,10 +588,18 @@ let typeMap: {[index: string]: any} = { "AlertServiceSample": AlertServiceSample, "AlertServiceSaveAlertRuleRequest": AlertServiceSaveAlertRuleRequest, "AnalyticServiceAnalyticServiceExecuteSQLBody": AnalyticServiceAnalyticServiceExecuteSQLBody, + "AnalyticServiceAnalyticServiceRerunSQLQueryBody": AnalyticServiceAnalyticServiceRerunSQLQueryBody, + "AnalyticServiceAnalyticServiceSaveSQLBody": AnalyticServiceAnalyticServiceSaveSQLBody, + "AnalyticServiceExecutionInfo": AnalyticServiceExecutionInfo, "AnalyticServiceLogQueryRequestFilter": AnalyticServiceLogQueryRequestFilter, "AnalyticServiceLogQueryRequestSort": AnalyticServiceLogQueryRequestSort, "AnalyticServiceLogQueryResponse": AnalyticServiceLogQueryResponse, + "AnalyticServiceQuerySQLResultResponse": AnalyticServiceQuerySQLResultResponse, + "AnalyticServiceRerunSQLQueryRequest": AnalyticServiceRerunSQLQueryRequest, + "AnalyticServiceRerunSQLQueryResponse": AnalyticServiceRerunSQLQueryResponse, "AnalyticServiceSQLQuery": AnalyticServiceSQLQuery, + "AnalyticServiceSaveSQLRequest": AnalyticServiceSaveSQLRequest, + "AnalyticServiceSaveSQLResponse": AnalyticServiceSaveSQLResponse, "AnalyticServiceSearchServiceQueryLogBody": AnalyticServiceSearchServiceQueryLogBody, "AnalyticServiceSyncExecuteSQLResponse": AnalyticServiceSyncExecuteSQLResponse, "CommonAggregate": CommonAggregate, diff --git a/src/models/all.ts b/src/models/all.ts index 1a46d53..62ac5b3 100755 --- a/src/models/all.ts +++ b/src/models/all.ts @@ -13,11 +13,21 @@ export * from '../models/AlertServiceMute.js' export * from '../models/AlertServiceSample.js' export * from '../models/AlertServiceSaveAlertRuleRequest.js' export * from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js' +export * from '../models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.js' +export * from '../models/AnalyticServiceAnalyticServiceSaveSQLBody.js' +export * from '../models/AnalyticServiceExecutionInfo.js' +export * from '../models/AnalyticServiceExecutionStatus.js' export * from '../models/AnalyticServiceLogQueryRequestFilter.js' export * from '../models/AnalyticServiceLogQueryRequestSort.js' export * from '../models/AnalyticServiceLogQueryResponse.js' +export * from '../models/AnalyticServiceQuerySQLResultResponse.js' +export * from '../models/AnalyticServiceRerunSQLQueryRequest.js' +export * from '../models/AnalyticServiceRerunSQLQueryResponse.js' export * from '../models/AnalyticServiceSQLQuery.js' +export * from '../models/AnalyticServiceSaveSQLRequest.js' +export * from '../models/AnalyticServiceSaveSQLResponse.js' export * from '../models/AnalyticServiceSearchServiceQueryLogBody.js' +export * from '../models/AnalyticServiceSource.js' export * from '../models/AnalyticServiceSyncExecuteSQLResponse.js' export * from '../models/CommonAggregate.js' export * from '../models/CommonAggregateAggregateOps.js' diff --git a/src/types/ObjectParamAPI.ts b/src/types/ObjectParamAPI.ts index 657b98c..cd5c51b 100755 --- a/src/types/ObjectParamAPI.ts +++ b/src/types/ObjectParamAPI.ts @@ -16,11 +16,21 @@ import { AlertServiceMute } from '../models/AlertServiceMute.js'; import { AlertServiceSample } from '../models/AlertServiceSample.js'; import { AlertServiceSaveAlertRuleRequest } from '../models/AlertServiceSaveAlertRuleRequest.js'; import { AnalyticServiceAnalyticServiceExecuteSQLBody } from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +import { AnalyticServiceAnalyticServiceRerunSQLQueryBody } from '../models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.js'; +import { AnalyticServiceAnalyticServiceSaveSQLBody } from '../models/AnalyticServiceAnalyticServiceSaveSQLBody.js'; +import { AnalyticServiceExecutionInfo } from '../models/AnalyticServiceExecutionInfo.js'; +import { AnalyticServiceExecutionStatus } from '../models/AnalyticServiceExecutionStatus.js'; import { AnalyticServiceLogQueryRequestFilter } from '../models/AnalyticServiceLogQueryRequestFilter.js'; import { AnalyticServiceLogQueryRequestSort } from '../models/AnalyticServiceLogQueryRequestSort.js'; import { AnalyticServiceLogQueryResponse } from '../models/AnalyticServiceLogQueryResponse.js'; +import { AnalyticServiceQuerySQLResultResponse } from '../models/AnalyticServiceQuerySQLResultResponse.js'; +import { AnalyticServiceRerunSQLQueryRequest } from '../models/AnalyticServiceRerunSQLQueryRequest.js'; +import { AnalyticServiceRerunSQLQueryResponse } from '../models/AnalyticServiceRerunSQLQueryResponse.js'; import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSaveSQLRequest } from '../models/AnalyticServiceSaveSQLRequest.js'; +import { AnalyticServiceSaveSQLResponse } from '../models/AnalyticServiceSaveSQLResponse.js'; import { AnalyticServiceSearchServiceQueryLogBody } from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +import { AnalyticServiceSource } from '../models/AnalyticServiceSource.js'; import { AnalyticServiceSyncExecuteSQLResponse } from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; import { CommonAggregate } from '../models/CommonAggregate.js'; import { CommonAggregateAggregateOps } from '../models/CommonAggregateAggregateOps.js'; @@ -768,6 +778,114 @@ export interface DataApiQueryRangeRequest { body: MetricsServiceObservabilityServiceQueryRangeBody } +export interface DataApiQuerySQLResultRequest { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof DataApiquerySQLResult + */ + owner: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof DataApiquerySQLResult + */ + slug: string + /** + * use project id if project_owner and project_slug are not provided + * Defaults to: undefined + * @type string + * @memberof DataApiquerySQLResult + */ + projectId?: string + /** + * version of the datasource, default to the active version if not provided + * Defaults to: undefined + * @type number + * @memberof DataApiquerySQLResult + */ + version?: number + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiquerySQLResult + */ + executionId?: string +} + +export interface DataApiQuerySQLResult2Request { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof DataApiquerySQLResult2 + */ + projectOwner?: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof DataApiquerySQLResult2 + */ + projectSlug?: string + /** + * use project id if project_owner and project_slug are not provided + * Defaults to: undefined + * @type string + * @memberof DataApiquerySQLResult2 + */ + projectId?: string + /** + * version of the datasource, default to the active version if not provided + * Defaults to: undefined + * @type number + * @memberof DataApiquerySQLResult2 + */ + version?: number + /** + * + * Defaults to: undefined + * @type string + * @memberof DataApiquerySQLResult2 + */ + executionId?: string +} + +export interface DataApiRerunSQLQueryRequest { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof DataApirerunSQLQuery + */ + owner: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof DataApirerunSQLQuery + */ + slug: string + /** + * + * @type AnalyticServiceAnalyticServiceRerunSQLQueryBody + * @memberof DataApirerunSQLQuery + */ + body: AnalyticServiceAnalyticServiceRerunSQLQueryBody +} + +export interface DataApiRerunSQLQuery2Request { + /** + * + * @type AnalyticServiceRerunSQLQueryRequest + * @memberof DataApirerunSQLQuery2 + */ + body: AnalyticServiceRerunSQLQueryRequest +} + export interface DataApiRetentionRequest { /** * @@ -800,6 +918,38 @@ export interface DataApiRetention2Request { body: InsightsServiceRetentionRequest } +export interface DataApiSaveSQLRequest { + /** + * username or organization name + * Defaults to: undefined + * @type string + * @memberof DataApisaveSQL + */ + owner: string + /** + * project slug + * Defaults to: undefined + * @type string + * @memberof DataApisaveSQL + */ + slug: string + /** + * + * @type AnalyticServiceAnalyticServiceSaveSQLBody + * @memberof DataApisaveSQL + */ + body: AnalyticServiceAnalyticServiceSaveSQLBody +} + +export interface DataApiSaveSQL2Request { + /** + * + * @type AnalyticServiceSaveSQLRequest + * @memberof DataApisaveSQL2 + */ + body: AnalyticServiceSaveSQLRequest +} + export class ObjectDataApi { private api: ObservableDataApi @@ -961,6 +1111,78 @@ export class ObjectDataApi { return this.api.queryRange(param.owner, param.slug, param.body, options).toPromise(); } + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param param the request object + */ + public querySQLResultWithHttpInfo(param: DataApiQuerySQLResultRequest, options?: Configuration): Promise> { + return this.api.querySQLResultWithHttpInfo(param.owner, param.slug, param.projectId, param.version, param.executionId, options).toPromise(); + } + + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param param the request object + */ + public querySQLResult(param: DataApiQuerySQLResultRequest, options?: Configuration): Promise { + return this.api.querySQLResult(param.owner, param.slug, param.projectId, param.version, param.executionId, options).toPromise(); + } + + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param param the request object + */ + public querySQLResult2WithHttpInfo(param: DataApiQuerySQLResult2Request = {}, options?: Configuration): Promise> { + return this.api.querySQLResult2WithHttpInfo(param.projectOwner, param.projectSlug, param.projectId, param.version, param.executionId, options).toPromise(); + } + + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param param the request object + */ + public querySQLResult2(param: DataApiQuerySQLResult2Request = {}, options?: Configuration): Promise { + return this.api.querySQLResult2(param.projectOwner, param.projectSlug, param.projectId, param.version, param.executionId, options).toPromise(); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param param the request object + */ + public rerunSQLQueryWithHttpInfo(param: DataApiRerunSQLQueryRequest, options?: Configuration): Promise> { + return this.api.rerunSQLQueryWithHttpInfo(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param param the request object + */ + public rerunSQLQuery(param: DataApiRerunSQLQueryRequest, options?: Configuration): Promise { + return this.api.rerunSQLQuery(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param param the request object + */ + public rerunSQLQuery2WithHttpInfo(param: DataApiRerunSQLQuery2Request, options?: Configuration): Promise> { + return this.api.rerunSQLQuery2WithHttpInfo(param.body, options).toPromise(); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param param the request object + */ + public rerunSQLQuery2(param: DataApiRerunSQLQuery2Request, options?: Configuration): Promise { + return this.api.rerunSQLQuery2(param.body, options).toPromise(); + } + /** * Query for retention. * Retention query @@ -997,6 +1219,42 @@ export class ObjectDataApi { return this.api.retention2(param.body, options).toPromise(); } + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param param the request object + */ + public saveSQLWithHttpInfo(param: DataApiSaveSQLRequest, options?: Configuration): Promise> { + return this.api.saveSQLWithHttpInfo(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param param the request object + */ + public saveSQL(param: DataApiSaveSQLRequest, options?: Configuration): Promise { + return this.api.saveSQL(param.owner, param.slug, param.body, options).toPromise(); + } + + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param param the request object + */ + public saveSQL2WithHttpInfo(param: DataApiSaveSQL2Request, options?: Configuration): Promise> { + return this.api.saveSQL2WithHttpInfo(param.body, options).toPromise(); + } + + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param param the request object + */ + public saveSQL2(param: DataApiSaveSQL2Request, options?: Configuration): Promise { + return this.api.saveSQL2(param.body, options).toPromise(); + } + } import { ObservableDebugAndSimulationApi } from "./ObservableAPI.js"; diff --git a/src/types/ObservableAPI.ts b/src/types/ObservableAPI.ts index f0a5ae9..7dc1bf6 100755 --- a/src/types/ObservableAPI.ts +++ b/src/types/ObservableAPI.ts @@ -17,11 +17,21 @@ import { AlertServiceMute } from '../models/AlertServiceMute.js'; import { AlertServiceSample } from '../models/AlertServiceSample.js'; import { AlertServiceSaveAlertRuleRequest } from '../models/AlertServiceSaveAlertRuleRequest.js'; import { AnalyticServiceAnalyticServiceExecuteSQLBody } from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +import { AnalyticServiceAnalyticServiceRerunSQLQueryBody } from '../models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.js'; +import { AnalyticServiceAnalyticServiceSaveSQLBody } from '../models/AnalyticServiceAnalyticServiceSaveSQLBody.js'; +import { AnalyticServiceExecutionInfo } from '../models/AnalyticServiceExecutionInfo.js'; +import { AnalyticServiceExecutionStatus } from '../models/AnalyticServiceExecutionStatus.js'; import { AnalyticServiceLogQueryRequestFilter } from '../models/AnalyticServiceLogQueryRequestFilter.js'; import { AnalyticServiceLogQueryRequestSort } from '../models/AnalyticServiceLogQueryRequestSort.js'; import { AnalyticServiceLogQueryResponse } from '../models/AnalyticServiceLogQueryResponse.js'; +import { AnalyticServiceQuerySQLResultResponse } from '../models/AnalyticServiceQuerySQLResultResponse.js'; +import { AnalyticServiceRerunSQLQueryRequest } from '../models/AnalyticServiceRerunSQLQueryRequest.js'; +import { AnalyticServiceRerunSQLQueryResponse } from '../models/AnalyticServiceRerunSQLQueryResponse.js'; import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSaveSQLRequest } from '../models/AnalyticServiceSaveSQLRequest.js'; +import { AnalyticServiceSaveSQLResponse } from '../models/AnalyticServiceSaveSQLResponse.js'; import { AnalyticServiceSearchServiceQueryLogBody } from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +import { AnalyticServiceSource } from '../models/AnalyticServiceSource.js'; import { AnalyticServiceSyncExecuteSQLResponse } from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; import { CommonAggregate } from '../models/CommonAggregate.js'; import { CommonAggregateAggregateOps } from '../models/CommonAggregateAggregateOps.js'; @@ -789,6 +799,158 @@ export class ObservableDataApi { return this.queryRangeWithHttpInfo(owner, slug, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param owner username or organization name + * @param slug project slug + * @param [projectId] use project id if project_owner and project_slug are not provided + * @param [version] version of the datasource, default to the active version if not provided + * @param [executionId] + */ + public querySQLResultWithHttpInfo(owner: string, slug: string, projectId?: string, version?: number, executionId?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.querySQLResult(owner, slug, projectId, version, executionId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.querySQLResultWithHttpInfo(rsp))); + })); + } + + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param owner username or organization name + * @param slug project slug + * @param [projectId] use project id if project_owner and project_slug are not provided + * @param [version] version of the datasource, default to the active version if not provided + * @param [executionId] + */ + public querySQLResult(owner: string, slug: string, projectId?: string, version?: number, executionId?: string, _options?: Configuration): Observable { + return this.querySQLResultWithHttpInfo(owner, slug, projectId, version, executionId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param [projectOwner] username or organization name + * @param [projectSlug] project slug + * @param [projectId] use project id if project_owner and project_slug are not provided + * @param [version] version of the datasource, default to the active version if not provided + * @param [executionId] + */ + public querySQLResult2WithHttpInfo(projectOwner?: string, projectSlug?: string, projectId?: string, version?: number, executionId?: string, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.querySQLResult2(projectOwner, projectSlug, projectId, version, executionId, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.querySQLResult2WithHttpInfo(rsp))); + })); + } + + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param [projectOwner] username or organization name + * @param [projectSlug] project slug + * @param [projectId] use project id if project_owner and project_slug are not provided + * @param [version] version of the datasource, default to the active version if not provided + * @param [executionId] + */ + public querySQLResult2(projectOwner?: string, projectSlug?: string, projectId?: string, version?: number, executionId?: string, _options?: Configuration): Observable { + return this.querySQLResult2WithHttpInfo(projectOwner, projectSlug, projectId, version, executionId, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public rerunSQLQueryWithHttpInfo(owner: string, slug: string, body: AnalyticServiceAnalyticServiceRerunSQLQueryBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.rerunSQLQuery(owner, slug, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.rerunSQLQueryWithHttpInfo(rsp))); + })); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public rerunSQLQuery(owner: string, slug: string, body: AnalyticServiceAnalyticServiceRerunSQLQueryBody, _options?: Configuration): Observable { + return this.rerunSQLQueryWithHttpInfo(owner, slug, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param body + */ + public rerunSQLQuery2WithHttpInfo(body: AnalyticServiceRerunSQLQueryRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.rerunSQLQuery2(body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.rerunSQLQuery2WithHttpInfo(rsp))); + })); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param body + */ + public rerunSQLQuery2(body: AnalyticServiceRerunSQLQueryRequest, _options?: Configuration): Observable { + return this.rerunSQLQuery2WithHttpInfo(body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + /** * Query for retention. * Retention query @@ -859,6 +1021,76 @@ export class ObservableDataApi { return this.retention2WithHttpInfo(body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); } + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public saveSQLWithHttpInfo(owner: string, slug: string, body: AnalyticServiceAnalyticServiceSaveSQLBody, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.saveSQL(owner, slug, body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.saveSQLWithHttpInfo(rsp))); + })); + } + + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public saveSQL(owner: string, slug: string, body: AnalyticServiceAnalyticServiceSaveSQLBody, _options?: Configuration): Observable { + return this.saveSQLWithHttpInfo(owner, slug, body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param body + */ + public saveSQL2WithHttpInfo(body: AnalyticServiceSaveSQLRequest, _options?: Configuration): Observable> { + const requestContextPromise = this.requestFactory.saveSQL2(body, _options); + + // build promise chain + let middlewarePreObservable = from(requestContextPromise); + for (const middleware of this.configuration.middleware) { + middlewarePreObservable = middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => middleware.pre(ctx))); + } + + return middlewarePreObservable.pipe(mergeMap((ctx: RequestContext) => this.configuration.httpApi.send(ctx))). + pipe(mergeMap((response: ResponseContext) => { + let middlewarePostObservable = of(response); + for (const middleware of this.configuration.middleware) { + middlewarePostObservable = middlewarePostObservable.pipe(mergeMap((rsp: ResponseContext) => middleware.post(rsp))); + } + return middlewarePostObservable.pipe(map((rsp: ResponseContext) => this.responseProcessor.saveSQL2WithHttpInfo(rsp))); + })); + } + + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param body + */ + public saveSQL2(body: AnalyticServiceSaveSQLRequest, _options?: Configuration): Observable { + return this.saveSQL2WithHttpInfo(body, _options).pipe(map((apiResponse: HttpInfo) => apiResponse.data)); + } + } import { DebugAndSimulationApiRequestFactory, DebugAndSimulationApiResponseProcessor} from "../apis/DebugAndSimulationApi.js"; diff --git a/src/types/PromiseAPI.ts b/src/types/PromiseAPI.ts index bf03c2b..ab25157 100755 --- a/src/types/PromiseAPI.ts +++ b/src/types/PromiseAPI.ts @@ -16,11 +16,21 @@ import { AlertServiceMute } from '../models/AlertServiceMute.js'; import { AlertServiceSample } from '../models/AlertServiceSample.js'; import { AlertServiceSaveAlertRuleRequest } from '../models/AlertServiceSaveAlertRuleRequest.js'; import { AnalyticServiceAnalyticServiceExecuteSQLBody } from '../models/AnalyticServiceAnalyticServiceExecuteSQLBody.js'; +import { AnalyticServiceAnalyticServiceRerunSQLQueryBody } from '../models/AnalyticServiceAnalyticServiceRerunSQLQueryBody.js'; +import { AnalyticServiceAnalyticServiceSaveSQLBody } from '../models/AnalyticServiceAnalyticServiceSaveSQLBody.js'; +import { AnalyticServiceExecutionInfo } from '../models/AnalyticServiceExecutionInfo.js'; +import { AnalyticServiceExecutionStatus } from '../models/AnalyticServiceExecutionStatus.js'; import { AnalyticServiceLogQueryRequestFilter } from '../models/AnalyticServiceLogQueryRequestFilter.js'; import { AnalyticServiceLogQueryRequestSort } from '../models/AnalyticServiceLogQueryRequestSort.js'; import { AnalyticServiceLogQueryResponse } from '../models/AnalyticServiceLogQueryResponse.js'; +import { AnalyticServiceQuerySQLResultResponse } from '../models/AnalyticServiceQuerySQLResultResponse.js'; +import { AnalyticServiceRerunSQLQueryRequest } from '../models/AnalyticServiceRerunSQLQueryRequest.js'; +import { AnalyticServiceRerunSQLQueryResponse } from '../models/AnalyticServiceRerunSQLQueryResponse.js'; import { AnalyticServiceSQLQuery } from '../models/AnalyticServiceSQLQuery.js'; +import { AnalyticServiceSaveSQLRequest } from '../models/AnalyticServiceSaveSQLRequest.js'; +import { AnalyticServiceSaveSQLResponse } from '../models/AnalyticServiceSaveSQLResponse.js'; import { AnalyticServiceSearchServiceQueryLogBody } from '../models/AnalyticServiceSearchServiceQueryLogBody.js'; +import { AnalyticServiceSource } from '../models/AnalyticServiceSource.js'; import { AnalyticServiceSyncExecuteSQLResponse } from '../models/AnalyticServiceSyncExecuteSQLResponse.js'; import { CommonAggregate } from '../models/CommonAggregate.js'; import { CommonAggregateAggregateOps } from '../models/CommonAggregateAggregateOps.js'; @@ -617,6 +627,106 @@ export class PromiseDataApi { return result.toPromise(); } + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param owner username or organization name + * @param slug project slug + * @param [projectId] use project id if project_owner and project_slug are not provided + * @param [version] version of the datasource, default to the active version if not provided + * @param [executionId] + */ + public querySQLResultWithHttpInfo(owner: string, slug: string, projectId?: string, version?: number, executionId?: string, _options?: Configuration): Promise> { + const result = this.api.querySQLResultWithHttpInfo(owner, slug, projectId, version, executionId, _options); + return result.toPromise(); + } + + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param owner username or organization name + * @param slug project slug + * @param [projectId] use project id if project_owner and project_slug are not provided + * @param [version] version of the datasource, default to the active version if not provided + * @param [executionId] + */ + public querySQLResult(owner: string, slug: string, projectId?: string, version?: number, executionId?: string, _options?: Configuration): Promise { + const result = this.api.querySQLResult(owner, slug, projectId, version, executionId, _options); + return result.toPromise(); + } + + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param [projectOwner] username or organization name + * @param [projectSlug] project slug + * @param [projectId] use project id if project_owner and project_slug are not provided + * @param [version] version of the datasource, default to the active version if not provided + * @param [executionId] + */ + public querySQLResult2WithHttpInfo(projectOwner?: string, projectSlug?: string, projectId?: string, version?: number, executionId?: string, _options?: Configuration): Promise> { + const result = this.api.querySQLResult2WithHttpInfo(projectOwner, projectSlug, projectId, version, executionId, _options); + return result.toPromise(); + } + + /** + * Query the result of a SQL query by execution_id. + * Query SQL Result + * @param [projectOwner] username or organization name + * @param [projectSlug] project slug + * @param [projectId] use project id if project_owner and project_slug are not provided + * @param [version] version of the datasource, default to the active version if not provided + * @param [executionId] + */ + public querySQLResult2(projectOwner?: string, projectSlug?: string, projectId?: string, version?: number, executionId?: string, _options?: Configuration): Promise { + const result = this.api.querySQLResult2(projectOwner, projectSlug, projectId, version, executionId, _options); + return result.toPromise(); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public rerunSQLQueryWithHttpInfo(owner: string, slug: string, body: AnalyticServiceAnalyticServiceRerunSQLQueryBody, _options?: Configuration): Promise> { + const result = this.api.rerunSQLQueryWithHttpInfo(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public rerunSQLQuery(owner: string, slug: string, body: AnalyticServiceAnalyticServiceRerunSQLQueryBody, _options?: Configuration): Promise { + const result = this.api.rerunSQLQuery(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param body + */ + public rerunSQLQuery2WithHttpInfo(body: AnalyticServiceRerunSQLQueryRequest, _options?: Configuration): Promise> { + const result = this.api.rerunSQLQuery2WithHttpInfo(body, _options); + return result.toPromise(); + } + + /** + * Rerun your SQL query by query_id, you can also update the query and run it. It will return execution_id, use it to query the result. + * Rerun SQL + * @param body + */ + public rerunSQLQuery2(body: AnalyticServiceRerunSQLQueryRequest, _options?: Configuration): Promise { + const result = this.api.rerunSQLQuery2(body, _options); + return result.toPromise(); + } + /** * Query for retention. * Retention query @@ -661,6 +771,50 @@ export class PromiseDataApi { return result.toPromise(); } + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public saveSQLWithHttpInfo(owner: string, slug: string, body: AnalyticServiceAnalyticServiceSaveSQLBody, _options?: Configuration): Promise> { + const result = this.api.saveSQLWithHttpInfo(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param owner username or organization name + * @param slug project slug + * @param body + */ + public saveSQL(owner: string, slug: string, body: AnalyticServiceAnalyticServiceSaveSQLBody, _options?: Configuration): Promise { + const result = this.api.saveSQL(owner, slug, body, _options); + return result.toPromise(); + } + + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param body + */ + public saveSQL2WithHttpInfo(body: AnalyticServiceSaveSQLRequest, _options?: Configuration): Promise> { + const result = this.api.saveSQL2WithHttpInfo(body, _options); + return result.toPromise(); + } + + /** + * Save your SQL query, and you can run it immediately or later. It will return query_id, you can use it to rerun the query. if you enable the \"run_immediately\" field, it will run the query immediately, and return execution_id, use it to query the result. + * Save SQL + * @param body + */ + public saveSQL2(body: AnalyticServiceSaveSQLRequest, _options?: Configuration): Promise { + const result = this.api.saveSQL2(body, _options); + return result.toPromise(); + } + }