From 5059cf42da6c69864a6071c7d6cd3b91386783e0 Mon Sep 17 00:00:00 2001 From: Mike DeAngelo Date: Thu, 3 Feb 2022 18:44:34 -0500 Subject: [PATCH] feat: SDK for Looker 22_2 --- csharp/rtl/Constants.cs | 2 +- csharp/sdk/3.1/methods.cs | 80 ++- csharp/sdk/3.1/models.cs | 44 +- csharp/sdk/4.0/methods.cs | 116 +++- csharp/sdk/4.0/models.cs | 68 ++- go/sdk/v4/methods.go | 89 ++- go/sdk/v4/models.go | 52 +- kotlin/src/main/com/looker/sdk/4.0/methods.kt | 118 +++- kotlin/src/main/com/looker/sdk/4.0/models.kt | 74 ++- kotlin/src/main/com/looker/sdk/4.0/streams.kt | 118 +++- kotlin/src/main/com/looker/sdk/Constants.kt | 2 +- packages/sdk/src/3.1/funcs.ts | 110 +++- packages/sdk/src/3.1/methods.ts | 102 +++- packages/sdk/src/3.1/methodsInterface.ts | 65 ++- packages/sdk/src/3.1/models.ts | 89 ++- packages/sdk/src/3.1/streams.ts | 118 +++- packages/sdk/src/4.0/funcs.ts | 167 +++++- packages/sdk/src/4.0/methods.ts | 155 ++++- packages/sdk/src/4.0/methodsInterface.ts | 104 +++- packages/sdk/src/4.0/models.ts | 127 +++- packages/sdk/src/4.0/streams.ts | 179 +++++- packages/sdk/src/constants.ts | 2 +- python/looker_sdk/sdk/api31/methods.py | 107 +++- python/looker_sdk/sdk/api31/models.py | 105 +++- python/looker_sdk/sdk/api40/methods.py | 156 ++++- python/looker_sdk/sdk/api40/models.py | 167 +++++- python/looker_sdk/sdk/constants.py | 2 +- spec/Looker.3.1.json | 302 +++++++++- spec/Looker.3.1.oas.json | 380 +++++++++++- spec/Looker.4.0.json | 427 +++++++++++++- spec/Looker.4.0.oas.json | 545 +++++++++++++++++- swift/looker/rtl/constants.swift | 2 +- swift/looker/sdk/methods.swift | 137 ++++- swift/looker/sdk/models.swift | 222 ++++++- swift/looker/sdk/streams.swift | 137 ++++- 35 files changed, 4614 insertions(+), 56 deletions(-) diff --git a/csharp/rtl/Constants.cs b/csharp/rtl/Constants.cs index 2cb871f18..11d6522f5 100644 --- a/csharp/rtl/Constants.cs +++ b/csharp/rtl/Constants.cs @@ -61,7 +61,7 @@ public struct Constants public const string DefaultApiVersion = "4.0"; public const string AgentPrefix = "CS-SDK"; - public const string LookerVersion = "22.0"; + public const string LookerVersion = "22.2"; public const string Bearer = "Bearer"; public const string LookerAppiId = "x-looker-appid"; diff --git a/csharp/sdk/3.1/methods.cs b/csharp/sdk/3.1/methods.cs index c929c621d..adc01ff35 100644 --- a/csharp/sdk/3.1/methods.cs +++ b/csharp/sdk/3.1/methods.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 378 API methods +/// 382 API methods #nullable enable using System; @@ -1091,6 +1091,21 @@ public async Task> all_locales( return await AuthRequest(HttpMethod.Get, "/locales", null,null,options); } + /// ### Configure SMTP Settings + /// This API allows users to configure the SMTP settings on the Looker instance. + /// This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + /// + /// POST /smtp_settings -> void + /// + /// void Successfully updated SMTP settings () + /// + public async Task> set_smtp_settings( + SmtpSettings body, + ITransportSettings? options = null) +{ + return await AuthRequest(HttpMethod.Post, "/smtp_settings", null,body,options); + } + /// ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). /// /// GET /timezones -> Timezone[] @@ -2491,6 +2506,69 @@ public async Task> graph_derived_tables_ { "workspace", workspace }},null,options); } + /// Enqueue materialization for a PDT with the given model name and view name + /// + /// GET /derived_table/{model_name}/{view_name}/start -> MaterializePDT + /// + /// MaterializePDT Derived Table (application/json) + /// + /// The model of the PDT to start building. + /// The view name of the PDT to start building. + /// Force rebuild of required dependent PDTs, even if they are already materialized. + /// Force involved incremental PDTs to fully re-materialize. + /// Workspace in which to materialize selected PDT ('dev' or default 'production'). + /// The source of this request. + public async Task> start_pdt_build( + string model_name, + string view_name, + string? force_rebuild = null, + string? force_full_incremental = null, + string? workspace = null, + string? source = null, + ITransportSettings? options = null) +{ + model_name = SdkUtils.EncodeParam(model_name); + view_name = SdkUtils.EncodeParam(view_name); + return await AuthRequest(HttpMethod.Get, $"/derived_table/{model_name}/{view_name}/start", new Values { + { "force_rebuild", force_rebuild }, + { "force_full_incremental", force_full_incremental }, + { "workspace", workspace }, + { "source", source }},null,options); + } + + /// Check status of PDT materialization + /// + /// GET /derived_table/{materialization_id}/status -> MaterializePDT + /// + /// MaterializePDT Derived Table (application/json) + /// + /// The materialization id to check status for. + public async Task> check_pdt_build( + string materialization_id, + ITransportSettings? options = null) +{ + materialization_id = SdkUtils.EncodeParam(materialization_id); + return await AuthRequest(HttpMethod.Get, $"/derived_table/{materialization_id}/status", null,null,options); + } + + /// Stop a PDT materialization + /// + /// GET /derived_table/{materialization_id}/stop -> MaterializePDT + /// + /// MaterializePDT Derived Table (application/json) + /// + /// The materialization id to stop. + /// The source of this request. + public async Task> stop_pdt_build( + string materialization_id, + string? source = null, + ITransportSettings? options = null) +{ + materialization_id = SdkUtils.EncodeParam(materialization_id); + return await AuthRequest(HttpMethod.Get, $"/derived_table/{materialization_id}/stop", new Values { + { "source", source }},null,options); + } + #endregion DerivedTable: View Derived Table graphs #region Folder: Manage Folders diff --git a/csharp/sdk/3.1/models.cs b/csharp/sdk/3.1/models.cs index 87c486ced..3d0238b9c 100644 --- a/csharp/sdk/3.1/models.cs +++ b/csharp/sdk/3.1/models.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 255 API models: 188 Spec, 0 Request, 51 Write, 16 Enum +/// 258 API models: 190 Spec, 0 Request, 51 Write, 17 Enum #nullable enable using System; @@ -1018,7 +1018,9 @@ public class DashboardLookml : SdkModel { /// Id of Dashboard (read-only) public string? dashboard_id { get; set; } = null; - /// lookml of UDD (read-only) + /// (Write-Only) Id of the folder + public string? folder_id { get; set; } = null; + /// lookml of UDD public string? lookml { get; set; } = null; } @@ -2777,6 +2779,14 @@ public class Manifest : SdkModel public LocalizationSettings? localization_settings { get; set; } } +public class MaterializePDT : SdkModel +{ + /// The ID of the enqueued materialization task (read-only) + public string? materialization_id { get; set; } = null; + /// Detailed response in text format (read-only) + public string? resp_text { get; set; } = null; +} + public class MergeFields : SdkModel { /// Field name to map onto in the merged results @@ -3776,6 +3786,25 @@ public class SessionConfig : SdkModel public bool? track_session_location { get; set; } = null; } +public class SmtpSettings : SdkModel +{ + /// SMTP Server url + public string? address { get; set; } = null; + /// From e-mail address + public string? from { get; set; } = null; + /// User name + public string? user_name { get; set; } = null; + /// Password + public string? password { get; set; } = null; + /// SMTP Server's port + public long? port { get; set; } = null; + /// Is TLS encryption enabled? + public bool? enable_starttls_auto { get; set; } = null; + /// TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". + [JsonConverter(typeof(StringEnumConverter))] + public SslVersion? ssl_version { get; set; } +} + public class Snippet : SdkModel { /// Name of the snippet (read-only) @@ -3908,6 +3937,17 @@ public class SqlQueryCreate : SdkModel public StringDictionary? vis_config { get; set; } = null; } +/// TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". (Enum defined in SmtpSettings) +public enum SslVersion +{ + [EnumMember(Value = "TLSv1_1")] + TLSv1_1, + [EnumMember(Value = "SSLv23")] + SSLv23, + [EnumMember(Value = "TLSv1_2")] + TLSv1_2 +} + /// A list of action types the integration supports. Valid values are: "cell", "query", "dashboard". (Enum defined in Integration) public enum SupportedActionTypes { diff --git a/csharp/sdk/4.0/methods.cs b/csharp/sdk/4.0/methods.cs index a1c665fc8..4a659e7cb 100644 --- a/csharp/sdk/4.0/methods.cs +++ b/csharp/sdk/4.0/methods.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 437 API methods +/// 443 API methods #nullable enable using System; @@ -1872,6 +1872,20 @@ public async Task> create_digest_email_s return await AuthRequest(HttpMethod.Post, "/digest_email_send", null,null,options); } + /// ### Get Egress IP Addresses + /// + /// Returns the list of public egress IP Addresses for a hosted customer's instance + /// + /// GET /public_egress_ip_addresses -> EgressIpAddresses + /// + /// EgressIpAddresses Public Egress IP Addresses (application/json) + /// + public async Task> public_egress_ip_addresses( + ITransportSettings? options = null) +{ + return await AuthRequest(HttpMethod.Get, "/public_egress_ip_addresses", null,null,options); + } + /// ### Set the menu item name and content for internal help resources /// /// GET /internal_help_resources_content -> InternalHelpResourcesContent @@ -2038,6 +2052,21 @@ public async Task> set_setting( { "fields", fields }},body,options); } + /// ### Configure SMTP Settings + /// This API allows users to configure the SMTP settings on the Looker instance. + /// This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + /// + /// POST /smtp_settings -> void + /// + /// void Successfully updated SMTP settings () + /// + public async Task> set_smtp_settings( + SmtpSettings body, + ITransportSettings? options = null) +{ + return await AuthRequest(HttpMethod.Post, "/smtp_settings", null,body,options); + } + /// ### Get current SMTP status. /// /// GET /smtp_status -> SmtpStatus @@ -3248,6 +3277,28 @@ public async Task> move_dashboard( { "folder_id", folder_id }},null,options); } + /// ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. + /// + /// This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. + /// + /// LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned + /// from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with + /// ). + /// + /// Note that the created dashboard is not linked to any LookML Dashboard, + /// i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. + /// + /// POST /dashboards/from_lookml -> DashboardLookml + /// + /// DashboardLookml DashboardLookML (application/json) + /// + public async Task> create_dashboard_from_lookml( + WriteDashboardLookml body, + ITransportSettings? options = null) +{ + return await AuthRequest(HttpMethod.Post, "/dashboards/from_lookml", null,body,options); + } + /// ### Copy an existing dashboard /// /// Creates a copy of an existing dashboard, in a specified folder, and returns the copied dashboard. @@ -3764,6 +3815,69 @@ public async Task> graph_derived_tables_ { "workspace", workspace }},null,options); } + /// Enqueue materialization for a PDT with the given model name and view name + /// + /// GET /derived_table/{model_name}/{view_name}/start -> MaterializePDT + /// + /// MaterializePDT Derived Table (application/json) + /// + /// The model of the PDT to start building. + /// The view name of the PDT to start building. + /// Force rebuild of required dependent PDTs, even if they are already materialized. + /// Force involved incremental PDTs to fully re-materialize. + /// Workspace in which to materialize selected PDT ('dev' or default 'production'). + /// The source of this request. + public async Task> start_pdt_build( + string model_name, + string view_name, + string? force_rebuild = null, + string? force_full_incremental = null, + string? workspace = null, + string? source = null, + ITransportSettings? options = null) +{ + model_name = SdkUtils.EncodeParam(model_name); + view_name = SdkUtils.EncodeParam(view_name); + return await AuthRequest(HttpMethod.Get, $"/derived_table/{model_name}/{view_name}/start", new Values { + { "force_rebuild", force_rebuild }, + { "force_full_incremental", force_full_incremental }, + { "workspace", workspace }, + { "source", source }},null,options); + } + + /// Check status of PDT materialization + /// + /// GET /derived_table/{materialization_id}/status -> MaterializePDT + /// + /// MaterializePDT Derived Table (application/json) + /// + /// The materialization id to check status for. + public async Task> check_pdt_build( + string materialization_id, + ITransportSettings? options = null) +{ + materialization_id = SdkUtils.EncodeParam(materialization_id); + return await AuthRequest(HttpMethod.Get, $"/derived_table/{materialization_id}/status", null,null,options); + } + + /// Stop a PDT materialization + /// + /// GET /derived_table/{materialization_id}/stop -> MaterializePDT + /// + /// MaterializePDT Derived Table (application/json) + /// + /// The materialization id to stop. + /// The source of this request. + public async Task> stop_pdt_build( + string materialization_id, + string? source = null, + ITransportSettings? options = null) +{ + materialization_id = SdkUtils.EncodeParam(materialization_id); + return await AuthRequest(HttpMethod.Get, $"/derived_table/{materialization_id}/stop", new Values { + { "source", source }},null,options); + } + #endregion DerivedTable: View Derived Table graphs #region Folder: Manage Folders diff --git a/csharp/sdk/4.0/models.cs b/csharp/sdk/4.0/models.cs index a61188dd5..b083da290 100644 --- a/csharp/sdk/4.0/models.cs +++ b/csharp/sdk/4.0/models.cs @@ -21,7 +21,7 @@ /// SOFTWARE. /// -/// 307 API models: 229 Spec, 0 Request, 58 Write, 20 Enum +/// 312 API models: 232 Spec, 0 Request, 59 Write, 21 Enum #nullable enable using System; @@ -1387,7 +1387,9 @@ public class DashboardLookml : SdkModel { /// Id of Dashboard (read-only) public string? dashboard_id { get; set; } = null; - /// lookml of UDD (read-only) + /// (Write-Only) Id of the folder + public string? folder_id { get; set; } = null; + /// lookml of UDD public string? lookml { get; set; } = null; } @@ -1565,6 +1567,10 @@ public class DBConnection : SdkModel public long? oauth_application_id { get; set; } = null; /// When true, error PDTs will be retried every regenerator cycle public bool? always_retry_failed_builds { get; set; } = null; + /// When true, query cost estimate will be displayed in explore. + public bool? cost_estimate_enabled { get; set; } = null; + /// PDT builds on this connection can be kicked off and cancelled via API. + public bool? pdt_api_control_enabled { get; set; } = null; } public class DBConnectionBase : SdkModel @@ -1759,6 +1765,12 @@ public class DiscretePalette : SdkModel public string[]? colors { get; set; } = null; } +public class EgressIpAddresses : SdkModel +{ + /// Egress IP addresses (read-only) + public string[]? egress_ip_addresses { get; set; } = null; +} + public class EmbedParams : SdkModel { /// The complete URL of the Looker UI page to display in the embed context. For example, to display the dashboard with id 34, `target_url` would look like: `https://mycompany.looker.com:9999/dashboards/34`. `target_uri` MUST contain a scheme (HTTPS), domain name, and URL path. Port must be included if it is required to reach the Looker server from browser clients. If the Looker instance is behind a load balancer or other proxy, `target_uri` must be the public-facing domain name and port required to reach the Looker instance, not the actual internal network machine name of the Looker instance. @@ -3237,6 +3249,14 @@ public class Manifest : SdkModel public LocalizationSettings? localization_settings { get; set; } } +public class MaterializePDT : SdkModel +{ + /// The ID of the enqueued materialization task (read-only) + public string? materialization_id { get; set; } = null; + /// Detailed response in text format (read-only) + public string? resp_text { get; set; } = null; +} + public class MergeFields : SdkModel { /// Field name to map onto in the merged results @@ -4414,6 +4434,25 @@ public class SmtpNodeStatus : SdkModel public string? hostname { get; set; } = null; } +public class SmtpSettings : SdkModel +{ + /// SMTP Server url + public string? address { get; set; } = null; + /// From e-mail address + public string? from { get; set; } = null; + /// User name + public string? user_name { get; set; } = null; + /// Password + public string? password { get; set; } = null; + /// SMTP Server's port + public long? port { get; set; } = null; + /// Is TLS encryption enabled? + public bool? enable_starttls_auto { get; set; } = null; + /// TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". + [JsonConverter(typeof(StringEnumConverter))] + public SslVersion? ssl_version { get; set; } +} + public class SmtpStatus : SdkModel { /// Overall SMTP status of cluster (read-only) @@ -4532,6 +4571,17 @@ public class SshTunnel : SdkModel public string? status { get; set; } = null; } +/// TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". (Enum defined in SmtpSettings) +public enum SslVersion +{ + [EnumMember(Value = "TLSv1_1")] + TLSv1_1, + [EnumMember(Value = "SSLv23")] + SSLv23, + [EnumMember(Value = "TLSv1_2")] + TLSv1_2 +} + public class SupportAccessAddEntries : SdkModel { /// An array of emails to add to the Allowlist @@ -5440,6 +5490,16 @@ public class WriteDashboardLayoutComponent : SdkModel public long? height { get; set; } = null; } +/// Dynamic writeable type for DashboardLookml removes: +/// dashboard_id +public class WriteDashboardLookml : SdkModel +{ + /// (Write-Only) Id of the folder + public string? folder_id { get; set; } = null; + /// lookml of UDD + public string? lookml { get; set; } = null; +} + /// Dynamic writeable type for Datagroup removes: /// can, created_at, id, model_name, name, trigger_check_at, trigger_error, trigger_value public class WriteDatagroup : SdkModel @@ -5519,6 +5579,10 @@ public class WriteDBConnection : SdkModel public long? oauth_application_id { get; set; } = null; /// When true, error PDTs will be retried every regenerator cycle public bool? always_retry_failed_builds { get; set; } = null; + /// When true, query cost estimate will be displayed in explore. + public bool? cost_estimate_enabled { get; set; } = null; + /// PDT builds on this connection can be kicked off and cancelled via API. + public bool? pdt_api_control_enabled { get; set; } = null; } /// Dynamic writeable type for DBConnectionOverride removes: diff --git a/go/sdk/v4/methods.go b/go/sdk/v4/methods.go index 87911de1a..ba53af8f7 100644 --- a/go/sdk/v4/methods.go +++ b/go/sdk/v4/methods.go @@ -26,7 +26,7 @@ SOFTWARE. /* -437 API methods +443 API methods */ @@ -1573,6 +1573,19 @@ func (l *LookerSDK) CreateDigestEmailSend( } +// ### Get Egress IP Addresses +// +// Returns the list of public egress IP Addresses for a hosted customer's instance +// +// GET /public_egress_ip_addresses -> EgressIpAddresses +func (l *LookerSDK) PublicEgressIpAddresses( + options *rtl.ApiSettings) (EgressIpAddresses, error) { + var result EgressIpAddresses + err := l.session.Do(&result, "GET", "/4.0", "/public_egress_ip_addresses", nil, nil, options) + return result, err + +} + // ### Set the menu item name and content for internal help resources // // GET /internal_help_resources_content -> InternalHelpResourcesContent @@ -1722,6 +1735,19 @@ func (l *LookerSDK) SetSetting( } +// ### Configure SMTP Settings +// This API allows users to configure the SMTP settings on the Looker instance. +// This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. +// +// POST /smtp_settings -> Void +func (l *LookerSDK) SetSmtpSettings( + body SmtpSettings, + options *rtl.ApiSettings) (error) { + err := l.session.Do(nil, "POST", "/4.0", "/smtp_settings", nil, body, options) + return err + +} + // ### Get current SMTP status. // // GET /smtp_status -> SmtpStatus @@ -2640,6 +2666,27 @@ func (l *LookerSDK) MoveDashboard( } +// ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. +// +// This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. +// +// LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned +// from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with +// ). +// +// Note that the created dashboard is not linked to any LookML Dashboard, +// i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. +// +// POST /dashboards/from_lookml -> DashboardLookml +func (l *LookerSDK) CreateDashboardFromLookml( + body WriteDashboardLookml, + options *rtl.ApiSettings) (DashboardLookml, error) { + var result DashboardLookml + err := l.session.Do(&result, "POST", "/4.0", "/dashboards/from_lookml", nil, body, options) + return result, err + +} + // ### Copy an existing dashboard // // Creates a copy of an existing dashboard, in a specified folder, and returns the copied dashboard. @@ -3040,6 +3087,46 @@ func (l *LookerSDK) GraphDerivedTablesForView(request RequestGraphDerivedTablesF err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/derived_table/graph/view/%v", request.View), map[string]interface{}{"models": request.Models, "workspace": request.Workspace}, nil, options) return result, err +} + +// Enqueue materialization for a PDT with the given model name and view name +// +// GET /derived_table/{model_name}/{view_name}/start -> MaterializePDT +func (l *LookerSDK) StartPdtBuild(request RequestStartPdtBuild, + options *rtl.ApiSettings) (MaterializePDT, error) { + request.ModelName = url.PathEscape(request.ModelName) + request.ViewName = url.PathEscape(request.ViewName) + var result MaterializePDT + err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/derived_table/%v/%v/start", request.ModelName, request.ViewName), map[string]interface{}{"force_rebuild": request.ForceRebuild, "force_full_incremental": request.ForceFullIncremental, "workspace": request.Workspace, "source": request.Source}, nil, options) + return result, err + +} + +// Check status of PDT materialization +// +// GET /derived_table/{materialization_id}/status -> MaterializePDT +func (l *LookerSDK) CheckPdtBuild( + materializationId string, + options *rtl.ApiSettings) (MaterializePDT, error) { + materializationId = url.PathEscape(materializationId) + var result MaterializePDT + err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/derived_table/%v/status", materializationId), nil, nil, options) + return result, err + +} + +// Stop a PDT materialization +// +// GET /derived_table/{materialization_id}/stop -> MaterializePDT +func (l *LookerSDK) StopPdtBuild( + materializationId string, + source string, + options *rtl.ApiSettings) (MaterializePDT, error) { + materializationId = url.PathEscape(materializationId) + var result MaterializePDT + err := l.session.Do(&result, "GET", "/4.0", fmt.Sprintf("/derived_table/%v/stop", materializationId), map[string]interface{}{"source": source}, nil, options) + return result, err + } // endregion DerivedTable: View Derived Table graphs diff --git a/go/sdk/v4/models.go b/go/sdk/v4/models.go index 505f89545..e5e4ec975 100644 --- a/go/sdk/v4/models.go +++ b/go/sdk/v4/models.go @@ -26,7 +26,7 @@ SOFTWARE. /* -362 API models: 229 Spec, 55 Request, 58 Write, 20 Enum +368 API models: 232 Spec, 56 Request, 59 Write, 21 Enum */ @@ -858,6 +858,7 @@ type DashboardLayoutComponent struct { type DashboardLookml struct { DashboardId *string `json:"dashboard_id,omitempty"` // Id of Dashboard + FolderId *string `json:"folder_id,omitempty"` // (Write-Only) Id of the folder Lookml *string `json:"lookml,omitempty"` // lookml of UDD } @@ -965,6 +966,8 @@ type DBConnection struct { DisableContextComment *bool `json:"disable_context_comment,omitempty"` // When disable_context_comment is true comment will not be added to SQL OauthApplicationId *int64 `json:"oauth_application_id,omitempty"` // An External OAuth Application to use for authenticating to the database AlwaysRetryFailedBuilds *bool `json:"always_retry_failed_builds,omitempty"` // When true, error PDTs will be retried every regenerator cycle + CostEstimateEnabled *bool `json:"cost_estimate_enabled,omitempty"` // When true, query cost estimate will be displayed in explore. + PdtApiControlEnabled *bool `json:"pdt_api_control_enabled,omitempty"` // PDT builds on this connection can be kicked off and cancelled via API. } @@ -1088,6 +1091,11 @@ type DiscretePalette struct { } +type EgressIpAddresses struct { + EgressIpAddresses *[]string `json:"egress_ip_addresses,omitempty"` // Egress IP addresses +} + + type EmbedParams struct { TargetUrl string `json:"target_url"` // The complete URL of the Looker UI page to display in the embed context. For example, to display the dashboard with id 34, `target_url` would look like: `https://mycompany.looker.com:9999/dashboards/34`. `target_uri` MUST contain a scheme (HTTPS), domain name, and URL path. Port must be included if it is required to reach the Looker server from browser clients. If the Looker instance is behind a load balancer or other proxy, `target_uri` must be the public-facing domain name and port required to reach the Looker instance, not the actual internal network machine name of the Looker instance. SessionLength *int64 `json:"session_length,omitempty"` // Number of seconds the SSO embed session will be valid after the embed session is started. Defaults to 300 seconds. Maximum session length accepted is 2592000 seconds (30 days). @@ -1959,6 +1967,12 @@ type Manifest struct { } +type MaterializePDT struct { + MaterializationId *string `json:"materialization_id,omitempty"` // The ID of the enqueued materialization task + RespText *string `json:"resp_text,omitempty"` // Detailed response in text format +} + + type MergeFields struct { FieldName *string `json:"field_name,omitempty"` // Field name to map onto in the merged results SourceFieldName *string `json:"source_field_name,omitempty"` // Field name from the source query @@ -2919,6 +2933,16 @@ type RequestSearchUsersNames struct { IsDisabled *bool `json:"is_disabled,omitempty"` // Include or exclude disabled accounts in the results } +// Dynamically generated request type for start_pdt_build +type RequestStartPdtBuild struct { + ModelName string `json:"model_name"` // The model of the PDT to start building. + ViewName string `json:"view_name"` // The view name of the PDT to start building. + ForceRebuild *string `json:"force_rebuild,omitempty"` // Force rebuild of required dependent PDTs, even if they are already materialized. + ForceFullIncremental *string `json:"force_full_incremental,omitempty"` // Force involved incremental PDTs to fully re-materialize. + Workspace *string `json:"workspace,omitempty"` // Workspace in which to materialize selected PDT ('dev' or default 'production'). + Source *string `json:"source,omitempty"` // The source of this request. +} + // Dynamically generated request type for tag_ref type RequestTagRef struct { ProjectId string `json:"project_id"` // Project Id @@ -3263,6 +3287,17 @@ type SmtpNodeStatus struct { } +type SmtpSettings struct { + Address *string `json:"address,omitempty"` // SMTP Server url + From *string `json:"from,omitempty"` // From e-mail address + UserName *string `json:"user_name,omitempty"` // User name + Password *string `json:"password,omitempty"` // Password + Port *int64 `json:"port,omitempty"` // SMTP Server's port + EnableStarttlsAuto *bool `json:"enable_starttls_auto,omitempty"` // Is TLS encryption enabled? + SslVersion *SslVersion `json:"ssl_version,omitempty"` // TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". +} + + type SmtpStatus struct { IsValid *bool `json:"is_valid,omitempty"` // Overall SMTP status of cluster NodeCount *int64 `json:"node_count,omitempty"` // Total number of nodes in cluster @@ -3336,6 +3371,12 @@ type SshTunnel struct { Status *string `json:"status,omitempty"` // Current connection status for this Tunnel } +type SslVersion string +const SslVersion_TLSv1_1 SslVersion = "TLSv1_1" +const SslVersion_SSLv23 SslVersion = "SSLv23" +const SslVersion_TLSv1_2 SslVersion = "TLSv1_2" + + type SupportAccessAddEntries struct { Emails *[]string `json:"emails,omitempty"` // An array of emails to add to the Allowlist @@ -3873,6 +3914,13 @@ type WriteDashboardLayoutComponent struct { Height *int64 `json:"height,omitempty"` // Height } +// Dynamic writeable type for DashboardLookml removes: +// dashboard_id +type WriteDashboardLookml struct { + FolderId *string `json:"folder_id,omitempty"` // (Write-Only) Id of the folder + Lookml *string `json:"lookml,omitempty"` // lookml of UDD +} + // Dynamic writeable type for Datagroup removes: // can, created_at, id, model_name, name, trigger_check_at, trigger_error, trigger_value type WriteDatagroup struct { @@ -3915,6 +3963,8 @@ type WriteDBConnection struct { DisableContextComment *bool `json:"disable_context_comment,omitempty"` // When disable_context_comment is true comment will not be added to SQL OauthApplicationId *int64 `json:"oauth_application_id,omitempty"` // An External OAuth Application to use for authenticating to the database AlwaysRetryFailedBuilds *bool `json:"always_retry_failed_builds,omitempty"` // When true, error PDTs will be retried every regenerator cycle + CostEstimateEnabled *bool `json:"cost_estimate_enabled,omitempty"` // When true, query cost estimate will be displayed in explore. + PdtApiControlEnabled *bool `json:"pdt_api_control_enabled,omitempty"` // PDT builds on this connection can be kicked off and cancelled via API. } // Dynamic writeable type for DBConnectionOverride removes: diff --git a/kotlin/src/main/com/looker/sdk/4.0/methods.kt b/kotlin/src/main/com/looker/sdk/4.0/methods.kt index 812c4af6a..bc26f727f 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/methods.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/methods.kt @@ -25,7 +25,7 @@ */ /** - * 437 API methods + * 443 API methods */ @@ -1927,6 +1927,20 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { } + /** + * ### Get Egress IP Addresses + * + * Returns the list of public egress IP Addresses for a hosted customer's instance + * + * GET /public_egress_ip_addresses -> EgressIpAddresses + */ + fun public_egress_ip_addresses( + + ) : SDKResponse { + return this.get("/public_egress_ip_addresses", mapOf()) + } + + /** * ### Set the menu item name and content for internal help resources * @@ -2097,6 +2111,22 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { } + /** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * @param {SmtpSettings} body + * + * POST /smtp_settings -> Void + */ + fun set_smtp_settings( + body: SmtpSettings + ) : SDKResponse { + return this.post("/smtp_settings", mapOf(), body) + } + + /** * ### Get current SMTP status. * @@ -3327,6 +3357,29 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { } + /** + * ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. + * + * This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. + * + * LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned + * from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with + * ). + * + * Note that the created dashboard is not linked to any LookML Dashboard, + * i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. + * + * @param {WriteDashboardLookml} body + * + * POST /dashboards/from_lookml -> DashboardLookml + */ + fun create_dashboard_from_lookml( + body: WriteDashboardLookml + ) : SDKResponse { + return this.post("/dashboards/from_lookml", mapOf(), body) + } + + /** * ### Copy an existing dashboard * @@ -3854,6 +3907,69 @@ class LookerSDK(authSession: AuthSession) : APIMethods(authSession) { "workspace" to workspace)) } + + /** + * Enqueue materialization for a PDT with the given model name and view name + * + * @param {String} model_name The model of the PDT to start building. + * @param {String} view_name The view name of the PDT to start building. + * @param {String} force_rebuild Force rebuild of required dependent PDTs, even if they are already materialized. + * @param {String} force_full_incremental Force involved incremental PDTs to fully re-materialize. + * @param {String} workspace Workspace in which to materialize selected PDT ('dev' or default 'production'). + * @param {String} source The source of this request. + * + * GET /derived_table/{model_name}/{view_name}/start -> MaterializePDT + */ + @JvmOverloads fun start_pdt_build( + model_name: String, + view_name: String, + force_rebuild: String? = null, + force_full_incremental: String? = null, + workspace: String? = null, + source: String? = null + ) : SDKResponse { + val path_model_name = encodeParam(model_name) + val path_view_name = encodeParam(view_name) + return this.get("/derived_table/${path_model_name}/${path_view_name}/start", + mapOf("force_rebuild" to force_rebuild, + "force_full_incremental" to force_full_incremental, + "workspace" to workspace, + "source" to source)) + } + + + /** + * Check status of PDT materialization + * + * @param {String} materialization_id The materialization id to check status for. + * + * GET /derived_table/{materialization_id}/status -> MaterializePDT + */ + fun check_pdt_build( + materialization_id: String + ) : SDKResponse { + val path_materialization_id = encodeParam(materialization_id) + return this.get("/derived_table/${path_materialization_id}/status", mapOf()) + } + + + /** + * Stop a PDT materialization + * + * @param {String} materialization_id The materialization id to stop. + * @param {String} source The source of this request. + * + * GET /derived_table/{materialization_id}/stop -> MaterializePDT + */ + @JvmOverloads fun stop_pdt_build( + materialization_id: String, + source: String? = null + ) : SDKResponse { + val path_materialization_id = encodeParam(materialization_id) + return this.get("/derived_table/${path_materialization_id}/stop", + mapOf("source" to source)) + } + //endregion DerivedTable: View Derived Table graphs //region Folder: Manage Folders diff --git a/kotlin/src/main/com/looker/sdk/4.0/models.kt b/kotlin/src/main/com/looker/sdk/4.0/models.kt index bd47efdf7..cccd79e46 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/models.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/models.kt @@ -25,7 +25,7 @@ */ /** - * 307 API models: 229 Spec, 0 Request, 58 Write, 20 Enum + * 312 API models: 232 Spec, 0 Request, 59 Write, 21 Enum */ @@ -1465,10 +1465,12 @@ data class DashboardLayoutComponent ( /** * @property dashboard_id Id of Dashboard (read-only) - * @property lookml lookml of UDD (read-only) + * @property folder_id (Write-Only) Id of the folder + * @property lookml lookml of UDD */ data class DashboardLookml ( var dashboard_id: String? = null, + var folder_id: String? = null, var lookml: String? = null ) : Serializable @@ -1614,6 +1616,8 @@ data class Datagroup ( * @property disable_context_comment When disable_context_comment is true comment will not be added to SQL * @property oauth_application_id An External OAuth Application to use for authenticating to the database * @property always_retry_failed_builds When true, error PDTs will be retried every regenerator cycle + * @property cost_estimate_enabled When true, query cost estimate will be displayed in explore. + * @property pdt_api_control_enabled PDT builds on this connection can be kicked off and cancelled via API. */ data class DBConnection ( var can: Map? = null, @@ -1657,7 +1661,9 @@ data class DBConnection ( var pdt_concurrency: Long? = null, var disable_context_comment: Boolean? = null, var oauth_application_id: Long? = null, - var always_retry_failed_builds: Boolean? = null + var always_retry_failed_builds: Boolean? = null, + var cost_estimate_enabled: Boolean? = null, + var pdt_api_control_enabled: Boolean? = null ) : Serializable /** @@ -1861,6 +1867,13 @@ data class DiscretePalette ( var colors: Array? = null ) : Serializable +/** + * @property egress_ip_addresses Egress IP addresses (read-only) + */ +data class EgressIpAddresses ( + var egress_ip_addresses: Array? = null +) : Serializable + /** * @property target_url The complete URL of the Looker UI page to display in the embed context. For example, to display the dashboard with id 34, `target_url` would look like: `https://mycompany.looker.com:9999/dashboards/34`. `target_uri` MUST contain a scheme (HTTPS), domain name, and URL path. Port must be included if it is required to reach the Looker server from browser clients. If the Looker instance is behind a load balancer or other proxy, `target_uri` must be the public-facing domain name and port required to reach the Looker instance, not the actual internal network machine name of the Looker instance. * @property session_length Number of seconds the SSO embed session will be valid after the embed session is started. Defaults to 300 seconds. Maximum session length accepted is 2592000 seconds (30 days). @@ -3408,6 +3421,15 @@ data class Manifest ( var localization_settings: LocalizationSettings? = null ) : Serializable +/** + * @property materialization_id The ID of the enqueued materialization task (read-only) + * @property resp_text Detailed response in text format (read-only) + */ +data class MaterializePDT ( + var materialization_id: String? = null, + var resp_text: String? = null +) : Serializable + /** * @property field_name Field name to map onto in the merged results * @property source_field_name Field name from the source query @@ -4629,6 +4651,25 @@ data class SmtpNodeStatus ( var hostname: String? = null ) : Serializable +/** + * @property address SMTP Server url + * @property from From e-mail address + * @property user_name User name + * @property password Password + * @property port SMTP Server's port + * @property enable_starttls_auto Is TLS encryption enabled? + * @property ssl_version TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". + */ +data class SmtpSettings ( + var address: String? = null, + var from: String? = null, + var user_name: String? = null, + var password: String? = null, + var port: Long? = null, + var enable_starttls_auto: Boolean? = null, + var ssl_version: SslVersion? = null +) : Serializable + /** * @property is_valid Overall SMTP status of cluster (read-only) * @property node_count Total number of nodes in cluster (read-only) @@ -4756,6 +4797,15 @@ data class SshTunnel ( var status: String? = null ) : Serializable +/** + * TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". (Enum defined in SmtpSettings) + */ +enum class SslVersion : Serializable { + TLSv1_1, + SSLv23, + TLSv1_2 +} + /** * @property emails An array of emails to add to the Allowlist * @property reason Reason for adding emails to the Allowlist @@ -5686,6 +5736,18 @@ data class WriteDashboardLayoutComponent ( var height: Long? = null ) : Serializable +/** + * Dynamic writeable type for DashboardLookml removes: + * dashboard_id + * + * @property folder_id (Write-Only) Id of the folder + * @property lookml lookml of UDD + */ +data class WriteDashboardLookml ( + var folder_id: String? = null, + var lookml: String? = null +) : Serializable + /** * Dynamic writeable type for Datagroup removes: * can, created_at, id, model_name, name, trigger_check_at, trigger_error, trigger_value @@ -5734,6 +5796,8 @@ data class WriteDatagroup ( * @property disable_context_comment When disable_context_comment is true comment will not be added to SQL * @property oauth_application_id An External OAuth Application to use for authenticating to the database * @property always_retry_failed_builds When true, error PDTs will be retried every regenerator cycle + * @property cost_estimate_enabled When true, query cost estimate will be displayed in explore. + * @property pdt_api_control_enabled PDT builds on this connection can be kicked off and cancelled via API. */ data class WriteDBConnection ( var name: String? = null, @@ -5766,7 +5830,9 @@ data class WriteDBConnection ( var pdt_concurrency: Long? = null, var disable_context_comment: Boolean? = null, var oauth_application_id: Long? = null, - var always_retry_failed_builds: Boolean? = null + var always_retry_failed_builds: Boolean? = null, + var cost_estimate_enabled: Boolean? = null, + var pdt_api_control_enabled: Boolean? = null ) : Serializable /** diff --git a/kotlin/src/main/com/looker/sdk/4.0/streams.kt b/kotlin/src/main/com/looker/sdk/4.0/streams.kt index e006cdc51..164478987 100644 --- a/kotlin/src/main/com/looker/sdk/4.0/streams.kt +++ b/kotlin/src/main/com/looker/sdk/4.0/streams.kt @@ -25,7 +25,7 @@ */ /** - * 437 API methods + * 443 API methods */ @@ -1926,6 +1926,20 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { } + /** + * ### Get Egress IP Addresses + * + * Returns the list of public egress IP Addresses for a hosted customer's instance + * + * GET /public_egress_ip_addresses -> ByteArray + */ + fun public_egress_ip_addresses( + + ) : SDKResponse { + return this.get("/public_egress_ip_addresses", mapOf()) + } + + /** * ### Set the menu item name and content for internal help resources * @@ -2096,6 +2110,22 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { } + /** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * @param {SmtpSettings} body + * + * POST /smtp_settings -> ByteArray + */ + fun set_smtp_settings( + body: SmtpSettings + ) : SDKResponse { + return this.post("/smtp_settings", mapOf(), body) + } + + /** * ### Get current SMTP status. * @@ -3326,6 +3356,29 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { } + /** + * ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. + * + * This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. + * + * LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned + * from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with + * ). + * + * Note that the created dashboard is not linked to any LookML Dashboard, + * i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. + * + * @param {WriteDashboardLookml} body + * + * POST /dashboards/from_lookml -> ByteArray + */ + fun create_dashboard_from_lookml( + body: WriteDashboardLookml + ) : SDKResponse { + return this.post("/dashboards/from_lookml", mapOf(), body) + } + + /** * ### Copy an existing dashboard * @@ -3853,6 +3906,69 @@ class LookerSDKStream(authSession: AuthSession) : APIMethods(authSession) { "workspace" to workspace)) } + + /** + * Enqueue materialization for a PDT with the given model name and view name + * + * @param {String} model_name The model of the PDT to start building. + * @param {String} view_name The view name of the PDT to start building. + * @param {String} force_rebuild Force rebuild of required dependent PDTs, even if they are already materialized. + * @param {String} force_full_incremental Force involved incremental PDTs to fully re-materialize. + * @param {String} workspace Workspace in which to materialize selected PDT ('dev' or default 'production'). + * @param {String} source The source of this request. + * + * GET /derived_table/{model_name}/{view_name}/start -> ByteArray + */ + @JvmOverloads fun start_pdt_build( + model_name: String, + view_name: String, + force_rebuild: String? = null, + force_full_incremental: String? = null, + workspace: String? = null, + source: String? = null + ) : SDKResponse { + val path_model_name = encodeParam(model_name) + val path_view_name = encodeParam(view_name) + return this.get("/derived_table/${path_model_name}/${path_view_name}/start", + mapOf("force_rebuild" to force_rebuild, + "force_full_incremental" to force_full_incremental, + "workspace" to workspace, + "source" to source)) + } + + + /** + * Check status of PDT materialization + * + * @param {String} materialization_id The materialization id to check status for. + * + * GET /derived_table/{materialization_id}/status -> ByteArray + */ + fun check_pdt_build( + materialization_id: String + ) : SDKResponse { + val path_materialization_id = encodeParam(materialization_id) + return this.get("/derived_table/${path_materialization_id}/status", mapOf()) + } + + + /** + * Stop a PDT materialization + * + * @param {String} materialization_id The materialization id to stop. + * @param {String} source The source of this request. + * + * GET /derived_table/{materialization_id}/stop -> ByteArray + */ + @JvmOverloads fun stop_pdt_build( + materialization_id: String, + source: String? = null + ) : SDKResponse { + val path_materialization_id = encodeParam(materialization_id) + return this.get("/derived_table/${path_materialization_id}/stop", + mapOf("source" to source)) + } + //endregion DerivedTable: View Derived Table graphs //region Folder: Manage Folders diff --git a/kotlin/src/main/com/looker/sdk/Constants.kt b/kotlin/src/main/com/looker/sdk/Constants.kt index 26f9d90e7..ed54d4e24 100644 --- a/kotlin/src/main/com/looker/sdk/Constants.kt +++ b/kotlin/src/main/com/looker/sdk/Constants.kt @@ -28,7 +28,7 @@ package com.looker.sdk const val ENVIRONMENT_PREFIX = "LOOKERSDK" const val SDK_TAG = "KT-SDK" -const val LOOKER_VERSION = "22.0" +const val LOOKER_VERSION = "22.2" const val API_VERSION = "4.0" const val AGENT_TAG = "$SDK_TAG $LOOKER_VERSION" const val LOOKER_APPID = "x-looker-appid" diff --git a/packages/sdk/src/3.1/funcs.ts b/packages/sdk/src/3.1/funcs.ts index f83953d6a..42561a001 100644 --- a/packages/sdk/src/3.1/funcs.ts +++ b/packages/sdk/src/3.1/funcs.ts @@ -25,7 +25,7 @@ */ /** - * 378 API methods + * 382 API methods */ import type { @@ -114,6 +114,7 @@ import type { ILookmlTestResult, ILookWithQuery, IManifest, + IMaterializePDT, IMergeQuery, IModelSet, IOIDCConfig, @@ -174,6 +175,7 @@ import type { IRequestSearchUsersNames, IRequestSpaceChildren, IRequestSpaceChildrenSearch, + IRequestStartPdtBuild, IRequestTagRef, IRequestUserAttributeUserValues, IRequestUserRoles, @@ -184,6 +186,7 @@ import type { IScheduledPlan, ISession, ISessionConfig, + ISmtpSettings, ISpace, ISpaceBase, ISqlQuery, @@ -1794,6 +1797,31 @@ export const all_locales = async ( return sdk.get('/locales', null, null, options) } +/** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * POST /smtp_settings -> void + * + * @param sdk IAPIMethods implementation + * @param body Partial + * @param options one-time API call overrides + * + */ +export const set_smtp_settings = async ( + sdk: IAPIMethods, + body: Partial, + options?: Partial +): Promise> => { + return sdk.post( + '/smtp_settings', + null, + body, + options + ) +} + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -3641,6 +3669,86 @@ export const graph_derived_tables_for_view = async ( ) } +/** + * Enqueue materialization for a PDT with the given model name and view name + * + * GET /derived_table/{model_name}/{view_name}/start -> IMaterializePDT + * + * @param sdk IAPIMethods implementation + * @param request composed interface "IRequestStartPdtBuild" for complex method parameters + * @param options one-time API call overrides + * + */ +export const start_pdt_build = async ( + sdk: IAPIMethods, + request: IRequestStartPdtBuild, + options?: Partial +): Promise> => { + request.model_name = encodeParam(request.model_name) + request.view_name = encodeParam(request.view_name) + return sdk.get( + `/derived_table/${request.model_name}/${request.view_name}/start`, + { + force_rebuild: request.force_rebuild, + force_full_incremental: request.force_full_incremental, + workspace: request.workspace, + source: request.source, + }, + null, + options + ) +} + +/** + * Check status of PDT materialization + * + * GET /derived_table/{materialization_id}/status -> IMaterializePDT + * + * @param sdk IAPIMethods implementation + * @param materialization_id The materialization id to check status for. + * @param options one-time API call overrides + * + */ +export const check_pdt_build = async ( + sdk: IAPIMethods, + materialization_id: string, + options?: Partial +): Promise> => { + materialization_id = encodeParam(materialization_id) + return sdk.get( + `/derived_table/${materialization_id}/status`, + null, + null, + options + ) +} + +/** + * Stop a PDT materialization + * + * GET /derived_table/{materialization_id}/stop -> IMaterializePDT + * + * @param sdk IAPIMethods implementation + * @param materialization_id The materialization id to stop. + * @param source The source of this request. + * @param options one-time API call overrides + * + */ +export const stop_pdt_build = async ( + sdk: IAPIMethods, + materialization_id: string, + source?: string, + options?: Partial +): Promise> => { + materialization_id = encodeParam(materialization_id) + return sdk.get( + `/derived_table/${materialization_id}/stop`, + { source }, + null, + options + ) +} + //#endregion DerivedTable: View Derived Table graphs //#region Folder: Manage Folders diff --git a/packages/sdk/src/3.1/methods.ts b/packages/sdk/src/3.1/methods.ts index 39074ffe8..f0aab2883 100644 --- a/packages/sdk/src/3.1/methods.ts +++ b/packages/sdk/src/3.1/methods.ts @@ -25,7 +25,7 @@ */ /** - * 378 API methods + * 382 API methods */ import type { @@ -112,6 +112,7 @@ import type { ILookmlTestResult, ILookWithQuery, IManifest, + IMaterializePDT, IMergeQuery, IModelSet, IOIDCConfig, @@ -172,6 +173,7 @@ import type { IRequestSearchUsersNames, IRequestSpaceChildren, IRequestSpaceChildrenSearch, + IRequestStartPdtBuild, IRequestTagRef, IRequestUserAttributeUserValues, IRequestUserRoles, @@ -182,6 +184,7 @@ import type { IScheduledPlan, ISession, ISessionConfig, + ISmtpSettings, ISpace, ISpaceBase, ISqlQuery, @@ -1686,6 +1689,29 @@ export class Looker31SDK extends APIMethods implements ILooker31SDK { return this.get('/locales', null, null, options) } + /** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * POST /smtp_settings -> void + * + * @param body Partial + * @param options one-time API call overrides + * + */ + async set_smtp_settings( + body: Partial, + options?: Partial + ): Promise> { + return this.post( + '/smtp_settings', + null, + body, + options + ) + } + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -3403,6 +3429,80 @@ export class Looker31SDK extends APIMethods implements ILooker31SDK { ) } + /** + * Enqueue materialization for a PDT with the given model name and view name + * + * GET /derived_table/{model_name}/{view_name}/start -> IMaterializePDT + * + * @param request composed interface "IRequestStartPdtBuild" for complex method parameters + * @param options one-time API call overrides + * + */ + async start_pdt_build( + request: IRequestStartPdtBuild, + options?: Partial + ): Promise> { + request.model_name = encodeParam(request.model_name) + request.view_name = encodeParam(request.view_name) + return this.get( + `/derived_table/${request.model_name}/${request.view_name}/start`, + { + force_rebuild: request.force_rebuild, + force_full_incremental: request.force_full_incremental, + workspace: request.workspace, + source: request.source, + }, + null, + options + ) + } + + /** + * Check status of PDT materialization + * + * GET /derived_table/{materialization_id}/status -> IMaterializePDT + * + * @param materialization_id The materialization id to check status for. + * @param options one-time API call overrides + * + */ + async check_pdt_build( + materialization_id: string, + options?: Partial + ): Promise> { + materialization_id = encodeParam(materialization_id) + return this.get( + `/derived_table/${materialization_id}/status`, + null, + null, + options + ) + } + + /** + * Stop a PDT materialization + * + * GET /derived_table/{materialization_id}/stop -> IMaterializePDT + * + * @param materialization_id The materialization id to stop. + * @param source The source of this request. + * @param options one-time API call overrides + * + */ + async stop_pdt_build( + materialization_id: string, + source?: string, + options?: Partial + ): Promise> { + materialization_id = encodeParam(materialization_id) + return this.get( + `/derived_table/${materialization_id}/stop`, + { source }, + null, + options + ) + } + //#endregion DerivedTable: View Derived Table graphs //#region Folder: Manage Folders diff --git a/packages/sdk/src/3.1/methodsInterface.ts b/packages/sdk/src/3.1/methodsInterface.ts index d774173de..9cca452d1 100644 --- a/packages/sdk/src/3.1/methodsInterface.ts +++ b/packages/sdk/src/3.1/methodsInterface.ts @@ -25,7 +25,7 @@ */ /** - * 378 API methods + * 382 API methods */ import type { @@ -109,6 +109,7 @@ import type { ILookmlTestResult, ILookWithQuery, IManifest, + IMaterializePDT, IMergeQuery, IModelSet, IOIDCConfig, @@ -169,6 +170,7 @@ import type { IRequestSearchUsersNames, IRequestSpaceChildren, IRequestSpaceChildrenSearch, + IRequestStartPdtBuild, IRequestTagRef, IRequestUserAttributeUserValues, IRequestUserRoles, @@ -179,6 +181,7 @@ import type { IScheduledPlan, ISession, ISessionConfig, + ISmtpSettings, ISpace, ISpaceBase, ISqlQuery, @@ -1281,6 +1284,22 @@ export interface ILooker31SDK extends IAPIMethods { options?: Partial ): Promise> + /** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * POST /smtp_settings -> void + * + * @param body Partial + * @param options one-time API call overrides + * + */ + set_smtp_settings( + body: Partial, + options?: Partial + ): Promise> + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -2466,6 +2485,50 @@ export interface ILooker31SDK extends IAPIMethods { options?: Partial ): Promise> + /** + * Enqueue materialization for a PDT with the given model name and view name + * + * GET /derived_table/{model_name}/{view_name}/start -> IMaterializePDT + * + * @param request composed interface "IRequestStartPdtBuild" for complex method parameters + * @param options one-time API call overrides + * + */ + start_pdt_build( + request: IRequestStartPdtBuild, + options?: Partial + ): Promise> + + /** + * Check status of PDT materialization + * + * GET /derived_table/{materialization_id}/status -> IMaterializePDT + * + * @param materialization_id The materialization id to check status for. + * @param options one-time API call overrides + * + */ + check_pdt_build( + materialization_id: string, + options?: Partial + ): Promise> + + /** + * Stop a PDT materialization + * + * GET /derived_table/{materialization_id}/stop -> IMaterializePDT + * + * @param materialization_id The materialization id to stop. + * @param source The source of this request. + * @param options one-time API call overrides + * + */ + stop_pdt_build( + materialization_id: string, + source?: string, + options?: Partial + ): Promise> + //#endregion DerivedTable: View Derived Table graphs //#region Folder: Manage Folders diff --git a/packages/sdk/src/3.1/models.ts b/packages/sdk/src/3.1/models.ts index d15eaf60f..4092b9b6e 100644 --- a/packages/sdk/src/3.1/models.ts +++ b/packages/sdk/src/3.1/models.ts @@ -25,7 +25,7 @@ */ /** - * 303 API models: 188 Spec, 48 Request, 51 Write, 16 Enum + * 307 API models: 190 Spec, 49 Request, 51 Write, 17 Enum */ import type { IDictionary, Url, DelimArray } from '@looker/sdk-rtl' @@ -1697,7 +1697,11 @@ export interface IDashboardLookml { */ dashboard_id?: string | null /** - * lookml of UDD (read-only) + * (Write-Only) Id of the folder + */ + folder_id?: string | null + /** + * lookml of UDD */ lookml?: string | null } @@ -4747,6 +4751,17 @@ export interface IManifest { localization_settings?: ILocalizationSettings } +export interface IMaterializePDT { + /** + * The ID of the enqueued materialization task (read-only) + */ + materialization_id?: string + /** + * Detailed response in text format (read-only) + */ + resp_text?: string | null +} + export interface IMergeFields { /** * Field name to map onto in the merged results @@ -7305,6 +7320,36 @@ export interface IRequestSpaceChildrenSearch { name?: string | null } +/** + * Dynamically generated request type for start_pdt_build + */ +export interface IRequestStartPdtBuild { + /** + * The model of the PDT to start building. + */ + model_name: string + /** + * The view name of the PDT to start building. + */ + view_name: string + /** + * Force rebuild of required dependent PDTs, even if they are already materialized. + */ + force_rebuild?: string | null + /** + * Force involved incremental PDTs to fully re-materialize. + */ + force_full_incremental?: string | null + /** + * Workspace in which to materialize selected PDT ('dev' or default 'production'). + */ + workspace?: string | null + /** + * The source of this request. + */ + source?: string | null +} + /** * Dynamically generated request type for tag_ref */ @@ -8088,6 +8133,37 @@ export interface ISessionConfig { track_session_location?: boolean } +export interface ISmtpSettings { + /** + * SMTP Server url + */ + address?: string + /** + * From e-mail address + */ + from?: string + /** + * User name + */ + user_name?: string + /** + * Password + */ + password?: string + /** + * SMTP Server's port + */ + port?: number + /** + * Is TLS encryption enabled? + */ + enable_starttls_auto?: boolean + /** + * TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". + */ + ssl_version?: SslVersion | null +} + export interface ISnippet { /** * Name of the snippet (read-only) @@ -8325,6 +8401,15 @@ export interface ISqlQueryCreate { vis_config?: IDictionary | null } +/** + * TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". (Enum defined in SmtpSettings) + */ +export enum SslVersion { + TLSv1_1 = 'TLSv1_1', + SSLv23 = 'SSLv23', + TLSv1_2 = 'TLSv1_2', +} + /** * A list of action types the integration supports. Valid values are: "cell", "query", "dashboard". (Enum defined in Integration) */ diff --git a/packages/sdk/src/3.1/streams.ts b/packages/sdk/src/3.1/streams.ts index a75bfea80..4bf5bd735 100644 --- a/packages/sdk/src/3.1/streams.ts +++ b/packages/sdk/src/3.1/streams.ts @@ -25,7 +25,7 @@ */ /** - * 378 API methods + * 382 API methods */ import type { Readable } from 'readable-stream' @@ -111,6 +111,7 @@ import type { ILookmlTestResult, ILookWithQuery, IManifest, + IMaterializePDT, IMergeQuery, IModelSet, IOIDCConfig, @@ -171,6 +172,7 @@ import type { IRequestSearchUsersNames, IRequestSpaceChildren, IRequestSpaceChildrenSearch, + IRequestStartPdtBuild, IRequestTagRef, IRequestUserAttributeUserValues, IRequestUserRoles, @@ -181,6 +183,7 @@ import type { IScheduledPlan, ISession, ISessionConfig, + ISmtpSettings, ISpace, ISpaceBase, ISqlQuery, @@ -1936,6 +1939,33 @@ export class Looker31SDKStream extends APIMethods { ) } + /** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * POST /smtp_settings -> void + * + * @param callback streaming output function + * @param body Partial + * @param options one-time API call overrides + * + */ + async set_smtp_settings( + callback: (readable: Readable) => Promise, + body: Partial, + options?: Partial + ) { + return this.authStream( + callback, + 'POST', + '/smtp_settings', + null, + body, + options + ) + } + /** * ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). * @@ -3920,6 +3950,92 @@ export class Looker31SDKStream extends APIMethods { ) } + /** + * Enqueue materialization for a PDT with the given model name and view name + * + * GET /derived_table/{model_name}/{view_name}/start -> IMaterializePDT + * + * @param callback streaming output function + * @param request composed interface "IRequestStartPdtBuild" for complex method parameters + * @param options one-time API call overrides + * + */ + async start_pdt_build( + callback: (readable: Readable) => Promise, + request: IRequestStartPdtBuild, + options?: Partial + ) { + request.model_name = encodeParam(request.model_name) + request.view_name = encodeParam(request.view_name) + return this.authStream( + callback, + 'GET', + `/derived_table/${request.model_name}/${request.view_name}/start`, + { + force_rebuild: request.force_rebuild, + force_full_incremental: request.force_full_incremental, + workspace: request.workspace, + source: request.source, + }, + null, + options + ) + } + + /** + * Check status of PDT materialization + * + * GET /derived_table/{materialization_id}/status -> IMaterializePDT + * + * @param callback streaming output function + * @param materialization_id The materialization id to check status for. + * @param options one-time API call overrides + * + */ + async check_pdt_build( + callback: (readable: Readable) => Promise, + materialization_id: string, + options?: Partial + ) { + materialization_id = encodeParam(materialization_id) + return this.authStream( + callback, + 'GET', + `/derived_table/${materialization_id}/status`, + null, + null, + options + ) + } + + /** + * Stop a PDT materialization + * + * GET /derived_table/{materialization_id}/stop -> IMaterializePDT + * + * @param callback streaming output function + * @param materialization_id The materialization id to stop. + * @param source The source of this request. + * @param options one-time API call overrides + * + */ + async stop_pdt_build( + callback: (readable: Readable) => Promise, + materialization_id: string, + source?: string, + options?: Partial + ) { + materialization_id = encodeParam(materialization_id) + return this.authStream( + callback, + 'GET', + `/derived_table/${materialization_id}/stop`, + { source }, + null, + options + ) + } + //#endregion DerivedTable: View Derived Table graphs //#region Folder: Manage Folders diff --git a/packages/sdk/src/4.0/funcs.ts b/packages/sdk/src/4.0/funcs.ts index 7f7f95a11..5c23ef8d3 100644 --- a/packages/sdk/src/4.0/funcs.ts +++ b/packages/sdk/src/4.0/funcs.ts @@ -25,7 +25,7 @@ */ /** - * 437 API methods + * 443 API methods */ import type { @@ -99,6 +99,7 @@ import type { IDialectInfo, IDigestEmails, IDigestEmailSend, + IEgressIpAddresses, IEmbedParams, IEmbedSecret, IEmbedSsoParams, @@ -131,6 +132,7 @@ import type { ILookmlTestResult, ILookWithQuery, IManifest, + IMaterializePDT, IMergeQuery, IMobileSettings, IModel, @@ -202,6 +204,7 @@ import type { IRequestSearchUserLoginLockouts, IRequestSearchUsers, IRequestSearchUsersNames, + IRequestStartPdtBuild, IRequestTagRef, IRequestUserAttributeUserValues, IRequestUserRoles, @@ -217,6 +220,7 @@ import type { ISession, ISessionConfig, ISetting, + ISmtpSettings, ISmtpStatus, ISqlQuery, ISqlQueryCreate, @@ -259,6 +263,7 @@ import type { IWriteDashboardFilter, IWriteDashboardLayout, IWriteDashboardLayoutComponent, + IWriteDashboardLookml, IWriteDatagroup, IWriteDBConnection, IWriteEmbedSecret, @@ -2856,6 +2861,29 @@ export const create_digest_email_send = async ( ) } +/** + * ### Get Egress IP Addresses + * + * Returns the list of public egress IP Addresses for a hosted customer's instance + * + * GET /public_egress_ip_addresses -> IEgressIpAddresses + * + * @param sdk IAPIMethods implementation + * @param options one-time API call overrides + * + */ +export const public_egress_ip_addresses = async ( + sdk: IAPIMethods, + options?: Partial +): Promise> => { + return sdk.get( + '/public_egress_ip_addresses', + null, + null, + options + ) +} + /** * ### Set the menu item name and content for internal help resources * @@ -3120,6 +3148,31 @@ export const set_setting = async ( ) } +/** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * POST /smtp_settings -> void + * + * @param sdk IAPIMethods implementation + * @param body Partial + * @param options one-time API call overrides + * + */ +export const set_smtp_settings = async ( + sdk: IAPIMethods, + body: Partial, + options?: Partial +): Promise> => { + return sdk.post( + '/smtp_settings', + null, + body, + options + ) +} + /** * ### Get current SMTP status. * @@ -4740,6 +4793,38 @@ export const move_dashboard = async ( ) } +/** + * ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. + * + * This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. + * + * LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned + * from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with + * ). + * + * Note that the created dashboard is not linked to any LookML Dashboard, + * i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. + * + * POST /dashboards/from_lookml -> IDashboardLookml + * + * @param sdk IAPIMethods implementation + * @param body Partial + * @param options one-time API call overrides + * + */ +export const create_dashboard_from_lookml = async ( + sdk: IAPIMethods, + body: Partial, + options?: Partial +): Promise> => { + return sdk.post( + '/dashboards/from_lookml', + null, + body, + options + ) +} + /** * ### Copy an existing dashboard * @@ -5467,6 +5552,86 @@ export const graph_derived_tables_for_view = async ( ) } +/** + * Enqueue materialization for a PDT with the given model name and view name + * + * GET /derived_table/{model_name}/{view_name}/start -> IMaterializePDT + * + * @param sdk IAPIMethods implementation + * @param request composed interface "IRequestStartPdtBuild" for complex method parameters + * @param options one-time API call overrides + * + */ +export const start_pdt_build = async ( + sdk: IAPIMethods, + request: IRequestStartPdtBuild, + options?: Partial +): Promise> => { + request.model_name = encodeParam(request.model_name) + request.view_name = encodeParam(request.view_name) + return sdk.get( + `/derived_table/${request.model_name}/${request.view_name}/start`, + { + force_rebuild: request.force_rebuild, + force_full_incremental: request.force_full_incremental, + workspace: request.workspace, + source: request.source, + }, + null, + options + ) +} + +/** + * Check status of PDT materialization + * + * GET /derived_table/{materialization_id}/status -> IMaterializePDT + * + * @param sdk IAPIMethods implementation + * @param materialization_id The materialization id to check status for. + * @param options one-time API call overrides + * + */ +export const check_pdt_build = async ( + sdk: IAPIMethods, + materialization_id: string, + options?: Partial +): Promise> => { + materialization_id = encodeParam(materialization_id) + return sdk.get( + `/derived_table/${materialization_id}/status`, + null, + null, + options + ) +} + +/** + * Stop a PDT materialization + * + * GET /derived_table/{materialization_id}/stop -> IMaterializePDT + * + * @param sdk IAPIMethods implementation + * @param materialization_id The materialization id to stop. + * @param source The source of this request. + * @param options one-time API call overrides + * + */ +export const stop_pdt_build = async ( + sdk: IAPIMethods, + materialization_id: string, + source?: string, + options?: Partial +): Promise> => { + materialization_id = encodeParam(materialization_id) + return sdk.get( + `/derived_table/${materialization_id}/stop`, + { source }, + null, + options + ) +} + //#endregion DerivedTable: View Derived Table graphs //#region Folder: Manage Folders diff --git a/packages/sdk/src/4.0/methods.ts b/packages/sdk/src/4.0/methods.ts index 8ba7ac9bf..3a563d856 100644 --- a/packages/sdk/src/4.0/methods.ts +++ b/packages/sdk/src/4.0/methods.ts @@ -25,7 +25,7 @@ */ /** - * 437 API methods + * 443 API methods */ import type { @@ -97,6 +97,7 @@ import type { IDialectInfo, IDigestEmails, IDigestEmailSend, + IEgressIpAddresses, IEmbedParams, IEmbedSecret, IEmbedSsoParams, @@ -129,6 +130,7 @@ import type { ILookmlTestResult, ILookWithQuery, IManifest, + IMaterializePDT, IMergeQuery, IMobileSettings, IModel, @@ -200,6 +202,7 @@ import type { IRequestSearchUserLoginLockouts, IRequestSearchUsers, IRequestSearchUsersNames, + IRequestStartPdtBuild, IRequestTagRef, IRequestUserAttributeUserValues, IRequestUserRoles, @@ -215,6 +218,7 @@ import type { ISession, ISessionConfig, ISetting, + ISmtpSettings, ISmtpStatus, ISqlQuery, ISqlQueryCreate, @@ -257,6 +261,7 @@ import type { IWriteDashboardFilter, IWriteDashboardLayout, IWriteDashboardLayoutComponent, + IWriteDashboardLookml, IWriteDatagroup, IWriteDBConnection, IWriteEmbedSecret, @@ -2685,6 +2690,27 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { ) } + /** + * ### Get Egress IP Addresses + * + * Returns the list of public egress IP Addresses for a hosted customer's instance + * + * GET /public_egress_ip_addresses -> IEgressIpAddresses + * + * @param options one-time API call overrides + * + */ + async public_egress_ip_addresses( + options?: Partial + ): Promise> { + return this.get( + '/public_egress_ip_addresses', + null, + null, + options + ) + } + /** * ### Set the menu item name and content for internal help resources * @@ -2927,6 +2953,29 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { ) } + /** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * POST /smtp_settings -> void + * + * @param body Partial + * @param options one-time API call overrides + * + */ + async set_smtp_settings( + body: Partial, + options?: Partial + ): Promise> { + return this.post( + '/smtp_settings', + null, + body, + options + ) + } + /** * ### Get current SMTP status. * @@ -4441,6 +4490,36 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { ) } + /** + * ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. + * + * This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. + * + * LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned + * from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with + * ). + * + * Note that the created dashboard is not linked to any LookML Dashboard, + * i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. + * + * POST /dashboards/from_lookml -> IDashboardLookml + * + * @param body Partial + * @param options one-time API call overrides + * + */ + async create_dashboard_from_lookml( + body: Partial, + options?: Partial + ): Promise> { + return this.post( + '/dashboards/from_lookml', + null, + body, + options + ) + } + /** * ### Copy an existing dashboard * @@ -5114,6 +5193,80 @@ export class Looker40SDK extends APIMethods implements ILooker40SDK { ) } + /** + * Enqueue materialization for a PDT with the given model name and view name + * + * GET /derived_table/{model_name}/{view_name}/start -> IMaterializePDT + * + * @param request composed interface "IRequestStartPdtBuild" for complex method parameters + * @param options one-time API call overrides + * + */ + async start_pdt_build( + request: IRequestStartPdtBuild, + options?: Partial + ): Promise> { + request.model_name = encodeParam(request.model_name) + request.view_name = encodeParam(request.view_name) + return this.get( + `/derived_table/${request.model_name}/${request.view_name}/start`, + { + force_rebuild: request.force_rebuild, + force_full_incremental: request.force_full_incremental, + workspace: request.workspace, + source: request.source, + }, + null, + options + ) + } + + /** + * Check status of PDT materialization + * + * GET /derived_table/{materialization_id}/status -> IMaterializePDT + * + * @param materialization_id The materialization id to check status for. + * @param options one-time API call overrides + * + */ + async check_pdt_build( + materialization_id: string, + options?: Partial + ): Promise> { + materialization_id = encodeParam(materialization_id) + return this.get( + `/derived_table/${materialization_id}/status`, + null, + null, + options + ) + } + + /** + * Stop a PDT materialization + * + * GET /derived_table/{materialization_id}/stop -> IMaterializePDT + * + * @param materialization_id The materialization id to stop. + * @param source The source of this request. + * @param options one-time API call overrides + * + */ + async stop_pdt_build( + materialization_id: string, + source?: string, + options?: Partial + ): Promise> { + materialization_id = encodeParam(materialization_id) + return this.get( + `/derived_table/${materialization_id}/stop`, + { source }, + null, + options + ) + } + //#endregion DerivedTable: View Derived Table graphs //#region Folder: Manage Folders diff --git a/packages/sdk/src/4.0/methodsInterface.ts b/packages/sdk/src/4.0/methodsInterface.ts index 30f24edcb..0c3e743ff 100644 --- a/packages/sdk/src/4.0/methodsInterface.ts +++ b/packages/sdk/src/4.0/methodsInterface.ts @@ -25,7 +25,7 @@ */ /** - * 437 API methods + * 443 API methods */ import type { @@ -94,6 +94,7 @@ import type { IDialectInfo, IDigestEmails, IDigestEmailSend, + IEgressIpAddresses, IEmbedParams, IEmbedSecret, IEmbedSsoParams, @@ -126,6 +127,7 @@ import type { ILookmlTestResult, ILookWithQuery, IManifest, + IMaterializePDT, IMergeQuery, IMobileSettings, IModel, @@ -197,6 +199,7 @@ import type { IRequestSearchUserLoginLockouts, IRequestSearchUsers, IRequestSearchUsersNames, + IRequestStartPdtBuild, IRequestTagRef, IRequestUserAttributeUserValues, IRequestUserRoles, @@ -212,6 +215,7 @@ import type { ISession, ISessionConfig, ISetting, + ISmtpSettings, ISmtpStatus, ISqlQuery, ISqlQueryCreate, @@ -254,6 +258,7 @@ import type { IWriteDashboardFilter, IWriteDashboardLayout, IWriteDashboardLayoutComponent, + IWriteDashboardLookml, IWriteDatagroup, IWriteDBConnection, IWriteEmbedSecret, @@ -2011,6 +2016,20 @@ export interface ILooker40SDK extends IAPIMethods { options?: Partial ): Promise> + /** + * ### Get Egress IP Addresses + * + * Returns the list of public egress IP Addresses for a hosted customer's instance + * + * GET /public_egress_ip_addresses -> IEgressIpAddresses + * + * @param options one-time API call overrides + * + */ + public_egress_ip_addresses( + options?: Partial + ): Promise> + /** * ### Set the menu item name and content for internal help resources * @@ -2179,6 +2198,22 @@ export interface ILooker40SDK extends IAPIMethods { options?: Partial ): Promise> + /** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * POST /smtp_settings -> void + * + * @param body Partial + * @param options one-time API call overrides + * + */ + set_smtp_settings( + body: Partial, + options?: Partial + ): Promise> + /** * ### Get current SMTP status. * @@ -3221,6 +3256,29 @@ export interface ILooker40SDK extends IAPIMethods { options?: Partial ): Promise> + /** + * ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. + * + * This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. + * + * LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned + * from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with + * ). + * + * Note that the created dashboard is not linked to any LookML Dashboard, + * i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. + * + * POST /dashboards/from_lookml -> IDashboardLookml + * + * @param body Partial + * @param options one-time API call overrides + * + */ + create_dashboard_from_lookml( + body: Partial, + options?: Partial + ): Promise> + /** * ### Copy an existing dashboard * @@ -3682,6 +3740,50 @@ export interface ILooker40SDK extends IAPIMethods { options?: Partial ): Promise> + /** + * Enqueue materialization for a PDT with the given model name and view name + * + * GET /derived_table/{model_name}/{view_name}/start -> IMaterializePDT + * + * @param request composed interface "IRequestStartPdtBuild" for complex method parameters + * @param options one-time API call overrides + * + */ + start_pdt_build( + request: IRequestStartPdtBuild, + options?: Partial + ): Promise> + + /** + * Check status of PDT materialization + * + * GET /derived_table/{materialization_id}/status -> IMaterializePDT + * + * @param materialization_id The materialization id to check status for. + * @param options one-time API call overrides + * + */ + check_pdt_build( + materialization_id: string, + options?: Partial + ): Promise> + + /** + * Stop a PDT materialization + * + * GET /derived_table/{materialization_id}/stop -> IMaterializePDT + * + * @param materialization_id The materialization id to stop. + * @param source The source of this request. + * @param options one-time API call overrides + * + */ + stop_pdt_build( + materialization_id: string, + source?: string, + options?: Partial + ): Promise> + //#endregion DerivedTable: View Derived Table graphs //#region Folder: Manage Folders diff --git a/packages/sdk/src/4.0/models.ts b/packages/sdk/src/4.0/models.ts index dc4c8efc8..4d00a50c1 100644 --- a/packages/sdk/src/4.0/models.ts +++ b/packages/sdk/src/4.0/models.ts @@ -25,7 +25,7 @@ */ /** - * 362 API models: 229 Spec, 55 Request, 58 Write, 20 Enum + * 368 API models: 232 Spec, 56 Request, 59 Write, 21 Enum */ import type { IDictionary, DelimArray } from '@looker/sdk-rtl' @@ -2305,7 +2305,11 @@ export interface IDashboardLookml { */ dashboard_id?: string | null /** - * lookml of UDD (read-only) + * (Write-Only) Id of the folder + */ + folder_id?: string | null + /** + * lookml of UDD */ lookml?: string | null } @@ -2616,6 +2620,14 @@ export interface IDBConnection { * When true, error PDTs will be retried every regenerator cycle */ always_retry_failed_builds?: boolean | null + /** + * When true, query cost estimate will be displayed in explore. + */ + cost_estimate_enabled?: boolean | null + /** + * PDT builds on this connection can be kicked off and cancelled via API. + */ + pdt_api_control_enabled?: boolean | null } export interface IDBConnectionBase { @@ -2919,6 +2931,13 @@ export interface IDiscretePalette { colors?: string[] } +export interface IEgressIpAddresses { + /** + * Egress IP addresses (read-only) + */ + egress_ip_addresses?: string[] | null +} + export interface IEmbedParams { /** * The complete URL of the Looker UI page to display in the embed context. For example, to display the dashboard with id 34, `target_url` would look like: `https://mycompany.looker.com:9999/dashboards/34`. `target_uri` MUST contain a scheme (HTTPS), domain name, and URL path. Port must be included if it is required to reach the Looker server from browser clients. If the Looker instance is behind a load balancer or other proxy, `target_uri` must be the public-facing domain name and port required to reach the Looker instance, not the actual internal network machine name of the Looker instance. @@ -5496,6 +5515,17 @@ export interface IManifest { localization_settings?: ILocalizationSettings } +export interface IMaterializePDT { + /** + * The ID of the enqueued materialization task (read-only) + */ + materialization_id?: string + /** + * Detailed response in text format (read-only) + */ + resp_text?: string | null +} + export interface IMergeFields { /** * Field name to map onto in the merged results @@ -8375,6 +8405,36 @@ export interface IRequestSearchUsersNames { is_disabled?: boolean | null } +/** + * Dynamically generated request type for start_pdt_build + */ +export interface IRequestStartPdtBuild { + /** + * The model of the PDT to start building. + */ + model_name: string + /** + * The view name of the PDT to start building. + */ + view_name: string + /** + * Force rebuild of required dependent PDTs, even if they are already materialized. + */ + force_rebuild?: string | null + /** + * Force involved incremental PDTs to fully re-materialize. + */ + force_full_incremental?: string | null + /** + * Workspace in which to materialize selected PDT ('dev' or default 'production'). + */ + workspace?: string | null + /** + * The source of this request. + */ + source?: string | null +} + /** * Dynamically generated request type for tag_ref */ @@ -9346,6 +9406,37 @@ export interface ISmtpNodeStatus { hostname?: string | null } +export interface ISmtpSettings { + /** + * SMTP Server url + */ + address?: string + /** + * From e-mail address + */ + from?: string + /** + * User name + */ + user_name?: string + /** + * Password + */ + password?: string + /** + * SMTP Server's port + */ + port?: number + /** + * Is TLS encryption enabled? + */ + enable_starttls_auto?: boolean + /** + * TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". + */ + ssl_version?: SslVersion | null +} + export interface ISmtpStatus { /** * Overall SMTP status of cluster (read-only) @@ -9545,6 +9636,15 @@ export interface ISshTunnel { status?: string } +/** + * TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". (Enum defined in SmtpSettings) + */ +export enum SslVersion { + TLSv1_1 = 'TLSv1_1', + SSLv23 = 'SSLv23', + TLSv1_2 = 'TLSv1_2', +} + export interface ISupportAccessAddEntries { /** * An array of emails to add to the Allowlist @@ -10966,6 +11066,21 @@ export interface IWriteDashboardLayoutComponent { height?: number | null } +/** + * Dynamic writeable type for DashboardLookml removes: + * dashboard_id + */ +export interface IWriteDashboardLookml { + /** + * (Write-Only) Id of the folder + */ + folder_id?: string | null + /** + * lookml of UDD + */ + lookml?: string | null +} + /** * Dynamic writeable type for Datagroup removes: * can, created_at, id, model_name, name, trigger_check_at, trigger_error, trigger_value @@ -11111,6 +11226,14 @@ export interface IWriteDBConnection { * When true, error PDTs will be retried every regenerator cycle */ always_retry_failed_builds?: boolean | null + /** + * When true, query cost estimate will be displayed in explore. + */ + cost_estimate_enabled?: boolean | null + /** + * PDT builds on this connection can be kicked off and cancelled via API. + */ + pdt_api_control_enabled?: boolean | null } /** diff --git a/packages/sdk/src/4.0/streams.ts b/packages/sdk/src/4.0/streams.ts index 0766de46f..878e5acea 100644 --- a/packages/sdk/src/4.0/streams.ts +++ b/packages/sdk/src/4.0/streams.ts @@ -25,7 +25,7 @@ */ /** - * 437 API methods + * 443 API methods */ import type { Readable } from 'readable-stream' @@ -97,6 +97,7 @@ import type { IDialectInfo, IDigestEmails, IDigestEmailSend, + IEgressIpAddresses, IEmbedParams, IEmbedSecret, IEmbedSsoParams, @@ -128,6 +129,7 @@ import type { ILookmlTestResult, ILookWithQuery, IManifest, + IMaterializePDT, IMergeQuery, IMobileSettings, IModel, @@ -199,6 +201,7 @@ import type { IRequestSearchUserLoginLockouts, IRequestSearchUsers, IRequestSearchUsersNames, + IRequestStartPdtBuild, IRequestTagRef, IRequestUserAttributeUserValues, IRequestUserRoles, @@ -214,6 +217,7 @@ import type { ISession, ISessionConfig, ISetting, + ISmtpSettings, ISmtpStatus, ISqlQuery, ISqlQueryCreate, @@ -256,6 +260,7 @@ import type { IWriteDashboardFilter, IWriteDashboardLayout, IWriteDashboardLayoutComponent, + IWriteDashboardLookml, IWriteDatagroup, IWriteDBConnection, IWriteEmbedSecret, @@ -3081,6 +3086,31 @@ export class Looker40SDKStream extends APIMethods { ) } + /** + * ### Get Egress IP Addresses + * + * Returns the list of public egress IP Addresses for a hosted customer's instance + * + * GET /public_egress_ip_addresses -> IEgressIpAddresses + * + * @param callback streaming output function + * @param options one-time API call overrides + * + */ + async public_egress_ip_addresses( + callback: (readable: Readable) => Promise, + options?: Partial + ) { + return this.authStream( + callback, + 'GET', + '/public_egress_ip_addresses', + null, + null, + options + ) + } + /** * ### Set the menu item name and content for internal help resources * @@ -3370,6 +3400,33 @@ export class Looker40SDKStream extends APIMethods { ) } + /** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * POST /smtp_settings -> void + * + * @param callback streaming output function + * @param body Partial + * @param options one-time API call overrides + * + */ + async set_smtp_settings( + callback: (readable: Readable) => Promise, + body: Partial, + options?: Partial + ) { + return this.authStream( + callback, + 'POST', + '/smtp_settings', + null, + body, + options + ) + } + /** * ### Get current SMTP status. * @@ -5117,6 +5174,40 @@ export class Looker40SDKStream extends APIMethods { ) } + /** + * ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. + * + * This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. + * + * LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned + * from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with + * ). + * + * Note that the created dashboard is not linked to any LookML Dashboard, + * i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. + * + * POST /dashboards/from_lookml -> IDashboardLookml + * + * @param callback streaming output function + * @param body Partial + * @param options one-time API call overrides + * + */ + async create_dashboard_from_lookml( + callback: (readable: Readable) => Promise, + body: Partial, + options?: Partial + ) { + return this.authStream( + callback, + 'POST', + '/dashboards/from_lookml', + null, + body, + options + ) + } + /** * ### Copy an existing dashboard * @@ -5901,6 +5992,92 @@ export class Looker40SDKStream extends APIMethods { ) } + /** + * Enqueue materialization for a PDT with the given model name and view name + * + * GET /derived_table/{model_name}/{view_name}/start -> IMaterializePDT + * + * @param callback streaming output function + * @param request composed interface "IRequestStartPdtBuild" for complex method parameters + * @param options one-time API call overrides + * + */ + async start_pdt_build( + callback: (readable: Readable) => Promise, + request: IRequestStartPdtBuild, + options?: Partial + ) { + request.model_name = encodeParam(request.model_name) + request.view_name = encodeParam(request.view_name) + return this.authStream( + callback, + 'GET', + `/derived_table/${request.model_name}/${request.view_name}/start`, + { + force_rebuild: request.force_rebuild, + force_full_incremental: request.force_full_incremental, + workspace: request.workspace, + source: request.source, + }, + null, + options + ) + } + + /** + * Check status of PDT materialization + * + * GET /derived_table/{materialization_id}/status -> IMaterializePDT + * + * @param callback streaming output function + * @param materialization_id The materialization id to check status for. + * @param options one-time API call overrides + * + */ + async check_pdt_build( + callback: (readable: Readable) => Promise, + materialization_id: string, + options?: Partial + ) { + materialization_id = encodeParam(materialization_id) + return this.authStream( + callback, + 'GET', + `/derived_table/${materialization_id}/status`, + null, + null, + options + ) + } + + /** + * Stop a PDT materialization + * + * GET /derived_table/{materialization_id}/stop -> IMaterializePDT + * + * @param callback streaming output function + * @param materialization_id The materialization id to stop. + * @param source The source of this request. + * @param options one-time API call overrides + * + */ + async stop_pdt_build( + callback: (readable: Readable) => Promise, + materialization_id: string, + source?: string, + options?: Partial + ) { + materialization_id = encodeParam(materialization_id) + return this.authStream( + callback, + 'GET', + `/derived_table/${materialization_id}/stop`, + { source }, + null, + options + ) + } + //#endregion DerivedTable: View Derived Table graphs //#region Folder: Manage Folders diff --git a/packages/sdk/src/constants.ts b/packages/sdk/src/constants.ts index a6b4008c2..21d93efe3 100644 --- a/packages/sdk/src/constants.ts +++ b/packages/sdk/src/constants.ts @@ -24,5 +24,5 @@ */ -export const sdkVersion = '22.0' +export const sdkVersion = '22.2' export const environmentPrefix = 'LOOKERSDK' diff --git a/python/looker_sdk/sdk/api31/methods.py b/python/looker_sdk/sdk/api31/methods.py index 1dc0fab0d..94224edbd 100644 --- a/python/looker_sdk/sdk/api31/methods.py +++ b/python/looker_sdk/sdk/api31/methods.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 378 API methods +# 382 API methods # NOTE: Do not edit this file generated by Looker SDK Codegen for API 3.1 @@ -1456,6 +1456,28 @@ def all_locales( ) return response + # ### Configure SMTP Settings + # This API allows users to configure the SMTP settings on the Looker instance. + # This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + # + # POST /smtp_settings -> None + def set_smtp_settings( + self, + body: mdls.SmtpSettings, + transport_options: Optional[transport.TransportOptions] = None, + ) -> None: + """Set SMTP Setting""" + response = cast( + None, + self.post( + path="/smtp_settings", + structure=None, + body=body, + transport_options=transport_options, + ), + ) + return response + # ### Get a list of timezones that Looker supports (e.g. useful for scheduling tasks). # # GET /timezones -> Sequence[mdls.Timezone] @@ -3272,6 +3294,89 @@ def graph_derived_tables_for_view( ) return response + # Enqueue materialization for a PDT with the given model name and view name + # + # GET /derived_table/{model_name}/{view_name}/start -> mdls.MaterializePDT + def start_pdt_build( + self, + # The model of the PDT to start building. + model_name: str, + # The view name of the PDT to start building. + view_name: str, + # Force rebuild of required dependent PDTs, even if they are already materialized. + force_rebuild: Optional[str] = None, + # Force involved incremental PDTs to fully re-materialize. + force_full_incremental: Optional[str] = None, + # Workspace in which to materialize selected PDT ('dev' or default 'production'). + workspace: Optional[str] = None, + # The source of this request. + source: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.MaterializePDT: + """Start a PDT materialization""" + model_name = self.encode_path_param(model_name) + view_name = self.encode_path_param(view_name) + response = cast( + mdls.MaterializePDT, + self.get( + path=f"/derived_table/{model_name}/{view_name}/start", + structure=mdls.MaterializePDT, + query_params={ + "force_rebuild": force_rebuild, + "force_full_incremental": force_full_incremental, + "workspace": workspace, + "source": source, + }, + transport_options=transport_options, + ), + ) + return response + + # Check status of PDT materialization + # + # GET /derived_table/{materialization_id}/status -> mdls.MaterializePDT + def check_pdt_build( + self, + # The materialization id to check status for. + materialization_id: str, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.MaterializePDT: + """Check status of a PDT materialization""" + materialization_id = self.encode_path_param(materialization_id) + response = cast( + mdls.MaterializePDT, + self.get( + path=f"/derived_table/{materialization_id}/status", + structure=mdls.MaterializePDT, + transport_options=transport_options, + ), + ) + return response + + # Stop a PDT materialization + # + # GET /derived_table/{materialization_id}/stop -> mdls.MaterializePDT + def stop_pdt_build( + self, + # The materialization id to stop. + materialization_id: str, + # The source of this request. + source: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.MaterializePDT: + """Stop a PDT materialization""" + materialization_id = self.encode_path_param(materialization_id) + response = cast( + mdls.MaterializePDT, + self.get( + path=f"/derived_table/{materialization_id}/stop", + structure=mdls.MaterializePDT, + query_params={"source": source}, + transport_options=transport_options, + ), + ) + return response + # endregion # region Folder: Manage Folders diff --git a/python/looker_sdk/sdk/api31/models.py b/python/looker_sdk/sdk/api31/models.py index af540e778..91459172d 100644 --- a/python/looker_sdk/sdk/api31/models.py +++ b/python/looker_sdk/sdk/api31/models.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 255 API models: 188 Spec, 0 Request, 51 Write, 16 Enum +# 258 API models: 190 Spec, 0 Request, 51 Write, 17 Enum # NOTE: Do not edit this file generated by Looker SDK Codegen for API 3.1 @@ -2261,16 +2261,23 @@ class DashboardLookml(model.Model): """ Attributes: dashboard_id: Id of Dashboard + folder_id: (Write-Only) Id of the folder lookml: lookml of UDD """ dashboard_id: Optional[str] = None + folder_id: Optional[str] = None lookml: Optional[str] = None def __init__( - self, *, dashboard_id: Optional[str] = None, lookml: Optional[str] = None + self, + *, + dashboard_id: Optional[str] = None, + folder_id: Optional[str] = None, + lookml: Optional[str] = None ): self.dashboard_id = dashboard_id + self.folder_id = folder_id self.lookml = lookml @@ -6135,6 +6142,27 @@ def __init__( self.localization_settings = localization_settings +@attr.s(auto_attribs=True, init=False) +class MaterializePDT(model.Model): + """ + Attributes: + materialization_id: The ID of the enqueued materialization task + resp_text: Detailed response in text format + """ + + materialization_id: Optional[str] = None + resp_text: Optional[str] = None + + def __init__( + self, + *, + materialization_id: Optional[str] = None, + resp_text: Optional[str] = None + ): + self.materialization_id = materialization_id + self.resp_text = resp_text + + @attr.s(auto_attribs=True, init=False) class MergeFields(model.Model): """ @@ -8278,6 +8306,47 @@ def __init__( self.track_session_location = track_session_location +@attr.s(auto_attribs=True, init=False) +class SmtpSettings(model.Model): + """ + Attributes: + address: SMTP Server url + from_: From e-mail address + user_name: User name + password: Password + port: SMTP Server's port + enable_starttls_auto: Is TLS encryption enabled? + ssl_version: TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". + """ + + address: Optional[str] = None + from_: Optional[str] = None + user_name: Optional[str] = None + password: Optional[str] = None + port: Optional[int] = None + enable_starttls_auto: Optional[bool] = None + ssl_version: Optional["SslVersion"] = None + + def __init__( + self, + *, + address: Optional[str] = None, + from_: Optional[str] = None, + user_name: Optional[str] = None, + password: Optional[str] = None, + port: Optional[int] = None, + enable_starttls_auto: Optional[bool] = None, + ssl_version: Optional["SslVersion"] = None + ): + self.address = address + self.from_ = from_ + self.user_name = user_name + self.password = password + self.port = port + self.enable_starttls_auto = enable_starttls_auto + self.ssl_version = ssl_version + + @attr.s(auto_attribs=True, init=False) class Snippet(model.Model): """ @@ -8571,6 +8640,22 @@ def __init__( self.vis_config = vis_config +class SslVersion(enum.Enum): + """ + TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". (Enum defined in SmtpSettings) + + """ + + TLSv1_1 = "TLSv1_1" + SSLv23 = "SSLv23" + TLSv1_2 = "TLSv1_2" + invalid_api_enum_value = "invalid_api_enum_value" + + +# https://github.com/python/mypy/issues/2427 +SslVersion.__new__ = model.safe_enum__new__ # type: ignore + + class SupportedActionTypes(enum.Enum): """ A list of action types the integration supports. Valid values are: "cell", "query", "dashboard". (Enum defined in Integration) @@ -12468,6 +12553,10 @@ def __init__( ForwardRef("Manifest"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter31.register_structure_hook( + ForwardRef("MaterializePDT"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter31.register_structure_hook( ForwardRef("MergeFields"), # type: ignore forward_ref_structure_hook, # type:ignore @@ -12636,6 +12725,14 @@ def __init__( ForwardRef("SessionConfig"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter31.register_structure_hook( + ForwardRef("SmtpSettings"), # type: ignore + forward_ref_structure_hook, # type:ignore +) +sr.converter31.register_structure_hook( + SmtpSettings, # type: ignore + translate_keys_structure_hook, # type:ignore +) sr.converter31.register_structure_hook( ForwardRef("Snippet"), # type: ignore forward_ref_structure_hook, # type:ignore @@ -12656,6 +12753,10 @@ def __init__( ForwardRef("SqlQueryCreate"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter31.register_structure_hook( + ForwardRef("SslVersion"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter31.register_structure_hook( ForwardRef("SupportedActionTypes"), # type: ignore forward_ref_structure_hook, # type:ignore diff --git a/python/looker_sdk/sdk/api40/methods.py b/python/looker_sdk/sdk/api40/methods.py index 0895eda02..f9ab53c90 100644 --- a/python/looker_sdk/sdk/api40/methods.py +++ b/python/looker_sdk/sdk/api40/methods.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 437 API methods +# 443 API methods # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -2458,6 +2458,26 @@ def create_digest_email_send( ) return response + # ### Get Egress IP Addresses + # + # Returns the list of public egress IP Addresses for a hosted customer's instance + # + # GET /public_egress_ip_addresses -> mdls.EgressIpAddresses + def public_egress_ip_addresses( + self, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.EgressIpAddresses: + """Public Egress IP Addresses""" + response = cast( + mdls.EgressIpAddresses, + self.get( + path="/public_egress_ip_addresses", + structure=mdls.EgressIpAddresses, + transport_options=transport_options, + ), + ) + return response + # ### Set the menu item name and content for internal help resources # # GET /internal_help_resources_content -> mdls.InternalHelpResourcesContent @@ -2694,6 +2714,28 @@ def set_setting( ) return response + # ### Configure SMTP Settings + # This API allows users to configure the SMTP settings on the Looker instance. + # This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + # + # POST /smtp_settings -> None + def set_smtp_settings( + self, + body: mdls.SmtpSettings, + transport_options: Optional[transport.TransportOptions] = None, + ) -> None: + """Set SMTP Setting""" + response = cast( + None, + self.post( + path="/smtp_settings", + structure=None, + body=body, + transport_options=transport_options, + ), + ) + return response + # ### Get current SMTP status. # # GET /smtp_status -> mdls.SmtpStatus @@ -4269,6 +4311,35 @@ def move_dashboard( ) return response + # ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. + # + # This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. + # + # LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned + # from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with + # ). + # + # Note that the created dashboard is not linked to any LookML Dashboard, + # i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. + # + # POST /dashboards/from_lookml -> mdls.DashboardLookml + def create_dashboard_from_lookml( + self, + body: mdls.WriteDashboardLookml, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.DashboardLookml: + """Create Dashboard from LookML""" + response = cast( + mdls.DashboardLookml, + self.post( + path="/dashboards/from_lookml", + structure=mdls.DashboardLookml, + body=body, + transport_options=transport_options, + ), + ) + return response + # ### Copy an existing dashboard # # Creates a copy of an existing dashboard, in a specified folder, and returns the copied dashboard. @@ -4961,6 +5032,89 @@ def graph_derived_tables_for_view( ) return response + # Enqueue materialization for a PDT with the given model name and view name + # + # GET /derived_table/{model_name}/{view_name}/start -> mdls.MaterializePDT + def start_pdt_build( + self, + # The model of the PDT to start building. + model_name: str, + # The view name of the PDT to start building. + view_name: str, + # Force rebuild of required dependent PDTs, even if they are already materialized. + force_rebuild: Optional[str] = None, + # Force involved incremental PDTs to fully re-materialize. + force_full_incremental: Optional[str] = None, + # Workspace in which to materialize selected PDT ('dev' or default 'production'). + workspace: Optional[str] = None, + # The source of this request. + source: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.MaterializePDT: + """Start a PDT materialization""" + model_name = self.encode_path_param(model_name) + view_name = self.encode_path_param(view_name) + response = cast( + mdls.MaterializePDT, + self.get( + path=f"/derived_table/{model_name}/{view_name}/start", + structure=mdls.MaterializePDT, + query_params={ + "force_rebuild": force_rebuild, + "force_full_incremental": force_full_incremental, + "workspace": workspace, + "source": source, + }, + transport_options=transport_options, + ), + ) + return response + + # Check status of PDT materialization + # + # GET /derived_table/{materialization_id}/status -> mdls.MaterializePDT + def check_pdt_build( + self, + # The materialization id to check status for. + materialization_id: str, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.MaterializePDT: + """Check status of a PDT materialization""" + materialization_id = self.encode_path_param(materialization_id) + response = cast( + mdls.MaterializePDT, + self.get( + path=f"/derived_table/{materialization_id}/status", + structure=mdls.MaterializePDT, + transport_options=transport_options, + ), + ) + return response + + # Stop a PDT materialization + # + # GET /derived_table/{materialization_id}/stop -> mdls.MaterializePDT + def stop_pdt_build( + self, + # The materialization id to stop. + materialization_id: str, + # The source of this request. + source: Optional[str] = None, + transport_options: Optional[transport.TransportOptions] = None, + ) -> mdls.MaterializePDT: + """Stop a PDT materialization""" + materialization_id = self.encode_path_param(materialization_id) + response = cast( + mdls.MaterializePDT, + self.get( + path=f"/derived_table/{materialization_id}/stop", + structure=mdls.MaterializePDT, + query_params={"source": source}, + transport_options=transport_options, + ), + ) + return response + # endregion # region Folder: Manage Folders diff --git a/python/looker_sdk/sdk/api40/models.py b/python/looker_sdk/sdk/api40/models.py index 404e14ad7..a1cc3f964 100644 --- a/python/looker_sdk/sdk/api40/models.py +++ b/python/looker_sdk/sdk/api40/models.py @@ -21,7 +21,7 @@ # SOFTWARE. # -# 307 API models: 229 Spec, 0 Request, 58 Write, 20 Enum +# 312 API models: 232 Spec, 0 Request, 59 Write, 21 Enum # NOTE: Do not edit this file generated by Looker SDK Codegen for API 4.0 @@ -3094,16 +3094,23 @@ class DashboardLookml(model.Model): """ Attributes: dashboard_id: Id of Dashboard + folder_id: (Write-Only) Id of the folder lookml: lookml of UDD """ dashboard_id: Optional[str] = None + folder_id: Optional[str] = None lookml: Optional[str] = None def __init__( - self, *, dashboard_id: Optional[str] = None, lookml: Optional[str] = None + self, + *, + dashboard_id: Optional[str] = None, + folder_id: Optional[str] = None, + lookml: Optional[str] = None ): self.dashboard_id = dashboard_id + self.folder_id = folder_id self.lookml = lookml @@ -3364,6 +3371,8 @@ class DBConnection(model.Model): disable_context_comment: When disable_context_comment is true comment will not be added to SQL oauth_application_id: An External OAuth Application to use for authenticating to the database always_retry_failed_builds: When true, error PDTs will be retried every regenerator cycle + cost_estimate_enabled: When true, query cost estimate will be displayed in explore. + pdt_api_control_enabled: PDT builds on this connection can be kicked off and cancelled via API. """ can: Optional[MutableMapping[str, bool]] = None @@ -3408,6 +3417,8 @@ class DBConnection(model.Model): disable_context_comment: Optional[bool] = None oauth_application_id: Optional[int] = None always_retry_failed_builds: Optional[bool] = None + cost_estimate_enabled: Optional[bool] = None + pdt_api_control_enabled: Optional[bool] = None def __init__( self, @@ -3453,7 +3464,9 @@ def __init__( pdt_concurrency: Optional[int] = None, disable_context_comment: Optional[bool] = None, oauth_application_id: Optional[int] = None, - always_retry_failed_builds: Optional[bool] = None + always_retry_failed_builds: Optional[bool] = None, + cost_estimate_enabled: Optional[bool] = None, + pdt_api_control_enabled: Optional[bool] = None ): self.can = can self.name = name @@ -3497,6 +3510,8 @@ def __init__( self.disable_context_comment = disable_context_comment self.oauth_application_id = oauth_application_id self.always_retry_failed_builds = always_retry_failed_builds + self.cost_estimate_enabled = cost_estimate_enabled + self.pdt_api_control_enabled = pdt_api_control_enabled @attr.s(auto_attribs=True, init=False) @@ -3920,6 +3935,19 @@ def __init__( self.colors = colors +@attr.s(auto_attribs=True, init=False) +class EgressIpAddresses(model.Model): + """ + Attributes: + egress_ip_addresses: Egress IP addresses + """ + + egress_ip_addresses: Optional[Sequence[str]] = None + + def __init__(self, *, egress_ip_addresses: Optional[Sequence[str]] = None): + self.egress_ip_addresses = egress_ip_addresses + + @attr.s(auto_attribs=True, init=False) class EmbedParams(model.Model): """ @@ -7149,6 +7177,27 @@ def __init__( self.localization_settings = localization_settings +@attr.s(auto_attribs=True, init=False) +class MaterializePDT(model.Model): + """ + Attributes: + materialization_id: The ID of the enqueued materialization task + resp_text: Detailed response in text format + """ + + materialization_id: Optional[str] = None + resp_text: Optional[str] = None + + def __init__( + self, + *, + materialization_id: Optional[str] = None, + resp_text: Optional[str] = None + ): + self.materialization_id = materialization_id + self.resp_text = resp_text + + @attr.s(auto_attribs=True, init=False) class MergeFields(model.Model): """ @@ -9718,6 +9767,47 @@ def __init__( self.hostname = hostname +@attr.s(auto_attribs=True, init=False) +class SmtpSettings(model.Model): + """ + Attributes: + address: SMTP Server url + from_: From e-mail address + user_name: User name + password: Password + port: SMTP Server's port + enable_starttls_auto: Is TLS encryption enabled? + ssl_version: TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". + """ + + address: Optional[str] = None + from_: Optional[str] = None + user_name: Optional[str] = None + password: Optional[str] = None + port: Optional[int] = None + enable_starttls_auto: Optional[bool] = None + ssl_version: Optional["SslVersion"] = None + + def __init__( + self, + *, + address: Optional[str] = None, + from_: Optional[str] = None, + user_name: Optional[str] = None, + password: Optional[str] = None, + port: Optional[int] = None, + enable_starttls_auto: Optional[bool] = None, + ssl_version: Optional["SslVersion"] = None + ): + self.address = address + self.from_ = from_ + self.user_name = user_name + self.password = password + self.port = port + self.enable_starttls_auto = enable_starttls_auto + self.ssl_version = ssl_version + + @attr.s(auto_attribs=True, init=False) class SmtpStatus(model.Model): """ @@ -9989,6 +10079,22 @@ def __init__( self.status = status +class SslVersion(enum.Enum): + """ + TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". (Enum defined in SmtpSettings) + + """ + + TLSv1_1 = "TLSv1_1" + SSLv23 = "SSLv23" + TLSv1_2 = "TLSv1_2" + invalid_api_enum_value = "invalid_api_enum_value" + + +# https://github.com/python/mypy/issues/2427 +SslVersion.__new__ = model.safe_enum__new__ # type: ignore + + @attr.s(auto_attribs=True, init=False) class SupportAccessAddEntries(model.Model): """ @@ -11875,6 +11981,27 @@ def __init__( self.height = height +@attr.s(auto_attribs=True, init=False) +class WriteDashboardLookml(model.Model): + """ + Dynamic writeable type for DashboardLookml removes: + dashboard_id + + Attributes: + folder_id: (Write-Only) Id of the folder + lookml: lookml of UDD + """ + + folder_id: Optional[str] = None + lookml: Optional[str] = None + + def __init__( + self, *, folder_id: Optional[str] = None, lookml: Optional[str] = None + ): + self.folder_id = folder_id + self.lookml = lookml + + @attr.s(auto_attribs=True, init=False) class WriteDatagroup(model.Model): """ @@ -11935,6 +12062,8 @@ class WriteDBConnection(model.Model): disable_context_comment: When disable_context_comment is true comment will not be added to SQL oauth_application_id: An External OAuth Application to use for authenticating to the database always_retry_failed_builds: When true, error PDTs will be retried every regenerator cycle + cost_estimate_enabled: When true, query cost estimate will be displayed in explore. + pdt_api_control_enabled: PDT builds on this connection can be kicked off and cancelled via API. """ name: Optional[str] = None @@ -11968,6 +12097,8 @@ class WriteDBConnection(model.Model): disable_context_comment: Optional[bool] = None oauth_application_id: Optional[int] = None always_retry_failed_builds: Optional[bool] = None + cost_estimate_enabled: Optional[bool] = None + pdt_api_control_enabled: Optional[bool] = None def __init__( self, @@ -12002,7 +12133,9 @@ def __init__( pdt_concurrency: Optional[int] = None, disable_context_comment: Optional[bool] = None, oauth_application_id: Optional[int] = None, - always_retry_failed_builds: Optional[bool] = None + always_retry_failed_builds: Optional[bool] = None, + cost_estimate_enabled: Optional[bool] = None, + pdt_api_control_enabled: Optional[bool] = None ): self.name = name self.host = host @@ -12035,6 +12168,8 @@ def __init__( self.disable_context_comment = disable_context_comment self.oauth_application_id = oauth_application_id self.always_retry_failed_builds = always_retry_failed_builds + self.cost_estimate_enabled = cost_estimate_enabled + self.pdt_api_control_enabled = pdt_api_control_enabled @attr.s(auto_attribs=True, init=False) @@ -14063,6 +14198,10 @@ def __init__( ForwardRef("DiscretePalette"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter40.register_structure_hook( + ForwardRef("EgressIpAddresses"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter40.register_structure_hook( ForwardRef("EmbedParams"), # type: ignore forward_ref_structure_hook, # type:ignore @@ -14339,6 +14478,10 @@ def __init__( ForwardRef("Manifest"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter40.register_structure_hook( + ForwardRef("MaterializePDT"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter40.register_structure_hook( ForwardRef("MergeFields"), # type: ignore forward_ref_structure_hook, # type:ignore @@ -14559,6 +14702,14 @@ def __init__( ForwardRef("SmtpNodeStatus"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter40.register_structure_hook( + ForwardRef("SmtpSettings"), # type: ignore + forward_ref_structure_hook, # type:ignore +) +sr.converter40.register_structure_hook( + SmtpSettings, # type: ignore + translate_keys_structure_hook, # type:ignore +) sr.converter40.register_structure_hook( ForwardRef("SmtpStatus"), # type: ignore forward_ref_structure_hook, # type:ignore @@ -14587,6 +14738,10 @@ def __init__( ForwardRef("SshTunnel"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter40.register_structure_hook( + ForwardRef("SslVersion"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter40.register_structure_hook( ForwardRef("SupportAccessAddEntries"), # type: ignore forward_ref_structure_hook, # type:ignore @@ -14775,6 +14930,10 @@ def __init__( ForwardRef("WriteDashboardLayoutComponent"), # type: ignore forward_ref_structure_hook, # type:ignore ) +sr.converter40.register_structure_hook( + ForwardRef("WriteDashboardLookml"), # type: ignore + forward_ref_structure_hook, # type:ignore +) sr.converter40.register_structure_hook( ForwardRef("WriteDatagroup"), # type: ignore forward_ref_structure_hook, # type:ignore diff --git a/python/looker_sdk/sdk/constants.py b/python/looker_sdk/sdk/constants.py index 2c73a4879..53e5639c0 100644 --- a/python/looker_sdk/sdk/constants.py +++ b/python/looker_sdk/sdk/constants.py @@ -20,5 +20,5 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -sdk_version = "22.0" +sdk_version = "22.2" environment_prefix = "LOOKERSDK" diff --git a/spec/Looker.3.1.json b/spec/Looker.3.1.json index a8b761630..e12f249ba 100644 --- a/spec/Looker.3.1.json +++ b/spec/Looker.3.1.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "version": "3.1.0", - "x-looker-release-version": "22.0.13", + "x-looker-release-version": "22.2.3", "title": "Looker API 3.1 Reference", "description": "### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### Try It Out!\n\nThis section describes the existing 'api-docs' page available on Looker instances. We recommend using the\n[API Explorer](https://looker.com/docs/r/api/explorer) instead.\n\nThe 'api-docs' page served by the Looker instance includes 'Try It Out!' buttons for each API method. After logging\nin with API3 credentials, you can use the \"Try It Out!\" buttons to call the API directly from the documentation\npage to interactively explore API features and responses.\n\n**NOTE**! With great power comes great responsibility: The \"Try It Out!\" button makes API calls to your live Looker\ninstance. Be especially careful with destructive API operations such as `delete_user` or similar.\nThere is no \"undo\" for API operations. (API Explorer's \"Run It\" feature requires a check mark before running\nAPI operations that can change data.)\n\n\n### In This Release\n\nThe following are a few examples of noteworthy items that have changed between API 3.0 and API 3.1.\nFor more comprehensive coverage of API changes, please see the release notes for your Looker release.\n\n### Examples of new things added in API 3.1 (compared to API 3.0):\n\n* [Dashboard construction](#!/3.1/Dashboard/) APIs\n* [Themes](#!/3.1/Theme/) and [custom color collections](#!/3.1/ColorCollection) APIs\n* Create and run [SQL Runner](#!/3.1/Query/run_sql_query) queries\n* Create and run [merged results](#!/3.1/Query/create_merge_query) queries\n* Create and modify [dashboard filters](#!/3.1/Dashboard/create_dashboard_filter)\n* Create and modify [password requirements](#!/3.1/Auth/password_config)\n\n### Deprecated in API 3.0\n\nThe following functions and properties have been deprecated in API 3.0. They continue to exist and work in API 3.0\nfor the next several Looker releases but they have not been carried forward to API 3.1:\n\n* Dashboard Prefetch functions\n* User access_filter functions\n* User API 1.0 credentials functions\n* Space.is_root and Space.is_user_root properties. Use Space.is_shared_root and Space.is_users_root instead.\n\n### Semantic changes in API 3.1:\n\n* [all_looks()](#!/3.1/Look/all_looks) no longer includes soft-deleted looks, matching [all_dashboards()](#!/3.1/Dashboard/all_dashboards) behavior.\nYou can find soft-deleted looks using [search_looks()](#!/3.1/Look/search_looks) with the `deleted` param set to True.\n* [all_spaces()](#!/3.1/Space/all_spaces) no longer includes duplicate items\n* [search_users()](#!/3.1/User/search_users) no longer accepts Y,y,1,0,N,n for Boolean params, only \"true\" and \"false\".\n* For greater client and network compatibility, [render_task_results](#!/3.1/RenderTask/render_task_results) now returns\nHTTP status **202 Accepted** instead of HTTP status **102 Processing**\n* [all_running_queries()](#!/3.1/Query/all_running_queries) and [kill_query](#!/3.1/Query/kill_query) functions have moved into the [Query](#!/3.1/Query/) function group.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -5381,6 +5381,171 @@ "x-looker-activity-type": "non_query" } }, + "/derived_table/{model_name}/{view_name}/start": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "start_pdt_build", + "summary": "Start a PDT materialization", + "description": "Enqueue materialization for a PDT with the given model name and view name", + "parameters": [ + { + "name": "model_name", + "in": "path", + "description": "The model of the PDT to start building.", + "required": true, + "type": "string" + }, + { + "name": "view_name", + "in": "path", + "description": "The view name of the PDT to start building.", + "required": true, + "type": "string" + }, + { + "name": "force_rebuild", + "in": "query", + "description": "Force rebuild of required dependent PDTs, even if they are already materialized.", + "required": false, + "type": "string" + }, + { + "name": "force_full_incremental", + "in": "query", + "description": "Force involved incremental PDTs to fully re-materialize.", + "required": false, + "type": "string" + }, + { + "name": "workspace", + "in": "query", + "description": "Workspace in which to materialize selected PDT ('dev' or default 'production').", + "required": false, + "type": "string" + }, + { + "name": "source", + "in": "query", + "description": "The source of this request.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Derived Table", + "schema": { + "$ref": "#/definitions/MaterializePDT" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/derived_table/{materialization_id}/status": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "check_pdt_build", + "summary": "Check status of a PDT materialization", + "description": "Check status of PDT materialization", + "parameters": [ + { + "name": "materialization_id", + "in": "path", + "description": "The materialization id to check status for.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Derived Table", + "schema": { + "$ref": "#/definitions/MaterializePDT" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/derived_table/{materialization_id}/stop": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "stop_pdt_build", + "summary": "Stop a PDT materialization", + "description": "Stop a PDT materialization", + "parameters": [ + { + "name": "materialization_id", + "in": "path", + "description": "The materialization id to stop.", + "required": true, + "type": "string" + }, + { + "name": "source", + "in": "query", + "description": "The source of this request.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Derived Table", + "schema": { + "$ref": "#/definitions/MaterializePDT" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/dialect_info": { "get": { "tags": [ @@ -14878,6 +15043,71 @@ "x-looker-activity-type": "non_query" } }, + "/smtp_settings": { + "post": { + "tags": [ + "Config" + ], + "operationId": "set_smtp_settings", + "summary": "Set SMTP Setting", + "description": "### Configure SMTP Settings\n This API allows users to configure the SMTP settings on the Looker instance.\n This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API.\n", + "parameters": [ + { + "name": "body", + "in": "body", + "description": "SMTP Setting Configuration", + "required": true, + "schema": { + "$ref": "#/definitions/SmtpSettings" + } + } + ], + "responses": { + "204": { + "description": "Successfully updated SMTP settings" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Permission Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "409": { + "description": "Resource Already Exists", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "stable", + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true + } + }, "/spaces/search": { "get": { "tags": [ @@ -23437,9 +23667,14 @@ "description": "Id of Dashboard", "x-looker-nullable": true }, + "folder_id": { + "type": "string", + "x-looker-write-only": true, + "description": "(Write-Only) Id of the folder", + "x-looker-nullable": true + }, "lookml": { "type": "string", - "readOnly": true, "description": "lookml of UDD", "x-looker-nullable": true } @@ -24727,6 +24962,52 @@ }, "x-looker-status": "stable" }, + "SmtpSettings": { + "properties": { + "address": { + "type": "string", + "description": "SMTP Server url", + "x-looker-nullable": false + }, + "from": { + "type": "string", + "description": "From e-mail address", + "x-looker-nullable": false + }, + "user_name": { + "type": "string", + "description": "User name", + "x-looker-nullable": false + }, + "password": { + "type": "string", + "description": "Password", + "x-looker-nullable": false + }, + "port": { + "type": "integer", + "format": "int64", + "description": "SMTP Server's port", + "x-looker-nullable": false + }, + "enable_starttls_auto": { + "type": "boolean", + "description": "Is TLS encryption enabled?", + "x-looker-nullable": false + }, + "ssl_version": { + "type": "string", + "x-looker-values": [ + "TLSv1_1", + "SSLv23", + "TLSv1_2" + ], + "description": "TLS version selected Valid values are: \"TLSv1_1\", \"SSLv23\", \"TLSv1_2\".", + "x-looker-nullable": true + } + }, + "x-looker-status": "stable" + }, "FolderBase": { "properties": { "name": { @@ -28456,6 +28737,23 @@ }, "x-looker-status": "stable" }, + "MaterializePDT": { + "properties": { + "materialization_id": { + "type": "string", + "readOnly": true, + "description": "The ID of the enqueued materialization task", + "x-looker-nullable": false + }, + "resp_text": { + "type": "string", + "readOnly": true, + "description": "Detailed response in text format", + "x-looker-nullable": true + } + }, + "x-looker-status": "stable" + }, "MergeQuery": { "properties": { "can": { diff --git a/spec/Looker.3.1.oas.json b/spec/Looker.3.1.oas.json index df206d439..a4e048d12 100644 --- a/spec/Looker.3.1.oas.json +++ b/spec/Looker.3.1.oas.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "version": "3.1.0", - "x-looker-release-version": "22.0.13", + "x-looker-release-version": "22.2.3", "title": "Looker API 3.1 Reference", "description": "### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### Try It Out!\n\nThis section describes the existing 'api-docs' page available on Looker instances. We recommend using the\n[API Explorer](https://looker.com/docs/r/api/explorer) instead.\n\nThe 'api-docs' page served by the Looker instance includes 'Try It Out!' buttons for each API method. After logging\nin with API3 credentials, you can use the \"Try It Out!\" buttons to call the API directly from the documentation\npage to interactively explore API features and responses.\n\n**NOTE**! With great power comes great responsibility: The \"Try It Out!\" button makes API calls to your live Looker\ninstance. Be especially careful with destructive API operations such as `delete_user` or similar.\nThere is no \"undo\" for API operations. (API Explorer's \"Run It\" feature requires a check mark before running\nAPI operations that can change data.)\n\n\n### In This Release\n\nThe following are a few examples of noteworthy items that have changed between API 3.0 and API 3.1.\nFor more comprehensive coverage of API changes, please see the release notes for your Looker release.\n\n### Examples of new things added in API 3.1 (compared to API 3.0):\n\n* [Dashboard construction](#!/3.1/Dashboard/) APIs\n* [Themes](#!/3.1/Theme/) and [custom color collections](#!/3.1/ColorCollection) APIs\n* Create and run [SQL Runner](#!/3.1/Query/run_sql_query) queries\n* Create and run [merged results](#!/3.1/Query/create_merge_query) queries\n* Create and modify [dashboard filters](#!/3.1/Dashboard/create_dashboard_filter)\n* Create and modify [password requirements](#!/3.1/Auth/password_config)\n\n### Deprecated in API 3.0\n\nThe following functions and properties have been deprecated in API 3.0. They continue to exist and work in API 3.0\nfor the next several Looker releases but they have not been carried forward to API 3.1:\n\n* Dashboard Prefetch functions\n* User access_filter functions\n* User API 1.0 credentials functions\n* Space.is_root and Space.is_user_root properties. Use Space.is_shared_root and Space.is_users_root instead.\n\n### Semantic changes in API 3.1:\n\n* [all_looks()](#!/3.1/Look/all_looks) no longer includes soft-deleted looks, matching [all_dashboards()](#!/3.1/Dashboard/all_dashboards) behavior.\nYou can find soft-deleted looks using [search_looks()](#!/3.1/Look/search_looks) with the `deleted` param set to True.\n* [all_spaces()](#!/3.1/Space/all_spaces) no longer includes duplicate items\n* [search_users()](#!/3.1/User/search_users) no longer accepts Y,y,1,0,N,n for Boolean params, only \"true\" and \"false\".\n* For greater client and network compatibility, [render_task_results](#!/3.1/RenderTask/render_task_results) now returns\nHTTP status **202 Accepted** instead of HTTP status **102 Processing**\n* [all_running_queries()](#!/3.1/Query/all_running_queries) and [kill_query](#!/3.1/Query/kill_query) functions have moved into the [Query](#!/3.1/Query/) function group.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -7454,6 +7454,225 @@ "x-looker-activity-type": "non_query" } }, + "/derived_table/{model_name}/{view_name}/start": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "start_pdt_build", + "summary": "Start a PDT materialization", + "description": "Enqueue materialization for a PDT with the given model name and view name", + "parameters": [ + { + "name": "model_name", + "in": "path", + "description": "The model of the PDT to start building.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "view_name", + "in": "path", + "description": "The view name of the PDT to start building.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "force_rebuild", + "in": "query", + "description": "Force rebuild of required dependent PDTs, even if they are already materialized.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "force_full_incremental", + "in": "query", + "description": "Force involved incremental PDTs to fully re-materialize.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "query", + "description": "Workspace in which to materialize selected PDT ('dev' or default 'production').", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "source", + "in": "query", + "description": "The source of this request.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Derived Table", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaterializePDT" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/derived_table/{materialization_id}/status": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "check_pdt_build", + "summary": "Check status of a PDT materialization", + "description": "Check status of PDT materialization", + "parameters": [ + { + "name": "materialization_id", + "in": "path", + "description": "The materialization id to check status for.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Derived Table", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaterializePDT" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/derived_table/{materialization_id}/stop": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "stop_pdt_build", + "summary": "Stop a PDT materialization", + "description": "Stop a PDT materialization", + "parameters": [ + { + "name": "materialization_id", + "in": "path", + "description": "The materialization id to stop.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "source", + "in": "query", + "description": "The source of this request.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Derived Table", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaterializePDT" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/dialect_info": { "get": { "tags": [ @@ -20379,6 +20598,95 @@ } } }, + "/smtp_settings": { + "post": { + "tags": [ + "Config" + ], + "operationId": "set_smtp_settings", + "summary": "Set SMTP Setting", + "description": "### Configure SMTP Settings\n This API allows users to configure the SMTP settings on the Looker instance.\n This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API.\n", + "responses": { + "204": { + "description": "Successfully updated SMTP settings" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Permission Denied", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Resource Already Exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "stable", + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SmtpSettings" + } + } + }, + "description": "SMTP Setting Configuration", + "required": true + } + } + }, "/spaces/search": { "get": { "tags": [ @@ -30863,9 +31171,14 @@ "description": "Id of Dashboard", "nullable": true }, + "folder_id": { + "type": "string", + "x-looker-write-only": true, + "description": "(Write-Only) Id of the folder", + "nullable": true + }, "lookml": { "type": "string", - "readOnly": true, "description": "lookml of UDD", "nullable": true } @@ -32125,6 +32438,52 @@ }, "x-looker-status": "stable" }, + "SmtpSettings": { + "properties": { + "address": { + "type": "string", + "description": "SMTP Server url", + "nullable": false + }, + "from": { + "type": "string", + "description": "From e-mail address", + "nullable": false + }, + "user_name": { + "type": "string", + "description": "User name", + "nullable": false + }, + "password": { + "type": "string", + "description": "Password", + "nullable": false + }, + "port": { + "type": "integer", + "format": "int64", + "description": "SMTP Server's port", + "nullable": false + }, + "enable_starttls_auto": { + "type": "boolean", + "description": "Is TLS encryption enabled?", + "nullable": false + }, + "ssl_version": { + "type": "string", + "enum": [ + "TLSv1_1", + "SSLv23", + "TLSv1_2" + ], + "description": "TLS version selected Valid values are: \"TLSv1_1\", \"SSLv23\", \"TLSv1_2\".", + "nullable": true + } + }, + "x-looker-status": "stable" + }, "FolderBase": { "properties": { "name": { @@ -35797,6 +36156,23 @@ }, "x-looker-status": "stable" }, + "MaterializePDT": { + "properties": { + "materialization_id": { + "type": "string", + "readOnly": true, + "description": "The ID of the enqueued materialization task", + "nullable": false + }, + "resp_text": { + "type": "string", + "readOnly": true, + "description": "Detailed response in text format", + "nullable": true + } + }, + "x-looker-status": "stable" + }, "MergeQuery": { "properties": { "can": { diff --git a/spec/Looker.4.0.json b/spec/Looker.4.0.json index 47827b06c..54dd95e95 100644 --- a/spec/Looker.4.0.json +++ b/spec/Looker.4.0.json @@ -1,8 +1,8 @@ { "swagger": "2.0", "info": { - "version": "4.0.22.0", - "x-looker-release-version": "22.0.13", + "version": "4.0.22.2", + "x-looker-release-version": "22.2.3", "title": "Looker API 4.0 (Beta) Reference", "description": "\nWelcome to the future! API 4.0 co-exists with APIs 3.1 and 3.0. (3.0 should no longer be used.)\nThe \"beta\" tag means updates for API 4.0 may include breaking changes, but as always we will work to minimize them.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 version was introduced so we can make adjustments to API functions, parameters, and response types to\nfix bugs and inconsistencies. These changes fall outside the bounds of non-breaking additive changes we can\nmake to our stable API 3.1.\n\nOne benefit of these type adjustments in API 4.0 is dramatically better support for strongly\ntyped languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nWhile API 3.1 is still the de-facto Looker API (\"current\", \"stable\", \"default\", etc), the bulk\nof our development activity has shifted to API 4.0, where all new features are added.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -4283,6 +4283,73 @@ "x-looker-activity-type": "non_query" } }, + "/dashboards/from_lookml": { + "post": { + "tags": [ + "Dashboard" + ], + "operationId": "create_dashboard_from_lookml", + "summary": "Create Dashboard from LookML", + "description": "### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard.\n\nThis is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard.\n\nLookML must contain valid LookML YAML code. It's recommended to use the LookML format returned\nfrom [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with \n).\n\nNote that the created dashboard is not linked to any LookML Dashboard,\ni.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method.\n\n", + "parameters": [ + { + "name": "body", + "in": "body", + "description": "DashboardLookML", + "required": true, + "schema": { + "$ref": "#/definitions/DashboardLookml" + } + } + ], + "responses": { + "200": { + "description": "DashboardLookML", + "schema": { + "$ref": "#/definitions/DashboardLookml" + } + }, + "201": { + "description": "dashboard", + "schema": { + "$ref": "#/definitions/Dashboard" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "409": { + "description": "Resource Already Exists", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/dashboards/{dashboard_id}/copy": { "post": { "tags": [ @@ -6312,6 +6379,171 @@ "x-looker-activity-type": "non_query" } }, + "/derived_table/{model_name}/{view_name}/start": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "start_pdt_build", + "summary": "Start a PDT materialization", + "description": "Enqueue materialization for a PDT with the given model name and view name", + "parameters": [ + { + "name": "model_name", + "in": "path", + "description": "The model of the PDT to start building.", + "required": true, + "type": "string" + }, + { + "name": "view_name", + "in": "path", + "description": "The view name of the PDT to start building.", + "required": true, + "type": "string" + }, + { + "name": "force_rebuild", + "in": "query", + "description": "Force rebuild of required dependent PDTs, even if they are already materialized.", + "required": false, + "type": "string" + }, + { + "name": "force_full_incremental", + "in": "query", + "description": "Force involved incremental PDTs to fully re-materialize.", + "required": false, + "type": "string" + }, + { + "name": "workspace", + "in": "query", + "description": "Workspace in which to materialize selected PDT ('dev' or default 'production').", + "required": false, + "type": "string" + }, + { + "name": "source", + "in": "query", + "description": "The source of this request.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Derived Table", + "schema": { + "$ref": "#/definitions/MaterializePDT" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/derived_table/{materialization_id}/status": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "check_pdt_build", + "summary": "Check status of a PDT materialization", + "description": "Check status of PDT materialization", + "parameters": [ + { + "name": "materialization_id", + "in": "path", + "description": "The materialization id to check status for.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Derived Table", + "schema": { + "$ref": "#/definitions/MaterializePDT" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/derived_table/{materialization_id}/stop": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "stop_pdt_build", + "summary": "Stop a PDT materialization", + "description": "Stop a PDT materialization", + "parameters": [ + { + "name": "materialization_id", + "in": "path", + "description": "The materialization id to stop.", + "required": true, + "type": "string" + }, + { + "name": "source", + "in": "query", + "description": "The source of this request.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Derived Table", + "schema": { + "$ref": "#/definitions/MaterializePDT" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/dialect_info": { "get": { "tags": [ @@ -6480,6 +6712,38 @@ "x-looker-rate-limited": true } }, + "/public_egress_ip_addresses": { + "get": { + "tags": [ + "Config" + ], + "operationId": "public_egress_ip_addresses", + "summary": "Public Egress IP Addresses", + "description": "### Get Egress IP Addresses\n\nReturns the list of public egress IP Addresses for a hosted customer's instance\n", + "responses": { + "200": { + "description": "Public Egress IP Addresses", + "schema": { + "$ref": "#/definitions/EgressIpAddresses" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/embed_config/secrets": { "post": { "tags": [ @@ -17832,6 +18096,71 @@ "x-looker-activity-type": "non_query" } }, + "/smtp_settings": { + "post": { + "tags": [ + "Config" + ], + "operationId": "set_smtp_settings", + "summary": "Set SMTP Setting", + "description": "### Configure SMTP Settings\n This API allows users to configure the SMTP settings on the Looker instance.\n This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API.\n", + "parameters": [ + { + "name": "body", + "in": "body", + "description": "SMTP Setting Configuration", + "required": true, + "schema": { + "$ref": "#/definitions/SmtpSettings" + } + } + ], + "responses": { + "204": { + "description": "Successfully updated SMTP settings" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Permission Denied", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "409": { + "description": "Resource Already Exists", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "422": { + "description": "Validation Error", + "schema": { + "$ref": "#/definitions/ValidationError" + } + }, + "429": { + "description": "Too Many Requests", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true + } + }, "/smtp_status": { "get": { "tags": [ @@ -27330,9 +27659,14 @@ "description": "Id of Dashboard", "x-looker-nullable": true }, + "folder_id": { + "type": "string", + "x-looker-write-only": true, + "description": "(Write-Only) Id of the folder", + "x-looker-nullable": true + }, "lookml": { "type": "string", - "readOnly": true, "description": "lookml of UDD", "x-looker-nullable": true } @@ -28155,6 +28489,16 @@ "type": "boolean", "description": "When true, error PDTs will be retried every regenerator cycle", "x-looker-nullable": true + }, + "cost_estimate_enabled": { + "type": "boolean", + "description": "When true, query cost estimate will be displayed in explore.", + "x-looker-nullable": true + }, + "pdt_api_control_enabled": { + "type": "boolean", + "description": "PDT builds on this connection can be kicked off and cancelled via API.", + "x-looker-nullable": true } }, "x-looker-status": "stable" @@ -28534,6 +28878,20 @@ }, "x-looker-status": "stable" }, + "EgressIpAddresses": { + "properties": { + "egress_ip_addresses": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true, + "description": "Egress IP addresses", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, "EmbedParams": { "properties": { "target_url": { @@ -28701,6 +29059,52 @@ }, "x-looker-status": "stable" }, + "SmtpSettings": { + "properties": { + "address": { + "type": "string", + "description": "SMTP Server url", + "x-looker-nullable": false + }, + "from": { + "type": "string", + "description": "From e-mail address", + "x-looker-nullable": false + }, + "user_name": { + "type": "string", + "description": "User name", + "x-looker-nullable": false + }, + "password": { + "type": "string", + "description": "Password", + "x-looker-nullable": false + }, + "port": { + "type": "integer", + "format": "int64", + "description": "SMTP Server's port", + "x-looker-nullable": false + }, + "enable_starttls_auto": { + "type": "boolean", + "description": "Is TLS encryption enabled?", + "x-looker-nullable": false + }, + "ssl_version": { + "type": "string", + "x-looker-values": [ + "TLSv1_1", + "SSLv23", + "TLSv1_2" + ], + "description": "TLS version selected Valid values are: \"TLSv1_1\", \"SSLv23\", \"TLSv1_2\".", + "x-looker-nullable": true + } + }, + "x-looker-status": "beta" + }, "ExternalOauthApplication": { "properties": { "can": { @@ -32577,6 +32981,23 @@ }, "x-looker-status": "stable" }, + "MaterializePDT": { + "properties": { + "materialization_id": { + "type": "string", + "readOnly": true, + "description": "The ID of the enqueued materialization task", + "x-looker-nullable": false + }, + "resp_text": { + "type": "string", + "readOnly": true, + "description": "Detailed response in text format", + "x-looker-nullable": true + } + }, + "x-looker-status": "stable" + }, "MergeQuery": { "properties": { "can": { diff --git a/spec/Looker.4.0.oas.json b/spec/Looker.4.0.oas.json index 267fe976d..6d8a02e9c 100644 --- a/spec/Looker.4.0.oas.json +++ b/spec/Looker.4.0.oas.json @@ -1,8 +1,8 @@ { "openapi": "3.0.0", "info": { - "version": "4.0.22.0", - "x-looker-release-version": "22.0.13", + "version": "4.0.22.2", + "x-looker-release-version": "22.2.3", "title": "Looker API 4.0 (Beta) Reference", "description": "\nWelcome to the future! API 4.0 co-exists with APIs 3.1 and 3.0. (3.0 should no longer be used.)\nThe \"beta\" tag means updates for API 4.0 may include breaking changes, but as always we will work to minimize them.\n\n### Authorization\n\nThe classic method of API authorization uses Looker **API3** credentials for authorization and access control.\nLooker admins can create API3 credentials on Looker's **Admin/Users** page.\n\nAPI 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests.\n\nFor details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization).\n\n\n### API Explorer\n\nThe API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs.\nIt is a replacement for the 'api-docs' page currently provided on Looker instances.\n\nFor details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer).\n\n\n### Looker Language SDKs\n\nThe Looker API is a RESTful system that should be usable by any programming language capable of making\nHTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker\nhas an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several\nlanguage SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically\nauthenticate API requests when needed.\n\nFor details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks).\n\n\n### API Versioning\n\nFuture releases of Looker expand the latest API version release-by-release to securely expose more and more of the core\npower of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without\nwarning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking\nchanges in future releases.\n\nFor details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning).\n\n\n### In This Release\n\nAPI 4.0 version was introduced so we can make adjustments to API functions, parameters, and response types to\nfix bugs and inconsistencies. These changes fall outside the bounds of non-breaking additive changes we can\nmake to our stable API 3.1.\n\nOne benefit of these type adjustments in API 4.0 is dramatically better support for strongly\ntyped languages like TypeScript, Kotlin, Swift, Go, C#, and more.\n\nWhile API 3.1 is still the de-facto Looker API (\"current\", \"stable\", \"default\", etc), the bulk\nof our development activity has shifted to API 4.0, where all new features are added.\n\nThe API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0.\n\n\n### API and SDK Support Policies\n\nLooker API versions and language SDKs have varying support levels. Please read the API and SDK\n[support policies](https://looker.com/docs/r/api/support-policy) for more information.\n\n\n", "contact": { @@ -5960,6 +5960,101 @@ "x-looker-activity-type": "non_query" } }, + "/dashboards/from_lookml": { + "post": { + "tags": [ + "Dashboard" + ], + "operationId": "create_dashboard_from_lookml", + "summary": "Create Dashboard from LookML", + "description": "### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard.\n\nThis is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard.\n\nLookML must contain valid LookML YAML code. It's recommended to use the LookML format returned\nfrom [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with \n).\n\nNote that the created dashboard is not linked to any LookML Dashboard,\ni.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method.\n\n", + "responses": { + "200": { + "description": "DashboardLookML", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DashboardLookml" + } + } + } + }, + "201": { + "description": "dashboard", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Resource Already Exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DashboardLookml" + } + } + }, + "description": "DashboardLookML", + "required": true + } + } + }, "/dashboards/{dashboard_id}/copy": { "post": { "tags": [ @@ -8729,6 +8824,225 @@ "x-looker-activity-type": "non_query" } }, + "/derived_table/{model_name}/{view_name}/start": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "start_pdt_build", + "summary": "Start a PDT materialization", + "description": "Enqueue materialization for a PDT with the given model name and view name", + "parameters": [ + { + "name": "model_name", + "in": "path", + "description": "The model of the PDT to start building.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "view_name", + "in": "path", + "description": "The view name of the PDT to start building.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "force_rebuild", + "in": "query", + "description": "Force rebuild of required dependent PDTs, even if they are already materialized.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "force_full_incremental", + "in": "query", + "description": "Force involved incremental PDTs to fully re-materialize.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "query", + "description": "Workspace in which to materialize selected PDT ('dev' or default 'production').", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "source", + "in": "query", + "description": "The source of this request.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Derived Table", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaterializePDT" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/derived_table/{materialization_id}/status": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "check_pdt_build", + "summary": "Check status of a PDT materialization", + "description": "Check status of PDT materialization", + "parameters": [ + { + "name": "materialization_id", + "in": "path", + "description": "The materialization id to check status for.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Derived Table", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaterializePDT" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, + "/derived_table/{materialization_id}/stop": { + "get": { + "tags": [ + "DerivedTable" + ], + "operationId": "stop_pdt_build", + "summary": "Stop a PDT materialization", + "description": "Stop a PDT materialization", + "parameters": [ + { + "name": "materialization_id", + "in": "path", + "description": "The materialization id to stop.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "source", + "in": "query", + "description": "The source of this request.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Derived Table", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MaterializePDT" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/dialect_info": { "get": { "tags": [ @@ -8959,6 +9273,50 @@ "x-looker-rate-limited": true } }, + "/public_egress_ip_addresses": { + "get": { + "tags": [ + "Config" + ], + "operationId": "public_egress_ip_addresses", + "summary": "Public Egress IP Addresses", + "description": "### Get Egress IP Addresses\n\nReturns the list of public egress IP Addresses for a hosted customer's instance\n", + "responses": { + "200": { + "description": "Public Egress IP Addresses", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EgressIpAddresses" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query" + } + }, "/embed_config/secrets": { "post": { "tags": [ @@ -24419,6 +24777,95 @@ "x-looker-activity-type": "non_query" } }, + "/smtp_settings": { + "post": { + "tags": [ + "Config" + ], + "operationId": "set_smtp_settings", + "summary": "Set SMTP Setting", + "description": "### Configure SMTP Settings\n This API allows users to configure the SMTP settings on the Looker instance.\n This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API.\n", + "responses": { + "204": { + "description": "Successfully updated SMTP settings" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Permission Denied", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "409": { + "description": "Resource Already Exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "x-looker-status": "beta", + "x-looker-activity-type": "non_query", + "x-looker-rate-limited": true, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SmtpSettings" + } + } + }, + "description": "SMTP Setting Configuration", + "required": true + } + } + }, "/smtp_status": { "get": { "tags": [ @@ -36041,9 +36488,14 @@ "description": "Id of Dashboard", "nullable": true }, + "folder_id": { + "type": "string", + "x-looker-write-only": true, + "description": "(Write-Only) Id of the folder", + "nullable": true + }, "lookml": { "type": "string", - "readOnly": true, "description": "lookml of UDD", "nullable": true } @@ -36844,6 +37296,16 @@ "type": "boolean", "description": "When true, error PDTs will be retried every regenerator cycle", "nullable": true + }, + "cost_estimate_enabled": { + "type": "boolean", + "description": "When true, query cost estimate will be displayed in explore.", + "nullable": true + }, + "pdt_api_control_enabled": { + "type": "boolean", + "description": "PDT builds on this connection can be kicked off and cancelled via API.", + "nullable": true } }, "x-looker-status": "stable" @@ -37220,6 +37682,20 @@ }, "x-looker-status": "stable" }, + "EgressIpAddresses": { + "properties": { + "egress_ip_addresses": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true, + "description": "Egress IP addresses", + "nullable": true + } + }, + "x-looker-status": "beta" + }, "EmbedParams": { "properties": { "target_url": { @@ -37387,6 +37863,52 @@ }, "x-looker-status": "stable" }, + "SmtpSettings": { + "properties": { + "address": { + "type": "string", + "description": "SMTP Server url", + "nullable": false + }, + "from": { + "type": "string", + "description": "From e-mail address", + "nullable": false + }, + "user_name": { + "type": "string", + "description": "User name", + "nullable": false + }, + "password": { + "type": "string", + "description": "Password", + "nullable": false + }, + "port": { + "type": "integer", + "format": "int64", + "description": "SMTP Server's port", + "nullable": false + }, + "enable_starttls_auto": { + "type": "boolean", + "description": "Is TLS encryption enabled?", + "nullable": false + }, + "ssl_version": { + "type": "string", + "enum": [ + "TLSv1_1", + "SSLv23", + "TLSv1_2" + ], + "description": "TLS version selected Valid values are: \"TLSv1_1\", \"SSLv23\", \"TLSv1_2\".", + "nullable": true + } + }, + "x-looker-status": "beta" + }, "ExternalOauthApplication": { "properties": { "can": { @@ -41227,6 +41749,23 @@ }, "x-looker-status": "stable" }, + "MaterializePDT": { + "properties": { + "materialization_id": { + "type": "string", + "readOnly": true, + "description": "The ID of the enqueued materialization task", + "nullable": false + }, + "resp_text": { + "type": "string", + "readOnly": true, + "description": "Detailed response in text format", + "nullable": true + } + }, + "x-looker-status": "stable" + }, "MergeQuery": { "properties": { "can": { diff --git a/swift/looker/rtl/constants.swift b/swift/looker/rtl/constants.swift index 223a5917b..5267cef95 100644 --- a/swift/looker/rtl/constants.swift +++ b/swift/looker/rtl/constants.swift @@ -51,7 +51,7 @@ extension String { } public struct Constants { - public static let lookerVersion = "22.0" + public static let lookerVersion = "22.2" public static let apiVersion = "4.0" public static let defaultApiVersion = "4.0" // Swift requires API 4.0 public static let sdkVersion = #"\#(apiVersion).\#(lookerVersion)"# diff --git a/swift/looker/sdk/methods.swift b/swift/looker/sdk/methods.swift index cfae8812f..1773d809b 100644 --- a/swift/looker/sdk/methods.swift +++ b/swift/looker/sdk/methods.swift @@ -25,7 +25,7 @@ */ /** - * 437 API methods + * 443 API methods */ @@ -2172,6 +2172,20 @@ open class LookerSDK: APIMethods { return result } + /** + * ### Get Egress IP Addresses + * + * Returns the list of public egress IP Addresses for a hosted customer's instance + * + * GET /public_egress_ip_addresses -> EgressIpAddresses + */ + public func public_egress_ip_addresses( + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.get("/public_egress_ip_addresses", nil, nil, options) + return result + } + /** * ### Set the menu item name and content for internal help resources * @@ -2358,6 +2372,24 @@ open class LookerSDK: APIMethods { return result } + /** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * POST /smtp_settings -> Voidable + */ + public func set_smtp_settings( + /** + * @param {SmtpSettings} body + */ + _ body: SmtpSettings, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.post("/smtp_settings", nil, try! self.encode(body), options) + return result + } + /** * ### Get current SMTP status. * @@ -3794,6 +3826,31 @@ open class LookerSDK: APIMethods { return result } + /** + * ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. + * + * This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. + * + * LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned + * from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with + * ). + * + * Note that the created dashboard is not linked to any LookML Dashboard, + * i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. + * + * POST /dashboards/from_lookml -> DashboardLookml + */ + public func create_dashboard_from_lookml( + /** + * @param {WriteDashboardLookml} body + */ + _ body: WriteDashboardLookml, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.post("/dashboards/from_lookml", nil, try! self.encode(body), options) + return result + } + /** * ### Copy an existing dashboard * @@ -4428,6 +4485,84 @@ open class LookerSDK: APIMethods { return result } + /** + * Enqueue materialization for a PDT with the given model name and view name + * + * GET /derived_table/{model_name}/{view_name}/start -> MaterializePDT + */ + public func start_pdt_build( + /** + * @param {String} model_name The model of the PDT to start building. + */ + _ model_name: String, + /** + * @param {String} view_name The view name of the PDT to start building. + */ + _ view_name: String, + /** + * @param {String} force_rebuild Force rebuild of required dependent PDTs, even if they are already materialized. + */ + force_rebuild: String? = nil, + /** + * @param {String} force_full_incremental Force involved incremental PDTs to fully re-materialize. + */ + force_full_incremental: String? = nil, + /** + * @param {String} workspace Workspace in which to materialize selected PDT ('dev' or default 'production'). + */ + workspace: String? = nil, + /** + * @param {String} source The source of this request. + */ + source: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_model_name = encodeParam(model_name) + let path_view_name = encodeParam(view_name) + let result: SDKResponse = self.get("/derived_table/\(path_model_name)/\(path_view_name)/start", + ["force_rebuild": force_rebuild, "force_full_incremental": force_full_incremental, "workspace": workspace, "source": source], nil, options) + return result + } + + /** + * Check status of PDT materialization + * + * GET /derived_table/{materialization_id}/status -> MaterializePDT + */ + public func check_pdt_build( + /** + * @param {String} materialization_id The materialization id to check status for. + */ + _ materialization_id: String, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_materialization_id = encodeParam(materialization_id) + let result: SDKResponse = self.get("/derived_table/\(path_materialization_id)/status", nil, nil, options) + return result + } + + /** + * Stop a PDT materialization + * + * GET /derived_table/{materialization_id}/stop -> MaterializePDT + */ + public func stop_pdt_build( + /** + * @param {String} materialization_id The materialization id to stop. + */ + _ materialization_id: String, + /** + * @param {String} source The source of this request. + */ + source: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_materialization_id = encodeParam(materialization_id) + let result: SDKResponse = self.get("/derived_table/\(path_materialization_id)/stop", + ["source": source], nil, options) + return result + } + // MARK Folder: Manage Folders diff --git a/swift/looker/sdk/models.swift b/swift/looker/sdk/models.swift index 034ebb285..d93dcadde 100644 --- a/swift/looker/sdk/models.swift +++ b/swift/looker/sdk/models.swift @@ -25,7 +25,7 @@ */ /** - * 307 API models: 229 Spec, 0 Request, 58 Write, 20 Enum + * 312 API models: 232 Spec, 0 Request, 59 Write, 21 Enum */ @@ -5833,6 +5833,7 @@ public struct DashboardLookml: SDKModel { private enum CodingKeys : String, CodingKey { case _dashboard_id = "dashboard_id" + case _folder_id = "folder_id" case _lookml = "lookml" } private var _dashboard_id: AnyString? @@ -5844,17 +5845,27 @@ public struct DashboardLookml: SDKModel { set { _dashboard_id = newValue.map(AnyString.init) } } + private var _folder_id: AnyString? + /** + * (Write-Only) Id of the folder + */ + public var folder_id: String? { + get { _folder_id?.value } + set { _folder_id = newValue.map(AnyString.init) } + } + private var _lookml: AnyString? /** - * lookml of UDD (read-only) + * lookml of UDD */ public var lookml: String? { get { _lookml?.value } set { _lookml = newValue.map(AnyString.init) } } - public init(dashboard_id: String? = nil, lookml: String? = nil) { + public init(dashboard_id: String? = nil, folder_id: String? = nil, lookml: String? = nil) { self._dashboard_id = dashboard_id.map(AnyString.init) + self._folder_id = folder_id.map(AnyString.init) self._lookml = lookml.map(AnyString.init) } @@ -6260,6 +6271,8 @@ public struct DBConnection: SDKModel { case disable_context_comment case _oauth_application_id = "oauth_application_id" case always_retry_failed_builds + case cost_estimate_enabled + case pdt_api_control_enabled } /** * Operations the current user is able to perform on this object (read-only) @@ -6573,7 +6586,17 @@ public struct DBConnection: SDKModel { */ public var always_retry_failed_builds: Bool? - public init(can: StringDictionary? = nil, name: String? = nil, dialect: Dialect? = nil, snippets: [Snippet]? = nil, pdts_enabled: Bool? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, uses_oauth: Bool? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, created_at: String? = nil, user_id: String? = nil, example: Bool? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, last_regen_at: String? = nil, last_reap_at: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: DBConnectionOverride? = nil, managed: Bool? = nil, tunnel_id: String? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: Int64? = nil, always_retry_failed_builds: Bool? = nil) { + /** + * When true, query cost estimate will be displayed in explore. + */ + public var cost_estimate_enabled: Bool? + + /** + * PDT builds on this connection can be kicked off and cancelled via API. + */ + public var pdt_api_control_enabled: Bool? + + public init(can: StringDictionary? = nil, name: String? = nil, dialect: Dialect? = nil, snippets: [Snippet]? = nil, pdts_enabled: Bool? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, uses_oauth: Bool? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, created_at: String? = nil, user_id: String? = nil, example: Bool? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, last_regen_at: String? = nil, last_reap_at: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: DBConnectionOverride? = nil, managed: Bool? = nil, tunnel_id: String? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: Int64? = nil, always_retry_failed_builds: Bool? = nil, cost_estimate_enabled: Bool? = nil, pdt_api_control_enabled: Bool? = nil) { self.can = can self._name = name.map(AnyString.init) self.dialect = dialect @@ -6616,6 +6639,8 @@ public struct DBConnection: SDKModel { self.disable_context_comment = disable_context_comment self._oauth_application_id = oauth_application_id.map(AnyInt.init) self.always_retry_failed_builds = always_retry_failed_builds + self.cost_estimate_enabled = cost_estimate_enabled + self.pdt_api_control_enabled = pdt_api_control_enabled } } @@ -7298,6 +7323,26 @@ public struct DiscretePalette: SDKModel { } +public struct EgressIpAddresses: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _egress_ip_addresses = "egress_ip_addresses" + } + private var _egress_ip_addresses: [AnyString]? + /** + * Egress IP addresses (read-only) + */ + public var egress_ip_addresses: [String]? { + get { if let v = _egress_ip_addresses { return v.map { $0.value } } else { return nil } } + set { if let v = newValue { _egress_ip_addresses = v.map { AnyString.init($0) } } else { _egress_ip_addresses = nil } } + } + + public init(egress_ip_addresses: [String]? = nil) { + if let v = egress_ip_addresses { _egress_ip_addresses = v.map { AnyString.init($0) } } else { _egress_ip_addresses = nil } + } + +} + public struct EmbedParams: SDKModel { private enum CodingKeys : String, CodingKey { @@ -13531,6 +13576,37 @@ public struct Manifest: SDKModel { } +public struct MaterializePDT: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _materialization_id = "materialization_id" + case _resp_text = "resp_text" + } + private var _materialization_id: AnyString? + /** + * The ID of the enqueued materialization task (read-only) + */ + public var materialization_id: String? { + get { _materialization_id?.value } + set { _materialization_id = newValue.map(AnyString.init) } + } + + private var _resp_text: AnyString? + /** + * Detailed response in text format (read-only) + */ + public var resp_text: String? { + get { _resp_text?.value } + set { _resp_text = newValue.map(AnyString.init) } + } + + public init(materialization_id: String? = nil, resp_text: String? = nil) { + self._materialization_id = materialization_id.map(AnyString.init) + self._resp_text = resp_text.map(AnyString.init) + } + +} + public struct MergeFields: SDKModel { private enum CodingKeys : String, CodingKey { @@ -18345,6 +18421,84 @@ public struct SmtpNodeStatus: SDKModel { } +public struct SmtpSettings: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _address = "address" + case _from = "from" + case _user_name = "user_name" + case _password = "password" + case _port = "port" + case enable_starttls_auto + case ssl_version + } + private var _address: AnyString? + /** + * SMTP Server url + */ + public var address: String? { + get { _address?.value } + set { _address = newValue.map(AnyString.init) } + } + + private var _from: AnyString? + /** + * From e-mail address + */ + public var from: String? { + get { _from?.value } + set { _from = newValue.map(AnyString.init) } + } + + private var _user_name: AnyString? + /** + * User name + */ + public var user_name: String? { + get { _user_name?.value } + set { _user_name = newValue.map(AnyString.init) } + } + + private var _password: AnyString? + /** + * Password + */ + public var password: String? { + get { _password?.value } + set { _password = newValue.map(AnyString.init) } + } + + private var _port: AnyInt? + /** + * SMTP Server's port + */ + public var port: Int64? { + get { _port?.value } + set { _port = newValue.map(AnyInt.init) } + } + + /** + * Is TLS encryption enabled? + */ + public var enable_starttls_auto: Bool? + + /** + * TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". + */ + public var ssl_version: SslVersion? + + public init(address: String? = nil, from: String? = nil, user_name: String? = nil, password: String? = nil, port: Int64? = nil, enable_starttls_auto: Bool? = nil, ssl_version: SslVersion? = nil) { + self._address = address.map(AnyString.init) + self._from = from.map(AnyString.init) + self._user_name = user_name.map(AnyString.init) + self._password = password.map(AnyString.init) + self._port = port.map(AnyInt.init) + self.enable_starttls_auto = enable_starttls_auto + self.ssl_version = ssl_version + } + +} + public struct SmtpStatus: SDKModel { private enum CodingKeys : String, CodingKey { @@ -18872,6 +19026,15 @@ public struct SshTunnel: SDKModel { } +/** + * TLS version selected Valid values are: "TLSv1_1", "SSLv23", "TLSv1_2". (Enum defined in SmtpSettings) + */ +public enum SslVersion: String, Codable { + case TLSv1_1 = "TLSv1_1" + case SSLv23 = "SSLv23" + case TLSv1_2 = "TLSv1_2" +} + public struct SupportAccessAddEntries: SDKModel { private enum CodingKeys : String, CodingKey { @@ -22200,6 +22363,41 @@ public struct WriteDashboardLayoutComponent: SDKModel { } +/** + * Dynamic writeable type for DashboardLookml removes: + * dashboard_id + */ +public struct WriteDashboardLookml: SDKModel { + + private enum CodingKeys : String, CodingKey { + case _folder_id = "folder_id" + case _lookml = "lookml" + } + private var _folder_id: AnyString? + /** + * (Write-Only) Id of the folder + */ + public var folder_id: String? { + get { _folder_id?.value } + set { _folder_id = newValue.map(AnyString.init) } + } + + private var _lookml: AnyString? + /** + * lookml of UDD + */ + public var lookml: String? { + get { _lookml?.value } + set { _lookml = newValue.map(AnyString.init) } + } + + public init(folder_id: String? = nil, lookml: String? = nil) { + self._folder_id = folder_id.map(AnyString.init) + self._lookml = lookml.map(AnyString.init) + } + +} + /** * Dynamic writeable type for Datagroup removes: * can, created_at, id, model_name, name, trigger_check_at, trigger_error, trigger_value @@ -22273,6 +22471,8 @@ public struct WriteDBConnection: SDKModel { case disable_context_comment case _oauth_application_id = "oauth_application_id" case always_retry_failed_builds + case cost_estimate_enabled + case pdt_api_control_enabled } private var _name: AnyString? /** @@ -22522,7 +22722,17 @@ public struct WriteDBConnection: SDKModel { */ public var always_retry_failed_builds: Bool? - public init(name: String? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: WriteDBConnectionOverride? = nil, tunnel_id: String? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: Int64? = nil, always_retry_failed_builds: Bool? = nil) { + /** + * When true, query cost estimate will be displayed in explore. + */ + public var cost_estimate_enabled: Bool? + + /** + * PDT builds on this connection can be kicked off and cancelled via API. + */ + public var pdt_api_control_enabled: Bool? + + public init(name: String? = nil, host: String? = nil, port: String? = nil, username: String? = nil, password: String? = nil, certificate: String? = nil, file_type: String? = nil, database: String? = nil, db_timezone: String? = nil, query_timezone: String? = nil, schema: String? = nil, max_connections: Int64? = nil, max_billing_gigabytes: String? = nil, ssl: Bool? = nil, verify_ssl: Bool? = nil, tmp_db_name: String? = nil, jdbc_additional_params: String? = nil, pool_timeout: Int64? = nil, dialect_name: String? = nil, user_db_credentials: Bool? = nil, user_attribute_fields: [String]? = nil, maintenance_cron: String? = nil, sql_runner_precache_tables: Bool? = nil, sql_writing_with_info_schema: Bool? = nil, after_connect_statements: String? = nil, pdt_context_override: WriteDBConnectionOverride? = nil, tunnel_id: String? = nil, pdt_concurrency: Int64? = nil, disable_context_comment: Bool? = nil, oauth_application_id: Int64? = nil, always_retry_failed_builds: Bool? = nil, cost_estimate_enabled: Bool? = nil, pdt_api_control_enabled: Bool? = nil) { self._name = name.map(AnyString.init) self._host = host.map(AnyString.init) self._port = port.map(AnyString.init) @@ -22554,6 +22764,8 @@ public struct WriteDBConnection: SDKModel { self.disable_context_comment = disable_context_comment self._oauth_application_id = oauth_application_id.map(AnyInt.init) self.always_retry_failed_builds = always_retry_failed_builds + self.cost_estimate_enabled = cost_estimate_enabled + self.pdt_api_control_enabled = pdt_api_control_enabled } } diff --git a/swift/looker/sdk/streams.swift b/swift/looker/sdk/streams.swift index e586f77aa..c9495e992 100644 --- a/swift/looker/sdk/streams.swift +++ b/swift/looker/sdk/streams.swift @@ -25,7 +25,7 @@ */ /** - * 437 API methods + * 443 API methods */ @@ -2170,6 +2170,20 @@ open class LookerSDKStream: APIMethods { return result } + /** + * ### Get Egress IP Addresses + * + * Returns the list of public egress IP Addresses for a hosted customer's instance + * + * GET /public_egress_ip_addresses -> EgressIpAddresses + */ + public func public_egress_ip_addresses( + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.get("/public_egress_ip_addresses", nil, nil, options) + return result + } + /** * ### Set the menu item name and content for internal help resources * @@ -2356,6 +2370,24 @@ open class LookerSDKStream: APIMethods { return result } + /** + * ### Configure SMTP Settings + * This API allows users to configure the SMTP settings on the Looker instance. + * This API is only supported in the OEM jar. Additionally, only admin users are authorised to call this API. + * + * POST /smtp_settings -> Voidable + */ + public func set_smtp_settings( + /** + * @param {SmtpSettings} body + */ + _ body: SmtpSettings, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.post("/smtp_settings", nil, try! self.encode(body), options) + return result + } + /** * ### Get current SMTP status. * @@ -3792,6 +3824,31 @@ open class LookerSDKStream: APIMethods { return result } + /** + * ### Creates a new dashboard object based on LookML Dashboard YAML, and returns the details of the newly created dashboard. + * + * This is equivalent to creating a LookML Dashboard and converting to a User-defined dashboard. + * + * LookML must contain valid LookML YAML code. It's recommended to use the LookML format returned + * from [dashboard_lookml()](#!/Dashboard/dashboard_lookml) as the input LookML (newlines replaced with + * ). + * + * Note that the created dashboard is not linked to any LookML Dashboard, + * i.e. [sync_lookml_dashboard()](#!/Dashboard/sync_lookml_dashboard) will not update dashboards created by this method. + * + * POST /dashboards/from_lookml -> DashboardLookml + */ + public func create_dashboard_from_lookml( + /** + * @param {WriteDashboardLookml} body + */ + _ body: WriteDashboardLookml, + options: ITransportSettings? = nil + ) -> SDKResponse { + let result: SDKResponse = self.post("/dashboards/from_lookml", nil, try! self.encode(body), options) + return result + } + /** * ### Copy an existing dashboard * @@ -4426,6 +4483,84 @@ open class LookerSDKStream: APIMethods { return result } + /** + * Enqueue materialization for a PDT with the given model name and view name + * + * GET /derived_table/{model_name}/{view_name}/start -> MaterializePDT + */ + public func start_pdt_build( + /** + * @param {String} model_name The model of the PDT to start building. + */ + _ model_name: String, + /** + * @param {String} view_name The view name of the PDT to start building. + */ + _ view_name: String, + /** + * @param {String} force_rebuild Force rebuild of required dependent PDTs, even if they are already materialized. + */ + force_rebuild: String? = nil, + /** + * @param {String} force_full_incremental Force involved incremental PDTs to fully re-materialize. + */ + force_full_incremental: String? = nil, + /** + * @param {String} workspace Workspace in which to materialize selected PDT ('dev' or default 'production'). + */ + workspace: String? = nil, + /** + * @param {String} source The source of this request. + */ + source: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_model_name = encodeParam(model_name) + let path_view_name = encodeParam(view_name) + let result: SDKResponse = self.get("/derived_table/\(path_model_name)/\(path_view_name)/start", + ["force_rebuild": force_rebuild, "force_full_incremental": force_full_incremental, "workspace": workspace, "source": source], nil, options) + return result + } + + /** + * Check status of PDT materialization + * + * GET /derived_table/{materialization_id}/status -> MaterializePDT + */ + public func check_pdt_build( + /** + * @param {String} materialization_id The materialization id to check status for. + */ + _ materialization_id: String, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_materialization_id = encodeParam(materialization_id) + let result: SDKResponse = self.get("/derived_table/\(path_materialization_id)/status", nil, nil, options) + return result + } + + /** + * Stop a PDT materialization + * + * GET /derived_table/{materialization_id}/stop -> MaterializePDT + */ + public func stop_pdt_build( + /** + * @param {String} materialization_id The materialization id to stop. + */ + _ materialization_id: String, + /** + * @param {String} source The source of this request. + */ + source: String? = nil, + options: ITransportSettings? = nil + ) -> SDKResponse { + let path_materialization_id = encodeParam(materialization_id) + let result: SDKResponse = self.get("/derived_table/\(path_materialization_id)/stop", + ["source": source], nil, options) + return result + } + // MARK Folder: Manage Folders