spartera_api_sdk 1.0.82 → 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
data/docs/EndpointsApi.md CHANGED
@@ -6,6 +6,7 @@ All URIs are relative to *https://api.spartera.com*
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**create_endpoints**](EndpointsApi.md#create_endpoints) | **POST** /companies/{company_id}/endpoints | Create a new endpoint |
8
8
  | [**create_endpoints_keys**](EndpointsApi.md#create_endpoints_keys) | **POST** /companies/{company_id}/endpoints/{endpoint_id}/keys | POST /companies/{company_id}/endpoints/{endpoint_id}/keys |
9
+ | [**create_endpoints_scan_column**](EndpointsApi.md#create_endpoints_scan_column) | **POST** /companies/{company_id}/endpoints/{endpoint_id}/scan_column | POST /companies/{company_id}/endpoints/{endpoint_id}/scan_column |
9
10
  | [**delete_endpoints**](EndpointsApi.md#delete_endpoints) | **DELETE** /companies/{company_id}/endpoints/{endpoint_id} | Delete single endpoint by ID |
10
11
  | [**delete_endpoints_keys**](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} |
11
12
  | [**get_endpoints_by_id**](EndpointsApi.md#get_endpoints_by_id) | **GET** /companies/{company_id}/endpoints/{endpoint_id} | Get single endpoint by ID |
@@ -13,6 +14,7 @@ All URIs are relative to *https://api.spartera.com*
13
14
  | [**get_endpoints_by_id_connections_describe**](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 |
14
15
  | [**get_endpoints_by_id_execute**](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 |
15
16
  | [**get_endpoints_by_id_keys**](EndpointsApi.md#get_endpoints_by_id_keys) | **GET** /companies/{company_id}/endpoints/{endpoint_id}/keys | GET /companies/{company_id}/endpoints/{endpoint_id}/keys |
17
+ | [**get_endpoints_by_id_recommendations**](EndpointsApi.md#get_endpoints_by_id_recommendations) | **GET** /companies/{company_id}/endpoints/{endpoint_id}/recommendations | GET /companies/{company_id}/endpoints/{endpoint_id}/recommendations |
16
18
  | [**get_endpoints_by_id_stats**](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) |
17
19
  | [**get_endpoints_by_id_test**](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) |
18
20
  | [**get_endpoints_by_id_url**](EndpointsApi.md#get_endpoints_by_id_url) | **GET** /companies/{company_id}/endpoints/{endpoint_id}/url | GET /companies/{company_id}/endpoints/{endpoint_id}/url |
@@ -176,6 +178,79 @@ end
176
178
  - **Accept**: application/json
177
179
 
178
180
 
181
+ ## create_endpoints_scan_column
182
+
183
+ > <CreateEndpoints200Response> create_endpoints_scan_column(company_id, endpoint_id, endpoints_input)
184
+
185
+ POST /companies/{company_id}/endpoints/{endpoint_id}/scan_column
186
+
187
+ ### Examples
188
+
189
+ ```ruby
190
+ require 'time'
191
+ require 'spartera_api_sdk'
192
+ # setup authorization
193
+ SparteraApiSdk.configure do |config|
194
+ # Configure API key authorization: ApiKeyAuth
195
+ config.api_key['x-api-key'] = 'YOUR API KEY'
196
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
197
+ # config.api_key_prefix['x-api-key'] = 'Bearer'
198
+ end
199
+
200
+ api_instance = SparteraApiSdk::EndpointsApi.new
201
+ company_id = 'company_id_example' # String | Unique identifier for the Company
202
+ endpoint_id = 'endpoint_id_example' # String | Unique identifier for the Endpoint
203
+ endpoints_input = SparteraApiSdk::EndpointsInput.new({company_id: 'company_id_abc123', connection_id: 'connection_id_abc123', name: 'Example Name'}) # EndpointsInput |
204
+
205
+ begin
206
+ # POST /companies/{company_id}/endpoints/{endpoint_id}/scan_column
207
+ result = api_instance.create_endpoints_scan_column(company_id, endpoint_id, endpoints_input)
208
+ p result
209
+ rescue SparteraApiSdk::ApiError => e
210
+ puts "Error when calling EndpointsApi->create_endpoints_scan_column: #{e}"
211
+ end
212
+ ```
213
+
214
+ #### Using the create_endpoints_scan_column_with_http_info variant
215
+
216
+ This returns an Array which contains the response data, status code and headers.
217
+
218
+ > <Array(<CreateEndpoints200Response>, Integer, Hash)> create_endpoints_scan_column_with_http_info(company_id, endpoint_id, endpoints_input)
219
+
220
+ ```ruby
221
+ begin
222
+ # POST /companies/{company_id}/endpoints/{endpoint_id}/scan_column
223
+ data, status_code, headers = api_instance.create_endpoints_scan_column_with_http_info(company_id, endpoint_id, endpoints_input)
224
+ p status_code # => 2xx
225
+ p headers # => { ... }
226
+ p data # => <CreateEndpoints200Response>
227
+ rescue SparteraApiSdk::ApiError => e
228
+ puts "Error when calling EndpointsApi->create_endpoints_scan_column_with_http_info: #{e}"
229
+ end
230
+ ```
231
+
232
+ ### Parameters
233
+
234
+ | Name | Type | Description | Notes |
235
+ | ---- | ---- | ----------- | ----- |
236
+ | **company_id** | **String** | Unique identifier for the Company | |
237
+ | **endpoint_id** | **String** | Unique identifier for the Endpoint | |
238
+ | **endpoints_input** | [**EndpointsInput**](EndpointsInput.md) | | |
239
+
240
+ ### Return type
241
+
242
+ [**CreateEndpoints200Response**](CreateEndpoints200Response.md)
243
+
244
+ ### Authorization
245
+
246
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
247
+
248
+ ### HTTP request headers
249
+
250
+ - **Content-Type**: application/json
251
+ - **Accept**: application/json
252
+
253
+
179
254
  ## delete_endpoints
180
255
 
181
256
  > <DeleteEndpoints200Response> delete_endpoints(company_id, endpoint_id)
@@ -675,6 +750,77 @@ end
675
750
  - **Accept**: application/json
676
751
 
677
752
 
753
+ ## get_endpoints_by_id_recommendations
754
+
755
+ > <GetEndpointsByIdConnectionsDescribe200Response> get_endpoints_by_id_recommendations(company_id, endpoint_id)
756
+
757
+ GET /companies/{company_id}/endpoints/{endpoint_id}/recommendations
758
+
759
+ ### Examples
760
+
761
+ ```ruby
762
+ require 'time'
763
+ require 'spartera_api_sdk'
764
+ # setup authorization
765
+ SparteraApiSdk.configure do |config|
766
+ # Configure API key authorization: ApiKeyAuth
767
+ config.api_key['x-api-key'] = 'YOUR API KEY'
768
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
769
+ # config.api_key_prefix['x-api-key'] = 'Bearer'
770
+ end
771
+
772
+ api_instance = SparteraApiSdk::EndpointsApi.new
773
+ company_id = 'company_id_example' # String | Unique identifier for the Company
774
+ endpoint_id = 'endpoint_id_example' # String | Unique identifier for the Endpoint
775
+
776
+ begin
777
+ # GET /companies/{company_id}/endpoints/{endpoint_id}/recommendations
778
+ result = api_instance.get_endpoints_by_id_recommendations(company_id, endpoint_id)
779
+ p result
780
+ rescue SparteraApiSdk::ApiError => e
781
+ puts "Error when calling EndpointsApi->get_endpoints_by_id_recommendations: #{e}"
782
+ end
783
+ ```
784
+
785
+ #### Using the get_endpoints_by_id_recommendations_with_http_info variant
786
+
787
+ This returns an Array which contains the response data, status code and headers.
788
+
789
+ > <Array(<GetEndpointsByIdConnectionsDescribe200Response>, Integer, Hash)> get_endpoints_by_id_recommendations_with_http_info(company_id, endpoint_id)
790
+
791
+ ```ruby
792
+ begin
793
+ # GET /companies/{company_id}/endpoints/{endpoint_id}/recommendations
794
+ data, status_code, headers = api_instance.get_endpoints_by_id_recommendations_with_http_info(company_id, endpoint_id)
795
+ p status_code # => 2xx
796
+ p headers # => { ... }
797
+ p data # => <GetEndpointsByIdConnectionsDescribe200Response>
798
+ rescue SparteraApiSdk::ApiError => e
799
+ puts "Error when calling EndpointsApi->get_endpoints_by_id_recommendations_with_http_info: #{e}"
800
+ end
801
+ ```
802
+
803
+ ### Parameters
804
+
805
+ | Name | Type | Description | Notes |
806
+ | ---- | ---- | ----------- | ----- |
807
+ | **company_id** | **String** | Unique identifier for the Company | |
808
+ | **endpoint_id** | **String** | Unique identifier for the Endpoint | |
809
+
810
+ ### Return type
811
+
812
+ [**GetEndpointsByIdConnectionsDescribe200Response**](GetEndpointsByIdConnectionsDescribe200Response.md)
813
+
814
+ ### Authorization
815
+
816
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
817
+
818
+ ### HTTP request headers
819
+
820
+ - **Content-Type**: Not defined
821
+ - **Accept**: application/json
822
+
823
+
678
824
  ## get_endpoints_by_id_stats
679
825
 
680
826
  > <GetEndpointsByIdConnectionsDescribe200Response> get_endpoints_by_id_stats(company_id, endpoint_id)
@@ -15,24 +15,32 @@
15
15
  | **approved_by_user_id** | **String** | User who approved this endpoint for marketplace | [optional] |
16
16
  | **approved_at** | **Time** | Timestamp of marketplace approval | [optional] |
17
17
  | **sell_in_marketplace** | **Boolean** | Whether this endpoint appears in the public marketplace | [optional] |
18
- | **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. | [optional] |
19
18
  | **name** | **String** | Human-readable name for the endpoint | |
20
19
  | **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] |
21
20
  | **description** | **String** | Description of what this endpoint provides | [optional] |
21
+ | **detailed_description** | **String** | Long-form HTML description for product pages and SEO | [optional] |
22
+ | **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] |
22
23
  | **source_schema_name** | **String** | Schema/database name where the table resides | [optional] |
23
24
  | **source_table_name** | **String** | Table name to query from | [optional] |
24
- | **customer_name** | **String** | Named customer for B2B deals (marketplace uses price_credits instead) | [optional] |
25
- | **price_usd** | **Float** | USD reference price for billing records and seller dashboards | [optional] |
25
+ | **customer_name** | **String** | Named customer for B2B deals (pricing handled via asset_price_history) | [optional] |
26
26
  | **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] |
27
- | **rate_limit_requests** | **Integer** | Number of requests allowed per rate_limit_period | [optional] |
27
+ | **rate_limit_number** | **Integer** | Number of requests allowed per rate_limit_period | [optional] |
28
28
  | **rate_limit_period** | **String** | Time period for rate limiting (HOUR, DAY, MONTH) | [optional] |
29
29
  | **rate_limit_granularity** | **String** | How to group rate limits (IP, USER, COMPANY, API_KEY, GLOBAL) | [optional] |
30
30
  | **access_method** | **String** | Access control method (OPEN, API_KEY, IP, EMAIL, DOMAIN) | [optional] |
31
31
  | **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] |
32
32
  | **status** | **String** | Current status of the endpoint (ACTIVE, INACTIVE, DEPRECATED) | [optional] |
33
+ | **data_time_period_start** | **Time** | Start date of the data time period covered | [optional] |
34
+ | **data_time_period_end** | **Time** | End date of the data time period covered | [optional] |
35
+ | **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] |
36
+ | **geographic_coverage_type** | **String** | Type of geographic coverage | [optional] |
37
+ | **geographic_coverage_details** | **String** | Specific regions/countries covered (e.g., &#39;United States, Canada, Mexico&#39;) | [optional] |
38
+ | **data_source_refresh_frequency** | **String** | How often the source data is refreshed | [optional] |
33
39
  | **tags** | **String** | Comma-separated tags for organizing endpoints | [optional] |
34
40
  | **last_accessed** | **Time** | When this endpoint was last called | [optional] |
35
41
  | **max_records_per_request** | **Integer** | Seller-enforced row cap per request. Buyers cannot exceed this. Default 1000. | [optional] |
42
+ | **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. | [optional] |
43
+ | **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] |
36
44
  | **sample_response** | **Object** | Last successful {spartera, request, response} envelope. Saved on each successful marketplace run. Displayed as preview on product page load. | [optional] |
37
45
  | **active** | **Boolean** | Required. | [optional] |
38
46
 
@@ -53,24 +61,32 @@ instance = SparteraApiSdk::EndpointsInput.new(
53
61
  approved_by_user_id: approved_by_user_id_abc123,
54
62
  approved_at: 2025-04-01T00:00:00Z,
55
63
  sell_in_marketplace: true,
56
- price_credits: 5.0,
57
64
  name: Example Name,
58
65
  slug: example-slug,
59
66
  description: Example description.,
67
+ detailed_description: Example description.,
68
+ top_questions: example_value,
60
69
  source_schema_name: Example Name,
61
70
  source_table_name: Example Name,
62
71
  customer_name: Example Name,
63
- price_usd: 5.0,
64
72
  endpoint_schema: {},
65
- rate_limit_requests: 0.15,
73
+ rate_limit_number: 0.15,
66
74
  rate_limit_period: SECOND,
67
75
  rate_limit_granularity: USER,
68
76
  access_method: OPEN,
69
77
  access_whitelist: {},
70
78
  status: ACTIVE,
79
+ data_time_period_start: 2025-04-01T00:00:00Z,
80
+ data_time_period_end: 2025-04-01T00:00:00Z,
81
+ date_collection_start: 2025-04-01T00:00:00Z,
82
+ geographic_coverage_type: GLOBAL,
83
+ geographic_coverage_details: example_value,
84
+ data_source_refresh_frequency: EVERY_SECOND,
71
85
  tags: example_value,
72
86
  last_accessed: 2025-04-01T00:00:00Z,
73
87
  max_records_per_request: 1,
88
+ export_enabled: true,
89
+ max_records_per_export: 1,
74
90
  sample_response: {},
75
91
  active: true
76
92
  )
@@ -15,24 +15,32 @@
15
15
  | **approved_by_user_id** | **String** | User who approved this endpoint for marketplace | [optional] |
16
16
  | **approved_at** | **Time** | Timestamp of marketplace approval | [optional] |
17
17
  | **sell_in_marketplace** | **Boolean** | Whether this endpoint appears in the public marketplace | [optional] |
18
- | **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. | [optional] |
19
18
  | **name** | **String** | Human-readable name for the endpoint | [optional] |
20
19
  | **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] |
21
20
  | **description** | **String** | Description of what this endpoint provides | [optional] |
21
+ | **detailed_description** | **String** | Long-form HTML description for product pages and SEO | [optional] |
22
+ | **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] |
22
23
  | **source_schema_name** | **String** | Schema/database name where the table resides | [optional] |
23
24
  | **source_table_name** | **String** | Table name to query from | [optional] |
24
- | **customer_name** | **String** | Named customer for B2B deals (marketplace uses price_credits instead) | [optional] |
25
- | **price_usd** | **Float** | USD reference price for billing records and seller dashboards | [optional] |
25
+ | **customer_name** | **String** | Named customer for B2B deals (pricing handled via asset_price_history) | [optional] |
26
26
  | **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] |
27
- | **rate_limit_requests** | **Integer** | Number of requests allowed per rate_limit_period | [optional] |
27
+ | **rate_limit_number** | **Integer** | Number of requests allowed per rate_limit_period | [optional] |
28
28
  | **rate_limit_period** | **String** | Time period for rate limiting (HOUR, DAY, MONTH) | [optional] |
29
29
  | **rate_limit_granularity** | **String** | How to group rate limits (IP, USER, COMPANY, API_KEY, GLOBAL) | [optional] |
30
30
  | **access_method** | **String** | Access control method (OPEN, API_KEY, IP, EMAIL, DOMAIN) | [optional] |
31
31
  | **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] |
32
32
  | **status** | **String** | Current status of the endpoint (ACTIVE, INACTIVE, DEPRECATED) | [optional] |
33
+ | **data_time_period_start** | **Time** | Start date of the data time period covered | [optional] |
34
+ | **data_time_period_end** | **Time** | End date of the data time period covered | [optional] |
35
+ | **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] |
36
+ | **geographic_coverage_type** | **String** | Type of geographic coverage | [optional] |
37
+ | **geographic_coverage_details** | **String** | Specific regions/countries covered (e.g., &#39;United States, Canada, Mexico&#39;) | [optional] |
38
+ | **data_source_refresh_frequency** | **String** | How often the source data is refreshed | [optional] |
33
39
  | **tags** | **String** | Comma-separated tags for organizing endpoints | [optional] |
34
40
  | **last_accessed** | **Time** | When this endpoint was last called | [optional] |
35
41
  | **max_records_per_request** | **Integer** | Seller-enforced row cap per request. Buyers cannot exceed this. Default 1000. | [optional] |
42
+ | **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. | [optional] |
43
+ | **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] |
36
44
  | **sample_response** | **Object** | Last successful {spartera, request, response} envelope. Saved on each successful marketplace run. Displayed as preview on product page load. | [optional] |
