I've not tested it, so it's just theoretical but - if you don't want to get the list of rows and then loop through them (presumably because there are thousands and it would be quite a lot of API calls) - then I suppose you could just "import" an empty file and send the mode to ReplaceAll rather than Append. It seems like this endpoint creates a job to generate a URL, and the URL could be put there (programmatically)?
/api/v2/flows/datatables/{datatableId}/import/jobs
------------------------------
James Dunn
Pitney Bowes Inc.James Dunn
Pitney Bowes Inc.
------------------------------
Original Message:
Sent: 05-09-2023 10:32
From: ADAM SUGDEN
Subject: Remove multiple rows from a datatable using an API
Hi,
Is it possible to delete all rows of data in a data table without deleting the actual table itself.
For context, we have a data table which is populated with customer numbers and an expiration date, from an outbound survey campaign . The data table is then exported once a month and used for reporting and also a DNC list.
The data needs to be replaced every month so I am looking for a solution to delete all rows in a data table whilst keeping the actual table as the DataTableID is coded in a data action.
I can use DELETE /api/v2/flows/datatables/{datatableId}/rows/{rowId} to delete a single row but I am looking for a solution to delete all rows.
Any help is appreciated.
#ArchitectureandDesign
#Integrations
#Unsure/Other
------------------------------
Adam Sugden
------------------------------