Edits history of script submission #388 for ' Bulk delete all items in a NocoDb table (nocodb)'

  • deno
    import { Resource } from "https://deno.land/x/windmill/mod.ts";
    export async function main(
      nocodb: Resource<"nocodb">,
    ) {
      // create row in nocodb
      const res = await fetch(`${nocodb.apiUrl}/api/v1/db/data/bulk/v1/${nocodb.workspace}/${nocodb.table}/all`, {
        method: "DELETE",
        headers: {
          "Content-Type": "application/json",
          "xc-token": nocodb.xc_token,
        }
      })
      const data = await res.json()
      return data
    }

    Submitted by yassinsiouda74165 1071 days ago