37
45
  | **active** | **Boolean** | Required. | [optional] |
38
46
 
@@ -53,24 +61,32 @@ instance = SparteraApiSdk::EndpointsUpdate.new(
53
61
  approved_by_user_id: approved_by_user_id_abc123,
54
62
  approved_at: 2025-04-01T00:00:00Z,
55
63
  sell_in_marketplace: true,
56
- price_credits: 5.0,
57
64
  name: Example Name,
58
65
  slug: example-slug,
59
66
  description: Example description.,
67
+ detailed_description: Example description.,
68
+ top_questions: example_value,
60
69
  source_schema_name: Example Name,
61
70
  source_table_name: Example Name,
62
71
  customer_name: Example Name,
63
- price_usd: 5.0,
64
72
  endpoint_schema: {},
65
- rate_limit_requests: 0.15,
73
+ rate_limit_number: 0.15,
66
74
  rate_limit_period: SECOND,
67
75
  rate_limit_granularity: USER,
68
76
  access_method: OPEN,
69
77
  access_whitelist: {},
70
78
  status: ACTIVE,
79
+ data_time_period_start: 2025-04-01T00:00:00Z,
80
+ data_time_period_end: 2025-04-01T00:00:00Z,
81
+ date_collection_start: 2025-04-01T00:00:00Z,
82
+ geographic_coverage_type: GLOBAL,
83
+ geographic_coverage_details: example_value,
84
+ data_source_refresh_frequency: EVERY_SECOND,
71
85
  tags: example_value,
72
86
  last_accessed: 2025-04-01T00:00:00Z,
73
87
  max_records_per_request: 1,
88
+ export_enabled: true,
89
+ max_records_per_export: 1,
74
90
  sample_response: {},
75
91
  active: true
76
92
  )
