Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Remove multiple rows from a datatable using an API

    Posted 05-09-2023 10:32
    No replies, thread closed.

    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

    ------------------------------


  • 2.  RE: Remove multiple rows from a datatable using an API

    Posted 05-09-2023 10:53
    No replies, thread closed.

    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.
    ------------------------------