spartera_api_sdk 1.0.81 → 1.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -4
  3. data/docs/Assets.md +7 -3
  4. data/docs/AssetsApi.md +12 -12
  5. data/docs/AssetsInput.md +7 -3
  6. data/docs/AssetsUpdate.md +7 -3
  7. data/docs/Connections.md +1 -1
  8. data/docs/ConnectionsApi.md +72 -0
  9. data/docs/ConnectionsInput.md +1 -1
  10. data/docs/ConnectionsUpdate.md +1 -1
  11. data/docs/Endpoints.md +23 -7
  12. data/docs/EndpointsApi.md +146 -0
  13. data/docs/EndpointsInput.md +23 -7
  14. data/docs/EndpointsUpdate.md +23 -7
  15. data/lib/spartera_api_sdk/api/assets_api.rb +20 -20
  16. data/lib/spartera_api_sdk/api/connections_api.rb +93 -0
  17. data/lib/spartera_api_sdk/api/endpoints_api.rb +197 -0
  18. data/lib/spartera_api_sdk/models/assets.rb +33 -13
  19. data/lib/spartera_api_sdk/models/assets_input.rb +33 -13
  20. data/lib/spartera_api_sdk/models/assets_update.rb +33 -13
  21. data/lib/spartera_api_sdk/models/connections.rb +3 -3
  22. data/lib/spartera_api_sdk/models/connections_input.rb +3 -3
  23. data/lib/spartera_api_sdk/models/connections_update.rb +3 -3
  24. data/lib/spartera_api_sdk/models/endpoints.rb +149 -45
  25. data/lib/spartera_api_sdk/models/endpoints_input.rb +132 -28
  26. data/lib/spartera_api_sdk/models/endpoints_update.rb +132 -28
  27. data/lib/spartera_api_sdk/version.rb +1 -1
  28. data/spec/api/assets_api_spec.rb +2 -2
  29. data/spec/api/connections_api_spec.rb +12 -0
  30. data/spec/api/endpoints_api_spec.rb +25 -0
  31. data/spec/models/assets_input_spec.rb +19 -7
  32. data/spec/models/assets_spec.rb +19 -7
  33. data/spec/models/assets_update_spec.rb +19 -7
  34. data/spec/models/connections_input_spec.rb +1 -1
  35. data/spec/models/connections_spec.rb +1 -1
  36. data/spec/models/connections_update_spec.rb +1 -1
  37. data/spec/models/endpoints_input_spec.rb +65 -9
  38. data/spec/models/endpoints_spec.rb +65 -9
  39. data/spec/models/endpoints_update_spec.rb +65 -9
  40. metadata +140 -140
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba51405f4e482e1d5d7b74de92ee59c08b78c126f5f26e23b43d01ffa3eb6342
4
- data.tar.gz: e100c58044e9482ff3f19870bd48412e6728920aa1955cc709aaf7b9742db13d
3
+ metadata.gz: d8a0910350ab3f5e3d10ca1340416d20dd65ddd6e7961f363384674de4dec534
4
+ data.tar.gz: 0ce15eeaf84959646673606dbdb14515b4f9e4be259724a5c97401ebc834e022
5
5
  SHA512:
6
- metadata.gz: 6acec8087a20002cf5558394b2a5a27000d1715934d4178c747c243fc73aab055f31358b959cb180b34021862b9d7be8859d617e3b20d9cc5720765b5e9b74d0
7
- data.tar.gz: 9a625ce9ecec9815f275f64e43dbe8a9c57a6da9c04db2e3dc1151b34d6adabe5d0ce534b6e00682bef6fd429501b9a9c2484e7f00ced5181ad14fa19ae02194
6
+ metadata.gz: e458fedd88bc3168c301f1dc08736d878bde9c57eb696a650d3dc238b88fd1d42d6ff2021bc488ec910b18767efcdbc7c90b5d7ec5350d752313134be86d1730
7
+ data.tar.gz: 981ba49f778ca746ca620acc22b8f482d5ffa0363840719a9bbd2088f241ad24c928df46f7c5d6fec3c1a184e1f0dcf325157aac32fbfd4126977d85d6a1b7a9
data/README.md CHANGED
@@ -7,7 +7,7 @@ Auto-generated API documentation for REST services of the Spartera platform
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 1.25.0
10
- - Package version: 1.0.81
10
+ - Package version: 1.0.83
11
11
  - Generator version: 7.21.0
12
12
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
13
13
 