@@ -144,40 +144,40 @@ module SparteraApiSdk
144
144
  end
145
145
 
146
146
  # Process (analyze) an asset with dynamic rate limiting applied via decorator.
147
- # @param asset_slug [String] URL-friendly slug for the Asset
148
147
  # @param company_handle [String] Human-readable handle for the Company
148
+ # @param asset_slug [String] URL-friendly slug for the Asset
149
149
  # @param assets_input [AssetsInput]
150
150
  # @param [Hash] opts the optional parameters
151
151
  # @return [CreateAssetsAnalyze200Response]
152
- def create_assets_analyze(asset_slug, company_handle, assets_input, opts = {})
153
- data, _status_code, _headers = create_assets_analyze_with_http_info(asset_slug, company_handle, assets_input, opts)
152
+ def create_assets_analyze(company_handle, asset_slug, assets_input, opts = {})
153
+ data, _status_code, _headers = create_assets_analyze_with_http_info(company_handle, asset_slug, assets_input, opts)
154
154
  data
155
155
  end
156
156
 
157
157
  # Process (analyze) an asset with dynamic rate limiting applied via decorator.
158
- # @param asset_slug [String] URL-friendly slug for the Asset
159
158
  # @param company_handle [String] Human-readable handle for the Company
159
+ # @param asset_slug [String] URL-friendly slug for the Asset
160
160
  # @param assets_input [AssetsInput]
