Class: HubSpotSDK::Resources::Cms::Hubdb::Rows
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Cms::Hubdb::Rows
- Defined in:
- lib/hubspot_sdk/resources/cms/hubdb/rows.rb
Instance Method Summary collapse
-
#clone_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Clones rows in the draft version of the specified table, given a set of row ids.
-
#clone_draft(row_id, table_id_or_name:, name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Clones a single row in the draft version of a table.
-
#create(table_id_or_name, child_table_id:, display_index:, values:, name: nil, path: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Some parameter documentations has been truncated, see Models::Cms::Hubdb::RowCreateParams for more details.
-
#create_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Creates rows in the draft version of the specified table, given an array of row objects.
-
#delete_draft(row_id, table_id_or_name:, request_options: {}) ⇒ nil
Permanently deletes a row from a table’s draft version.
-
#get(row_id, table_id_or_name:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Get a single row by ID from the published version of a table.
-
#get_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Returns rows in the published version of the specified table, given a set of row IDs.
-
#get_draft(row_id, table_id_or_name:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Get a single row by ID from a table’s draft version.
-
#get_draft_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Returns rows in the draft version of the specified table, given a set of row IDs.
-
#initialize(client:) ⇒ Rows
constructor
private
A new instance of Rows.
-
#list(table_id_or_name, after: nil, archived: nil, limit: nil, offset: nil, properties: nil, sort: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::RandomAccessCollectionResponseWithTotalHubDBTableRowV3, HubSpotSDK::Models::Cms::StreamingCollectionResponseWithTotalHubDBTableRowV3
Some parameter documentations has been truncated, see Models::Cms::Hubdb::RowListParams for more details.
-
#purge_batch(table_id_or_name, inputs:, request_options: {}) ⇒ nil
Permanently delete rows from the draft version of a table, given a set of row IDs.
-
#replace_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Replaces multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call.
-
#replace_draft(row_id, table_id_or_name:, child_table_id:, display_index:, values:, name: nil, path: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Some parameter documentations has been truncated, see Models::Cms::Hubdb::RowReplaceDraftParams for more details.
-
#update_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Updates multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call.
-
#update_draft(row_id, table_id_or_name:, child_table_id:, display_index:, values:, name: nil, path: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Some parameter documentations has been truncated, see Models::Cms::Hubdb::RowUpdateDraftParams for more details.
Constructor Details
#initialize(client:) ⇒ Rows
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Rows.
476 477 478 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 476 def initialize(client:) @client = client end |
Instance Method Details
#clone_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Clones rows in the draft version of the specified table, given a set of row ids. Maximum of 100 row ids per call.
104 105 106 107 108 109 110 111 112 113 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 104 def clone_batch(table_id_or_name, params) parsed, = HubSpotSDK::Cms::Hubdb::RowCloneBatchParams.dump_request(params) @client.request( method: :post, path: ["cms/hubdb/2026-03/tables/%1$s/rows/draft/batch/clone", table_id_or_name], body: parsed, model: HubSpotSDK::Cms::BatchResponseHubDBTableRowV3, options: ) end |
#clone_draft(row_id, table_id_or_name:, name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Clones a single row in the draft version of a table.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 130 def clone_draft(row_id, params) parsed, = HubSpotSDK::Cms::Hubdb::RowCloneDraftParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) table_id_or_name = parsed.delete(:table_id_or_name) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["cms/hubdb/2026-03/tables/%1$s/rows/%2$s/draft/clone", table_id_or_name, row_id], query: query, model: HubSpotSDK::Cms::HubDBTableRowV3, options: ) end |
#create(table_id_or_name, child_table_id:, display_index:, values:, name: nil, path: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Some parameter documentations has been truncated, see Models::Cms::Hubdb::RowCreateParams for more details.
Add a new row to a HubDB table. New rows will be added to the draft version of the table. Use the ‘/publish` endpoint to push these changes to published version.
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 34 def create(table_id_or_name, params) parsed, = HubSpotSDK::Cms::Hubdb::RowCreateParams.dump_request(params) @client.request( method: :post, path: ["cms/hubdb/2026-03/tables/%1$s/rows", table_id_or_name], body: parsed, model: HubSpotSDK::Cms::HubDBTableRowV3, options: ) end |
#create_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Creates rows in the draft version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example.
159 160 161 162 163 164 165 166 167 168 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 159 def create_batch(table_id_or_name, params) parsed, = HubSpotSDK::Cms::Hubdb::RowCreateBatchParams.dump_request(params) @client.request( method: :post, path: ["cms/hubdb/2026-03/tables/%1$s/rows/draft/batch/create", table_id_or_name], body: parsed, model: HubSpotSDK::Cms::BatchResponseHubDBTableRowV3, options: ) end |
#delete_draft(row_id, table_id_or_name:, request_options: {}) ⇒ nil
Permanently deletes a row from a table’s draft version.
181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 181 def delete_draft(row_id, params) parsed, = HubSpotSDK::Cms::Hubdb::RowDeleteDraftParams.dump_request(params) table_id_or_name = parsed.delete(:table_id_or_name) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["cms/hubdb/2026-03/tables/%1$s/rows/%2$s/draft", table_id_or_name, row_id], model: NilClass, options: ) end |
#get(row_id, table_id_or_name:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Get a single row by ID from the published version of a table. Note: This endpoint can be accessed without any authentication, if the table is set to be allowed for public access.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 212 def get(row_id, params) parsed, = HubSpotSDK::Cms::Hubdb::RowGetParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) table_id_or_name = parsed.delete(:table_id_or_name) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["cms/hubdb/2026-03/tables/%1$s/rows/%2$s", table_id_or_name, row_id], query: query, model: HubSpotSDK::Cms::HubDBTableRowV3, options: ) end |
#get_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
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.
243 244 245 246 247 248 249 250 251 252 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 243 def get_batch(table_id_or_name, params) parsed, = HubSpotSDK::Cms::Hubdb::RowGetBatchParams.dump_request(params) @client.request( method: :post, path: ["cms/hubdb/2026-03/tables/%1$s/rows/batch/read", table_id_or_name], body: parsed, model: HubSpotSDK::Cms::BatchResponseHubDBTableRowV3, options: ) end |
#get_draft(row_id, table_id_or_name:, archived: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Get a single row by ID from a table’s draft version.
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 269 def get_draft(row_id, params) parsed, = HubSpotSDK::Cms::Hubdb::RowGetDraftParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) table_id_or_name = parsed.delete(:table_id_or_name) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["cms/hubdb/2026-03/tables/%1$s/rows/%2$s/draft", table_id_or_name, row_id], query: query, model: HubSpotSDK::Cms::HubDBTableRowV3, options: ) end |
#get_draft_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Returns rows in the draft version of the specified table, given a set of row IDs.
299 300 301 302 303 304 305 306 307 308 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 299 def get_draft_batch(table_id_or_name, params) parsed, = HubSpotSDK::Cms::Hubdb::RowGetDraftBatchParams.dump_request(params) @client.request( method: :post, path: ["cms/hubdb/2026-03/tables/%1$s/rows/draft/batch/read", table_id_or_name], body: parsed, model: HubSpotSDK::Cms::BatchResponseHubDBTableRowV3, options: ) end |
#list(table_id_or_name, after: nil, archived: nil, limit: nil, offset: nil, properties: nil, sort: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::RandomAccessCollectionResponseWithTotalHubDBTableRowV3, HubSpotSDK::Models::Cms::StreamingCollectionResponseWithTotalHubDBTableRowV3
Some parameter documentations has been truncated, see Models::Cms::Hubdb::RowListParams for more details.
Returns a set of rows in the published version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters ‘column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options. Note: This endpoint can be accessed without any authentication, if the table is set to be allowed for public access.
80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 80 def list(table_id_or_name, params = {}) parsed, = HubSpotSDK::Cms::Hubdb::RowListParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["cms/hubdb/2026-03/tables/%1$s/rows", table_id_or_name], query: query, model: HubSpotSDK::Cms::UnifiedCollectionResponseWithTotalBaseHubDBTableRowV3, options: ) end |
#purge_batch(table_id_or_name, inputs:, request_options: {}) ⇒ nil
Permanently delete rows from the draft version of a table, given a set of row IDs. Maximum of 100 row IDs per call.
324 325 326 327 328 329 330 331 332 333 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 324 def purge_batch(table_id_or_name, params) parsed, = HubSpotSDK::Cms::Hubdb::RowPurgeBatchParams.dump_request(params) @client.request( method: :post, path: ["cms/hubdb/2026-03/tables/%1$s/rows/draft/batch/purge", table_id_or_name], body: parsed, model: NilClass, options: ) end |
#replace_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Replaces multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint ‘PUT /tables/tableIdOrName/rows/rowId/draft` for details on updating a single row.
349 350 351 352 353 354 355 356 357 358 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 349 def replace_batch(table_id_or_name, params) parsed, = HubSpotSDK::Cms::Hubdb::RowReplaceBatchParams.dump_request(params) @client.request( method: :post, path: ["cms/hubdb/2026-03/tables/%1$s/rows/draft/batch/replace", table_id_or_name], body: parsed, model: HubSpotSDK::Cms::BatchResponseHubDBTableRowV3, options: ) end |
#replace_draft(row_id, table_id_or_name:, child_table_id:, display_index:, values:, name: nil, path: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Some parameter documentations has been truncated, see Models::Cms::Hubdb::RowReplaceDraftParams for more details.
Replace a single row in the draft version of a table. All column values must be specified. If a column has a value in the target table and this request doesn’t define that value, it will be deleted. See the “Create a row” endpoint for instructions on how to format the JSON row definitions.
389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 389 def replace_draft(row_id, params) parsed, = HubSpotSDK::Cms::Hubdb::RowReplaceDraftParams.dump_request(params) table_id_or_name = parsed.delete(:table_id_or_name) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :put, path: ["cms/hubdb/2026-03/tables/%1$s/rows/%2$s/draft", table_id_or_name, row_id], body: parsed, model: HubSpotSDK::Cms::HubDBTableRowV3, options: ) end |
#update_batch(table_id_or_name, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Cms::BatchResponseHubDBTableRowV3
Updates multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint ‘PATCH /tables/tableIdOrName/rows/rowId/draft` for details on updating a single row.
418 419 420 421 422 423 424 425 426 427 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 418 def update_batch(table_id_or_name, params) parsed, = HubSpotSDK::Cms::Hubdb::RowUpdateBatchParams.dump_request(params) @client.request( method: :post, path: ["cms/hubdb/2026-03/tables/%1$s/rows/draft/batch/update", table_id_or_name], body: parsed, model: HubSpotSDK::Cms::BatchResponseHubDBTableRowV3, options: ) end |
#update_draft(row_id, table_id_or_name:, child_table_id:, display_index:, values:, name: nil, path: nil, request_options: {}) ⇒ HubSpotSDK::Models::Cms::HubDBTableRowV3
Some parameter documentations has been truncated, see Models::Cms::Hubdb::RowUpdateDraftParams for more details.
Partially update a single row in the table’s draft version. All the column values need not be specified. Only the columns or fields that needs to be modified can be specified. See the “Create a row” endpoint for instructions on how to format the JSON row definitions.
458 459 460 461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/hubspot_sdk/resources/cms/hubdb/rows.rb', line 458 def update_draft(row_id, params) parsed, = HubSpotSDK::Cms::Hubdb::RowUpdateDraftParams.dump_request(params) table_id_or_name = parsed.delete(:table_id_or_name) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :patch, path: ["cms/hubdb/2026-03/tables/%1$s/rows/%2$s/draft", table_id_or_name, row_id], body: parsed, model: HubSpotSDK::Cms::HubDBTableRowV3, options: ) end |