@@ -24,16 +24,16 @@ gem build spartera_api_sdk.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./spartera_api_sdk-1.0.81.gem
27
+ gem install ./spartera_api_sdk-1.0.83.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./spartera_api_sdk-1.0.81.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./spartera_api_sdk-1.0.83.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'spartera_api_sdk', '~> 1.0.81'
36
+ gem 'spartera_api_sdk', '~> 1.0.83'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -149,10 +149,12 @@ Class | Method | HTTP request | Description
149
149
  *SparteraApiSdk::ConnectionsApi* | [**get_connections_by_id**](docs/ConnectionsApi.md#get_connections_by_id) | **GET** /companies/{company_id}/connections/{connection_id} | Get single connection by ID
150
150
  *SparteraApiSdk::ConnectionsApi* | [**get_connections_by_id2**](docs/ConnectionsApi.md#get_connections_by_id2) | **GET** /companies/{company_id}/connections/{connection_id}/test | Test the specified connection
151
151
  *SparteraApiSdk::ConnectionsApi* | [**get_connections_by_id_infoschema**](docs/ConnectionsApi.md#get_connections_by_id_infoschema) | **GET** /companies/{company_id}/connections/{connection_id}/infoschema | Retrieve the information schema for the specified connection
152
+ *SparteraApiSdk::ConnectionsApi* | [**get_connections_by_id_sample_data**](docs/ConnectionsApi.md#get_connections_by_id_sample_data) | **GET** /companies/{company_id}/connections/{connection_id}/sample-data | Get a randomized sample of rows from a table on this connection. Used by the visualization editor to give sellers data to author against. Query Parameters: schema_name (required): Schema/dataset name table_name (required): Table name limit (optional): Max rows to return (default 1000, max 10000) Returns columnar data — {column_name: [values]} — ready for Plotly's dataSources prop. The actual chart at render time will pull fresh data via the asset's saved SQL; this is only for authoring preview.
152
153
  *SparteraApiSdk::ConnectionsApi* | [**list_connections**](docs/ConnectionsApi.md#list_connections) | **GET** /companies/{company_id}/connections | Get all connections for a specific company
153
154
  *SparteraApiSdk::ConnectionsApi* | [**update_connections**](docs/ConnectionsApi.md#update_connections) | **PATCH** /companies/{company_id}/connections/{connection_id} | Update an existing connection by ID
154
155
  *SparteraApiSdk::EndpointsApi* | [**create_endpoints**](docs/EndpointsApi.md#create_endpoints) | **POST** /companies/{company_id}/endpoints | Create a new endpoint
155
156
  *SparteraApiSdk::EndpointsApi* | [**create_endpoints_keys**](docs/EndpointsApi.md#create_endpoints_keys) | **POST** /companies/{company_id}/endpoints/{endpoint_id}/keys | POST /companies/{company_id}/endpoints/{endpoint_id}/keys
157
+ *SparteraApiSdk::EndpointsApi* | [**create_endpoints_scan_column**](docs/EndpointsApi.md#create_endpoints_scan_column) | **POST** /companies/{company_id}/endpoints/{endpoint_id}/scan_column | POST /companies/{company_id}/endpoints/{endpoint_id}/scan_column
156
158
  *SparteraApiSdk::EndpointsApi* | [**delete_endpoints**](docs/EndpointsApi.md#delete_endpoints) | **DELETE** /companies/{company_id}/endpoints/{endpoint_id} | Delete single endpoint by ID
157
159
  *SparteraApiSdk::EndpointsApi* | [**delete_endpoints_keys**](docs/EndpointsApi.md#delete_endpoints_keys) | **DELETE** /companies/{company_id}/endpoints/{endpoint_id}/keys/{api_key_id} | DELETE /companies/{company_id}/endpoints/{endpoint_id}/keys/{api_key_id}
158
160
  *SparteraApiSdk::EndpointsApi* | [**get_endpoints_by_id**](docs/EndpointsApi.md#get_endpoints_by_id) | **GET** /companies/{company_id}/endpoints/{endpoint_id} | Get single endpoint by ID
@@ -160,6 +162,7 @@ Class | Method | HTTP request | Description
160
162
  *SparteraApiSdk::EndpointsApi* | [**get_endpoints_by_id_connections_describe**](docs/EndpointsApi.md#get_endpoints_by_id_connections_describe) | **GET** /companies/{company_id}/endpoints/../connections/{connection_id}/describe | Get schema information for a connection Query parameters: include_fields: Whether to include field information (default: true) schemas: Optional comma-separated schemas to include tables: Optional comma-separated tables to include
161
163
  *SparteraApiSdk::EndpointsApi* | [**get_endpoints_by_id_execute**](docs/EndpointsApi.md#get_endpoints_by_id_execute) | **GET** /companies/{company_id}/endpoints/{endpoint_id}/execute | Execute an endpoint with pagination support. Customer-facing route that returns paginated data. Query params: ?start=0&limit=100
162
164
  *SparteraApiSdk::EndpointsApi* | [**get_endpoints_by_id_keys**](docs/EndpointsApi.md#get_endpoints_by_id_keys) | **GET** /companies/{company_id}/endpoints/{endpoint_id}/keys | GET /companies/{company_id}/endpoints/{endpoint_id}/keys
165
+ *SparteraApiSdk::EndpointsApi* | [**get_endpoints_by_id_recommendations**](docs/EndpointsApi.md#get_endpoints_by_id_recommendations) | **GET** /companies/{company_id}/endpoints/{endpoint_id}/recommendations | GET /companies/{company_id}/endpoints/{endpoint_id}/recommendations
163
166
  *SparteraApiSdk::EndpointsApi* | [**get_endpoints_by_id_stats**](docs/EndpointsApi.md#get_endpoints_by_id_stats) | **GET** /companies/{company_id}/endpoints/{endpoint_id}/stats | Get usage statistics for an endpoint Query parameters: days: Number of days to analyze (default: 30)
164
167
  *SparteraApiSdk::EndpointsApi* | [**get_endpoints_by_id_test**](docs/EndpointsApi.md#get_endpoints_by_id_test) | **GET** /companies/{company_id}/endpoints/{endpoint_id}/test | Test an endpoint with sample data Request body (optional): limit: Number of sample rows to return (default: 10)
165
168
  *SparteraApiSdk::EndpointsApi* | [**get_endpoints_by_id_url**](docs/EndpointsApi.md#get_endpoints_by_id_url) | **GET** /companies/{company_id}/endpoints/{endpoint_id}/url | GET /companies/{company_id}/endpoints/{endpoint_id}/url
data/docs/Assets.md CHANGED
@@ -28,6 +28,7 @@
28
28
  | **asset_schema** | **Object** | Stores database table schema data including columns, types, and metadata | [optional] |
29
29
  | **visibility** | **String** | Optional. One of: PRIVATE, SHARED. | [optional] |
30
30
  | **tags** | **String** | Optional. | [optional] |
31
+ | **top_questions** | **String** | Top 3 questions this asset can help answer, in English. Stored as JSON array of strings (1-3 items, 15-200 chars each). Required for marketplace assets. | [optional] |
31
32
  | **short_code** | **String** | Short code for tera.ac URL shortener (e.g., 'f78zq1') | [optional] |
32
33
  | **restricted_domains** | **String** | Semicolon or comma-separated list of domains restricted from accessing this asset | [optional] |
33
34
  | **sql_logic** | **String** | Optional. | [optional] |
@@ -35,6 +36,7 @@
35
36
  | **source_table_name** | **String** | Optional. | [optional] |
36
37
  | **sell_in_marketplace** | **Boolean** | Required. | |
37
38
  | **require_customization** | **Boolean** | Whether this asset requires customization before use | |
39
+ | **viz_spec** | **Object** | Plotly figure JSON describing the visualization. Authored via the visual editor or via API. When populated, takes precedence over the legacy viz_* fields. Shape follows Plotly's figure schema: {data: [{type: '...', xsrc: '...', ...}], layout: {...}}. Column references use *src keys (xsrc, ysrc, labelssrc, etc.) and are hydrated with actual data at render time. | [optional] |
38
40
  | **viz_chart_library** | **String** | Optional. One of: PLOTLY, MATPLOTLIB, SEABORN. | [optional] |
39
41
  | **viz_chart_type** | **String** | Optional. One of: LINE, BAR, PIE, DOUGHNUT, POLAR, … (8 total). | [optional] |
40
42
  | **viz_dep_var_col_name** | **String** | Optional. | [optional] |
@@ -58,10 +60,10 @@
58
60
  | **next_run** | **Time** | Optional. | [optional] |
59
61
  | **data_time_period_start** | **Time** | Start date of the data time period covered | [optional] |
60
62
  | **data_time_period_end** | **Time** | End date of the data time period covered | [optional] |
63
+ | **date_collection_start** | **Time** | When the seller began actively collecting this data. Distinct from data_time_period_start, which describes when the records themselves begin. Backfilled historical data will have date_collection_start > data_time_period_start. | [optional] |
61
64
  | **geographic_coverage_type** | **String** | Type of geographic coverage | [optional] |
62
65
  | **geographic_coverage_details** | **String** | Specific regions/countries covered (e.g., 'United States, Canada, Mexico') | [optional] |
63
66
  | **data_source_refresh_frequency** | **String** | How often the source data is refreshed | [optional] |
64
- | **data_source_last_refreshed** | **Time** | When the source data was last refreshed | [optional] |
65
67
  | **rate_limit_number** | **Integer** | Number of requests allowed per period (e.g., 100) | [optional] |
66
68
  | **rate_limit_period** | **String** | Time period for rate limiting (second, minute, hour, day) | [optional] |
67
69
  | **rate_limit_granularity** | **String** | Granularity level for rate limiting (USER, COMPANY, IP) | [optional] |
@@ -96,6 +98,7 @@ instance = SparteraApiSdk::Assets.new(
96
98
  asset_schema: {},
97
99
  visibility: PRIVATE,
98
100
  tags: example_value,
101
+ top_questions: example_value,
99
102
  short_code: ABC123,
100
103
  restricted_domains: example.com,
101
104
  sql_logic: example_value,
@@ -103,6 +106,7 @@ instance = SparteraApiSdk::Assets.new(
103
106
  source_table_name: Example Name,
104
107
  sell_in_marketplace: true,
105
108
  require_customization: true,
109
+ viz_spec: {},
106
110
  viz_chart_library: PLOTLY,
107
111
  viz_chart_type: LINE,
108
112
  viz_dep_var_col_name: Example Name,
@@ -126,10 +130,10 @@ instance = SparteraApiSdk::Assets.new(
126
130
  next_run: 2025-04-01T00:00:00Z,
127
131
  data_time_period_start: 2025-04-01T00:00:00Z,
128
132
  data_time_period_end: 2025-04-01T00:00:00Z,
133
+ date_collection_start: 2025-04-01T00:00:00Z,
129
134
  geographic_coverage_type: GLOBAL,
130
135
  geographic_coverage_details: example_value,
131
- data_source_refresh_frequency: REAL_TIME,
132
- data_source_last_refreshed: 2025-04-01T00:00:00Z,
136
+ data_source_refresh_frequency: EVERY_SECOND,
133
137
  rate_limit_number: 0.15,
134
138
  rate_limit_period: SECOND,
135
139
  rate_limit_granularity: USER
data/docs/AssetsApi.md CHANGED
@@ -107,7 +107,7 @@ end
107
107
 
108
108
  ## create_assets_analyze
109
109
 
110
- > <CreateAssetsAnalyze200Response> create_assets_analyze(asset_slug, company_handle, assets_input)
110
+ > <CreateAssetsAnalyze200Response> create_assets_analyze(company_handle, asset_slug, assets_input)
111
111
 
112
112
  Process (analyze) an asset with dynamic rate limiting applied via decorator.
113
113
 
@@ -125,13 +125,13 @@ SparteraApiSdk.configure do |config|
125
125
  end
126
126
 
127
127
  api_instance = SparteraApiSdk::AssetsApi.new
128
- asset_slug = 'asset_slug_example' # String | URL-friendly slug for the Asset
129
128
  company_handle = 'company_handle_example' # String | Human-readable handle for the Company
129
+ asset_slug = 'asset_slug_example' # String | URL-friendly slug for the Asset
130
130
  assets_input = SparteraApiSdk::AssetsInput.new({company_id: 'company_id_abc123', name: 'Example Name', source: 'MANUAL'}) # AssetsInput |
131
131
 
132
132
  begin
133
133
  # Process (analyze) an asset with dynamic rate limiting applied via decorator.
134
- result = api_instance.create_assets_analyze(asset_slug, company_handle, assets_input)
134
+ result = api_instance.create_assets_analyze(company_handle, asset_slug, assets_input)
135
135
  p result
136
136
  rescue SparteraApiSdk::ApiError => e
137
137
  puts "Error when calling AssetsApi->create_assets_analyze: #{e}"
@@ -142,12 +142,12 @@ end
142
142
 
143
143
  This returns an Array which contains the response data, status code and headers.
144
144
 
145
- > <Array(<CreateAssetsAnalyze200Response>, Integer, Hash)> create_assets_analyze_with_http_info(asset_slug, company_handle, assets_input)
145
+ > <Array(<CreateAssetsAnalyze200Response>, Integer, Hash)> create_assets_analyze_with_http_info(company_handle, asset_slug, assets_input)
146
146
 
147
147
  ```ruby
148
148
  begin
149
149
  # Process (analyze) an asset with dynamic rate limiting applied via decorator.
150
- data, status_code, headers = api_instance.create_assets_analyze_with_http_info(asset_slug, company_handle, assets_input)
150
+ data, status_code, headers = api_instance.create_assets_analyze_with_http_info(company_handle, asset_slug, assets_input)
151
151
  p status_code # => 2xx
152
152
  p headers # => { ... }
153
153
  p data # => <CreateAssetsAnalyze200Response>
@@ -160,8 +160,8 @@ end
160
160
 
161
161
  | Name | Type | Description | Notes |
162
162
  | ---- | ---- | ----------- | ----- |
163
- | **asset_slug** | **String** | URL-friendly slug for the Asset | |
164
163
  | **company_handle** | **String** | Human-readable handle for the Company | |
164
+ | **asset_slug** | **String** | URL-friendly slug for the Asset | |
165
165
  | **assets_input** | [**AssetsInput**](AssetsInput.md) | | |
166
166
 
167
167
  ### Return type
@@ -539,7 +539,7 @@ end
539
539
 
540
540
  ## get_assets_by_id_analyze
541
541
 
542
- > <GetAssetsByIdAnalyze200Response> get_assets_by_id_analyze(asset_slug, company_handle)
542
+ > <GetAssetsByIdAnalyze200Response> get_assets_by_id_analyze(company_handle, asset_slug)
543
543
 
544
544
  Process (analyze) an asset with dynamic rate limiting applied via decorator.
545
545
 
@@ -557,12 +557,12 @@ SparteraApiSdk.configure do |config|
557
557
  end
558
558
 
559
559
  api_instance = SparteraApiSdk::AssetsApi.new
560
- asset_slug = 'asset_slug_example' # String | URL-friendly slug for the Asset
561
560
  company_handle = 'company_handle_example' # String | Human-readable handle for the Company
561
+ asset_slug = 'asset_slug_example' # String | URL-friendly slug for the Asset
562
562
 
563
563
  begin
564
564
  # Process (analyze) an asset with dynamic rate limiting applied via decorator.
565
- result = api_instance.get_assets_by_id_analyze(asset_slug, company_handle)
565
+ result = api_instance.get_assets_by_id_analyze(company_handle, asset_slug)
566
566
  p result
567
567
  rescue SparteraApiSdk::ApiError => e
568
568
  puts "Error when calling AssetsApi->get_assets_by_id_analyze: #{e}"
@@ -573,12 +573,12 @@ end
573
573
 
574
574
  This returns an Array which contains the response data, status code and headers.
575
575
 
576
- > <Array(<GetAssetsByIdAnalyze200Response>, Integer, Hash)> get_assets_by_id_analyze_with_http_info(asset_slug, company_handle)
576
+ > <Array(<GetAssetsByIdAnalyze200Response>, Integer, Hash)> get_assets_by_id_analyze_with_http_info(company_handle, asset_slug)
577
577
 
578
578
  ```ruby
579
579
  begin
580
580
  # Process (analyze) an asset with dynamic rate limiting applied via decorator.
581
- data, status_code, headers = api_instance.get_assets_by_id_analyze_with_http_info(asset_slug, company_handle)
581
+ data, status_code, headers = api_instance.get_assets_by_id_analyze_with_http_info(company_handle, asset_slug)
582
582
  p status_code # => 2xx
583
583
  p headers # => { ... }
584
584
  p data # => <GetAssetsByIdAnalyze200Response>
@@ -591,8 +591,8 @@ end
591
591
 
592
592
  | Name | Type | Description | Notes |
593
593
  | ---- | ---- | ----------- | ----- |
594
- | **asset_slug** | **String** | URL-friendly slug for the Asset | |
595
594
  | **company_handle** | **String** | Human-readable handle for the Company | |
595
+ | **asset_slug** | **String** | URL-friendly slug for the Asset | |
596
596
 
597
597
  ### Return type
598
598
 
data/docs/AssetsInput.md CHANGED
@@ -21,6 +21,7 @@
21
21
  | **asset_type** | **String** | Optional. One of: CALCULATION, VISUALIZATION, DATA. | [optional] |
22
22
  | **asset_schema** | **Object** | Stores database table schema data including columns, types, and metadata | [optional] |
23
23
  | **tags** | **String** | Optional. | [optional] |
24
+ | **top_questions** | **String** | Top 3 questions this asset can help answer, in English. Stored as JSON array of strings (1-3 items, 15-200 chars each). Required for marketplace assets. | [optional] |
24
25
  | **short_code** | **String** | Short code for tera.ac URL shortener (e.g., &#39;f78zq1&#39;) | [optional] |
25
26
  | **restricted_domains** | **String** | Semicolon or comma-separated list of domains restricted from accessing this asset | [optional] |
26
27
  | **sql_logic** | **String** | Optional. | [optional] |
@@ -28,6 +29,7 @@
28
29
  | **source_table_name** | **String** | Optional. | [optional] |
29
30
  | **sell_in_marketplace** | **Boolean** | Required. | [optional] |
30
31
  | **require_customization** | **Boolean** | Whether this asset requires customization before use | [optional] |
32
+ | **viz_spec** | **Object** | Plotly figure JSON describing the visualization. Authored via the visual editor or via API. When populated, takes precedence over the legacy viz_* fields. Shape follows Plotly&#39;s figure schema: {data: [{type: &#39;...&#39;, xsrc: &#39;...&#39;, ...}], layout: {...}}. Column references use *src keys (xsrc, ysrc, labelssrc, etc.) and are hydrated with actual data at render time. | [optional] |
31
33
  | **viz_chart_library** | **String** | Optional. One of: PLOTLY, MATPLOTLIB, SEABORN. | [optional] |
32
34
  | **viz_chart_type** | **String** | Optional. One of: LINE, BAR, PIE, DOUGHNUT, POLAR, … (8 total). | [optional] |
33
35
  | **viz_dep_var_col_name** | **String** | Optional. | [optional] |
@@ -51,10 +53,10 @@
51
53
  | **next_run** | **Time** | Optional. | [optional] |
52
54
  | **data_time_period_start** | **Time** | Start date of the data time period covered | [optional] |
53
55
  | **data_time_period_end** | **Time** | End date of the data time period covered | [optional] |
56
+ | **date_collection_start** | **Time** | When the seller began actively collecting this data. Distinct from data_time_period_start, which describes when the records themselves begin. Backfilled historical data will have date_collection_start &gt; data_time_period_start. | [optional] |
54
57
  | **geographic_coverage_type** | **String** | Type of geographic coverage | [optional] |
55
58
  | **geographic_coverage_details** | **String** | Specific regions/countries covered (e.g., &#39;United States, Canada, Mexico&#39;) | [optional] |
56
59
  | **data_source_refresh_frequency** | **String** | How often the source data is refreshed | [optional] |
57
- | **data_source_last_refreshed** | **Time** | When the source data was last refreshed | [optional] |
58
60
  | **rate_limit_number** | **Integer** | Number of requests allowed per period (e.g., 100) | [optional] |
59
61
  | **rate_limit_period** | **String** | Time period for rate limiting (second, minute, hour, day) | [optional] |
60
62
  | **rate_limit_granularity** | **String** | Granularity level for rate limiting (USER, COMPANY, IP) | [optional] |
@@ -82,6 +84,7 @@ instance = SparteraApiSdk::AssetsInput.new(
82
84
  asset_type: CALCULATION,
83
85
  asset_schema: {},
84
86
  tags: example_value,
87
+ top_questions: example_value,
85
88
  short_code: ABC123,
86
89
  restricted_domains: example.com,
87
90
  sql_logic: example_value,
@@ -89,6 +92,7 @@ instance = SparteraApiSdk::AssetsInput.new(
89
92
  source_table_name: Example Name,
90
93
  sell_in_marketplace: true,
91
94
  require_customization: true,
95
+ viz_spec: {},
92
96
  viz_chart_library: PLOTLY,
93
97
  viz_chart_type: LINE,
94
98
  viz_dep_var_col_name: Example Name,
@@ -112,10 +116,10 @@ instance = SparteraApiSdk::AssetsInput.new(
112
116
  next_run: 2025-04-01T00:00:00Z,
113
117
  data_time_period_start: 2025-04-01T00:00:00Z,
114
118
  data_time_period_end: 2025-04-01T00:00:00Z,
119
+ date_collection_start: 2025-04-01T00:00:00Z,
115
120
  geographic_coverage_type: GLOBAL,
116
121
  geographic_coverage_details: example_value,
117
- data_source_refresh_frequency: REAL_TIME,
118
- data_source_last_refreshed: 2025-04-01T00:00:00Z,
122
+ data_source_refresh_frequency: EVERY_SECOND,
119
123
  rate_limit_number: 0.15,
120
124
  rate_limit_period: SECOND,
121
125
  rate_limit_granularity: USER
data/docs/AssetsUpdate.md CHANGED
@@ -21,6 +21,7 @@
21
21
  | **asset_type** | **String** | Optional. One of: CALCULATION, VISUALIZATION, DATA. | [optional] |
22
22
  | **asset_schema** | **Object** | Stores database table schema data including columns, types, and metadata | [optional] |
23
23
  | **tags** | **String** | Optional. | [optional] |
24
+ | **top_questions** | **String** | Top 3 questions this asset can help answer, in English. Stored as JSON array of strings (1-3 items, 15-200 chars each). Required for marketplace assets. | [optional] |
24
25
  | **short_code** | **String** | Short code for tera.ac URL shortener (e.g., &#39;f78zq1&#39;) | [optional] |
25
26
  | **restricted_domains** | **String** | Semicolon or comma-separated list of domains restricted from accessing this asset | [optional] |
26
27
  | **sql_logic** | **String** | Optional. | [optional] |
@@ -28,6 +29,7 @@
28
29
  | **source_table_name** | **String** | Optional. | [optional] |
29
30
  | **sell_in_marketplace** | **Boolean** | Required. | [optional] |
30
31
  | **require_customization** | **Boolean** | Whether this asset requires customization before use | [optional] |
32
+ | **viz_spec** | **Object** | Plotly figure JSON describing the visualization. Authored via the visual editor or via API. When populated, takes precedence over the legacy viz_* fields. Shape follows Plotly&#39;s figure schema: {data: [{type: &#39;...&#39;, xsrc: &#39;...&#39;, ...}], layout: {...}}. Column references use *src keys (xsrc, ysrc, labelssrc, etc.) and are hydrated with actual data at render time. | [optional] |
31
33
  | **viz_chart_library** | **String** | Optional. One of: PLOTLY, MATPLOTLIB, SEABORN. | [optional] |
32
34
  | **viz_chart_type** | **String** | Optional. One of: LINE, BAR, PIE, DOUGHNUT, POLAR, … (8 total). | [optional] |
33
35
  | **viz_dep_var_col_name** | **String** | Optional. | [optional] |
@@ -51,10 +53,10 @@
51
53
  | **next_run** | **Time** | Optional. | [optional] |
52
54
  | **data_time_period_start** | **Time** | Start date of the data time period covered | [optional] |
53
55
  | **data_time_period_end** | **Time** | End date of the data time period covered | [optional] |
56
+ | **date_collection_start** | **Time** | When the seller began actively collecting this data. Distinct from data_time_period_start, which describes when the records themselves begin. Backfilled historical data will have date_collection_start &gt; data_time_period_start. | [optional] |
54
57
  | **geographic_coverage_type** | **String** | Type of geographic coverage | [optional] |
55
58
  | **geographic_coverage_details** | **String** | Specific regions/countries covered (e.g., &#39;United States, Canada, Mexico&#39;) | [optional] |
56
59
  | **data_source_refresh_frequency** | **String** | How often the source data is refreshed | [optional] |
57
- | **data_source_last_refreshed** | **Time** | When the source data was last refreshed | [optional] |
58
60
  | **rate_limit_number** | **Integer** | Number of requests allowed per period (e.g., 100) | [optional] |
59
61
  | **rate_limit_period** | **String** | Time period for rate limiting (second, minute, hour, day) | [optional] |
60
62
  | **rate_limit_granularity** | **String** | Granularity level for rate limiting (USER, COMPANY, IP) | [optional] |
@@ -82,6 +84,7 @@ instance = SparteraApiSdk::AssetsUpdate.new(
82
84
  asset_type: CALCULATION,
83
85
  asset_schema: {},
84
86
  tags: example_value,
87
+ top_questions: example_value,
85
88
  short_code: ABC123,
86
89
  restricted_domains: example.com,
87
90
  sql_logic: example_value,
@@ -89,6 +92,7 @@ instance = SparteraApiSdk::AssetsUpdate.new(
89
92
  source_table_name: Example Name,
90
93
  sell_in_marketplace: true,
91
94
  require_customization: true,
95
+ viz_spec: {},
92
96
  viz_chart_library: PLOTLY,
93
97
  viz_chart_type: LINE,
94
98
  viz_dep_var_col_name: Example Name,
@@ -112,10 +116,10 @@ instance = SparteraApiSdk::AssetsUpdate.new(
112
116
  next_run: 2025-04-01T00:00:00Z,
113
117
  data_time_period_start: 2025-04-01T00:00:00Z,
114
118
  data_time_period_end: 2025-04-01T00:00:00Z,
119
+ date_collection_start: 2025-04-01T00:00:00Z,
115
120
  geographic_coverage_type: GLOBAL,
116
121
  geographic_coverage_details: example_value,
117
- data_source_refresh_frequency: REAL_TIME,
118
- data_source_last_refreshed: 2025-04-01T00:00:00Z,
122
+ data_source_refresh_frequency: EVERY_SECOND,
119
123
  rate_limit_number: 0.15,
120
124
  rate_limit_period: SECOND,
121
125
  rate_limit_granularity: USER
data/docs/Connections.md CHANGED
@@ -10,7 +10,7 @@
10
10
  | **user_id** | **String** | References users.user_id — An individual user account within a company. See GET /users for valid values. Optional. | [optional] |
11
11
  | **engine_id** | **Integer** | References storage_engines.engine_id — Fact table of all the different storage engines we support. See GET /storage_engines for valid values. Required. | |
12
12
  | **company_id** | **String** | References companies.company_id — A Spartera seller or buyer company account. See GET /companies for valid values. Required. | |
13
- | **credential_type** | **String** | Optional. One of: SERVICE_ACCOUNT, USERNAME_PASSWORD, API_KEY, SERVICE_IDENTITY, ACCESS_KEY, … (8 total). | [optional] |
13
+ | **credential_type** | **String** | Optional. One of: SERVICE_ACCOUNT, USERNAME_PASSWORD, API_KEY, SERVICE_IDENTITY, ACCESS_KEY, … (10 total). | [optional] |
14
14
  | **name** | **String** | Optional. | [optional] |
15
15
  | **description** | **String** | Optional. | [optional] |
16
16
  | **provider_domain** | **String** | Domain of the external API provider (e.g., &#39;api.weather.com&#39;) | [optional] |
@@ -9,6 +9,7 @@ All URIs are relative to *https://api.spartera.com*
9
9
  | [**get_connections_by_id**](ConnectionsApi.md#get_connections_by_id) | **GET** /companies/{company_id}/connections/{connection_id} | Get single connection by ID |
10
10
  | [**get_connections_by_id2**](ConnectionsApi.md#get_connections_by_id2) | **GET** /companies/{company_id}/connections/{connection_id}/test | Test the specified connection |
11
11
  | [**get_connections_by_id_infoschema**](ConnectionsApi.md#get_connections_by_id_infoschema) | **GET** /companies/{company_id}/connections/{connection_id}/infoschema | Retrieve the information schema for the specified connection |
12
+ | [**get_connections_by_id_sample_data**](ConnectionsApi.md#get_connections_by_id_sample_data) | **GET** /companies/{company_id}/connections/{connection_id}/sample-data | Get a randomized sample of rows from a table on this connection. Used by the visualization editor to give sellers data to author against. Query Parameters: schema_name (required): Schema/dataset name table_name (required): Table name limit (optional): Max rows to return (default 1000, max 10000) Returns columnar data — {column_name: [values]} — ready for Plotly&#39;s dataSources prop. The actual chart at render time will pull fresh data via the asset&#39;s saved SQL; this is only for authoring preview. |
12
13
  | [**list_connections**](ConnectionsApi.md#list_connections) | **GET** /companies/{company_id}/connections | Get all connections for a specific company |
13
14
  | [**update_connections**](ConnectionsApi.md#update_connections) | **PATCH** /companies/{company_id}/connections/{connection_id} | Update an existing connection by ID |
14
15
 
@@ -380,6 +381,77 @@ end
380
381
  - **Accept**: application/json
381
382
 
382
383
 
384
+ ## get_connections_by_id_sample_data
385
+
386
+ > <GetConnectionsById200Response> get_connections_by_id_sample_data(company_id, connection_id)
387
+
388
+ Get a randomized sample of rows from a table on this connection. Used by the visualization editor to give sellers data to author against. Query Parameters: schema_name (required): Schema/dataset name table_name (required): Table name limit (optional): Max rows to return (default 1000, max 10000) Returns columnar data — {column_name: [values]} — ready for Plotly's dataSources prop. The actual chart at render time will pull fresh data via the asset's saved SQL; this is only for authoring preview.
389
+
390
+ ### Examples
391
+
392
+ ```ruby
393
+ require 'time'
394
+ require 'spartera_api_sdk'
395
+ # setup authorization
396
+ SparteraApiSdk.configure do |config|
397
+ # Configure API key authorization: ApiKeyAuth
398
+ config.api_key['x-api-key'] = 'YOUR API KEY'
399
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
400
+ # config.api_key_prefix['x-api-key'] = 'Bearer'
401
+ end
402
+
403
+ api_instance = SparteraApiSdk::ConnectionsApi.new
404
+ company_id = 'company_id_example' # String | Unique identifier for the Company
405
+ connection_id = 'connection_id_example' # String | Unique identifier for the Connection
406
+
407
+ begin
408
+ # Get a randomized sample of rows from a table on this connection. Used by the visualization editor to give sellers data to author against. Query Parameters: schema_name (required): Schema/dataset name table_name (required): Table name limit (optional): Max rows to return (default 1000, max 10000) Returns columnar data — {column_name: [values]} — ready for Plotly's dataSources prop. The actual chart at render time will pull fresh data via the asset's saved SQL; this is only for authoring preview.
409
+ result = api_instance.get_connections_by_id_sample_data(company_id, connection_id)
410
+ p result
411
+ rescue SparteraApiSdk::ApiError => e
412
+ puts "Error when calling ConnectionsApi->get_connections_by_id_sample_data: #{e}"
413
+ end
414
+ ```
415
+
416
+ #### Using the get_connections_by_id_sample_data_with_http_info variant
417
+
418
+ This returns an Array which contains the response data, status code and headers.
419
+
420
+ > <Array(<GetConnectionsById200Response>, Integer, Hash)> get_connections_by_id_sample_data_with_http_info(company_id, connection_id)
421
+
422
+ ```ruby
423
+ begin
424
+ # Get a randomized sample of rows from a table on this connection. Used by the visualization editor to give sellers data to author against. Query Parameters: schema_name (required): Schema/dataset name table_name (required): Table name limit (optional): Max rows to return (default 1000, max 10000) Returns columnar data — {column_name: [values]} — ready for Plotly's dataSources prop. The actual chart at render time will pull fresh data via the asset's saved SQL; this is only for authoring preview.
425
+ data, status_code, headers = api_instance.get_connections_by_id_sample_data_with_http_info(company_id, connection_id)
426
+ p status_code # => 2xx
427
+ p headers # => { ... }
428
+ p data # => <GetConnectionsById200Response>
429
+ rescue SparteraApiSdk::ApiError => e
430
+ puts "Error when calling ConnectionsApi->get_connections_by_id_sample_data_with_http_info: #{e}"
431
+ end
432
+ ```
433
+
434
+ ### Parameters
435
+
436
+ | Name | Type | Description | Notes |
437
+ | ---- | ---- | ----------- | ----- |
438
+ | **company_id** | **String** | Unique identifier for the Company | |
439
+ | **connection_id** | **String** | Unique identifier for the Connection | |
440
+
441
+ ### Return type
442
+
443
+ [**GetConnectionsById200Response**](GetConnectionsById200Response.md)
444
+
445
+ ### Authorization
446
+
447
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
448
+
449
+ ### HTTP request headers
450
+
451
+ - **Content-Type**: Not defined
452
+ - **Accept**: application/json
453
+
454
+
383
455
  ## list_connections
384
456
 
385
457
  > <ListConnections200Response> list_connections(company_id, opts)
@@ -7,7 +7,7 @@
7
7
  | **user_id** | **String** | References users.user_id — An individual user account within a company. See GET /users for valid values. Optional. | [optional] |
8
8
  | **engine_id** | **Integer** | References storage_engines.engine_id — Fact table of all the different storage engines we support. See GET /storage_engines for valid values. Required. | |
9
9
  | **company_id** | **String** | References companies.company_id — A Spartera seller or buyer company account. See GET /companies for valid values. Required. | |
10
- | **credential_type** | **String** | Optional. One of: SERVICE_ACCOUNT, USERNAME_PASSWORD, API_KEY, SERVICE_IDENTITY, ACCESS_KEY, … (8 total). | [optional] |
10
+ | **credential_type** | **String** | Optional. One of: SERVICE_ACCOUNT, USERNAME_PASSWORD, API_KEY, SERVICE_IDENTITY, ACCESS_KEY, … (10 total). | [optional] |
11
11
  | **name** | **String** | Optional. | [optional] |
12
12
  | **description** | **String** | Optional. | [optional] |
13
13
  | **provider_domain** | **String** | Domain of the external API provider (e.g., &#39;api.weather.com&#39;) | [optional] |
@@ -7,7 +7,7 @@
7
7
  | **user_id** | **String** | References users.user_id — An individual user account within a company. See GET /users for valid values. Optional. | [optional] |
8
8
  | **engine_id** | **Integer** | References storage_engines.engine_id — Fact table of all the different storage engines we support. See GET /storage_engines for valid values. Required. | [optional] |
9
9
  | **company_id** | **String** | References companies.company_id — A Spartera seller or buyer company account. See GET /companies for valid values. Required. | [optional] |
10
- | **credential_type** | **String** | Optional. One of: SERVICE_ACCOUNT, USERNAME_PASSWORD, API_KEY, SERVICE_IDENTITY, ACCESS_KEY, … (8 total). | [optional] |
10
+ | **credential_type** | **String** | Optional. One of: SERVICE_ACCOUNT, USERNAME_PASSWORD, API_KEY, SERVICE_IDENTITY, ACCESS_KEY, … (10 total). | [optional] |
11
11
  | **name** | **String** | Optional. | [optional] |
12
12
  | **description** | **String** | Optional. | [optional] |
13
13
  | **provider_domain** | **String** | Domain of the external API provider (e.g., &#39;api.weather.com&#39;) | [optional] |
data/docs/Endpoints.md CHANGED
@@ -16,24 +16,32 @@
16
16
  | **approved_by_user_id** | **String** | User who approved this endpoint for marketplace | [optional] |
17
17
  | **approved_at** | **Time** | Timestamp of marketplace approval | [optional] |
18
18
  | **sell_in_marketplace** | **Boolean** | Whether this endpoint appears in the public marketplace | |
19
- | **price_credits** | **Integer** | Credits deducted from the buyer&#39;s pool per successful (200 OK) request. Same credit pool as assets. price_usd kept for billing records / dashboards. | |
20
19
  | **name** | **String** | Human-readable name for the endpoint | |
21
20
  | **slug** | **String** | Human-readable, URL-safe slug derived from name at creation time. e.g. &#39;NFL Live Moneyline &amp; Spread Odds&#39; → &#39;nfl-live-moneyline-spread-odds&#39;. Never changes after creation. Unique within company (DB constraint). Creation fails with 409 if a duplicate name exists in the same company. | [optional] |
22
21
  | **description** | **String** | Description of what this endpoint provides | [optional] |
22
+ | **detailed_description** | **String** | Long-form HTML description for product pages and SEO | [optional] |
23
+ | **top_questions** | **String** | Top 3 questions this endpoint can help answer, in English. Stored as JSON array of strings (1-3 items, 15-200 chars each). Strongly encouraged for marketplace endpoints but not required — nudge via UI completeness score, not hard validation. | [optional] |
23
24
  | **source_schema_name** | **String** | Schema/database name where the table resides | [optional] |
24
25
  | **source_table_name** | **String** | Table name to query from | [optional] |
25
- | **customer_name** | **String** | Named customer for B2B deals (marketplace uses price_credits instead) | [optional] |
26
- | **price_usd** | **Float** | USD reference price for billing records and seller dashboards | [optional] |
26
+ | **customer_name** | **String** | Named customer for B2B deals (pricing handled via asset_price_history) | [optional] |
27
27
  | **endpoint_schema** | **Object** | Column configurations including aggregations, filters, and visibility. Format: {columns: [{name, type, aggregation, filter, is_hidden, alias, ...}]}. This is the source of truth — SQL is generated at runtime from this configuration. | [optional] |
28
- | **rate_limit_requests** | **Integer** | Number of requests allowed per rate_limit_period | [optional] |
28
+ | **rate_limit_number** | **Integer** | Number of requests allowed per rate_limit_period | [optional] |
29
29
  | **rate_limit_period** | **String** | Time period for rate limiting (HOUR, DAY, MONTH) | [optional] |
30
30
  | **rate_limit_granularity** | **String** | How to group rate limits (IP, USER, COMPANY, API_KEY, GLOBAL) | [optional] |
31
31
  | **access_method** | **String** | Access control method (OPEN, API_KEY, IP, EMAIL, DOMAIN) | [optional] |
32
32
  | **access_whitelist** | **Object** | List of allowed IPs, emails, or domains based on access_method. Format: {type: &#39;ip&#39;|&#39;email&#39;|&#39;domain&#39;, values: [&#39;192.168.1.1&#39;, ...]} | [optional] |
33
33
  | **status** | **String** | Current status of the endpoint (ACTIVE, INACTIVE, DEPRECATED) | |
34
+ | **data_time_period_start** | **Time** | Start date of the data time period covered | [optional] |
35
+ | **data_time_period_end** | **Time** | End date of the data time period covered | [optional] |
36
+ | **date_collection_start** | **Time** | When the seller began actively collecting this data. Distinct from data_time_period_start, which describes when the records themselves begin. Backfilled historical data will have date_collection_start &gt; data_time_period_start. | [optional] |
37
+ | **geographic_coverage_type** | **String** | Type of geographic coverage | [optional] |
38
+ | **geographic_coverage_details** | **String** | Specific regions/countries covered (e.g., &#39;United States, Canada, Mexico&#39;) | [optional] |
39
+ | **data_source_refresh_frequency** | **String** | How often the source data is refreshed | [optional] |
34
40
  | **tags** | **String** | Comma-separated tags for organizing endpoints | [optional] |
35
41
  | **last_accessed** | **Time** | When this endpoint was last called | [optional] |
36
42
  | **max_records_per_request** | **Integer** | Seller-enforced row cap per request. Buyers cannot exceed this. Default 1000. | [optional] |
43
+ | **export_enabled** | **Boolean** | Whether this endpoint supports bulk export to GCS. When True, buyers can request delivery&#x3D;gcs with format&#x3D;csv|parquet. Independent of max_records_per_request, which only governs inline JSON. | |
44
+ | **max_records_per_export** | **Integer** | Hard ceiling on rows returned per GCS export. Separate from max_records_per_request so sellers can offer larger downloads via file delivery without expanding inline JSON responses. | [optional] |
37
45
  | **sample_response** | **Object** | Last successful {spartera, request, response} envelope. Saved on each successful marketplace run. Displayed as preview on product page load. | [optional] |
38
46
  | **active** | **Boolean** | Required. | |
39
47
 
@@ -55,24 +63,32 @@ instance = SparteraApiSdk::Endpoints.new(
55
63
  approved_by_user_id: approved_by_user_id_abc123,
56
64
  approved_at: 2025-04-01T00:00:00Z,
57
65
  sell_in_marketplace: true,
58
- price_credits: 5.0,
59
66
  name: Example Name,
60
67
  slug: example-slug,
61
68
  description: Example description.,
69
+ detailed_description: Example description.,
70
+ top_questions: example_value,
62
71
  source_schema_name: Example Name,
63
72
  source_table_name: Example Name,
64
73
  customer_name: Example Name,
65
- price_usd: 5.0,
66
74
  endpoint_schema: {},
67
- rate_limit_requests: 0.15,
75
+ rate_limit_number: 0.15,
68
76
  rate_limit_period: SECOND,
69
77
  rate_limit_granularity: USER,
70
78
  access_method: OPEN,
71
79
  access_whitelist: {},
72
80
  status: ACTIVE,
81
+ data_time_period_start: 2025-04-01T00:00:00Z,
82
+ data_time_period_end: 2025-04-01T00:00:00Z,
83
+ date_collection_start: 2025-04-01T00:00:00Z,
84
+ geographic_coverage_type: GLOBAL,
85
+ geographic_coverage_details: example_value,
86
+ data_source_refresh_frequency: EVERY_SECOND,
73
87
  tags: example_value,
74
88
  last_accessed: 2025-04-01T00:00:00Z,
75
89
  max_records_per_request: 1,
90
+ export_enabled: true,
91
+ max_records_per_export: 1,
76
92
  sample_response: {},
77
93
  active: true
78
94
  )