161
161
  # @param [Hash] opts the optional parameters
162
162
  # @return [Array<(CreateAssetsAnalyze200Response, Integer, Hash)>] CreateAssetsAnalyze200Response data, response status code and response headers
163
- def create_assets_analyze_with_http_info(asset_slug, company_handle, assets_input, opts = {})
163
+ def create_assets_analyze_with_http_info(company_handle, asset_slug, assets_input, opts = {})
164
164
  if @api_client.config.debugging
165
165
  @api_client.config.logger.debug 'Calling API: AssetsApi.create_assets_analyze ...'
166
166
  end
167
- # verify the required parameter 'asset_slug' is set
168
- if @api_client.config.client_side_validation && asset_slug.nil?
169
- fail ArgumentError, "Missing the required parameter 'asset_slug' when calling AssetsApi.create_assets_analyze"
170
- end
171
167
  # verify the required parameter 'company_handle' is set
172
168
  if @api_client.config.client_side_validation && company_handle.nil?
173
169
  fail ArgumentError, "Missing the required parameter 'company_handle' when calling AssetsApi.create_assets_analyze"
174
170
  end
171
+ # verify the required parameter 'asset_slug' is set
172
+ if @api_client.config.client_side_validation && asset_slug.nil?
173
+ fail ArgumentError, "Missing the required parameter 'asset_slug' when calling AssetsApi.create_assets_analyze"
174
+ end
175
175
  # verify the required parameter 'assets_input' is set
