hubspot-api-client 10.1.1 → 11.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +2 -2
- data/lib/hubspot/codegen/cms/audit-logs/api/{default_api.rb → audit_logs_api.rb} +3 -3
- data/lib/hubspot/codegen/cms/blogs/authors/api/{default_api.rb → author_api.rb} +28 -28
- data/lib/hubspot/codegen/cms/blogs/blog-posts/api/{default_api.rb → blog_post_api.rb} +62 -62
- data/lib/hubspot/codegen/cms/blogs/tags/api/{default_api.rb → tag_api.rb} +28 -28
- data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +2 -2
- data/lib/hubspot/codegen/cms/domains/configuration.rb +0 -7
- data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +102 -102
- data/lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb +21 -21
- data/lib/hubspot/codegen/cms/hubdb/api/tables_api.rb +100 -108
- data/lib/hubspot/codegen/cms/hubdb/api_client.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/api_error.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/configuration.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/{batch_input_hub_db_table_row_v3.rb → batch_input_hub_db_table_row_v3_request.rb} +5 -5
- data/lib/hubspot/codegen/cms/hubdb/models/batch_input_json_node.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/batch_input_string.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/column.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/{column_input.rb → column_request.rb} +71 -47
- data/lib/hubspot/codegen/cms/hubdb/models/error.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/error_detail.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/foreign_id.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/forward_paging.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request.rb +4 -9
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb +12 -27
- data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_row_v3_input.rb → hub_db_table_row_v3_request.rb} +25 -20
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_v3_input.rb → hub_db_table_v3_request.rb} +53 -53
- data/lib/hubspot/codegen/cms/hubdb/models/import_result.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/next_page.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/option.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/simple_user.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/standard_error.rb +1 -1
- data/lib/hubspot/codegen/cms/performance/api/{default_api.rb → public_performance_api.rb} +5 -5
- data/lib/hubspot/codegen/cms/site-search/api/{default_api.rb → public_api.rb} +7 -7
- data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +15 -15
- data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/companies/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/companies/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +150 -0
- data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/contacts/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/deals/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/deals/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/imports/api/core_api.rb +2 -2
- data/lib/hubspot/codegen/crm/imports/api/{default_api.rb → public_imports_api.rb} +8 -8
- data/lib/hubspot/codegen/crm/imports/models/public_import_error.rb +4 -4
- data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/line_items/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/objects/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/objects/api/gdpr_api.rb +162 -0
- data/lib/hubspot/codegen/crm/objects/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +0 -2
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/objects/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/owners/api/{default_api.rb → owners_api.rb} +6 -6
- data/lib/hubspot/codegen/crm/products/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/products/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/products/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +0 -2
- data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/quotes/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/schemas/api/core_api.rb +3 -3
- data/lib/hubspot/codegen/crm/schemas/api/{default_api.rb → public_object_schemas_api.rb} +4 -4
- data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/tickets/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/timeline/api/templates_api.rb +3 -3
- data/lib/hubspot/codegen/crm/timeline/models/{collection_response_timeline_event_template.rb → collection_response_timeline_event_template_no_paging.rb} +7 -17
- data/lib/hubspot/codegen/files/files/api/files_api.rb +12 -6
- data/lib/hubspot/codegen/files/files/api/folders_api.rb +12 -0
- data/lib/hubspot/codegen/files/files/models/error_category.rb +18 -18
- data/lib/hubspot/codegen/marketing/transactional/api/{default_api.rb → public_smtp_tokens_api.rb} +14 -74
- data/lib/hubspot/codegen/marketing/transactional/api/single_send_api.rb +86 -0
- data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +82 -0
- data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +140 -0
- data/lib/hubspot/codegen/oauth/api/tokens_api.rb +100 -0
- data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +33 -1
- data/lib/hubspot/codegen/oauth/models/token_response_if.rb +27 -4
- data/lib/hubspot/version.rb +1 -1
- data/pkg/hubspot-api-client-10.1.1.gem +0 -0
- data/spec/codegen/cms/audit-logs/api/{default_api_spec.rb → audit_logs_api_spec.rb} +6 -6
- data/spec/codegen/cms/blogs/authors/api/{default_api_spec.rb → author_api_spec.rb} +6 -6
- data/spec/codegen/cms/blogs/blog-posts/api/{default_api_spec.rb → blog_post_api_spec.rb} +6 -6
- data/spec/codegen/cms/blogs/tags/api/{default_api_spec.rb → tag_api_spec.rb} +6 -6
- data/spec/codegen/cms/hubdb/api/rows_api_spec.rb +18 -18
- data/spec/codegen/cms/hubdb/api/rows_batch_api_spec.rb +4 -4
- data/spec/codegen/cms/hubdb/api/tables_api_spec.rb +35 -36
- data/spec/codegen/cms/hubdb/models/{batch_input_hub_db_table_row_v3_spec.rb → batch_input_hub_db_table_row_v3_request_spec.rb} +7 -7
- data/spec/codegen/cms/hubdb/models/batch_input_json_node_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/batch_input_string_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/{column_input_spec.rb → column_request_spec.rb} +14 -22
- data/spec/codegen/cms/hubdb/models/column_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/error_detail_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/error_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/foreign_id_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/forward_paging_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/hub_db_table_clone_request_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/{hub_db_table_row_v3_input_spec.rb → hub_db_table_row_v3_request_spec.rb} +10 -10
- data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_spec.rb +7 -1
- data/spec/codegen/cms/hubdb/models/{hub_db_table_v3_input_spec.rb → hub_db_table_v3_request_spec.rb} +13 -13
- data/spec/codegen/cms/hubdb/models/hub_db_table_v3_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/import_result_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/next_page_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/option_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/simple_user_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/standard_error_spec.rb +1 -1
- data/spec/codegen/cms/performance/api/{default_api_spec.rb → public_performance_api_spec.rb} +6 -6
- data/spec/codegen/cms/site-search/api/{default_api_spec.rb → public_api_spec.rb} +6 -6
- data/spec/codegen/cms/site-search/models/search_hit_field_spec.rb +2 -2
- data/spec/codegen/crm/companies/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/companies/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/companies/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/contacts/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/contacts/api/gdpr_api_spec.rb +59 -0
- data/spec/codegen/crm/contacts/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/contacts/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/deals/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/deals/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/deals/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/imports/api/{default_api_spec.rb → public_imports_api_spec.rb} +8 -8
- data/spec/codegen/crm/imports/models/public_import_error_spec.rb +2 -2
- data/spec/codegen/crm/line_items/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/line_items/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/line_items/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/objects/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/objects/api/gdpr_api_spec.rb +61 -0
- data/spec/codegen/crm/objects/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +0 -1
- data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/objects/feedback_submissions/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/objects/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/owners/api/{default_api_spec.rb → owners_api_spec.rb} +6 -6
- data/spec/codegen/crm/products/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/products/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/products/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/quotes/api/batch_api_spec.rb +0 -1
- data/spec/codegen/crm/quotes/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/quotes/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/schemas/api/{default_api_spec.rb → public_object_schemas_api_spec.rb} +6 -6
- data/spec/codegen/crm/tickets/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/tickets/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/tickets/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/timeline/api/templates_api_spec.rb +1 -1
- data/spec/codegen/crm/timeline/models/{collection_response_timeline_event_template_spec.rb → collection_response_timeline_event_template_no_paging_spec.rb} +6 -12
- data/spec/codegen/files/files/api/files_api_spec.rb +4 -2
- data/spec/codegen/files/files/api/folders_api_spec.rb +4 -0
- data/spec/codegen/files/files/models/error_category_spec.rb +6 -6
- data/spec/codegen/marketing/transactional/api/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +6 -18
- data/spec/codegen/marketing/transactional/api/single_send_api_spec.rb +47 -0
- data/spec/codegen/oauth/api/access_tokens_api_spec.rb +45 -0
- data/spec/codegen/oauth/api/{default_api_spec.rb → refresh_tokens_api_spec.rb} +6 -31
- data/spec/codegen/oauth/api/tokens_api_spec.rb +50 -0
- data/spec/codegen/oauth/models/access_token_info_response_spec.rb +12 -0
- data/spec/codegen/oauth/models/token_response_if_spec.rb +12 -0
- data/spec/features/cms/audit-logs/{default_api_spec.rb → audit_logs_api_spec.rb} +4 -4
- data/spec/features/cms/blogs/authors/{default_api_spec.rb → author_api_spec.rb} +28 -28
- data/spec/features/cms/blogs/blog-posts/{default_api_spec.rb → blog_post_api_spec.rb} +2 -2
- data/spec/features/cms/blogs/tags/{default_api_spec.rb → tag_api_spec.rb} +2 -2
- data/spec/features/cms/hubdb/tables_api_spec.rb +1 -1
- data/spec/features/cms/perfomance/public_perfomance_api_spec.rb +8 -0
- data/spec/features/cms/site-search/{default_api_spec.rb → public_api_spec.rb} +2 -2
- data/spec/features/crm/contacts/gdpr_api_spec.rb +8 -0
- data/spec/features/crm/objects/gdpr_api_spec.rb +8 -0
- data/spec/features/crm/owners/{default_api_spec.rb → owners_api_spec.rb} +2 -2
- data/spec/features/crm/schemas/public_object_schemas_api_spec.rb +7 -0
- data/spec/features/marketing/transactional/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +2 -3
- data/spec/features/marketing/transactional/single_send_api_spec.rb +7 -0
- data/spec/features/oauth/access_tokens_api_spec.rb +7 -0
- data/spec/features/oauth/refresh_tokens_api_spec.rb +8 -0
- data/spec/features/oauth/tokens_api_spec.rb +7 -0
- metadata +96 -82
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_live_input.rb +0 -241
- data/lib/hubspot/codegen/crm/timeline/models/next_page.rb +0 -224
- data/lib/hubspot/codegen/crm/timeline/models/paging.rb +0 -219
- data/lib/hubspot/codegen/crm/timeline/models/previous_page.rb +0 -224
- data/lib/hubspot/codegen/oauth/api/default_api.rb +0 -270
- data/spec/codegen/cms/hubdb/models/hub_db_table_v3_live_input_spec.rb +0 -59
- data/spec/codegen/crm/timeline/models/next_page_spec.rb +0 -47
- data/spec/codegen/crm/timeline/models/paging_spec.rb +0 -47
- data/spec/codegen/crm/timeline/models/previous_page_spec.rb +0 -47
- data/spec/features/cms/perfomance/default_api_spec.rb +0 -8
- data/spec/features/crm/schemas/default_api_spec.rb +0 -7
- data/spec/features/oauth/default_api_spec.rb +0 -10
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#HubDB endpoints
|
3
3
|
|
4
|
-
#HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `
|
4
|
+
#HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
@@ -94,21 +94,21 @@ module Hubspot
|
|
94
94
|
# Create rows in batch
|
95
95
|
# Creates rows in the `draft` version of the specified table, given an array of row objects. See the overview section for more details with an example.
|
96
96
|
# @param table_id_or_name [String] The ID or name of the table
|
97
|
-
# @param
|
97
|
+
# @param batch_input_hub_db_table_row_v3_request [BatchInputHubDbTableRowV3Request] JSON array of row objects
|
98
98
|
# @param [Hash] opts the optional parameters
|
99
99
|
# @return [Object]
|
100
|
-
def batch_create_draft_table_rows(table_id_or_name,
|
101
|
-
data, _status_code, _headers = batch_create_draft_table_rows_with_http_info(table_id_or_name,
|
100
|
+
def batch_create_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts = {})
|
101
|
+
data, _status_code, _headers = batch_create_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts)
|
102
102
|
data
|
103
103
|
end
|
104
104
|
|
105
105
|
# Create rows in batch
|
106
106
|
# Creates rows in the `draft` version of the specified table, given an array of row objects. See the overview section for more details with an example.
|
107
107
|
# @param table_id_or_name [String] The ID or name of the table
|
108
|
-
# @param
|
108
|
+
# @param batch_input_hub_db_table_row_v3_request [BatchInputHubDbTableRowV3Request] JSON array of row objects
|
109
109
|
# @param [Hash] opts the optional parameters
|
110
110
|
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
111
|
-
def batch_create_draft_table_rows_with_http_info(table_id_or_name,
|
111
|
+
def batch_create_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts = {})
|
112
112
|
if @api_client.config.debugging
|
113
113
|
@api_client.config.logger.debug 'Calling API: RowsBatchApi.batch_create_draft_table_rows ...'
|
114
114
|
end
|
@@ -116,9 +116,9 @@ module Hubspot
|
|
116
116
|
if @api_client.config.client_side_validation && table_id_or_name.nil?
|
117
117
|
fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling RowsBatchApi.batch_create_draft_table_rows"
|
118
118
|
end
|
119
|
-
# verify the required parameter '
|
120
|
-
if @api_client.config.client_side_validation &&
|
121
|
-
fail ArgumentError, "Missing the required parameter '
|
119
|
+
# verify the required parameter 'batch_input_hub_db_table_row_v3_request' is set
|
120
|
+
if @api_client.config.client_side_validation && batch_input_hub_db_table_row_v3_request.nil?
|
121
|
+
fail ArgumentError, "Missing the required parameter 'batch_input_hub_db_table_row_v3_request' when calling RowsBatchApi.batch_create_draft_table_rows"
|
122
122
|
end
|
123
123
|
# resource path
|
124
124
|
local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/create'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))
|
@@ -137,7 +137,7 @@ module Hubspot
|
|
137
137
|
form_params = opts[:form_params] || {}
|
138
138
|
|
139
139
|
# http body (model)
|
140
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
140
|
+
post_body = opts[:body] || @api_client.object_to_http_body(batch_input_hub_db_table_row_v3_request)
|
141
141
|
|
142
142
|
# return_type
|
143
143
|
return_type = opts[:return_type] || 'Object'
|
@@ -302,7 +302,7 @@ module Hubspot
|
|
302
302
|
end
|
303
303
|
|
304
304
|
# Get a set of rows
|
305
|
-
# Returns rows in the `
|
305
|
+
# Returns rows in the `published` version of the specified table, given a set of row ids. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access.
|
306
306
|
# @param table_id_or_name [String] The ID or name of the table to query.
|
307
307
|
# @param batch_input_string [BatchInputString] The JSON array of row ids
|
308
308
|
# @param [Hash] opts the optional parameters
|
@@ -313,7 +313,7 @@ module Hubspot
|
|
313
313
|
end
|
314
314
|
|
315
315
|
# Get a set of rows
|
316
|
-
# Returns rows in the `
|
316
|
+
# Returns rows in the `published` version of the specified table, given a set of row ids. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access.
|
317
317
|
# @param table_id_or_name [String] The ID or name of the table to query.
|
318
318
|
# @param batch_input_string [BatchInputString] The JSON array of row ids
|
319
319
|
# @param [Hash] opts the optional parameters
|
@@ -374,21 +374,21 @@ module Hubspot
|
|
374
374
|
# Replace rows in batch in draft table
|
375
375
|
# Replaces multiple rows as a batch in the `draft` version of the table. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row.
|
376
376
|
# @param table_id_or_name [String] The ID or name of the table
|
377
|
-
# @param
|
377
|
+
# @param batch_input_hub_db_table_row_v3_request [BatchInputHubDbTableRowV3Request] JSON array of row objects.
|
378
378
|
# @param [Hash] opts the optional parameters
|
379
379
|
# @return [Object]
|
380
|
-
def batch_replace_draft_table_rows(table_id_or_name,
|
381
|
-
data, _status_code, _headers = batch_replace_draft_table_rows_with_http_info(table_id_or_name,
|
380
|
+
def batch_replace_draft_table_rows(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts = {})
|
381
|
+
data, _status_code, _headers = batch_replace_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts)
|
382
382
|
data
|
383
383
|
end
|
384
384
|
|
385
385
|
# Replace rows in batch in draft table
|
386
386
|
# Replaces multiple rows as a batch in the `draft` version of the table. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row.
|
387
387
|
# @param table_id_or_name [String] The ID or name of the table
|
388
|
-
# @param
|
388
|
+
# @param batch_input_hub_db_table_row_v3_request [BatchInputHubDbTableRowV3Request] JSON array of row objects.
|
389
389
|
# @param [Hash] opts the optional parameters
|
390
390
|
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
391
|
-
def batch_replace_draft_table_rows_with_http_info(table_id_or_name,
|
391
|
+
def batch_replace_draft_table_rows_with_http_info(table_id_or_name, batch_input_hub_db_table_row_v3_request, opts = {})
|
392
392
|
if @api_client.config.debugging
|
393
393
|
@api_client.config.logger.debug 'Calling API: RowsBatchApi.batch_replace_draft_table_rows ...'
|
394
394
|
end
|
@@ -396,9 +396,9 @@ module Hubspot
|
|
396
396
|
if @api_client.config.client_side_validation && table_id_or_name.nil?
|
397
397
|
fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling RowsBatchApi.batch_replace_draft_table_rows"
|
398
398
|
end
|
399
|
-
# verify the required parameter '
|
400
|
-
if @api_client.config.client_side_validation &&
|
401
|
-
fail ArgumentError, "Missing the required parameter '
|
399
|
+
# verify the required parameter 'batch_input_hub_db_table_row_v3_request' is set
|
400
|
+
if @api_client.config.client_side_validation && batch_input_hub_db_table_row_v3_request.nil?
|
401
|
+
fail ArgumentError, "Missing the required parameter 'batch_input_hub_db_table_row_v3_request' when calling RowsBatchApi.batch_replace_draft_table_rows"
|
402
402
|
end
|
403
403
|
# resource path
|
404
404
|
local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/replace'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))
|
@@ -417,7 +417,7 @@ module Hubspot
|
|
417
417
|
form_params = opts[:form_params] || {}
|
418
418
|
|
419
419
|
# http body (model)
|
420
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
420
|
+
post_body = opts[:body] || @api_client.object_to_http_body(batch_input_hub_db_table_row_v3_request)
|
421
421
|
|
422
422
|
# return_type
|
423
423
|
return_type = opts[:return_type] || 'Object'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#HubDB endpoints
|
3
3
|
|
4
|
-
#HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `
|
4
|
+
#HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `published` versions. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the published version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
@@ -22,7 +22,7 @@ module Hubspot
|
|
22
22
|
@api_client = api_client
|
23
23
|
end
|
24
24
|
# Archive a table
|
25
|
-
# Archive (soft delete) an existing HubDB table. This archives both the
|
25
|
+
# Archive (soft delete) an existing HubDB table. This archives both the published and draft versions.
|
26
26
|
# @param table_id_or_name [String] The ID or name of the table to archive.
|
27
27
|
# @param [Hash] opts the optional parameters
|
28
28
|
# @return [nil]
|
@@ -32,7 +32,7 @@ module Hubspot
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# Archive a table
|
35
|
-
# Archive (soft delete) an existing HubDB table. This archives both the
|
35
|
+
# Archive (soft delete) an existing HubDB table. This archives both the published and draft versions.
|
36
36
|
# @param table_id_or_name [String] The ID or name of the table to archive.
|
37
37
|
# @param [Hash] opts the optional parameters
|
38
38
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
@@ -155,26 +155,26 @@ module Hubspot
|
|
155
155
|
|
156
156
|
# Create a new table
|
157
157
|
# Creates a new draft HubDB table given a JSON schema. The table name and label should be unique for each account.
|
158
|
-
# @param
|
158
|
+
# @param hub_db_table_v3_request [HubDbTableV3Request] The JSON schema for the table being created.
|
159
159
|
# @param [Hash] opts the optional parameters
|
160
160
|
# @return [HubDbTableV3]
|
161
|
-
def create_table(
|
162
|
-
data, _status_code, _headers = create_table_with_http_info(
|
161
|
+
def create_table(hub_db_table_v3_request, opts = {})
|
162
|
+
data, _status_code, _headers = create_table_with_http_info(hub_db_table_v3_request, opts)
|
163
163
|
data
|
164
164
|
end
|
165
165
|
|
166
166
|
# Create a new table
|
167
167
|
# Creates a new draft HubDB table given a JSON schema. The table name and label should be unique for each account.
|
168
|
-
# @param
|
168
|
+
# @param hub_db_table_v3_request [HubDbTableV3Request] The JSON schema for the table being created.
|
169
169
|
# @param [Hash] opts the optional parameters
|
170
170
|
# @return [Array<(HubDbTableV3, Integer, Hash)>] HubDbTableV3 data, response status code and response headers
|
171
|
-
def create_table_with_http_info(
|
171
|
+
def create_table_with_http_info(hub_db_table_v3_request, opts = {})
|
172
172
|
if @api_client.config.debugging
|
173
173
|
@api_client.config.logger.debug 'Calling API: TablesApi.create_table ...'
|
174
174
|
end
|
175
|
-
# verify the required parameter '
|
176
|
-
if @api_client.config.client_side_validation &&
|
177
|
-
fail ArgumentError, "Missing the required parameter '
|
175
|
+
# verify the required parameter 'hub_db_table_v3_request' is set
|
176
|
+
if @api_client.config.client_side_validation && hub_db_table_v3_request.nil?
|
177
|
+
fail ArgumentError, "Missing the required parameter 'hub_db_table_v3_request' when calling TablesApi.create_table"
|
178
178
|
end
|
179
179
|
# resource path
|
180
180
|
local_var_path = '/cms/v3/hubdb/tables'
|
@@ -193,7 +193,7 @@ module Hubspot
|
|
193
193
|
form_params = opts[:form_params] || {}
|
194
194
|
|
195
195
|
# http body (model)
|
196
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
196
|
+
post_body = opts[:body] || @api_client.object_to_http_body(hub_db_table_v3_request)
|
197
197
|
|
198
198
|
# return_type
|
199
199
|
return_type = opts[:return_type] || 'HubDbTableV3'
|
@@ -283,7 +283,7 @@ module Hubspot
|
|
283
283
|
end
|
284
284
|
|
285
285
|
# Export a published version of a table
|
286
|
-
# Exports the `
|
286
|
+
# Exports the `published` version of a table to CSV / EXCEL format.
|
287
287
|
# @param table_id_or_name [String] The ID or name of the table to export.
|
288
288
|
# @param [Hash] opts the optional parameters
|
289
289
|
# @option opts [String] :format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`.
|
@@ -294,7 +294,7 @@ module Hubspot
|
|
294
294
|
end
|
295
295
|
|
296
296
|
# Export a published version of a table
|
297
|
-
# Exports the `
|
297
|
+
# Exports the `published` version of a table to CSV / EXCEL format.
|
298
298
|
# @param table_id_or_name [String] The ID or name of the table to export.
|
299
299
|
# @param [Hash] opts the optional parameters
|
300
300
|
# @option opts [String] :format The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`.
|
@@ -350,16 +350,16 @@ module Hubspot
|
|
350
350
|
# Return all draft tables
|
351
351
|
# Returns the details for each draft table defined in the specified account, including column definitions.
|
352
352
|
# @param [Hash] opts the optional parameters
|
353
|
-
# @option opts [DateTime] :updated_after Only return tables last updated after the specified time.
|
354
|
-
# @option opts [DateTime] :updated_before Only return tables last updated before the specified time.
|
355
353
|
# @option opts [Array<String>] :sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default.
|
354
|
+
# @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
|
355
|
+
# @option opts [Integer] :limit The maximum number of results to return. Default is 1000.
|
356
356
|
# @option opts [DateTime] :created_at Only return tables created at exactly the specified time.
|
357
357
|
# @option opts [DateTime] :created_after Only return tables created after the specified time.
|
358
|
-
# @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
|
359
|
-
# @option opts [Boolean] :archived Specifies whether to return archived tables. Defaults to `false`.
|
360
358
|
# @option opts [DateTime] :created_before Only return tables created before the specified time.
|
361
359
|
# @option opts [DateTime] :updated_at Only return tables last updated at exactly the specified time.
|
362
|
-
# @option opts [
|
360
|
+
# @option opts [DateTime] :updated_after Only return tables last updated after the specified time.
|
361
|
+
# @option opts [DateTime] :updated_before Only return tables last updated before the specified time.
|
362
|
+
# @option opts [Boolean] :archived Specifies whether to return archived tables. Defaults to `false`.
|
363
363
|
# @return [CollectionResponseWithTotalHubDbTableV3ForwardPaging]
|
364
364
|
def get_all_draft_tables(opts = {})
|
365
365
|
data, _status_code, _headers = get_all_draft_tables_with_http_info(opts)
|
@@ -369,16 +369,16 @@ module Hubspot
|
|
369
369
|
# Return all draft tables
|
370
370
|
# Returns the details for each draft table defined in the specified account, including column definitions.
|
371
371
|
# @param [Hash] opts the optional parameters
|
372
|
-
# @option opts [DateTime] :updated_after Only return tables last updated after the specified time.
|
373
|
-
# @option opts [DateTime] :updated_before Only return tables last updated before the specified time.
|
374
372
|
# @option opts [Array<String>] :sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default.
|
373
|
+
# @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
|
374
|
+
# @option opts [Integer] :limit The maximum number of results to return. Default is 1000.
|
375
375
|
# @option opts [DateTime] :created_at Only return tables created at exactly the specified time.
|
376
376
|
# @option opts [DateTime] :created_after Only return tables created after the specified time.
|
377
|
-
# @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
|
378
|
-
# @option opts [Boolean] :archived Specifies whether to return archived tables. Defaults to `false`.
|
379
377
|
# @option opts [DateTime] :created_before Only return tables created before the specified time.
|
380
378
|
# @option opts [DateTime] :updated_at Only return tables last updated at exactly the specified time.
|
381
|
-
# @option opts [
|
379
|
+
# @option opts [DateTime] :updated_after Only return tables last updated after the specified time.
|
380
|
+
# @option opts [DateTime] :updated_before Only return tables last updated before the specified time.
|
381
|
+
# @option opts [Boolean] :archived Specifies whether to return archived tables. Defaults to `false`.
|
382
382
|
# @return [Array<(CollectionResponseWithTotalHubDbTableV3ForwardPaging, Integer, Hash)>] CollectionResponseWithTotalHubDbTableV3ForwardPaging data, response status code and response headers
|
383
383
|
def get_all_draft_tables_with_http_info(opts = {})
|
384
384
|
if @api_client.config.debugging
|
@@ -389,16 +389,16 @@ module Hubspot
|
|
389
389
|
|
390
390
|
# query parameters
|
391
391
|
query_params = opts[:query_params] || {}
|
392
|
-
query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
|
393
|
-
query_params[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil?
|
394
392
|
query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?
|
393
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
394
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
395
395
|
query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil?
|
396
396
|
query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
397
|
-
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
398
|
-
query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
|
399
397
|
query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
400
398
|
query_params[:'updatedAt'] = opts[:'updated_at'] if !opts[:'updated_at'].nil?
|
401
|
-
query_params[:'
|
399
|
+
query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
|
400
|
+
query_params[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil?
|
401
|
+
query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
|
402
402
|
|
403
403
|
# header parameters
|
404
404
|
header_params = opts[:header_params] || {}
|
@@ -433,38 +433,38 @@ module Hubspot
|
|
433
433
|
return data, status_code, headers
|
434
434
|
end
|
435
435
|
|
436
|
-
# Get all
|
437
|
-
# Returns the details for the `
|
436
|
+
# Get all published tables
|
437
|
+
# Returns the details for the `published` version of each table defined in an account, including column definitions.
|
438
438
|
# @param [Hash] opts the optional parameters
|
439
|
-
# @option opts [DateTime] :updated_after Only return tables last updated after the specified time.
|
440
|
-
# @option opts [DateTime] :updated_before Only return tables last updated before the specified time.
|
441
439
|
# @option opts [Array<String>] :sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default.
|
440
|
+
# @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
|
441
|
+
# @option opts [Integer] :limit The maximum number of results to return. Default is 1000.
|
442
442
|
# @option opts [DateTime] :created_at Only return tables created at exactly the specified time.
|
443
443
|
# @option opts [DateTime] :created_after Only return tables created after the specified time.
|
444
|
-
# @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
|
445
|
-
# @option opts [Boolean] :archived Specifies whether to return archived tables. Defaults to `false`.
|
446
444
|
# @option opts [DateTime] :created_before Only return tables created before the specified time.
|
447
445
|
# @option opts [DateTime] :updated_at Only return tables last updated at exactly the specified time.
|
448
|
-
# @option opts [
|
446
|
+
# @option opts [DateTime] :updated_after Only return tables last updated after the specified time.
|
447
|
+
# @option opts [DateTime] :updated_before Only return tables last updated before the specified time.
|
448
|
+
# @option opts [Boolean] :archived Specifies whether to return archived tables. Defaults to `false`.
|
449
449
|
# @return [CollectionResponseWithTotalHubDbTableV3ForwardPaging]
|
450
450
|
def get_all_tables(opts = {})
|
451
451
|
data, _status_code, _headers = get_all_tables_with_http_info(opts)
|
452
452
|
data
|
453
453
|
end
|
454
454
|
|
455
|
-
# Get all
|
456
|
-
# Returns the details for the `
|
455
|
+
# Get all published tables
|
456
|
+
# Returns the details for the `published` version of each table defined in an account, including column definitions.
|
457
457
|
# @param [Hash] opts the optional parameters
|
458
|
-
# @option opts [DateTime] :updated_after Only return tables last updated after the specified time.
|
459
|
-
# @option opts [DateTime] :updated_before Only return tables last updated before the specified time.
|
460
458
|
# @option opts [Array<String>] :sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default.
|
459
|
+
# @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
|
460
|
+
# @option opts [Integer] :limit The maximum number of results to return. Default is 1000.
|
461
461
|
# @option opts [DateTime] :created_at Only return tables created at exactly the specified time.
|
462
462
|
# @option opts [DateTime] :created_after Only return tables created after the specified time.
|
463
|
-
# @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.
|
464
|
-
# @option opts [Boolean] :archived Specifies whether to return archived tables. Defaults to `false`.
|
465
463
|
# @option opts [DateTime] :created_before Only return tables created before the specified time.
|
466
464
|
# @option opts [DateTime] :updated_at Only return tables last updated at exactly the specified time.
|
467
|
-
# @option opts [
|
465
|
+
# @option opts [DateTime] :updated_after Only return tables last updated after the specified time.
|
466
|
+
# @option opts [DateTime] :updated_before Only return tables last updated before the specified time.
|
467
|
+
# @option opts [Boolean] :archived Specifies whether to return archived tables. Defaults to `false`.
|
468
468
|
# @return [Array<(CollectionResponseWithTotalHubDbTableV3ForwardPaging, Integer, Hash)>] CollectionResponseWithTotalHubDbTableV3ForwardPaging data, response status code and response headers
|
469
469
|
def get_all_tables_with_http_info(opts = {})
|
470
470
|
if @api_client.config.debugging
|
@@ -475,16 +475,16 @@ module Hubspot
|
|
475
475
|
|
476
476
|
# query parameters
|
477
477
|
query_params = opts[:query_params] || {}
|
478
|
-
query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
|
479
|
-
query_params[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil?
|
480
478
|
query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?
|
479
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
480
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
481
481
|
query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil?
|
482
482
|
query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
483
|
-
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
484
|
-
query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
|
485
483
|
query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
486
484
|
query_params[:'updatedAt'] = opts[:'updated_at'] if !opts[:'updated_at'].nil?
|
487
|
-
query_params[:'
|
485
|
+
query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
|
486
|
+
query_params[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil?
|
487
|
+
query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
|
488
488
|
|
489
489
|
# header parameters
|
490
490
|
header_params = opts[:header_params] || {}
|
@@ -587,8 +587,8 @@ module Hubspot
|
|
587
587
|
return data, status_code, headers
|
588
588
|
end
|
589
589
|
|
590
|
-
# Get details for a
|
591
|
-
# Returns the details for the `
|
590
|
+
# Get details for a published table
|
591
|
+
# Returns the details for the `published` version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access.
|
592
592
|
# @param table_id_or_name [String] The ID or name of the table to return.
|
593
593
|
# @param [Hash] opts the optional parameters
|
594
594
|
# @option opts [Boolean] :archived Set this to `true` to return details for an archived table. Defaults to `false`.
|
@@ -599,8 +599,8 @@ module Hubspot
|
|
599
599
|
data
|
600
600
|
end
|
601
601
|
|
602
|
-
# Get details for a
|
603
|
-
# Returns the details for the `
|
602
|
+
# Get details for a published table
|
603
|
+
# Returns the details for the `published` version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. **Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access.
|
604
604
|
# @param table_id_or_name [String] The ID or name of the table to return.
|
605
605
|
# @param [Hash] opts the optional parameters
|
606
606
|
# @option opts [Boolean] :archived Set this to `true` to return details for an archived table. Defaults to `false`.
|
@@ -656,11 +656,11 @@ module Hubspot
|
|
656
656
|
end
|
657
657
|
|
658
658
|
# Import data into draft table
|
659
|
-
# Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/
|
659
|
+
# Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/publish` endpoint to push these changes to `published` version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import.
|
660
660
|
# @param table_id_or_name [String] The ID of the destination table where data will be imported.
|
661
661
|
# @param [Hash] opts the optional parameters
|
662
|
-
# @option opts [File] :file The source CSV file to be imported.
|
663
662
|
# @option opts [String] :config Configuration for the import in JSON format as described above.
|
663
|
+
# @option opts [File] :file The source CSV file to be imported.
|
664
664
|
# @return [ImportResult]
|
665
665
|
def import_draft_table(table_id_or_name, opts = {})
|
666
666
|
data, _status_code, _headers = import_draft_table_with_http_info(table_id_or_name, opts)
|
@@ -668,11 +668,11 @@ module Hubspot
|
|
668
668
|
end
|
669
669
|
|
670
670
|
# Import data into draft table
|
671
|
-
# Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/
|
671
|
+
# Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the `draft` version of the table. Use `/publish` endpoint to push these changes to `published` version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import.
|
672
672
|
# @param table_id_or_name [String] The ID of the destination table where data will be imported.
|
673
673
|
# @param [Hash] opts the optional parameters
|
674
|
-
# @option opts [File] :file The source CSV file to be imported.
|
675
674
|
# @option opts [String] :config Configuration for the import in JSON format as described above.
|
675
|
+
# @option opts [File] :file The source CSV file to be imported.
|
676
676
|
# @return [Array<(ImportResult, Integer, Hash)>] ImportResult data, response status code and response headers
|
677
677
|
def import_draft_table_with_http_info(table_id_or_name, opts = {})
|
678
678
|
if @api_client.config.debugging
|
@@ -697,8 +697,8 @@ module Hubspot
|
|
697
697
|
|
698
698
|
# form parameters
|
699
699
|
form_params = opts[:form_params] || {}
|
700
|
-
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
701
700
|
form_params['config'] = opts[:'config'] if !opts[:'config'].nil?
|
701
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
702
702
|
|
703
703
|
# http body (model)
|
704
704
|
post_body = opts[:body]
|
@@ -726,7 +726,7 @@ module Hubspot
|
|
726
726
|
end
|
727
727
|
|
728
728
|
# Publish a table from draft
|
729
|
-
#
|
729
|
+
# Publishes the table by copying the data and table schema changes from draft version to the published version, meaning any website pages using data from the table will be updated.
|
730
730
|
# @param table_id_or_name [String] The ID or name of the table to publish.
|
731
731
|
# @param [Hash] opts the optional parameters
|
732
732
|
# @option opts [Boolean] :include_foreign_ids Set this to `true` to populate foreign ID values in the response.
|
@@ -737,7 +737,7 @@ module Hubspot
|
|
737
737
|
end
|
738
738
|
|
739
739
|
# Publish a table from draft
|
740
|
-
#
|
740
|
+
# Publishes the table by copying the data and table schema changes from draft version to the published version, meaning any website pages using data from the table will be updated.
|
741
741
|
# @param table_id_or_name [String] The ID or name of the table to publish.
|
742
742
|
# @param [Hash] opts the optional parameters
|
743
743
|
# @option opts [Boolean] :include_foreign_ids Set this to `true` to populate foreign ID values in the response.
|
@@ -751,7 +751,7 @@ module Hubspot
|
|
751
751
|
fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling TablesApi.publish_draft_table"
|
752
752
|
end
|
753
753
|
# resource path
|
754
|
-
local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/draft/
|
754
|
+
local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/draft/publish'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))
|
755
755
|
|
756
756
|
# query parameters
|
757
757
|
query_params = opts[:query_params] || {}
|
@@ -791,7 +791,7 @@ module Hubspot
|
|
791
791
|
end
|
792
792
|
|
793
793
|
# Reset a draft table
|
794
|
-
# Replaces the data in the `draft` version of the table with values from the `
|
794
|
+
# Replaces the data in the `draft` version of the table with values from the `published` version. Any unpublished changes in the `draft` will be lost after this call is made.
|
795
795
|
# @param table_id_or_name [String] The ID or name of the table to reset.
|
796
796
|
# @param [Hash] opts the optional parameters
|
797
797
|
# @option opts [Boolean] :include_foreign_ids Set this to `true` to populate foreign ID values in the response.
|
@@ -802,7 +802,7 @@ module Hubspot
|
|
802
802
|
end
|
803
803
|
|
804
804
|
# Reset a draft table
|
805
|
-
# Replaces the data in the `draft` version of the table with values from the `
|
805
|
+
# Replaces the data in the `draft` version of the table with values from the `published` version. Any unpublished changes in the `draft` will be lost after this call is made.
|
806
806
|
# @param table_id_or_name [String] The ID or name of the table to reset.
|
807
807
|
# @param [Hash] opts the optional parameters
|
808
808
|
# @option opts [Boolean] :include_foreign_ids Set this to `true` to populate foreign ID values in the response.
|
@@ -855,39 +855,33 @@ module Hubspot
|
|
855
855
|
return data, status_code, headers
|
856
856
|
end
|
857
857
|
|
858
|
-
#
|
859
|
-
#
|
860
|
-
# @param table_id_or_name [String] The ID or name of the table to
|
861
|
-
# @param hub_db_table_v3_input [HubDbTableV3Input] The JSON schema for the table being updated.
|
858
|
+
# Unpublish a table
|
859
|
+
# Unpublishes the table, meaning any website pages using data from the table will not render any data.
|
860
|
+
# @param table_id_or_name [String] The ID or name of the table to publish.
|
862
861
|
# @param [Hash] opts the optional parameters
|
863
|
-
# @option opts [Boolean] :include_foreign_ids Set this to `true` to populate foreign ID values in the
|
862
|
+
# @option opts [Boolean] :include_foreign_ids Set this to `true` to populate foreign ID values in the response.
|
864
863
|
# @return [HubDbTableV3]
|
865
|
-
def
|
866
|
-
data, _status_code, _headers =
|
864
|
+
def unpublish_table(table_id_or_name, opts = {})
|
865
|
+
data, _status_code, _headers = unpublish_table_with_http_info(table_id_or_name, opts)
|
867
866
|
data
|
868
867
|
end
|
869
868
|
|
870
|
-
#
|
871
|
-
#
|
872
|
-
# @param table_id_or_name [String] The ID or name of the table to
|
873
|
-
# @param hub_db_table_v3_input [HubDbTableV3Input] The JSON schema for the table being updated.
|
869
|
+
# Unpublish a table
|
870
|
+
# Unpublishes the table, meaning any website pages using data from the table will not render any data.
|
871
|
+
# @param table_id_or_name [String] The ID or name of the table to publish.
|
874
872
|
# @param [Hash] opts the optional parameters
|
875
|
-
# @option opts [Boolean] :include_foreign_ids Set this to `true` to populate foreign ID values in the
|
873
|
+
# @option opts [Boolean] :include_foreign_ids Set this to `true` to populate foreign ID values in the response.
|
876
874
|
# @return [Array<(HubDbTableV3, Integer, Hash)>] HubDbTableV3 data, response status code and response headers
|
877
|
-
def
|
875
|
+
def unpublish_table_with_http_info(table_id_or_name, opts = {})
|
878
876
|
if @api_client.config.debugging
|
879
|
-
@api_client.config.logger.debug 'Calling API: TablesApi.
|
877
|
+
@api_client.config.logger.debug 'Calling API: TablesApi.unpublish_table ...'
|
880
878
|
end
|
881
879
|
# verify the required parameter 'table_id_or_name' is set
|
882
880
|
if @api_client.config.client_side_validation && table_id_or_name.nil?
|
883
|
-
fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling TablesApi.
|
884
|
-
end
|
885
|
-
# verify the required parameter 'hub_db_table_v3_input' is set
|
886
|
-
if @api_client.config.client_side_validation && hub_db_table_v3_input.nil?
|
887
|
-
fail ArgumentError, "Missing the required parameter 'hub_db_table_v3_input' when calling TablesApi.update_draft_table"
|
881
|
+
fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling TablesApi.unpublish_table"
|
888
882
|
end
|
889
883
|
# resource path
|
890
|
-
local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/
|
884
|
+
local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/unpublish'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))
|
891
885
|
|
892
886
|
# query parameters
|
893
887
|
query_params = opts[:query_params] || {}
|
@@ -897,14 +891,12 @@ module Hubspot
|
|
897
891
|
header_params = opts[:header_params] || {}
|
898
892
|
# HTTP header 'Accept' (if needed)
|
899
893
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
900
|
-
# HTTP header 'Content-Type'
|
901
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
902
894
|
|
903
895
|
# form parameters
|
904
896
|
form_params = opts[:form_params] || {}
|
905
897
|
|
906
898
|
# http body (model)
|
907
|
-
post_body = opts[:body]
|
899
|
+
post_body = opts[:body]
|
908
900
|
|
909
901
|
# return_type
|
910
902
|
return_type = opts[:return_type] || 'HubDbTableV3'
|
@@ -921,48 +913,48 @@ module Hubspot
|
|
921
913
|
:return_type => return_type
|
922
914
|
)
|
923
915
|
|
924
|
-
data, status_code, headers = @api_client.call_api(:
|
916
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
925
917
|
if @api_client.config.debugging
|
926
|
-
@api_client.config.logger.debug "API called: TablesApi#
|
918
|
+
@api_client.config.logger.debug "API called: TablesApi#unpublish_table\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
927
919
|
end
|
928
920
|
return data, status_code, headers
|
929
921
|
end
|
930
922
|
|
931
|
-
#
|
932
|
-
#
|
933
|
-
# @param table_id_or_name [String] The ID or name of the table to
|
934
|
-
# @param
|
923
|
+
# Update an existing table
|
924
|
+
# Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the `draft` verion of the table. Use `publish` endpoint to push all the changes to the `published` version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted.
|
925
|
+
# @param table_id_or_name [String] The ID or name of the table to update.
|
926
|
+
# @param hub_db_table_v3_request [HubDbTableV3Request] The JSON schema for the table being updated.
|
935
927
|
# @param [Hash] opts the optional parameters
|
936
|
-
# @option opts [Boolean] :archived
|
928
|
+
# @option opts [Boolean] :archived Specifies whether to return archived tables. Defaults to `false`.
|
937
929
|
# @option opts [Boolean] :include_foreign_ids Set this to `true` to populate foreign ID values in the result.
|
938
930
|
# @return [HubDbTableV3]
|
939
|
-
def
|
940
|
-
data, _status_code, _headers =
|
931
|
+
def update_draft_table(table_id_or_name, hub_db_table_v3_request, opts = {})
|
932
|
+
data, _status_code, _headers = update_draft_table_with_http_info(table_id_or_name, hub_db_table_v3_request, opts)
|
941
933
|
data
|
942
934
|
end
|
943
935
|
|
944
|
-
#
|
945
|
-
#
|
946
|
-
# @param table_id_or_name [String] The ID or name of the table to
|
947
|
-
# @param
|
936
|
+
# Update an existing table
|
937
|
+
# Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the `draft` verion of the table. Use `publish` endpoint to push all the changes to the `published` version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body. **Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted.
|
938
|
+
# @param table_id_or_name [String] The ID or name of the table to update.
|
939
|
+
# @param hub_db_table_v3_request [HubDbTableV3Request] The JSON schema for the table being updated.
|
948
940
|
# @param [Hash] opts the optional parameters
|
949
|
-
# @option opts [Boolean] :archived
|
941
|
+
# @option opts [Boolean] :archived Specifies whether to return archived tables. Defaults to `false`.
|
950
942
|
# @option opts [Boolean] :include_foreign_ids Set this to `true` to populate foreign ID values in the result.
|
951
943
|
# @return [Array<(HubDbTableV3, Integer, Hash)>] HubDbTableV3 data, response status code and response headers
|
952
|
-
def
|
944
|
+
def update_draft_table_with_http_info(table_id_or_name, hub_db_table_v3_request, opts = {})
|
953
945
|
if @api_client.config.debugging
|
954
|
-
@api_client.config.logger.debug 'Calling API: TablesApi.
|
946
|
+
@api_client.config.logger.debug 'Calling API: TablesApi.update_draft_table ...'
|
955
947
|
end
|
956
948
|
# verify the required parameter 'table_id_or_name' is set
|
957
949
|
if @api_client.config.client_side_validation && table_id_or_name.nil?
|
958
|
-
fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling TablesApi.
|
950
|
+
fail ArgumentError, "Missing the required parameter 'table_id_or_name' when calling TablesApi.update_draft_table"
|
959
951
|
end
|
960
|
-
# verify the required parameter '
|
961
|
-
if @api_client.config.client_side_validation &&
|
962
|
-
fail ArgumentError, "Missing the required parameter '
|
952
|
+
# verify the required parameter 'hub_db_table_v3_request' is set
|
953
|
+
if @api_client.config.client_side_validation && hub_db_table_v3_request.nil?
|
954
|
+
fail ArgumentError, "Missing the required parameter 'hub_db_table_v3_request' when calling TablesApi.update_draft_table"
|
963
955
|
end
|
964
956
|
# resource path
|
965
|
-
local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))
|
957
|
+
local_var_path = '/cms/v3/hubdb/tables/{tableIdOrName}/draft'.sub('{' + 'tableIdOrName' + '}', CGI.escape(table_id_or_name.to_s))
|
966
958
|
|
967
959
|
# query parameters
|
968
960
|
query_params = opts[:query_params] || {}
|
@@ -980,7 +972,7 @@ module Hubspot
|
|
980
972
|
form_params = opts[:form_params] || {}
|
981
973
|
|
982
974
|
# http body (model)
|
983
|
-
post_body = opts[:body] || @api_client.object_to_http_body(
|
975
|
+
post_body = opts[:body] || @api_client.object_to_http_body(hub_db_table_v3_request)
|
984
976
|
|
985
977
|
# return_type
|
986
978
|
return_type = opts[:return_type] || 'HubDbTableV3'
|
@@ -999,7 +991,7 @@ module Hubspot
|
|
999
991
|
|
1000
992
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1001
993
|
if @api_client.config.debugging
|
1002
|
-
@api_client.config.logger.debug "API called: TablesApi#
|
994
|
+
@api_client.config.logger.debug "API called: TablesApi#update_draft_table\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1003
995
|
end
|
1004
996
|
return data, status_code, headers
|
1005
997
|
end
|