176
176
  if @api_client.config.client_side_validation && assets_input.nil?
177
177
  fail ArgumentError, "Missing the required parameter 'assets_input' when calling AssetsApi.create_assets_analyze"
178
178
  end
179
179
  # resource path
180
- local_var_path = '/analyze/{company_handle}/assets/{asset_slug}'.sub('{' + 'asset_slug' + '}', CGI.escape(asset_slug.to_s)).sub('{' + 'company_handle' + '}', CGI.escape(company_handle.to_s))
180
+ local_var_path = '/analyze/{company_handle}/assets/{asset_slug}'.sub('{' + 'company_handle' + '}', CGI.escape(company_handle.to_s)).sub('{' + 'asset_slug' + '}', CGI.escape(asset_slug.to_s))
181
181
 
182
182
  # query parameters
183
183
  query_params = opts[:query_params] || {}
@@ -709,34 +709,34 @@ module SparteraApiSdk
709
709
  end
710
710
 
711
711
  # Process (analyze) an asset with dynamic rate limiting applied via decorator.
712
- # @param asset_slug [String] URL-friendly slug for the Asset
713
712
  # @param company_handle [String] Human-readable handle for the Company
713
+ # @param asset_slug [String] URL-friendly slug for the Asset
714
714
  # @param [Hash] opts the optional parameters
715
715
  # @return [GetAssetsByIdAnalyze200Response]
716
- def get_assets_by_id_analyze(asset_slug, company_handle, opts = {})
717
- data, _status_code, _headers = get_assets_by_id_analyze_with_http_info(asset_slug, company_handle, opts)
716
+ def get_assets_by_id_analyze(company_handle, asset_slug, opts = {})
717
+ data, _status_code, _headers = get_assets_by_id_analyze_with_http_info(company_handle, asset_slug, opts)
718
718
  data
719
719
  end
720
720
 
721
721
  # Process (analyze) an asset with dynamic rate limiting applied via decorator.
722
- # @param asset_slug [String] URL-friendly slug for the Asset
723
722
  # @param company_handle [String] Human-readable handle for the Company
723
+ # @param asset_slug [String] URL-friendly slug for the Asset
724
724
  # @param [Hash] opts the optional parameters
725
725
  # @return [Array<(GetAssetsByIdAnalyze200Response, Integer, Hash)>] GetAssetsByIdAnalyze200Response data, response status code and response headers
726
- def get_assets_by_id_analyze_with_http_info(asset_slug, company_handle, opts = {})
726
+ def get_assets_by_id_analyze_with_http_info(company_handle, asset_slug, opts = {})
727
727
  if @api_client.config.debugging
728
728
  @api_client.config.logger.debug 'Calling API: AssetsApi.get_assets_by_id_analyze ...'
729
729
  end
730
- # verify the required parameter 'asset_slug' is set
731
- if @api_client.config.client_side_validation && asset_slug.nil?
732
- fail ArgumentError, "Missing the required parameter 'asset_slug' when calling AssetsApi.get_assets_by_id_analyze"
733
- end
734
730
  # verify the required parameter 'company_handle' is set
735
731
  if @api_client.config.client_side_validation && company_handle.nil?
736
732
  fail ArgumentError, "Missing the required parameter 'company_handle' when calling AssetsApi.get_assets_by_id_analyze"
737
733
  end
734
+ # verify the required parameter 'asset_slug' is set
735
+ if @api_client.config.client_side_validation && asset_slug.nil?
736
+ fail ArgumentError, "Missing the required parameter 'asset_slug' when calling AssetsApi.get_assets_by_id_analyze"
737
+ end
738
738
  # resource path
739
- local_var_path = '/analyze/{company_handle}/assets/{asset_slug}'.sub('{' + 'asset_slug' + '}', CGI.escape(asset_slug.to_s)).sub('{' + 'company_handle' + '}', CGI.escape(company_handle.to_s))
739
+ local_var_path = '/analyze/{company_handle}/assets/{asset_slug}'.sub('{' + 'company_handle' + '}', CGI.escape(company_handle.to_s)).sub('{' + 'asset_slug' + '}', CGI.escape(asset_slug.to_s))
740
740
 
741
741
  # query parameters
742
742
  query_params = opts[:query_params] || {}
@@ -515,6 +515,99 @@ module SparteraApiSdk
515
515
  return data, status_code, headers
516
516
  end
517
517
 
518
+ # 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.
519
+ # @param company_id [String] Unique identifier for the Company
520
+ # @param connection_id [String] Unique identifier for the Connection
521
+ # @param [Hash] opts the optional parameters
522
+ # @return [GetConnectionsById200Response]
523
+ def get_connections_by_id_sample_data(company_id, connection_id, opts = {})
524
+ data, _status_code, _headers = get_connections_by_id_sample_data_with_http_info(company_id, connection_id, opts)
525
+ data
526
+ end
527
+
528
+ # 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.
529
+ # @param company_id [String] Unique identifier for the Company
530
+ # @param connection_id [String] Unique identifier for the Connection
531
+ # @param [Hash] opts the optional parameters
532
+ # @return [Array<(GetConnectionsById200Response, Integer, Hash)>] GetConnectionsById200Response data, response status code and response headers
533
+ def get_connections_by_id_sample_data_with_http_info(company_id, connection_id, opts = {})
534
+ if @api_client.config.debugging
535
+ @api_client.config.logger.debug 'Calling API: ConnectionsApi.get_connections_by_id_sample_data ...'
536
+ end
537
+ # verify the required parameter 'company_id' is set
538
+ if @api_client.config.client_side_validation && company_id.nil?
539
+ fail ArgumentError, "Missing the required parameter 'company_id' when calling ConnectionsApi.get_connections_by_id_sample_data"
540
+ end
541
+ if @api_client.config.client_side_validation && company_id.to_s.length > 255
542
+ fail ArgumentError, 'invalid value for "company_id" when calling ConnectionsApi.get_connections_by_id_sample_data, the character length must be smaller than or equal to 255.'
543
+ end
544
+
545
+ if @api_client.config.client_side_validation && company_id.to_s.length < 1
546
+ fail ArgumentError, 'invalid value for "company_id" when calling ConnectionsApi.get_connections_by_id_sample_data, the character length must be greater than or equal to 1.'
547
+ end
548
+
549
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
550
+ if @api_client.config.client_side_validation && company_id !~ pattern
551
+ fail ArgumentError, "invalid value for 'company_id' when calling ConnectionsApi.get_connections_by_id_sample_data, must conform to the pattern #{pattern}."
552
+ end
553
+
554
+ # verify the required parameter 'connection_id' is set
555
+ if @api_client.config.client_side_validation && connection_id.nil?
556
+ fail ArgumentError, "Missing the required parameter 'connection_id' when calling ConnectionsApi.get_connections_by_id_sample_data"
557
+ end
558
+ if @api_client.config.client_side_validation && connection_id.to_s.length > 255
559
+ fail ArgumentError, 'invalid value for "connection_id" when calling ConnectionsApi.get_connections_by_id_sample_data, the character length must be smaller than or equal to 255.'
560
+ end
561
+
562
+ if @api_client.config.client_side_validation && connection_id.to_s.length < 1
563
+ fail ArgumentError, 'invalid value for "connection_id" when calling ConnectionsApi.get_connections_by_id_sample_data, the character length must be greater than or equal to 1.'
564
+ end
565
+
566
+ pattern = Regexp.new(/^[a-zA-Z0-9_-]+$/)
567
+ if @api_client.config.client_side_validation && connection_id !~ pattern
568
+ fail ArgumentError, "invalid value for 'connection_id' when calling ConnectionsApi.get_connections_by_id_sample_data, must conform to the pattern #{pattern}."
569
+ end
570
+
571
+ # resource path
572
+ local_var_path = '/companies/{company_id}/connections/{connection_id}/sample-data'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'connection_id' + '}', CGI.escape(connection_id.to_s))
573
+
574
+ # query parameters
575
+ query_params = opts[:query_params] || {}
576
+
577
+ # header parameters
578
+ header_params = opts[:header_params] || {}
579
+ # HTTP header 'Accept' (if needed)
580
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
581
+
582
+ # form parameters
583
+ form_params = opts[:form_params] || {}
584
+
585
+ # http body (model)
586
+ post_body = opts[:debug_body]
587
+
588
+ # return_type
589
+ return_type = opts[:debug_return_type] || 'GetConnectionsById200Response'
590
+
591
+ # auth_names
592
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
593
+
594
+ new_options = opts.merge(
595
+ :operation => :"ConnectionsApi.get_connections_by_id_sample_data",
596
+ :header_params => header_params,
597
+ :query_params => query_params,
598
+ :form_params => form_params,
599
+ :body => post_body,
600
+ :auth_names => auth_names,
601
+ :return_type => return_type
602
+ )
603
+
604
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
605
+ if @api_client.config.debugging
606
+ @api_client.config.logger.debug "API called: ConnectionsApi#get_connections_by_id_sample_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
607
+ end
608
+ return data, status_code, headers
609
+ end
610
+
518
611
  # Get all connections for a specific company
519
612
  # @param company_id [String] Unique identifier for the Company
520
613
  # @param [Hash] opts the optional parameters